/* ============================================================
   Top Académie — design system
   Encre / Marine / Or — signature : la journée scindée
   ============================================================ */

:root {
  --encre: #16293F;
  --marine: #1F3A5F;
  --marine-2: #2C4A73;
  --or: #B08D3C;
  --or-pale: #E8DCC0;
  --or-soft: #F3EBDB;
  --papier: #FAFBFC;
  --brume: #EEF1F5;
  --gris: #5A6572;
  --texte: #23303F;
  --blanc: #FFFFFF;
  --ok: #2C5F2D;

  --f-display: "Cormorant Garamond", Cambria, Georgia, serif;
  --f-body: "Source Sans 3", "Segoe UI", Calibri, sans-serif;

  --wrap: 1120px;
  --r: 14px;
  --shadow: 0 10px 30px rgba(22, 41, 63, 0.10);
  --shadow-s: 0 4px 14px rgba(22, 41, 63, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--f-body);
  color: var(--texte);
  background: var(--papier);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--marine); text-decoration: none; }
a:hover { color: var(--or); }
:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; border-radius: 4px; }

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

/* ---------- Typo ---------- */
h1, h2, h3 { font-family: var(--f-display); color: var(--encre); font-weight: 600; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 5.2vw, 4.1rem); letter-spacing: 0.2px; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.35rem; font-weight: 700; }
.lead { font-size: 1.18rem; color: var(--gris); max-width: 46em; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 14px;
}

/* ---------- Signature : la journée scindée ---------- */
.split {
  height: 4px; width: 88px; border-radius: 2px; margin: 18px 0 26px;
  background: linear-gradient(90deg, var(--marine) 0 55%, var(--or) 55% 100%);
}
.split.center { margin-left: auto; margin-right: auto; }

/* ---------- Header ---------- */
.topbar {
  background: var(--encre); color: #C9D4E2;
  font-size: 0.86rem; text-align: center; padding: 8px 16px;
}
.topbar strong { color: var(--or-pale); font-weight: 600; }

header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 251, 252, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--brume);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; }
.crest { width: 38px; height: 46px; flex: none; display: block; }
.brand-name { font-family: var(--f-display); font-weight: 700; color: var(--encre); font-size: 1.14rem; line-height: 1.15; }
.brand-name small { display: block; font-family: var(--f-body); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--or); }

.nav-links { display: flex; gap: 30px; align-items: center; list-style: none; }
.nav-links a { font-weight: 600; font-size: 0.98rem; color: var(--encre); }
.nav-links a.active { color: var(--or); }
.nav-links .btn { color: var(--blanc); }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--encre); margin: 5px 0; }

@media (max-width: 880px) {
  .burger { display: block; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--papier); border-bottom: 1px solid var(--brume);
    flex-direction: column; gap: 0; padding: 8px 0 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 12px; }
}

/* ---------- Menu du compte (ajouté par site.js) ---------- */
.account { position: relative; margin-left: 24px; flex: none; }
.account-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--brume); cursor: pointer;
  background: var(--marine); color: var(--blanc); font: 700 0.9rem var(--f-body);
  display: flex; align-items: center; justify-content: center;
}
.account-btn:hover { background: var(--encre); }
.account-btn:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
.account-menu {
  position: absolute; right: 0; top: 50px; z-index: 60; width: 16rem; max-width: calc(100vw - 2rem);
  background: var(--blanc); border: 1px solid var(--brume); border-radius: 12px; box-shadow: var(--shadow); padding: 8px 0;
}
.account-menu[hidden] { display: none; }
.account-menu p { padding: 0 16px 8px; font-size: 0.82rem; color: var(--gris); }
.account-menu p.who { border-bottom: 1px solid var(--brume); margin-bottom: 4px; }
.account-menu p strong { display: block; color: var(--encre); word-break: break-all; }
.account-menu a, .account-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 16px; border: 0; background: none; cursor: pointer;
  font: 600 0.95rem var(--f-body); color: var(--encre);
}
.account-menu a:hover, .account-menu button:hover { background: var(--brume); }
.account-menu form { border-top: 1px solid var(--brume); margin-top: 4px; padding-top: 4px; }
@media (max-width: 880px) {
  .account { margin-left: auto; margin-right: 8px; }
  .burger { order: 2; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 8px;
  font-weight: 700; font-size: 0.98rem; letter-spacing: 0.02em;
  background: var(--marine); color: var(--blanc); border: 2px solid var(--marine);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { color: var(--blanc); box-shadow: var(--shadow-s); transform: translateY(-1px); }
.btn.gold { background: var(--or); border-color: var(--or); color: var(--encre); }
.btn.gold:hover { color: var(--encre); }
.btn.ghost { background: transparent; color: var(--blanc); border-color: rgba(255, 255, 255, 0.5); }
.btn.ghost:hover { border-color: var(--or); color: var(--or-pale); }
.btn.line { background: transparent; color: var(--marine); border-color: var(--marine); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 600px at 78% -10%, #24405f 0%, var(--encre) 55%);
  color: var(--blanc); overflow: hidden; position: relative;
}
.hero .wrap { padding-top: 84px; padding-bottom: 40px; position: relative; }
.hero h1 { color: var(--blanc); max-width: 12em; }
.hero h1 em { font-style: italic; color: var(--or-pale); }
.hero .lead { color: #B9C6D8; margin: 22px 0 30px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }

/* La journée : frise signature */
.dayline { border-top: 1px solid rgba(255, 255, 255, 0.14); padding: 26px 0 46px; }
.dayline .caption { font-size: 0.8rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--or); font-weight: 700; margin-bottom: 18px; }
.dl-bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; }
.dl-seg { height: 100%; }
.dl-seg.acad { background: linear-gradient(90deg, var(--marine-2), var(--marine)); }
.dl-seg.pause { background: rgba(255, 255, 255, 0.22); }
.dl-seg.sport { background: linear-gradient(90deg, var(--or), #C9A452); }
.dl-labels { display: flex; margin-top: 12px; font-size: 0.88rem; color: #AEBDD0; }
.dl-labels div { line-height: 1.4; }
.dl-labels strong { color: var(--blanc); display: block; font-size: 0.95rem; }
@media (max-width: 640px) {
  /* Les colonnes de la frise sont trop étroites pour leurs libellés : on empile. */
  .dl-labels { font-size: 0.82rem; flex-direction: column; gap: 10px; }
  .dl-labels div { width: auto !important; }
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
section.tint { background: var(--brume); }
section.dark { background: var(--encre); color: var(--blanc); }
section.dark h2, section.dark h3 { color: var(--blanc); }
section.dark .lead { color: #AEBDD0; }
.section-head { max-width: 720px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Grilles & cartes ---------- */
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g4, .g3, .g2 { grid-template-columns: 1fr; } }

.card {
  background: var(--blanc); border: 1px solid var(--brume);
  border-radius: var(--r); padding: 30px 28px; box-shadow: var(--shadow-s);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--gris); font-size: 0.99rem; }
.card .tag { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--or); margin-bottom: 10px; }

/* Stat */
.stat { text-align: center; padding: 34px 20px; }
.stat .n { font-family: var(--f-display); font-size: 3.6rem; font-weight: 700; color: var(--marine); line-height: 1; }
.stat.on-dark .n { color: var(--or-pale); }
.stat .l { font-weight: 700; color: var(--encre); margin-top: 8px; }
.stat.on-dark .l { color: var(--blanc); }
.stat .d { font-size: 0.9rem; color: var(--gris); margin-top: 6px; }
.stat.on-dark .d { color: #AEBDD0; }

/* ---------- Timeline journée (pédagogie) ---------- */
.tl { list-style: none; max-width: 780px; }
.tl li { display: grid; grid-template-columns: 118px 20px 1fr; gap: 18px; padding: 0 0 26px; position: relative; }
.tl .t { font-weight: 700; color: var(--marine); font-variant-numeric: tabular-nums; }
.tl .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--marine); margin-top: 6px; position: relative; }
.tl li.gold .dot { background: var(--or); }
.tl li::after { content: ""; position: absolute; left: 124.5px; top: 24px; bottom: -2px; width: 2px; background: var(--brume); }
.tl li:last-child::after { display: none; }
.tl h3 { font-size: 1.08rem; font-family: var(--f-body); }
.tl p { color: var(--gris); font-size: 0.96rem; }
@media (max-width: 640px) {
  .tl li { grid-template-columns: 84px 16px 1fr; gap: 12px; }
  .tl li::after { left: 89px; }
}

/* ---------- Tableaux ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--blanc); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-s); }
.table th { background: var(--marine); color: var(--blanc); text-align: left; padding: 14px 18px; font-size: 0.95rem; }
.table td { padding: 13px 18px; border-bottom: 1px solid var(--brume); font-size: 0.98rem; }
.table tr:last-child td { border-bottom: 0; }
.table td.num { font-weight: 700; color: var(--marine); white-space: nowrap; }
.table tr.total td { background: var(--or-soft); font-weight: 700; color: var(--encre); }

/* ---------- FAQ ---------- */
details {
  background: var(--blanc); border: 1px solid var(--brume); border-radius: 12px;
  padding: 20px 24px; margin-bottom: 14px;
}
details summary { cursor: pointer; font-weight: 700; color: var(--encre); font-size: 1.04rem; list-style: none; position: relative; padding-right: 34px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; position: absolute; right: 0; top: -2px; font-size: 1.5rem; color: var(--or); font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { color: var(--gris); margin-top: 12px; font-size: 0.98rem; }

/* ---------- Offres (recrutement) ---------- */
.job { position: relative; }
.job .pill {
  position: absolute; top: -13px; left: 26px;
  background: var(--or); color: var(--encre); font-weight: 700; font-size: 0.74rem;
  letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px;
}
.job ul { margin: 14px 0 18px 18px; color: var(--gris); font-size: 0.97rem; }
.job ul li { margin-bottom: 7px; }
.job .rem { font-family: var(--f-display); font-size: 1.7rem; font-weight: 700; color: var(--marine); margin: 6px 0 2px; }
.job .rem small { font-family: var(--f-body); font-size: 0.85rem; color: var(--gris); font-weight: 400; }

/* ---------- Bandeau CTA ---------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { margin-bottom: 28px; }

/* ---------- Footer ---------- */
footer.site { background: var(--encre); color: #93A5BB; padding: 56px 0 34px; font-size: 0.94rem; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; margin-bottom: 36px; }
@media (max-width: 780px) { footer.site .cols { grid-template-columns: 1fr; } }
footer.site h4 { color: var(--blanc); font-family: var(--f-display); font-size: 1.12rem; margin-bottom: 12px; }
footer.site a { color: #C9D4E2; display: block; margin-bottom: 8px; }
footer.site a:hover { color: var(--or-pale); }
footer.site a.social { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-top: 6px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 50%; }
footer.site a.social:hover { border-color: var(--or-pale); }
footer.site .legal { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 22px; font-size: 0.84rem; color: #6E829B; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Divers ---------- */
.note { font-size: 0.9rem; color: var(--gris); font-style: italic; }
.badge-open {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(176, 141, 60, 0.14); border: 1px solid rgba(176, 141, 60, 0.5);
  color: var(--or-pale); font-weight: 600; font-size: 0.88rem;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 26px;
}
.badge-open .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--or); }
.checklist { list-style: none; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 12px; color: var(--texte); }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--or); font-weight: 700; }

/* ---------- Langue & liens juridiques ---------- */
/* Drapeau en SVG intégré (flag-icons, MIT) : rendu identique partout, contrairement à l'émoji
   drapeau qui retombe en texte "GB"/"FR" sans police d'émoji couleur (mesuré sous Windows). */
.nav-links a.lang {
  display: inline-flex; align-items: center; justify-content: center; color: var(--marine);
  border: 1px solid currentColor; border-radius: 6px; padding: 4px;
}
.nav-links a.lang svg { width: 22px; height: 16px; border-radius: 2px; display: block; }
@media (max-width: 880px) { .nav-links a.lang { display: inline-flex; margin: 6px 0; padding: 5px; } }
footer.site .legal-links { margin-top: 12px; }
footer.site .legal-links a { display: inline; margin: 0; color: #93A5BB; }

/* ---------- Pages juridiques ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.45rem; margin: 38px 0 12px; }
.prose p, .prose li { margin-bottom: 10px; color: var(--texte); }
.prose ul { padding-left: 22px; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.prose dt { font-weight: 600; color: var(--encre); }
@media (max-width: 640px) { .prose dl { grid-template-columns: 1fr; } .prose dd { margin-bottom: 8px; } }

/* ---------- Formulaire de contact ---------- */
.contact-form { max-width: 760px; display: grid; gap: 18px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .contact-form .row { grid-template-columns: 1fr; } }
.contact-form label, .contact-form legend { display: block; font-weight: 600; color: var(--encre); margin-bottom: 6px; }
.contact-form .hint { font-weight: 400; color: var(--gris); font-size: 0.92rem; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"],
.contact-form select, .contact-form textarea {
  width: 100%; font: inherit; color: var(--texte); background: var(--blanc);
  border: 1px solid #C9D2DC; border-radius: 10px; padding: 11px 13px;
}
.contact-form textarea { min-height: 170px; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--or); outline-offset: 1px; border-color: var(--or); }
.contact-form fieldset { border: 0; padding: 0; margin: 0; }
.contact-form .choices { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-form .choices label { font-weight: 400; margin: 0; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid #C9D2DC; border-radius: 999px; cursor: pointer; background: var(--blanc); }
.contact-form .choices input { accent-color: var(--marine); }
.contact-form .choices label:has(input:checked) { border-color: var(--marine); background: var(--brume); }
.contact-form input[type="file"] { font: inherit; max-width: 100%; }
.contact-form .consent label { font-weight: 400; display: flex; align-items: flex-start; gap: 10px; margin: 0; }
.contact-form .consent input { accent-color: var(--marine); flex: 0 0 auto; margin-top: 4px; }
.contact-form .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form [hidden] { display: none; }
.contact-form .status { padding: 14px 16px; border-radius: 10px; background: var(--brume); }
.contact-form .status.ok { background: #E4F0E4; color: var(--ok); }
.contact-form .status.err { background: #F8E6E3; color: #8A2A1B; }
.contact-form .privacy { font-size: 0.92rem; color: var(--gris); }
