/* Design « formation-01 » — institutionnel clair, porte sur Bootstrap 5.
   Tokens injectes au build : #6E2F23 / #E0A144. */

:root {
  --primary: #6E2F23;
  --primary-mid: color-mix(in srgb, #6E2F23 88%, #fff);
  --primary-dark: color-mix(in srgb, #6E2F23 78%, #000);
  --primary-pale: color-mix(in srgb, #6E2F23 7%, #fff);
  --accent: #E0A144;
  --accent-pale: color-mix(in srgb, #E0A144 13%, #fff);
  /* assez fonce pour servir de couleur de texte sur fond clair (>= 4,5:1) */
  --accent-deep: color-mix(in srgb, #E0A144 60%, #000);
  --surface: #FFFFFF;
  --grey-bg: #F6F8FB;
  --grey-line: #E6EAF1;
  --text: #6E2F23;
  --text-mid: #4A5468;
  --text-light: #667085;
  --radius: 14px;
  --shadow: 0 6px 26px rgba(15, 32, 63, .08);
  --shadow-lg: 0 18px 48px rgba(15, 32, 63, .14);
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text-mid);
  background: var(--surface);
  font-size: 1rem;
  line-height: 1.7;
}

h1, h2, h3, h4, .h1, .h2, .h3 { color: var(--text); font-weight: 800; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.2vw, 3.15rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 2.7vw, 2.3rem); letter-spacing: -.015em; }
h3 { font-size: 1.22rem; font-weight: 700; }

.serif-it { font-family: 'Lora', Georgia, serif; font-style: italic; font-weight: 600; }

a { color: var(--primary); text-decoration-color: color-mix(in srgb, var(--primary) 35%, #fff); }
a:hover { color: var(--accent-deep); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-deep);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); display: inline-block; }
.eyebrow-light { color: var(--accent); }

.section { padding: 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 {
  border-radius: 999px; font-weight: 700; font-size: .95rem;
  padding: .85rem 1.7rem; display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
/* texte navy sur l'or : le blanc sur accent tombe a 1,9:1, sous le seuil d'accessibilite */
.btn-gold { background: var(--accent); color: var(--primary); box-shadow: 0 6px 22px rgba(0,0,0,.16); }
.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,.12); 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;
  border-radius: 999px; font-weight: 700; padding: .8rem 1.6rem; display: inline-flex; gap: .5rem; text-decoration: none; }
.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: 42px; height: 42px; border-radius: 12px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.12rem; flex: 0 0 auto;
}
.brand-name { font-weight: 800; color: var(--text); font-size: 1.06rem; line-height: 1.15; }
.brand-city { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--text-light); }
.site-header .nav-link {
  font-weight: 600; color: var(--text-mid); padding: .45rem .85rem; border-radius: 999px;
}
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--primary); background: var(--primary-pale); }

/* ------------------------------------------------------------------- hero */
.hero { position: relative; background: var(--primary); color: #fff; overflow: hidden; isolation: isolate; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, var(--primary) 0%, var(--primary) 52%, var(--primary-dark) 100%);
}
.hero-pattern {
  position: absolute; inset: 0; z-index: -1; opacity: .16;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 26px 26px;
}
.hero-home { padding: 5.5rem 0 6rem; }
.hero h1, .hero h2 { color: #fff; }
.hero-desc { color: rgba(255,255,255,.86); font-size: 1.1rem; max-width: 34rem; }
.hero-checks { list-style: none; padding: 0; margin: 1.6rem 0 2rem; display: grid; gap: .6rem; }
.hero-checks li { display: flex; align-items: flex-start; gap: .6rem; color: rgba(255,255,255,.9); font-weight: 500; }
.check-icon {
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: .72rem; flex: 0 0 auto; margin-top: .22rem; font-weight: 800;
}
.hero-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
}
.hero-card img { width: 100%; height: 260px; object-fit: cover; display: block; }
.hero-card-body { padding: 1.4rem 1.5rem 1.6rem; }
.hero-card-eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); }
.hero-card-title { color: var(--text); font-weight: 800; font-size: 1.15rem; margin: .35rem 0 0; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--grey-line); border-top: 1px solid var(--grey-line); }
.hero-stat { background: var(--surface); padding: 1rem .6rem; text-align: center; }
.hero-stat-num { font-weight: 800; color: var(--primary); font-size: 1.35rem; line-height: 1; }
.hero-stat-label { font-size: .74rem; color: var(--text-light); font-weight: 600; }

/* page-hero (rubriques, guides, pages simples) */
.page-hero { position: relative; background: var(--primary); color: #fff; padding: 3.4rem 0 3.6rem; overflow: hidden; isolation: isolate; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, var(--primary) 0%, var(--primary-dark) 100%); }
.page-hero.has-image::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .22;
  background-image: var(--hero-img); background-size: cover; background-position: center;
}
.page-hero h1 { color: #fff; max-width: 22ch; }
.page-hero .lead { color: rgba(255,255,255,.87); max-width: 44rem; font-size: 1.08rem; }
.breadcrumb-bar { font-size: .82rem; color: rgba(255,255,255,.7); margin-bottom: 1rem; }
.breadcrumb-bar a { color: rgba(255,255,255,.85); text-decoration: none; }
.breadcrumb-bar a:hover { color: #fff; text-decoration: underline; }

/* ------------------------------------------------------------------ cards */
.card-tile {
  background: var(--surface); border: 1px solid var(--grey-line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; height: 100%; display: flex; flex-direction: column;
  text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s;
}
a.card-tile:hover { border-color: color-mix(in srgb, var(--accent) 55%, #fff); box-shadow: var(--shadow); color: inherit; }
.tile-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--accent-pale); color: var(--accent-deep);
  display: grid; place-items: center; font-size: 1.35rem; margin-bottom: 1rem;
}
.card-tile h3 { margin-bottom: .5rem; }
.card-tile p { color: var(--text-mid); font-size: .95rem; margin-bottom: 1rem; }
.tile-link { margin-top: auto; font-weight: 700; font-size: .9rem; color: var(--accent-deep); }

.card-media {
  background: var(--surface); border: 1px solid var(--grey-line); border-radius: var(--radius);
  overflow: hidden; height: 100%; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: border-color .2s, box-shadow .2s;
}
a.card-media:hover { border-color: color-mix(in srgb, var(--accent) 55%, #fff); box-shadow: var(--shadow); color: inherit; }
.card-media img { width: 100%; height: 178px; object-fit: cover; display: block; }
.card-media-body { padding: 1.25rem 1.3rem 1.4rem; 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.03rem; color: var(--text-mid); }
.prose h2 { margin: 2.6rem 0 1rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.9rem 0 .7rem; color: var(--primary); }
.prose p { margin-bottom: 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.prose strong { color: var(--text); }
.prose blockquote {
  border-left: 3px solid var(--accent); background: var(--grey-bg); border-radius: 0 10px 10px 0;
  margin: 1.6rem 0; padding: 1.1rem 1.3rem; color: var(--text); font-family: 'Lora', Georgia, serif; font-style: italic;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--grey-line); padding: .7rem .85rem; text-align: left; }
.prose th { background: var(--primary-pale); color: var(--text); font-weight: 700; }

.callout {
  background: var(--primary-pale); border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff);
  border-radius: var(--radius); padding: 1.4rem 1.5rem; margin: 2rem 0;
}
.callout h3 { margin-top: 0; }

/* -------------------------------------------------------------------- FAQ */
.faq-item {
  border: 1px solid var(--grey-line); border-radius: 12px; background: var(--surface);
  padding: 1rem 1.2rem; margin-bottom: .75rem;
}
.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 50%, #fff); box-shadow: var(--shadow); }
.faq-item summary {
  cursor: pointer; font-weight: 700; 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.35rem; font-weight: 700; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: .85rem 0 0; color: var(--text-mid); }

/* ------------------------------------------------------------- bandes CTA */
.stats-band { background: var(--primary); color: #fff; padding: 3rem 0; }
.stats-band .stat-num { font-size: 2.3rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stats-band .stat-label { color: rgba(255,255,255,.82); font-weight: 600; font-size: .92rem; }

.cta-band { background: var(--primary); color: #fff; border-radius: var(--radius); padding: 2.8rem 2.4rem; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); margin-bottom: 0; }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.72); padding: 3.6rem 0 0; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,.72); 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: .5rem; }
.footer-brand { color: #fff; font-weight: 800; font-size: 1.08rem; }
.footer-note { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.6rem; padding: 1.3rem 0; font-size: .84rem; color: rgba(255,255,255,.55); }
.footer-disclaimer { background: rgba(0,0,0,.18); border-radius: 10px; padding: .9rem 1.1rem; font-size: .85rem; }

@media (max-width: 991.98px) {
  .section { padding: 3.4rem 0; }
  .hero-home { padding: 3.4rem 0 3.8rem; }
  .site-header .nav-link { padding: .5rem .2rem; }
}

/* -------------------------------------------------- messages de formulaire */
.form-message {
  border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1.5rem;
  background: color-mix(in srgb, var(--primary) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, #fff);
  color: var(--text);
}
.form-message-erreur {
  background: color-mix(in srgb, #C0392B 7%, #fff);
  border-color: color-mix(in srgb, #C0392B 28%, #fff);
}
.form-message[hidden] { display: none; }
.card-tile .form-control, .card-tile .form-select {
  border-color: var(--grey-line); border-radius: 10px; padding: .6rem .8rem;
}
.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) 28%, transparent);
}
.card-tile .form-label { color: var(--text); font-size: .9rem; }

/* ---------------------------------------------------------------- partenaires */
.partners { padding-bottom: 4.5rem; }
.partners-head { max-width: 640px; margin-bottom: 2rem; }
.partners-intro { color: var(--text-mid); margin: 0; }
.partners-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 992px) { .partners-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .partners-grid { grid-template-columns: 1fr; } }
.partner-card { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; height: 100%; }
.partner-name { font-weight: 700; line-height: 1.3; }
.partner-line { font-size: .88rem; line-height: 1.45; color: var(--text-light); }

/* sobre : filet fin, coin superieur souligne a l'accent */
.partners { background: var(--surface); }
.partner-card {
  padding: 1.1rem 1.15rem; border: 1px solid var(--grey-line);
  border-radius: var(--radius); background: var(--surface);
  border-top: 3px solid var(--accent);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.partner-card .partner-name { color: var(--primary); font-size: 1rem; }
.partner-card:hover, .partner-card:focus-visible {
  border-color: var(--primary); border-top-color: var(--accent-deep);
  box-shadow: var(--shadow);
}
.partner-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
