/* Design « formation-03 » — hero immersif en image, cartes numerotees, ombres portees.
   Tokens injectes au build : #0F2A5F / #D4A24C. */

:root {
  --primary: #0F2A5F;
  --primary-soft: color-mix(in srgb, #0F2A5F 86%, #fff);
  --primary-dark: color-mix(in srgb, #0F2A5F 74%, #000);
  --primary-pale: color-mix(in srgb, #0F2A5F 8%, #fff);
  --accent: #D4A24C;
  --accent-pale: color-mix(in srgb, #D4A24C 14%, #fff);
  /* assez fonce pour servir de couleur de texte sur fond clair (>= 4,5:1) */
  --accent-deep: color-mix(in srgb, #D4A24C 55%, #000);
  --surface: #FFFFFF;
  --grey-bg: #F4F7F7;
  --grey-line: #E3EAEA;
  --text: #12211F;
  --text-mid: #4C5A58;
  --text-light: #63716E;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 16px 40px rgba(15, 33, 31, .08);
  --shadow-lg: 0 24px 60px rgba(15, 33, 31, .18);
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text-mid);
  background: var(--surface);
  line-height: 1.75;
}

h1, h2, h3, h4, .h1, .h2, .h3 {
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--text); font-weight: 700; line-height: 1.2;
}
h1 { font-size: clamp(2.1rem, 4.3vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }
h3 { font-size: 1.22rem; font-weight: 600; }

a { color: var(--primary); text-decoration-color: color-mix(in srgb, var(--primary) 32%, #fff); }
a:hover { color: var(--accent-deep); }

/* eyebrow a tiret, signature du gabarit */
.eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: 'Poppins', sans-serif;
  font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-deep);
}
.eyebrow::before { content: ""; width: 34px; height: 3px; border-radius: 2px; background: var(--accent); }
.eyebrow-light { color: var(--accent); }

.section { padding: 5.5rem 0; }
.section-tight { padding: 3.5rem 0; }
.section-grey { background: var(--grey-bg); }
.section-sub { color: var(--text-mid); font-size: 1.06rem; max-width: 46rem; }

/* ---------------------------------------------------------------- boutons */
.btn-gold, .btn-ghost, .btn-primary-solid, .btn-outline-ink {
  border-radius: var(--radius-sm); font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: .95rem;
  padding: .9rem 1.8rem; display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.btn-gold { background: var(--accent); color: var(--primary-dark); box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 38%, transparent); }
.btn-gold:hover { background: var(--primary); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; }
.btn-primary-solid { background: var(--primary); color: #fff; }
.btn-primary-solid:hover { background: var(--primary-dark); color: #fff; }
.btn-outline-ink { border-color: var(--grey-line); color: var(--primary); background: #fff; }
.btn-outline-ink:hover { border-color: var(--primary); color: var(--primary); }

/* ----------------------------------------------------------------- header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--grey-line); position: sticky; top: 0; z-index: 1030; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--primary); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; flex: 0 0 auto;
  font-family: 'Poppins', sans-serif;
}
.brand-name { font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--text); font-size: 1.06rem; line-height: 1.15; }
.brand-city { display: block; font-size: .72rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-light); }
.site-header .nav-link { font-weight: 500; color: var(--text-mid); padding: .45rem .85rem; border-radius: var(--radius-sm); }
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--primary); background: var(--primary-pale); }

/* ------------------------------------------------------ hero immersif image */
.hero { position: relative; background: var(--primary); color: #fff; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--hero-img); background-size: cover; background-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--primary) 12%,
              color-mix(in srgb, var(--primary) 78%, transparent) 55%,
              color-mix(in srgb, var(--primary-dark) 62%, transparent) 100%);
}
.hero-pattern { display: none; }
.hero-home { padding: 6.5rem 0 7rem; min-height: 640px; display: flex; align-items: center; }
.hero h1, .hero h2 { color: #fff; }
.hero-desc { color: rgba(255,255,255,.9); font-size: 1.1rem; max-width: 34rem; }
.hero-checks { list-style: none; padding: 0; margin: 1.7rem 0 2.1rem; display: grid; gap: .65rem; }
.hero-checks li { display: flex; align-items: flex-start; gap: .65rem; color: rgba(255,255,255,.92); }
.check-icon {
  width: 24px; height: 24px; border-radius: 6px; background: var(--accent); color: var(--primary-dark);
  display: grid; place-items: center; font-size: .74rem; flex: 0 0 auto; margin-top: .22rem; font-weight: 700;
}
.hero-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.hero-card img { width: 100%; height: 240px; object-fit: cover; display: block; }
.hero-card-body { padding: 1.5rem 1.6rem 1.4rem; }
.hero-card-eyebrow { font-family: 'Poppins', sans-serif; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); }
.hero-card-title { font-family: 'Poppins', sans-serif; color: var(--text); font-weight: 600; font-size: 1.16rem; margin: .4rem 0 0; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--grey-line); }
.hero-stat { padding: 1.1rem .6rem; text-align: center; border-right: 1px solid var(--grey-line); }
.hero-stat:last-child { border-right: 0; }
.hero-stat-num { font-family: 'Poppins', sans-serif; font-weight: 700; color: var(--primary); font-size: 1.4rem; line-height: 1; }
.hero-stat-label { font-size: .72rem; color: var(--text-light); font-weight: 500; }

/* page-hero */
.page-hero { position: relative; background: var(--primary); color: #fff; padding: 4rem 0 4.2rem; overflow: hidden; isolation: isolate; }
.page-hero.has-image::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--hero-img); background-size: cover; background-position: center;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--primary) 20%, color-mix(in srgb, var(--primary) 72%, transparent) 100%);
}
.page-hero h1 { color: #fff; max-width: 24ch; }
.page-hero .lead { color: rgba(255,255,255,.9); max-width: 44rem; font-size: 1.08rem; }
.breadcrumb-bar { font-size: .82rem; color: rgba(255,255,255,.75); margin-bottom: 1rem; }
.breadcrumb-bar a { color: rgba(255,255,255,.9); text-decoration: none; }
.breadcrumb-bar a:hover { color: #fff; text-decoration: underline; }

/* ------------------------------------------------- cartes numerotees */
.card-tile {
  background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 2rem 1.7rem 1.8rem; height: 100%; display: flex; flex-direction: column;
  text-decoration: none; color: inherit; transition: box-shadow .25s, border-color .25s;
  border-top: 4px solid transparent; counter-increment: tuile;
}
a.card-tile:hover { box-shadow: var(--shadow-lg); border-top-color: var(--accent); color: inherit; }
.row { counter-reset: tuile; }
.card-tile::before {
  content: counter(tuile, decimal-leading-zero);
  font-family: 'Poppins', sans-serif; font-size: 2.6rem; font-weight: 700; line-height: 1;
  color: var(--primary-pale); position: absolute; top: 1rem; right: 1.4rem; pointer-events: none;
}
.card-tile { position: relative; overflow: hidden; }
.tile-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--primary); color: var(--accent);
  display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 1.1rem;
}
.card-tile h3 { margin-bottom: .55rem; }
.card-tile p { color: var(--text-mid); font-size: .95rem; margin-bottom: 1rem; }
.tile-link { margin-top: auto; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: .9rem; color: var(--accent-deep); }

.card-media {
  background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; height: 100%; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: box-shadow .25s;
}
a.card-media:hover { box-shadow: var(--shadow-lg); color: inherit; }
.card-media img { width: 100%; height: 190px; object-fit: cover; display: block; }
.card-media-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card-media-body h3 { font-size: 1.08rem; }
.card-media-body p { font-size: .93rem; color: var(--text-mid); }

/* --------------------------------------------------------------- contenus */
.prose { font-size: 1.04rem; color: var(--text-mid); }
.prose h2 { margin: 2.8rem 0 1rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 2rem 0 .7rem; color: var(--primary); }
.prose p { margin-bottom: 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1.4rem; padding-left: 1.2rem; }
.prose li { margin-bottom: .55rem; }
.prose strong { color: var(--text); }
.prose blockquote {
  border-left: 4px solid var(--accent); background: var(--grey-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.8rem 0; padding: 1.2rem 1.4rem; color: var(--text);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--grey-line); padding: .75rem .9rem; text-align: left; }
.prose th { background: var(--primary); color: #fff; font-weight: 600; }

.callout {
  background: var(--surface); border-left: 4px solid var(--accent); box-shadow: var(--shadow);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.6rem 1.7rem; margin: 2rem 0;
}
.callout h3 { margin-top: 0; }

/* -------------------------------------------------------------------- FAQ */
.faq-item {
  border: 1px solid var(--grey-line); border-radius: var(--radius-sm); background: var(--surface);
  padding: 1.1rem 1.35rem; margin-bottom: .8rem;
}
.faq-item[open] { border-color: var(--accent); box-shadow: var(--shadow); }
.faq-item summary {
  cursor: pointer; font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--text); list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent-deep); font-size: 1.4rem; font-weight: 700; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: .9rem 0 0; color: var(--text-mid); }

/* ------------------------------------------------------------- bandes CTA */
.stats-band { background: var(--primary); color: #fff; padding: 3.4rem 0; }
.stats-band .stat-num { font-family: 'Poppins', sans-serif; font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stats-band .stat-label { color: rgba(255,255,255,.85); font-weight: 500; font-size: .92rem; }

.cta-band { background: var(--primary); color: #fff; border-radius: var(--radius); padding: 3rem 2.6rem;
  border-left: 6px solid var(--accent); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); margin-bottom: 0; }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.74); padding: 4rem 0 0; font-size: .94rem; }
.site-footer h4 { color: var(--accent); font-family: 'Poppins', sans-serif; font-size: .82rem; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 600; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,.74); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.footer-brand { color: #fff; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.1rem; }
.footer-note { border-top: 1px solid rgba(255,255,255,.14); margin-top: 2.8rem; padding: 1.4rem 0; font-size: .84rem; color: rgba(255,255,255,.58); }
.footer-disclaimer { background: rgba(0,0,0,.2); border-radius: var(--radius-sm); padding: 1rem 1.2rem; font-size: .85rem; }

/* -------------------------------------------------- messages de formulaire */
.form-message { border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-bottom: 1.5rem;
  background: var(--primary-pale); color: var(--text); border-left: 4px solid var(--primary); }
.form-message-erreur { background: color-mix(in srgb, #C0392B 8%, #fff); border-left-color: #C0392B; }
.form-message[hidden] { display: none; }
.card-tile .form-control, .card-tile .form-select {
  border-color: var(--grey-line); border-radius: var(--radius-sm); padding: .7rem .9rem;
}
.card-tile .form-control:focus, .card-tile .form-select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--accent) 26%, transparent);
}
.card-tile .form-label { color: var(--text); font-size: .9rem; }
/* pas de numerotation sur la carte du formulaire */
#formulaire .card-tile::before { content: none; }

@media (max-width: 991.98px) {
  .section { padding: 3.6rem 0; }
  .hero-home { padding: 3.8rem 0 4rem; min-height: 0; }
  .site-header .nav-link { padding: .5rem .2rem; }
  .cta-band { padding: 2.2rem 1.6rem; }
}
