/* ===== Code Bleu — styles ===== */

:root {
  --blue: #2E3AC7;
  --blue-dark: #232f9e;
  --yellow: #F5A623;
  --light: #EEF3FF;
  --dark: #0F172A;
  --white: #FFFFFF;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 18px 40px rgba(15, 23, 42, 0.14);
  --container: 1160px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 10px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }

.btn-white {
  background: var(--white);
  color: var(--blue);
}
.btn-white:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.18); }

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-blue {
  background: var(--blue);
  color: var(--white);
  border: none;
}
.btn-blue:hover { background: var(--blue-dark); box-shadow: 0 10px 24px rgba(46,58,199,0.35); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blue);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  flex-shrink: 0;
}
.logo-mark { color: var(--white); flex-shrink: 0; }
.logo-word {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 34px;
}
.main-nav a {
  color: var(--white);
  font-weight: 500;
  opacity: 0.92;
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover { opacity: 1; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--yellow);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.main-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* Mobile dropdown nav */
@media (max-width: 899px) {
  .main-nav {
    position: absolute;
    top: 76px;
    left: 0; right: 0;
    background: var(--blue-dark);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.is-open { display: flex; max-height: 320px; }
  .main-nav a {
    width: 100%;
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .main-nav a::after { display: none; }
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(160deg, #34409ee6 0%, var(--blue) 55%, #2531a6 100%);
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 52px;
  padding-bottom: 0;
}

.hero-text {
  text-align: center;
  max-width: 640px;
}

.hero-text h1 {
  font-size: clamp(2rem, 5.2vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-lede {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 8px;
}

.hero-media {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.hero-bear {
  width: min(340px, 78vw);
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.18));
}

@media (min-width: 900px) {
  .hero-inner {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding-top: 76px;
    padding-bottom: 0;
    gap: 40px;
  }
  .hero-text { text-align: left; align-self: center; }
  .hero-lede { margin-left: 0; }
  .hero-actions { justify-content: flex-start; }
  .hero-media { margin-top: 0; justify-content: flex-end; align-self: flex-end; }
  .hero-bear { width: min(420px, 34vw); display: block; }
}

/* ===== Section head ===== */
.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 40px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
}
.section-head p {
  color: #5b6478;
  margin-bottom: 0;
}

/* ===== Apps ===== */
.apps {
  padding: 64px 0 72px;
  background: var(--light);
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 620px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1040px) {
  .app-grid { grid-template-columns: repeat(4, 1fr); }
}

.app-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 26px 24px 28px;
  box-shadow: var(--shadow-card);
  transition: transform .22s ease, box-shadow .22s ease;
  position: relative;
}
.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.app-card-media {
  height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 6px;
}
.app-card-media img {
  height: 100%;
  width: auto;
  object-fit: contain;
}

.app-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  color: var(--dark);
}
.app-badge--monelio { background: #FFE3B0; }
.app-badge--pointer { background: #E4DBFB; }
.app-badge--castor { background: #D7F0DC; }
.app-badge--medicread { background: #CFE3FF; }

.app-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.app-card p { color: #5b6478; font-size: 0.96rem; }

.app-link {
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.app-link span { transition: transform .2s ease; }
.app-link:hover span { transform: translateX(4px); }

.app-card--soon {
  border: 1.5px dashed #d3dcf5;
  box-shadow: none;
}
.app-card--soon:hover {
  transform: none;
  box-shadow: none;
}
.app-card--soon h3 { color: #5b6478; font-weight: 600; }

.soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #8a94ab;
  background: #EEF1F8;
  padding: 7px 14px;
  border-radius: 999px;
}

/* ===== Ambitions ===== */
.ambitions {
  padding: 68px 0 72px;
}

.ambition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (min-width: 760px) {
  .ambition-grid { grid-template-columns: repeat(4, 1fr); }
}

.ambition-card {
  background: var(--light);
  border-radius: var(--radius-sm);
  padding: 24px 18px;
  text-align: center;
  transition: transform .2s ease, background-color .2s ease;
}
.ambition-card:hover {
  transform: translateY(-4px);
  background: #e2ecff;
}

.ambition-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--white);
}
.ambition-icon--heart { background: #3B82F6; }
.ambition-icon--access { background: #8B5CF6; }
.ambition-icon--rocket { background: var(--yellow); }
.ambition-icon--leaf { background: #22C55E; }

.ambition-card h3 {
  font-size: 0.96rem;
  font-weight: 600;
  margin: 0;
}

/* ===== Univers ===== */
.univers {
  background: linear-gradient(150deg, #2531a6 0%, var(--blue) 60%, #34409e 100%);
  color: var(--white);
  padding: 64px 0 0;
  overflow: hidden;
}
.univers-inner { text-align: center; }
.univers h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.univers p { opacity: 0.9; max-width: 460px; margin: 0 auto 28px; }

.univers-cast {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
}
.cast-mascot {
  height: 110px;
  width: auto;
  object-fit: contain;
}
.cast-bear { height: 140px; margin: 0 -4px; }
.cast-owl { height: 92px; }

@media (min-width: 480px) {
  .univers-cast { gap: 6px; }
  .cast-mascot { height: 150px; }
  .cast-bear { height: 190px; margin: 0 -8px; }
  .cast-owl { height: 128px; }
}

@media (min-width: 700px) {
  .univers-cast { gap: 4px; }
  .cast-mascot { height: 260px; }
  .cast-bear { height: 320px; margin: 0 -10px; }
  .cast-owl { height: 224px; }
}

/* ===== Newsletter ===== */
.newsletter {
  background: var(--light);
  padding: 60px 0;
}
.newsletter-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  text-align: center;
}
.newsletter-text h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
.newsletter-text p { color: #5b6478; }

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1 1 220px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1.5px solid #d3dcf5;
  font-family: inherit;
  font-size: 0.96rem;
  background: var(--white);
}
.newsletter-form input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (min-width: 860px) {
  .newsletter-text { max-width: 460px; margin: 0 auto; }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--dark);
  color: #cbd3e6;
  padding: 52px 0 0;
}
.footer-inner {
  display: grid;
  gap: 36px;
  grid-template-columns: 1fr;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer-brand .logo { color: var(--white); margin-bottom: 10px; }
.footer-tagline { color: #93a0bd; font-size: 0.92rem; max-width: 280px; }

.footer-heading {
  display: block;
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a:hover { color: var(--white); }

.social-icons { display: flex; gap: 12px; }
.social-icons a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  transition: background-color .2s ease, border-color .2s ease;
}
.social-icons a:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }

.footer-bottom {
  padding: 20px 24px 28px;
  font-size: 0.82rem;
  color: #7a8398;
  text-align: center;
}
