:root {
  --gold: #C9A227;
  --gold-deep: #9A7A1A;
  --gold-soft: rgba(201, 162, 39, 0.14);
  --navy: #14213D;
  --navy-deep: #0C1630;
  --ground: #FBF8F1;
  --surface: #FFFFFF;
  --ink: #1A2440;
  --ink-soft: #55618A;
  --line: #E7E0CE;
  --hero-ink: #F3EDDD;
  --hero-ink-soft: #B9C0D6;
  --shadow: 0 1px 2px rgba(20, 33, 61, 0.06), 0 8px 24px rgba(20, 33, 61, 0.07);
}
@media (prefers-color-scheme: dark) {
  :root {
    --gold: #D9B44A;
    --gold-deep: #E2C468;
    --gold-soft: rgba(217, 180, 74, 0.12);
    --ground: #0C1630;
    --surface: #152244;
    --ink: #EDE7D8;
    --ink-soft: #9AA3C0;
    --line: #263356;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --gold: #D9B44A;
  --gold-deep: #E2C468;
  --gold-soft: rgba(217, 180, 74, 0.12);
  --ground: #0C1630;
  --surface: #152244;
  --ink: #EDE7D8;
  --ink-soft: #9AA3C0;
  --line: #263356;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}
:root[data-theme="light"] {
  --gold: #C9A227;
  --gold-deep: #9A7A1A;
  --gold-soft: rgba(201, 162, 39, 0.14);
  --ground: #FBF8F1;
  --surface: #FFFFFF;
  --ink: #1A2440;
  --ink-soft: #55618A;
  --line: #E7E0CE;
  --shadow: 0 1px 2px rgba(20, 33, 61, 0.06), 0 8px 24px rgba(20, 33, 61, 0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
h1, h2, h3 {
  font-family: Georgia, "Palatino Linotype", "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
}
.mono {
  font-family: Consolas, "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}

/* ---------- Header ----------
   Fond blanc en permanence (les deux thèmes) pour s'accorder
   au fond blanc du logo. Couleurs figées, hors tokens. */
header {
  background: #FFFFFF;
  color: #14213D;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #E7E0CE;
}
.bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
}
/* Le logo déborde volontairement sous la barre du header (effet badge) */
.plaque {
  background: #FFFFFF;
  border: 1px solid #EFE9DA;
  border-radius: 8px;
  padding: 5px;
  width: 104px;
  height: 104px;
  flex: none;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 11;
  margin: -8px 0 -40px;
  box-shadow: 0 10px 24px rgba(20, 33, 61, 0.18);
}
@media (max-width: 480px) {
  .plaque { width: 76px; height: 76px; margin: -6px 0 -26px; }
}
.plaque img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }
.brand { line-height: 1.25; }
.brand strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
}
.brand span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9A7A1A;
}
nav { margin-left: auto; display: flex; gap: 26px; }
nav a {
  color: #55618A;
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
}
nav a:hover { color: #9A7A1A; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid #E7E0CE;
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
  color: #14213D;
}
.nav-toggle svg { width: 20px; height: 20px; display: block; fill: currentColor; }
@media (max-width: 720px) {
  nav { display: none; }
  .nav-toggle { display: block; }
  header.nav-open nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid #E7E0CE;
    padding: 6px 24px 14px;
    box-shadow: 0 12px 24px rgba(20, 33, 61, 0.12);
  }
  header.nav-open nav a { padding: 11px 0; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 82% -10%, rgba(201, 162, 39, 0.16), transparent 62%),
    var(--navy-deep);
  color: var(--hero-ink);
  padding: 92px 0 0;
  overflow: hidden;
}
.hero .eyebrow { color: #E3C15A; }
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.7rem);
  max-width: 17ch;
  margin: 18px 0 22px;
}
.hero h1 em {
  font-style: italic;
  color: #E3C15A;
}
.hero p.lede {
  max-width: 56ch;
  color: var(--hero-ink-soft);
  margin: 0 0 36px;
  font-size: 1.06rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 72px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 52px;
  align-items: center;
}
.hero-art {
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  margin-bottom: 72px;
}
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-art { display: none; }
}
.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 13px 26px;
  border-radius: 3px;
}
.btn-gold {
  background: linear-gradient(135deg, #E3C15A, #C9A227 60%, #A9871E);
  color: #171200;
}
.btn-gold:hover { filter: brightness(1.07); }
.btn-ghost {
  color: var(--hero-ink);
  border: 1px solid rgba(243, 237, 221, 0.35);
}
.btn-ghost:hover { border-color: #E3C15A; color: #E3C15A; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(243, 237, 221, 0.16);
}
.stats div { padding: 22px 18px 26px; border-left: 1px solid rgba(243, 237, 221, 0.16); }
.stats div:first-child { border-left: none; padding-left: 0; }
.stats b {
  display: block;
  font-family: Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  color: #E3C15A;
  font-variant-numeric: tabular-nums;
}
.stats small {
  color: var(--hero-ink-soft);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: none; padding-left: 0; }
}

.banner-art {
  margin-top: 30px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.banner-art img { display: block; width: 100%; }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
section + section { border-top: 1px solid var(--line); }
.sec-head { max-width: 62ch; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 12px 0 14px; }
.sec-head p { color: var(--ink-soft); margin: 0; }

/* Qui sommes-nous */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 4px;
  padding: 26px 24px 28px;
  box-shadow: var(--shadow);
}
.pillar h3 { font-size: 1.12rem; margin-bottom: 10px; }
.pillar p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* Certifications */
.certs { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.cert {
  display: grid;
  grid-template-columns: 3.2rem 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  transition: background 0.15s ease;
}
.cert:first-child { border-top: none; }
.cert:hover { background: var(--gold-soft); }
.cert .num {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}
.cert .title { font-size: 0.98rem; }
.cert .code {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--gold-deep);
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  border-radius: 3px;
  padding: 3px 9px;
}
@media (max-width: 640px) {
  .cert { grid-template-columns: 2.4rem 1fr; }
  .cert .code { grid-column: 2; justify-self: start; }
}

/* Domaines */
.domains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.domain {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.domain:hover { border-color: var(--gold); transform: translateY(-2px); }
.domain .meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.domain .rn {
  font-family: Georgia, serif;
  color: var(--gold-deep);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.domain .acr { font-size: 0.72rem; letter-spacing: 0.14em; color: var(--ink-soft); }
.domain h3 { font-size: 1.05rem; font-family: "Segoe UI", sans-serif; font-weight: 600; }
.domain small { color: var(--ink-soft); font-size: 0.82rem; margin-top: auto; }
@media (max-width: 900px) { .domains { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .domains { grid-template-columns: 1fr; } }
.cat-note { margin-top: 26px; color: var(--ink-soft); font-size: 0.92rem; }

/* Réseau */
.countries { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.country {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow);
}
.country::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 10px;
}
.ambition {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--gold-deep);
}

/* ---------- Footer / contact ---------- */
footer {
  background: var(--navy-deep);
  color: var(--hero-ink);
  padding: 70px 0 40px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}
footer h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 12px 0 10px; }
footer .eyebrow { color: #E3C15A; }
footer p { color: var(--hero-ink-soft); max-width: 48ch; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact-list li {
  border-left: 2px solid #C9A227;
  padding-left: 16px;
}
.contact-list .lbl {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hero-ink-soft);
  margin-bottom: 2px;
}
.contact-list a { color: var(--hero-ink); text-decoration: none; }
.contact-list a:hover { color: #E3C15A; }
.foot-note {
  border-top: 1px solid rgba(243, 237, 221, 0.16);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--hero-ink-soft);
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.cat-note a { color: var(--gold-deep); text-decoration: none; font-weight: 600; }
.cat-note a:hover { text-decoration: underline; }

/* ---------- Page catalogue (formations.html) ---------- */
.hero.compact { padding: 64px 0 56px; }
.hero.compact h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.cat-theme {
  border-top: 1px solid var(--line);
  padding: 38px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 10px 36px;
}
.cat-theme .theme-head,
.cat-theme ol { grid-column: 1; }
.cat-theme .illus {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
@media (max-width: 760px) {
  .cat-theme { grid-template-columns: 1fr; }
  .cat-theme .illus {
    grid-column: 1;
    grid-row: auto;
    order: -1;
    max-width: 400px;
  }
}
.cat-theme:first-child { border-top: none; padding-top: 0; }
.cat-theme .theme-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
}
.cat-theme .rn {
  font-family: Georgia, serif;
  color: var(--gold-deep);
  font-size: 1.2rem;
  min-width: 2.2rem;
}
.cat-theme h3 { font-size: 1.2rem; }
.cat-theme .acr {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
  background: var(--gold-soft);
  border: 1px solid var(--gold);
  border-radius: 3px;
  padding: 2px 8px;
}
.cat-theme ol {
  margin: 0;
  padding-left: 4.4rem;
  color: var(--ink-soft);
}
.cat-theme ol li { margin: 7px 0; padding-left: 6px; }
.cat-theme ol li::marker {
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) { .cat-theme ol { padding-left: 2.4rem; } }

/* ---------- Formulaire de contact (contact.php) ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 30px 28px;
  max-width: 640px;
}
.form-card label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin: 18px 0 6px;
}
.form-card label:first-of-type { margin-top: 0; }
.form-card input,
.form-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--ground);
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
}
.form-card input:focus,
.form-card textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.form-card button {
  margin-top: 22px;
  border: none;
  cursor: pointer;
  font: inherit;
}
.notice {
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 24px;
  max-width: 640px;
  font-size: 0.95rem;
}
.notice.ok { background: rgba(37, 211, 102, 0.12); border: 1px solid #1FA855; color: inherit; }
.notice.err { background: rgba(200, 60, 60, 0.1); border: 1px solid #C03C3C; color: inherit; }

/* ---------- Bouton WhatsApp flottant ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  z-index: 50;
  transition: transform 0.15s ease;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; fill: #FFFFFF; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .domain, .cert { transition: none; }
}
