/* ==========================================================
   Gabarit Flora Smile v2
   Pour décliner par client : modifier le bloc :root uniquement.
   Contrastes mesurés (WCAG) :
   - encre sur orange 4,79 (boutons)
   - orange foncé sur blanc 5,86 (liens)
   - orange sur blanc 3,63 : réservé aux grands titres et aux formes
   ========================================================== */

/* Montserrat hébergée sur le site (licence SIL OFL 1.1, voir assets/fonts) */
@font-face { font-family: "Montserrat"; font-weight: 400; font-style: normal; font-display: swap; src: url("../assets/fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url("../assets/fonts/montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700; font-style: normal; font-display: swap; src: url("../assets/fonts/montserrat-700.woff2") format("woff2"); }

:root {
  --orange: #F3632E;
  --orange-ink: #B83700;   /* texte lié sur fond clair */
  --ink: #1A1A1A;
  --paper: #FFFFFF;
  --tint: #FFF4EE;
  --rule: #E8E0DB;
  --muted: #5C5651;
  --font: "Montserrat", Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--orange-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

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

.skip-link {
  position: absolute; left: 16px; top: -64px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 6px; z-index: 50; font-weight: 700;
}
.skip-link:focus { top: 12px; color: var(--paper); }

/* ---------- Titres ---------- */
h1, h2, h3 { margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); letter-spacing: -0.03em; line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }

.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink); }
.muted { color: var(--muted); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.header-row { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.brand { display: block; flex-shrink: 0; }
.brand img { display: block; height: 56px; width: auto; border-radius: 6px; }

.site-nav { margin-left: auto; }
.nav-list { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: block; padding: 6px 0;
  color: var(--ink); font-weight: 600; font-size: 0.97rem; text-decoration: none;
  text-decoration-line: underline; text-decoration-thickness: 4px;
  text-decoration-color: transparent; text-underline-offset: 10px;
}
.nav-link:hover { text-decoration-color: var(--orange); color: var(--ink); }
.nav-link.is-current { text-decoration-color: var(--orange); }

.nav-toggle {
  display: none; margin-left: auto;
  font: inherit; font-weight: 700; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 6px;
  padding: 8px 14px; cursor: pointer;
}

/* Remplacement temporaire d'une image absente (voir js/main.js) */
.img-fallback { display: grid; place-items: center; text-align: center; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.brand .img-fallback { height: 56px; color: var(--ink); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.portrait .img-fallback { position: relative; z-index: 1; aspect-ratio: 4 / 5; background: var(--tint); border-radius: 4px; padding: 24px; }
.partner-row .img-fallback { height: 56px; padding: 0 18px; border: 2px dashed var(--rule); border-radius: 6px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; font: inherit; font-weight: 700; font-size: 0.97rem;
  padding: 13px 24px; border-radius: 6px; border: 2px solid var(--orange);
  background: var(--orange); color: var(--ink); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.btn-quiet { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 0; }

/* ---------- Bandeau d'accueil ---------- */
.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 72px; align-items: center; }
.hero-note { margin: 28px 0 0; color: var(--muted); font-size: 0.95rem; }

/* Panneau de prompt : l'élément mémorable de la page */
.prompt-panel {
  border: 2px solid var(--ink); border-radius: 14px;
  background: var(--paper); box-shadow: 10px 10px 0 var(--orange);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 2px solid var(--ink);
}
.panel-title { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.btn-small { padding: 7px 14px; font-size: 0.85rem; }

.prompt-rows { margin: 0; padding: 4px 18px 8px; }
.prompt-row { display: grid; grid-template-columns: 6.6rem 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.prompt-row:last-child { border-bottom: 0; }
.prompt-row dt { font-weight: 700; font-size: 0.92rem; }
.prompt-row dd { margin: 0; font-size: 0.92rem; color: var(--muted); line-height: 1.5; }

.js-ready .prompt-row { opacity: 0; transform: translateY(6px); }
.js-ready .prompt-row.is-in { opacity: 1; transform: none; transition: opacity 0.45s ease, transform 0.45s ease; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-tint { background: var(--tint); }

/* Parcours : une vraie suite d'étapes, donc numérotée */
.journey { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 72px; }
.journey-intro { position: sticky; top: 112px; align-self: start; }
.journey-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.journey-item {
  counter-increment: step;
  display: grid; grid-template-columns: 4.2rem 1fr; gap: 20px;
  padding: 30px 0; border-top: 1px solid var(--rule);
}
.journey-item:last-child { border-bottom: 1px solid var(--rule); }
.journey-item::before {
  content: counter(step);
  font-size: 3rem; font-weight: 700; line-height: 1; color: var(--orange); letter-spacing: -0.04em;
}
.journey-item h3 { margin-bottom: 0.3em; }
.journey-item p { margin: 0 0 0.6em; color: var(--muted); }

/* Entrées de l'espace : liste à filets, pas de cartes */
.entry-list { list-style: none; margin: 40px 0 0; padding: 0; }
.entry { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 30px 0; border-top: 2px solid var(--ink); text-decoration: none; color: var(--ink); }
.entry-list li:last-child .entry { border-bottom: 2px solid var(--ink); }
.entry h3 { margin: 0 0 0.2em; font-size: clamp(1.4rem, 2.6vw, 1.9rem); text-decoration: underline; text-decoration-thickness: 4px; text-decoration-color: transparent; text-underline-offset: 6px; }
.entry p { margin: 0; color: var(--muted); }
.entry-go { font-weight: 700; color: var(--orange-ink); text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.entry:hover { color: var(--ink); }
.entry:hover h3 { text-decoration-color: var(--orange); }

/* Mot de la formatrice */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; align-items: center; }
.portrait { position: relative; margin: 0 0 0 16px; }
.portrait::before { content: ""; position: absolute; inset: 16px -16px -16px 16px; background: var(--orange); border-radius: 4px; z-index: 0; }
.portrait img { position: relative; z-index: 1; display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--tint); border-radius: 4px; }

.facts { list-style: none; margin: 28px 0 0; padding: 0 0 0 20px; border-left: 4px solid var(--orange); }
.facts li { margin-bottom: 8px; }

/* Partenaire client */
.partner { padding: 36px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.partner-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.partner-row p { margin: 0; font-weight: 600; }
.partner-row img { height: 120px; width: auto; }

/* Contact */
.contact-phone {
  display: inline-block; margin: 8px 0 28px;
  font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  color: var(--ink); text-decoration: underline; text-decoration-thickness: 6px;
  text-decoration-color: var(--orange); text-underline-offset: 8px;
}
.contact-phone:hover { color: var(--ink); text-decoration-color: var(--ink); }

/* ---------- Pages intérieures ---------- */
.page-head { padding: 72px 0 40px; border-bottom: 2px solid var(--ink); }
.page-head h1 { margin-bottom: 0.3em; }
.page-head p { margin: 0; color: var(--muted); font-size: 1.15rem; }

.note { border-left: 5px solid var(--orange); background: var(--tint); padding: 18px 22px; border-radius: 0 8px 8px 0; margin: 0 0 40px; }
.note p { margin: 0; max-width: none; }

/* Supports */
.file-list { list-style: none; margin: 0; padding: 0; }
.file-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.file-type { display: grid; place-items: center; width: 56px; height: 56px; border: 2px solid var(--ink); border-radius: 8px; font-weight: 700; font-size: 0.8rem; }
.file-row h3 { margin: 0 0 0.15em; }
.file-row p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* Exercices */
.ex-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 72px; padding: 56px 0 0; }
.ex-aside { position: sticky; top: 112px; align-self: start; }
.ex-aside h2 { font-size: 1rem; letter-spacing: 0; margin-bottom: 0.8em; }
.ex-toc { list-style: none; margin: 0 0 28px; padding: 0; }
.ex-toc a { display: block; padding: 8px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.ex-toc a:hover { color: var(--orange-ink); }
.progress { margin: 0; font-weight: 700; font-size: 0.95rem; }

.exercise { padding: 0 0 56px; margin: 0 0 56px; border-bottom: 2px solid var(--ink); }
.exercise:last-child { border-bottom: 0; margin-bottom: 0; }
.exercise-meta { color: var(--muted); font-size: 0.97rem; }

.prompt-text {
  margin: 20px 0 14px; padding: 20px 22px;
  background: var(--tint); border-left: 5px solid var(--orange); border-radius: 0 8px 8px 0;
  font-family: var(--font); font-size: 0.97rem; line-height: 1.7; white-space: pre-wrap;
}
.exercise h3 { margin-top: 28px; }

.check-list { list-style: none; margin: 12px 0 0; padding: 0; }
.check-list li { margin-bottom: 10px; }
.check-list label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check-list input { flex-shrink: 0; margin-top: 4px; width: 20px; height: 20px; accent-color: var(--orange); }

/* Ressources */
.res-group { padding: 48px 0 0; }
.res-group h2 { font-size: 1.5rem; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: 18px 0; border-top: 1px solid var(--rule); }
.link-list li:last-child { border-bottom: 1px solid var(--rule); }
.link-list a { font-weight: 700; }
.link-list span { display: block; color: var(--muted); font-size: 0.97rem; max-width: 68ch; }


/* ---------- Barrière d'accès (js/gate.js) ---------- */
html:not(.is-open) body > *:not(.gate):not(noscript) { display: none !important; }
html:not(.is-open) body { background: var(--tint); }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card { width: 100%; max-width: 440px; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 10px 10px 0 var(--orange); padding: 36px 32px; }
.gate-card img { display: block; height: 64px; width: auto; border-radius: 6px; margin-bottom: 20px; }
.gate-card h1 { font-size: 1.8rem; margin-bottom: 0.3em; }
.gate-card p { color: var(--muted); }
.gate-card label { display: block; font-weight: 700; font-size: 0.92rem; margin: 18px 0 6px; }
.gate-card input { display: block; width: 100%; font: inherit; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); color: var(--ink); }
.gate-card .btn { margin-top: 22px; width: 100%; }
.gate-card .btn:disabled { opacity: 0.6; cursor: wait; }
.gate-error { min-height: 1.4em; margin: 12px 0 0; color: var(--orange-ink) !important; font-weight: 700; font-size: 0.95rem; }
.gate-nojs { padding: 40px 24px; font-weight: 700; }

/* ---------- Thème Canva : repère de formation et icônes d'outils ---------- */
.kicker { margin: 0 0 14px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-ink); }
.tool-title { display: flex; align-items: center; gap: 14px; }
.tool-icon { flex-shrink: 0; display: inline-grid; place-items: center; width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 8px; background: var(--paper); box-shadow: 3px 3px 0 var(--orange); color: var(--ink); }
.tool-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Pied de page ---------- */
.site-footer { padding: 48px 0; border-top: 2px solid var(--ink); font-size: 0.95rem; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.site-footer p { margin: 0 0 4px; }
.site-footer strong { color: var(--ink); }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .hero-grid, .journey, .about, .ex-layout { grid-template-columns: 1fr; gap: 48px; }
  .journey-intro, .ex-aside { position: static; }
  .hero { padding: 48px 0 64px; }
  .section { padding: 64px 0; }
  .prompt-panel { box-shadow: 6px 6px 0 var(--orange); }
  .portrait { margin: 0 16px 0 0; max-width: 420px; }
  .portrait::before { inset: 14px -14px -14px 14px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .header-row { flex-wrap: wrap; gap: 12px; padding: 10px 0; }
  .site-nav { display: none; width: 100%; margin-left: 0; }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 4px; padding: 8px 0 14px; }
  .header-cta { display: none; }
  .entry { grid-template-columns: 1fr; gap: 10px; }
  .file-row { grid-template-columns: 56px 1fr; }
  .file-row .btn { grid-column: 2; justify-self: start; }
  .journey-item { grid-template-columns: 3rem 1fr; gap: 14px; }
  .journey-item::before { font-size: 2.3rem; }
  .prompt-row { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-ready .prompt-row { opacity: 1; transform: none; }
  .js-ready .prompt-row.is-in { transition: none; }
}

/* ---------- Impression ---------- */
@media print {
  .site-header, .site-footer, .btn, .nav-toggle, .skip-link { display: none !important; }
  body { font-size: 11pt; }
  .exercise, .file-row, .journey-item { break-inside: avoid; }
  .prompt-panel { box-shadow: none; }
}

/* Vignettes d'outils : captures de l'interface de Canva fournies par la formatrice */
.tool-icon.tool-thumb { width: auto; height: auto; min-width: 52px; border: 0; background: none; box-shadow: none; border-radius: 0; }
.tool-icon.tool-thumb img { display: block; height: auto; max-width: 64px; }
.tool-icon.tool-ui img { display: block; width: 28px; height: 28px; }
