@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700&family=Nunito+Sans:wght@400;600&display=swap');

/* ─── TOKENS ──────────────────────────────────────────────────────────────── */

:root {
  --blue:        #102B6A;
  --red:         #D62839;
  --bg:          #F8FAFC;
  --card-bg:     #ffffff;
  --text:        #1E2532;
  --muted:       #5F6368;
  --border:      #E8EDF3;
  --shadow-sm:   0 4px 16px rgba(16,43,106,0.06);
  --shadow-md:   0 10px 30px rgba(16,43,106,0.10);
  --shadow-img:  0 24px 64px rgba(16,43,106,0.14);
  --radius-card: 20px;
  --radius-img:  32px;

  /* ─── Proficiamus Brand Tokens ──────────────────────────── */
  --color-brand-navy:  #1A2D6B;
  --color-brand-gold:  #F5A623;
  --color-brand-blue:  #2563EB;
  --color-niveau-cm1:  #1DBFA0;
  --color-niveau-cm2:  #4A90D9;
  --color-niveau-6e:   #F5A623;
  --font-display:      'Fredoka', sans-serif;
  --font-body:         'Nunito Sans', sans-serif;
}

/* ─── RESET ───────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ─── TYPOGRAPHIE PROFICIAMUS ──────────────────────────────────────────────── */

h1, h2, h3,
.page-title, .ex-page-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-brand-navy);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }

/* ─── LAYOUT CONTAINER ────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 64px;
}

/* ─── HEADER ──────────────────────────────────────────────────────────────── */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-brand-navy);
  box-shadow: 0 4px 20px rgba(26,45,107,0.18);
  border-bottom: none;
  height: 88px;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 64px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.header-logo {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--color-brand-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.header-sub {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.header-actions a {
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-weight: 700;
  font-size: 12px;
  color: var(--blue);
  letter-spacing: 0.05em;
}

.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.mbar {
  display: block;
  width: 26px;
  height: 2.5px;
  border-radius: 2px;
}
.mbar-top  { background: var(--red); }
.mbar-mid  { background: var(--blue); }
.mbar-mid2 { background: var(--blue); }
.mbar-bot  { background: var(--red); }

/* ─── CYCLE 3 BANNER ─────────────────────────────────────────────────────── */

.cycle3-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-brand-navy);
  margin: 1rem 0;
}

.cycle3-icon {
  font-size: 1.3rem;
}

.cycle3-label {
  color: var(--color-brand-navy);
}

.cycle3-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cycle3-dot {
  color: var(--color-brand-navy);
  font-weight: 900;
}

.badge-niveau {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 5px 16px;
  border-radius: 20px;
  display: inline-block;
}

/* ─── HERO ────────────────────────────────────────────────────────────────── */

.hero {
  background: var(--bg);
  display: grid;
  grid-template-columns: 45% 55%;
  grid-template-rows: 480px;
  align-items: stretch;
  overflow: hidden;
}

/* Hero left — content */
.hero-content {
  position: relative;
  padding: 60px 48px 0 64px;
}

/* Dot matrix */
.dot-matrix {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(5, 6px);
  gap: 6px;
}

.dm {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.dn { background: var(--blue); }
.dr { background: var(--red); }

/* Heading */
.hero-title {
  position: relative;
  z-index: 1;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 0.97;
  letter-spacing: -0.03em;
}

.title-navy {
  display: block;
  font-weight: 900;
  font-size: 46px;
  color: var(--blue);
  line-height: 1.0;
}

.title-red {
  display: block;
  font-weight: 900;
  font-size: 36px;
  color: var(--red);
  line-height: 1.08;
  margin-top: 4px;
}

/* Subtitle */
.hero-sub {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.65;
  max-width: 420px;
}

/* Grade pill */
.grade-pill {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  border-radius: 100px;
  padding: 10px 26px;
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
  letter-spacing: 0.08em;
}

.pill-dot {
  color: var(--red);
}

/* Benefits */
.benefits {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.b-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── HERO VISUAL (right column) ─────────────────────────────────────────── */

.hero-visual {
  position: relative;
  align-self: stretch;
  margin-top: 0;
  padding-top: 0;
}

/* Subtle floating icons */
.ficon {
  position: absolute;
  z-index: 2;
  opacity: 0.12;
  pointer-events: none;
}

.fi-plane {
  left: 4%;
  top: 6%;
}

.fi-bulb {
  left: 34%;
  top: 2%;
}

.fi-flask {
  right: 2%;
  top: 20%;
}

.fi-globe {
  right: 4%;
  bottom: 10%;
}

/* Hero image — fills full right column, bleeds to viewport edge */
.hero-img-frame {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin-top: 0;
  padding-top: 0;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, black 18%),
    linear-gradient(to bottom, black 70%, transparent 100%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to right, transparent 0%, black 18%),
    linear-gradient(to bottom, black 70%, transparent 100%);
  mask-composite: intersect;
}

.hero-img {
  width: 100%;
  height: calc(100% + 165px);
  margin-top: -165px;
  object-fit: cover;
  object-position: top right;
  display: block;
}

/* ─── CARDS SECTION ───────────────────────────────────────────────────────── */

.cards-section {
  background: var(--bg);
  padding: 10px 0 34px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  align-items: stretch;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 14px 12px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 190px;
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--color-brand-navy);
  letter-spacing: 0.06em;
  text-transform: none;
  margin-top: 8px;
}

.card-rule {
  width: 36px;
  height: 3px;
  border-radius: 2px;
  margin: 6px auto 0;
}

.card:nth-child(odd) .card-rule  { background: #F5A623; }
.card:nth-child(even) .card-rule { background: #1A2D6B; }

.card-btn {
  background: var(--color-brand-navy);
  color: #ffffff;
  border: none;
  border-radius: 22px;
  padding: 9px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  margin-top: 18px;
  margin-bottom: 10px;
  transition: background 250ms ease;
}

.card-btn:hover {
  background: #0f1d45;
}

/* Stretched link : toute la carte est cliquable quand le bouton est un <a> */
.card a.card-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card:has(a.card-btn) {
  cursor: pointer;
}

.card-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.card-subtitle-emile {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  margin-top: 3px;
  line-height: 1.3;
  text-align: center;
}

.emile-label {
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
}

.emile-desc {
  color: var(--blue);
  font-weight: 500;
}

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */

.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 28px 0 8px;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-rule {
  flex: 1;
  height: 1px;
  background: var(--blue);
  opacity: 0.2;
}

.footer-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.footer-text {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.footer-em {
  color: var(--red);
  font-weight: 700;
}

.footer-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.04em;
}

.footer-credit {
  flex: 1;
  text-align: right;
  font-size: 0.75rem;
  color: #8a8a8a;
  font-style: italic;
}

.footer-credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(138,138,138,0.35);
  transition: border-color 200ms;
}

.footer-credit a:hover {
  border-bottom-color: rgba(138,138,138,0.85);
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .container,
  .header-inner {
    padding: 0 40px;
  }

  .hero-content {
    padding: 56px 36px 64px 40px;
  }

  .title-navy { font-size: 38px; }
  .title-red  { font-size: 30px; }
}

@media (max-width: 768px) {
  .header {
    height: auto;
    min-height: 70px;
    padding: 12px 0;
  }

  .header-inner {
    height: auto;
  }

  .header-brand {
    flex: 1;
    min-width: 0;
  }

  .header-name {
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .header-sub {
    font-size: 9px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 48px 24px 40px 24px;
  }

  .hero-visual {
    height: 300px;
    align-self: auto;
  }

  .hero-img-frame {
    position: relative;
    inset: unset;
    width: 100%;
    height: 300px;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .title-navy { font-size: 36px; }
  .title-red  { font-size: 28px; }

  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .container,
  .header-inner {
    padding: 0 24px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .footer-rule {
    flex: none;
    width: 100%;
  }

  .footer-body {
    flex-shrink: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .footer-text {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    overflow: visible;
    max-width: 100%;
    text-align: center;
  }

  .footer-credit {
    flex: none;
    text-align: center;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .header-name {
    font-size: 9px;
  }

  .header-sub {
    font-size: 8px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .footer-body {
    flex-direction: column;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROFICIAMUS DESIGN SYSTEM
   ─── Badges de niveau ────────────────────────────────────────────────────── */

/* Base badge — taille compacte pour les fiches de compétences */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  flex-shrink: 0;
  line-height: 1;
}

/* ─── Bouton filtre de niveau ────────────────────────────────────────────── */

.level-btn {
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--muted);
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 200ms, color 200ms, background 200ms;
}

.level-btn:hover {
  border-color: var(--color-brand-navy);
  color: var(--color-brand-navy);
}

.level-btn.active[data-level="all"] {
  background: var(--color-brand-navy);
  border-color: var(--color-brand-navy);
  color: #fff;
}

.level-btn.active[data-level="CM1"] {
  background: var(--color-niveau-cm1);
  border-color: var(--color-niveau-cm1);
  color: #054336;
}

.level-btn.active[data-level="CM2"] {
  background: var(--color-niveau-cm2);
  border-color: var(--color-niveau-cm2);
  color: #0c2d5a;
}

.level-btn.active[data-level="6e"] {
  background: var(--color-niveau-6e);
  border-color: var(--color-niveau-6e);
  color: #6b420a;
}

.badge-cm1 {
  background: var(--color-niveau-cm1);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  border-radius: 20px;
  padding: 4px 14px;
  border: none;
}

.badge-cm2 {
  background: var(--color-niveau-cm2);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  border-radius: 20px;
  padding: 4px 14px;
}

.badge-6e {
  background: var(--color-niveau-6e);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 800;
  border-radius: 20px;
  padding: 4px 14px;
}

/* ─── Boutons ────────────────────────────────────────────────────────────── */

/* Bouton CTA / niveau suivant */
.btn-cta {
  background: var(--color-brand-gold);
  color: #6b420a;
  border: none;
  border-radius: 22px;
  padding: 13px 36px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: background 200ms, transform 200ms;
}
.btn-cta:hover { background: #e8971a; transform: translateY(-2px); }

/* Bouton secondaire (retour, annuler) */
.btn-secondary {
  background: transparent;
  color: var(--color-brand-navy);
  border: 2px solid var(--color-brand-navy);
  border-radius: 22px;
  padding: 13px 36px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 200ms, transform 200ms;
}
.btn-secondary:hover { background: rgba(26,45,107,0.06); transform: translateY(-2px); }

/* ─── Feedback exercices ─────────────────────────────────────────────────── */

.ex-feedback-correct {
  background: #e1f5ee;
  color: #054336;
  border-left: 3px solid var(--color-niveau-cm1);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
}

.ex-feedback-wrong {
  background: #FAECE7;
  color: #712B13;
  border-left: 3px solid var(--color-brand-gold);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.65;
}

.ex-note {
  background: #EFF3FB;
  color: #0c447c;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.6;
}

/* ─── Barre de progression ───────────────────────────────────────────────── */

.ex-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-niveau-cm1), var(--color-niveau-cm2));
  border-radius: 99px;
  transition: width 500ms cubic-bezier(.4,0,.2,1);
}

/* ─── Bouton suivant ─────────────────────────────────────────────────────── */

.ex-next-btn {
  display: block;
  margin: 28px auto 0;
  background: var(--color-brand-navy);
  color: #fff;
  border: none;
  border-radius: 22px;
  padding: 13px 44px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 200ms, transform 200ms;
}

.ex-next-btn:hover {
  background: #0f1d45;
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGES INTÉRIEURES — Shell commun · Hub · Navbar
   ══════════════════════════════════════════════════════════════════════════ */

/* Compense la navbar fixe (position:fixed ne prend pas de place dans le flux) */
body:has(.navbar) { padding-top: 50px; }

/* ─── Shell de page ──────────────────────────────────────────────────────── */

.page-wrap {
  background: var(--bg);
  min-height: calc(100vh - 50px);
  padding-bottom: 64px;
}

.page-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 64px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-brand-navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 20px 0 0;
  opacity: 0.75;
  transition: opacity 180ms;
}
.back-link:hover { opacity: 1; }

/* ─── En-tête de page ───────────────────────────────────────────────────── */

.page-header {
  text-align: center;
  padding: 28px 0 40px;
}

.page-header-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.page-title {
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-transform: none;
  margin-bottom: 10px;
}

.page-title-rule {
  width: 44px;
  height: 3px;
  background: var(--color-niveau-cm1);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}

/* ─── Hub de cartes (Français, Mathématiques…) ──────────────────────────── */

.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.hub-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 32px 16px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  text-decoration: none;
  color: inherit;
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.hub-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.hub-card-emoji {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
}

.hub-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  color: var(--color-brand-navy);
  letter-spacing: 0.06em;
  text-transform: none;
  margin-bottom: 6px;
}

.hub-card-rule {
  width: 36px;
  height: 3px;
  border-radius: 2px;
  margin: 0 auto;
}

.hub-card:nth-child(odd) .hub-card-rule  { background: #F5A623; }
.hub-card:nth-child(even) .hub-card-rule { background: #1A2D6B; }

.hub-card-btn {
  background: var(--color-brand-navy);
  color: #ffffff;
  border-radius: 22px;
  padding: 9px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  margin-top: auto;
  margin-bottom: 24px;
  display: inline-block;
  transition: background 200ms ease;
}

.hub-card:hover .hub-card-btn { background: #0f1d45; }

.hub-card-accent {
  display: none;
}

.hub-card:nth-child(odd)  { border-bottom: 4px solid #F5A623; }
.hub-card:nth-child(even) { border-bottom: 4px solid #1A2D6B; }

/* ─── Navbar Proficiamus ────────────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  height: auto;
  padding: 4px 0;
  display: flex;
  align-items: center;
}

.navbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.navbar__brand img { height: 34px; width: auto; }

.navbar__brand-text { display: flex; flex-direction: column; }

.navbar__name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--color-brand-navy);
}

.navbar__tagline {
  font-family: var(--font-display);
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
  color: var(--color-brand-navy);
  margin-top: 2px;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar__nav a {
  text-decoration: none;
  color: #1a1a1a;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  transition: color 200ms;
}

.navbar__nav a:hover { color: var(--color-brand-blue); }

.navbar__nav a.active {
  color: var(--color-niveau-cm1);
  border-bottom: 2px solid var(--color-niveau-cm1);
  padding-bottom: 2px;
}

.nav-lang {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: var(--color-brand-navy);
}

.navbar__nav .btn-login { color: #fff !important; }

.btn-login {
  background: #102B6A;
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
}
.btn-login:hover { background: #0b1e4d; }

/* ─── Responsive — pages intérieures ─────────────────────────────────────── */

@media (max-width: 768px) {
  .page-content { padding: 0 24px; }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .navbar__brand img { height: 28px; }
  .navbar__nav { gap: 12px; }
  .navbar__nav a:not(.btn-login) { display: none; }
  .nav-lang { display: none; }
}

@media (max-width: 480px) {
  .hub-grid { grid-template-columns: 1fr; }
  .btn-login { padding: 7px 13px; font-size: 13px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOME PAGE — SURCHARGES SPÉCIFIQUES (préfixe body.home-page)
   N'affecte que index.html — aucune autre page n'a class="home-page" sur body
   ══════════════════════════════════════════════════════════════════════════ */

/* Alignement horizontal unifié : header, hero, cartes et footer
   partagent le même point de départ gauche (40 px depuis le conteneur). */
body.home-page .header-inner {
  padding: 0 40px;
}

body.home-page .container {
  padding-left: 40px;
  padding-right: 40px;
}

/* Hero : proportions ajustées, hauteur légèrement augmentée pour une image
   plus grande, gap droite réduit pour mieux utiliser l'espace horizontal. */
body.home-page .hero {
  position: relative;
  grid-template-columns: 45% 55%;
  grid-template-rows: 540px;
}

/* Recadrage desktop : montre les 3 élèves, ancre en haut-centre */
body.home-page .hero-img {
  object-position: center top;
}

/* Alignement dynamique : le bord gauche du titre s'aligne avec le logo
   et les cartes, quel que soit la largeur du viewport. */
body.home-page .hero-content {
  padding: 60px 24px 0 max(40px, calc((100vw - 1400px) / 2 + 40px));
}

/* Grille des cartes : occupe davantage la largeur disponible. */
body.home-page .cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* — RESPONSIVE — */

@media (max-width: 1024px) {
  body.home-page .hero-content {
    padding: 56px 24px 64px 40px;
  }
}

@media (max-width: 768px) {

  /* Annuler la surcharge 40 px desktop → 20 px sur mobile */
  body.home-page .container,
  body.home-page .header-inner {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* En-tête : hauteur flexible, texte professeur entièrement visible sur 2 lignes */
  body.home-page .header {
    height: auto !important;
    min-height: 70px !important;
    padding: 12px 0 !important;
  }
  body.home-page .header-inner {
    height: auto !important;
  }
  body.home-page .header-brand {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: visible !important;
    gap: 12px !important;
  }
  body.home-page .header-logo {
    height: 44px !important;
  }
  body.home-page .header-text {
    min-width: 0 !important;
    overflow: visible !important;
  }
  body.home-page .header-sub {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
  }

  /* Points décoratifs : masqués sur mobile */
  body.home-page .dot-matrix {
    display: none !important;
  }

  /* Hero layout */
  body.home-page .hero {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }

  body.home-page .hero-content {
    padding: 24px 24px 16px 24px !important;
  }

  /* Image hero : fond neutre + contain pour afficher les 3 élèves ET le drapeau en entier */
  body.home-page .hero-img-frame {
    background: var(--bg);
  }
  body.home-page .hero-img {
    height: 100% !important;
    margin-top: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  /* Cartes */
  body.home-page .cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Footer : empilement vertical, tous les textes visibles sans coupure */
  body.home-page .footer-inner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  body.home-page .footer-rule {
    flex: none !important;
    width: 100% !important;
  }
  body.home-page .footer-body {
    flex-shrink: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  body.home-page .footer-text {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    overflow: visible !important;
    max-width: 100% !important;
    text-align: center !important;
  }
  body.home-page .footer-credit {
    flex: none !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {

  /* Paddings réduits sur 320-480 px */
  body.home-page .container,
  body.home-page .header-inner {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Logo et texte légèrement réduits */
  body.home-page .header-logo {
    height: 40px !important;
  }
  body.home-page .header-sub {
    font-size: 10px !important;
  }

  body.home-page .cards-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ─── HOME PAGE — AJUSTEMENTS DESKTOP UNIQUEMENT (≥ 769px) ──────────────────
   Encapsulé dans min-width: 769px → aucun impact sur les breakpoints mobiles.
   ─────────────────────────────────────────────────────────────────────────── */

@media (min-width: 769px) {

  /* 1. En-tête plus compact */
  body.home-page .header {
    height: 68px;
  }

  /* 2a. Image hero étendue à gauche : bord visible ≈ au niveau de "SSAGE !".
         left: -17% (relatif à hero-visual ≈ 9% de la largeur totale du hero).
         height: 100% + margin-top: 0 : annule le décalage de base (-165px) pour
         montrer l'image depuis le haut → bâtiment, inscription et 3 drapeaux visibles. */
  body.home-page .hero-img-frame {
    left: -17%;
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, black 6%),
      linear-gradient(to bottom, black 70%, transparent 100%);
    -webkit-mask-composite: destination-in;
    mask-image:
      linear-gradient(to right, transparent 0%, black 6%),
      linear-gradient(to bottom, black 70%, transparent 100%);
    mask-composite: intersect;
  }
  body.home-page .hero-img {
    height: 100%;
    margin-top: 0;
  }

  /* 2b. Padding-right à 0 + z-index 1 : le texte s'affiche par-dessus
         la partie gauche de l'image qui s'étend derrière lui. */
  body.home-page .hero-content {
    padding-right: 0;
    z-index: 1;
  }

  /* 3. Bandeau niveaux CM1 • CM2 • 6ÈME agrandi */
  body.home-page .grade-pill {
    font-size: 18px;
    padding: 13px 30px;
    gap: 10px;
    margin-top: 22px;
  }

  /* 4. Liste des avantages agrandie — réduit le blanc sous le dernier item */
  body.home-page .benefits {
    margin-top: 24px;
    gap: 13px;
  }
  body.home-page .benefit {
    font-size: 16px;
  }
  body.home-page .b-check {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
}
