/* =========================================================
   CFP-YASMINE — Design system
   Vert institutionnel + bordeaux + crème + doré (accent rare)
   Serif display (Fraunces) pour la personnalité "diplôme",
   sans-serif humaniste (Work Sans) pour la lisibilité mobile.
   ========================================================= */

:root {
  --green-900: #163821;
  --green-700: #1f5f32;
  --green-600: #2c7a41;
  --green-100: #e7f1e7;

  --bordeaux-900: #4a121e;
  --bordeaux-700: #7a1f2e;
  --bordeaux-600: #932438;

  --gold: #b8912f;
  --gold-soft: #eadfc0;

  --cream: #faf7f0;
  --cream-2: #f2ede1;
  --ink: #201d1a;
  --ink-soft: #55504a;
  --line: #e4ddce;
  --white: #ffffff;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  --radius-s: 4px;
  --radius-m: 10px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  color: var(--green-900);
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 65ch; }
.lede { font-size: 1.15rem; color: var(--ink-soft); }

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

section { padding: 64px 0; }
section.tight { padding: 40px 0; }

.bg-cream2 { background: var(--cream-2); }
.bg-green  { background: var(--green-900); color: var(--white); }
.bg-green .lede, .bg-green p { color: #d9e7db; }
.bg-green h1, .bg-green h2, .bg-green h3 { color: var(--white); }
.bg-bordeaux { background: var(--bordeaux-900); color: var(--white); }
.bg-bordeaux h1, .bg-bordeaux h2, .bg-bordeaux h3 { color: var(--white); }

.eyebrow-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  background: rgba(184,145,47,.08);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

/* ---------- Header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1340px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; flex: 0 0 auto; white-space: nowrap; }
.brand img { width: 42px; height: 42px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: .95rem; color: var(--green-900); white-space: nowrap; }
.brand-text span { font-size: .68rem; color: var(--bordeaux-700); white-space: nowrap; }

nav.main-nav { display: none; flex: 1 1 auto; min-width: 0; }
nav.main-nav ul {
  display: flex; gap: 13px; list-style: none; margin: 0; padding: 0;
  flex-wrap: nowrap; justify-content: center;
}
nav.main-nav a {
  text-decoration: none;
  font-size: .82rem;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
nav.main-nav a:hover, nav.main-nav a.active { border-color: var(--gold); color: var(--green-700); }

.header-actions { display: none; gap: 8px; align-items: center; flex: 0 0 auto; }
.header-actions .btn { padding: 10px 14px; font-size: .82rem; white-space: nowrap; }

.burger {
  border: none;
  background: none;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.burger span, .burger span::before, .burger span::after {
  content: ""; display: block; width: 22px; height: 2px; background: var(--green-900);
  position: relative; transition: transform .2s ease, opacity .2s ease;
}
.burger span::before { position: absolute; top: -7px; }
.burger span::after { position: absolute; top: 7px; }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 8px 20px 18px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none;
  color: var(--ink);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.mobile-menu .mm-cta { margin-top: 12px; }

@media (min-width: 1080px) {
  nav.main-nav { display: block; }
  .header-actions { display: flex; }
  .burger { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-s);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--bordeaux-700); color: var(--white); }
.btn-primary:hover { background: var(--bordeaux-600); }
.btn-secondary { background: var(--green-700); color: var(--white); }
.btn-secondary:hover { background: var(--green-600); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--green-900); }
.bg-green .btn-outline, .bg-bordeaux .btn-outline { color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.08); }
.btn-ghost { background: transparent; color: var(--green-900); text-decoration: underline; padding: 8px 0; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(155deg, var(--green-900) 0%, var(--green-700) 60%, var(--bordeaux-700) 130%);
  color: var(--white);
  padding: 60px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 82% 18%, rgba(184,145,47,.25), transparent 45%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; }
.hero .brandmark { width: 84px; height: 84px; margin-bottom: 22px; }
.hero .slogan { font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--gold-soft); margin-bottom: 6px; }
.hero h1 { color: var(--white); margin-bottom: 14px; }
.hero .accroche { font-size: 1.15rem; color: #eee7d5; max-width: 55ch; }

/* ---------- Carousel photos filières (hero) ---------- */
.filieres-carousel {
  width: 100%;
  max-width: 720px;
  overflow: hidden;
  margin-bottom: 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.filieres-carousel-track {
  display: flex;
  width: max-content;
  gap: 14px;
  animation: cfp-carousel-scroll 40s linear infinite;
}
.carousel-card {
  flex: 0 0 auto;
  width: 150px;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
}
.carousel-card .photo {
  width: 150px;
  height: 100px;
  object-fit: cover;
  display: block;
  background: rgba(255,255,255,.06);
}
.carousel-card .photo-placeholder {
  width: 150px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.06);
}
.carousel-card .caption {
  display: block;
  padding: 8px 10px;
  font-size: .74rem;
  font-weight: 600;
  color: #f2ede1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes cfp-carousel-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .filieres-carousel-track { animation: none; }
}
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green-700);
  border-radius: var(--radius-m);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card.bordeaux-top { border-top-color: var(--bordeaux-700); }
.card h3 { margin-bottom: 4px; }
.card .univers-tag { font-size: .75rem; color: var(--bordeaux-700); font-weight: 600; }
.card p { margin-bottom: 6px; font-size: .95rem; }
.card .card-cta { margin-top: auto; }

.icon-badge {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--green-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-700);
  flex-shrink: 0;
}

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; text-align: center; }
@media (min-width: 700px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-num { font-family: var(--font-display); font-size: 2.3rem; color: var(--gold); font-weight: 700; }
.stat-label { font-size: .85rem; color: #d9e7db; }

/* ---------- Info rows / definition lists ---------- */
.fact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.fact-list li { display: flex; gap: 12px; align-items: flex-start; }
.fact-list .fact-label { font-weight: 600; color: var(--green-900); min-width: 150px; }

.pill {
  display: inline-block;
  background: var(--green-100);
  color: var(--green-700);
  border: 1px solid var(--green-600);
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin: 0 6px 6px 0;
}
.pill.bordeaux { background: #f6e6e9; color: var(--bordeaux-700); border-color: var(--bordeaux-600); }

.tbc {
  font-size: .82rem;
  color: var(--gold);
  border-left: 3px solid var(--gold);
  padding-left: 10px;
  background: rgba(184,145,47,.06);
  border-radius: 0 4px 4px 0;
  padding-top: 4px; padding-bottom: 4px;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .82rem; color: var(--ink-soft); margin-bottom: 18px; }
.breadcrumb a { text-decoration: none; color: var(--green-700); }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Formation detail layout ---------- */
.formation-head {
  background: var(--green-900);
  color: var(--white);
  padding: 40px 0 50px;
}
.formation-head h1, .formation-head h2, .formation-head h3 { color: var(--white); }
.formation-head .badges { margin-top: 12px; }
.formation-head .badges .pill { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); color: var(--white); }

.formation-layout { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 940px) { .formation-layout { grid-template-columns: 2fr 1fr; } }

.side-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 24px;
  position: sticky;
  top: 90px;
  height: max-content;
}
.side-card .price { font-family: var(--font-display); font-size: 1.6rem; color: var(--bordeaux-700); }
.side-card hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }

.module-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.module-list li { padding: 10px 14px; background: var(--cream-2); border-radius: var(--radius-s); font-size: .93rem; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--green-900); color: #cfe0d1; padding: 50px 0 100px; }
footer.site-footer h4 { color: var(--white); font-size: .95rem; margin-bottom: 14px; }
footer.site-footer a { color: #cfe0d1; text-decoration: none; font-size: .9rem; }
footer.site-footer a:hover { color: var(--gold-soft); }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  font-size: .78rem; color: #9db69f; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}
.footer-arrete { font-size: .74rem; color: #86a289; max-width: 60ch; }

/* ---------- Mobile sticky action bar ---------- */
.mobile-action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 14px rgba(0,0,0,.06);
}
.mobile-action-bar a {
  text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 10px;
  font-size: .68rem;
  color: var(--green-900);
  font-weight: 600;
}
.mobile-action-bar a:nth-child(2) { color: var(--bordeaux-700); }
.mobile-action-bar a:nth-child(3) { color: var(--white); background: var(--green-700); }
body { padding-bottom: 66px; }
@media (min-width: 1080px) {
  .mobile-action-bar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Forms ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; color: var(--green-900); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  font-family: var(--font-body);
  font-size: .95rem;
  background: var(--white);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--green-700);
}
.form-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Stepper (inscription) ---------- */
.stepper { display: flex; justify-content: space-between; margin-bottom: 36px; gap: 6px; flex-wrap: wrap; }
.step-dot {
  display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--ink-soft);
  flex: 1; min-width: 90px;
}
.step-dot .num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--cream-2); border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; color: var(--ink-soft);
  flex-shrink: 0;
}
.step-dot.active .num { background: var(--bordeaux-700); border-color: var(--bordeaux-700); color: var(--white); }
.step-dot.active { color: var(--green-900); font-weight: 600; }
.step-dot.done .num { background: var(--green-700); border-color: var(--green-700); color: var(--white); }

.step-panel { display: none; }
.step-panel.active { display: block; }

.recap-box { background: var(--cream-2); border-radius: var(--radius-m); padding: 20px; margin-bottom: 20px; }
.recap-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.recap-row span:first-child { color: var(--ink-soft); flex-shrink: 0; }
.recap-row span:last-child { text-align: right; font-weight: 600; }
.recap-row:last-child { border: none; font-weight: 700; color: var(--bordeaux-700); font-size: 1.05rem; }
.recap-row:last-child span:first-child { color: var(--bordeaux-700); }

.notice-box {
  border: 1.5px dashed var(--gold);
  background: rgba(184,145,47,.07);
  border-radius: var(--radius-m);
  padding: 18px 20px;
  font-size: .9rem;
  color: var(--ink);
}

/* ---------- Gallery ---------- */
.gallery-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.gallery-filter button {
  border: 1.5px solid var(--line); background: var(--white); padding: 8px 16px; border-radius: 20px;
  font-size: .85rem; cursor: pointer; color: var(--ink);
}
.gallery-filter button.active { background: var(--green-700); border-color: var(--green-700); color: var(--white); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
.gallery-tile {
  aspect-ratio: 4/3; border-radius: var(--radius-s); background: var(--green-100);
  display: flex; align-items: center; justify-content: center; color: var(--green-700);
  font-size: .8rem; text-align: center; padding: 10px; border: 1px solid var(--line);
}

/* ---------- Utility ---------- */
.section-head { max-width: 640px; margin-bottom: 40px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.flex { display: flex; }
.gap-10 { gap: 10px; }
.mt-0 { margin-top: 0; }
.text-muted { color: var(--ink-soft); }
.divider-gold { width: 46px; height: 3px; background: var(--gold); border: none; margin: 0 0 18px; }
.small { font-size: .82rem; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 10px; top: 10px; background: var(--white); padding: 8px 14px; z-index: 100; }
