/* Optimiz'UP — feuille de style unique
   Polices hébergées localement (aucune requête vers un service tiers). */

@font-face { font-family: "Bricolage Grotesque"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-weight: 800; font-style: normal; font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-next-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2"); }

:root {
  --paper: #f8f9fd;
  --paper-2: #eef1fa;
  --ruling: #dde4f5;
  --ink: #17235a;
  --ink-2: #3b4880;
  --line: #aebbe3;
  --red: #d2483f;
  --red-soft: #f7d4d0;
  --marker: #ffe66b;
  --blue-soft: #c5d0f4;
  --blue-mid: #3e55b8;

  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --text: "Atkinson Hyperlegible Next", "Segoe UI", Verdana, system-ui, sans-serif;

  /* Position de la marge rouge : suit le bord gauche du contenu sur grand écran */
  --content: 1120px;
  --margin: max(14px, calc((100vw - var(--content)) / 2 - 30px));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  /* Papier Seyès : lignes horizontales tous les 32 px, verticales tous les 128 px */
  background-image:
    linear-gradient(var(--ruling) 1px, transparent 1px),
    linear-gradient(90deg, var(--ruling) 1px, transparent 1px);
  background-size: 100% 32px, 128px 100%;
  background-position: 0 -1px, calc(var(--margin) - 1px) 0;
}
/* La marge rouge du cahier */
body::before {
  content: "";
  position: fixed; top: 0; bottom: 0; left: var(--margin);
  width: 2px; background: var(--red); opacity: .55;
  pointer-events: none; z-index: 0;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration-color: var(--blue-mid); text-underline-offset: .2em; text-decoration-thickness: 2px; }
a:hover { text-decoration-color: var(--red); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: var(--margin); }

.wrap {
  position: relative; z-index: 1;
  width: min(var(--content), 100% - var(--margin) - 28px);
  margin-left: calc(var(--margin) + 28px);
}
@media (min-width: 1240px) {
  .wrap { margin-left: calc((100vw - var(--content)) / 2); width: var(--content); }
}

/* ---------- En-tête ---------- */
.site-header { position: relative; z-index: 2; padding-block: 1.1rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.55rem; letter-spacing: -.02em; text-decoration: none; color: var(--ink); line-height: 1; }
.brand span { background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%); padding-inline: .06em; }
.nav-toggle { display: none; font: inherit; font-weight: 700; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; padding: .45rem .8rem; cursor: pointer; }
.nav ul { display: flex; gap: .4rem 1.6rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a { text-decoration: none; font-weight: 600; padding: .3rem 0; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--blue-soft); }
.nav a[aria-current="page"] { border-bottom-color: var(--marker); box-shadow: 0 2px 0 var(--ink); }
.nav a.nav-cta { border: 2px solid var(--ink); border-radius: 4px; padding: .4rem .95rem; background: var(--paper); box-shadow: none; }
.nav a.nav-cta:hover { background: var(--ink); color: #fff; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: .8rem calc(var(--margin) + 28px); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: flex-start; gap: .5rem; }
}

/* ---------- Typographie ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; margin: 0 0 1rem; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); max-width: 15ch; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1rem; max-width: 62ch; }
.lead { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.5; max-width: 54ch; }
.small { font-size: .95rem; color: var(--ink-2); }

.section { position: relative; z-index: 1; padding-block: clamp(2.8rem, 7vw, 5.5rem); }
.hero { padding-top: clamp(2rem, 6vw, 4.5rem); padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; margin-top: 1.8rem; }

.btn { display: inline-block; font: inherit; font-weight: 700; text-decoration: none; background: var(--ink); color: #fff; padding: .85rem 1.4rem; border: 2px solid var(--ink); border-radius: 4px; cursor: pointer; }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn-quiet { font-weight: 700; }

/* ---------- Frise du calendrier (élément signature) ---------- */
.tl-head { max-width: 62ch; }
.tl { margin-top: 2.2rem; }
.tl-track { display: flex; height: 136px; }
.seg {
  flex: var(--d) 1 0; min-width: 0; margin-left: -2px;
  display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  font: 600 .85rem/1.15 var(--text); color: var(--fg, var(--ink));
  background: var(--bg, #fff); border: 2px solid var(--ink); border-radius: 3px;
  padding: .45rem .5rem; cursor: pointer;
  transition: transform .18s ease;
  animation: draw .6s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i) * 80ms); transform-origin: left center;
}
.seg:first-child { margin-left: 0; }
.seg .d { font-weight: 700; }
.seg .n { display: none; }
.seg.wide .n { display: block; }
.seg.narrow .n { display: block; writing-mode: vertical-rl; transform: rotate(180deg); align-self: flex-start; white-space: nowrap; }
.seg[aria-pressed="true"] { transform: translateY(-7px); outline: 3px solid var(--ink); outline-offset: 2px; z-index: 2; }
.seg:hover { transform: translateY(-4px); }
.seg[aria-pressed="true"]:hover { transform: translateY(-7px); }
.seg.k-cadrage, .seg.k-contenus { --bg: #fff; }
.seg.k-maquette { --bg: var(--blue-soft); }
.seg.k-creation { --bg: var(--ink); --fg: #fff; }
.seg.k-relecture { --bg: var(--blue-mid); --fg: #fff; }
.seg.k-ligne { --bg: var(--marker); }
.seg.k-formation { --bg: var(--red-soft); }
.seg.k-suivi { --bg: var(--paper); border-style: dashed; }

.tl-axis { position: relative; height: 34px; margin-top: 12px; border-top: 2px solid var(--ink); }
.tick { position: absolute; top: 0; transform: translateX(-50%); font-size: .82rem; color: var(--ink-2); padding-top: 8px; font-weight: 600; }
.tick::before { content: ""; position: absolute; top: -10px; left: 50%; height: 8px; border-left: 2px solid var(--ink); }
.tick:first-child { transform: none; } .tick:first-child::before { left: 0; }
.tick:last-child { transform: translateX(-100%); } .tick:last-child::before { left: 100%; }
.tl-unit { font-size: .85rem; color: var(--ink-2); margin: .2rem 0 0; }

.tl-detail {
  margin-top: 1.4rem; background: #fff; border: 2px solid var(--ink); border-radius: 4px;
  padding: 1.2rem 1.5rem; box-shadow: 7px 7px 0 var(--marker);
  display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: .5rem 2rem; align-items: start;
}
.tl-detail h3 { margin: 0; }
.tl-detail .when { margin: .25rem 0 0; font-size: .95rem; color: var(--ink-2); }
.tl-detail p { margin: 0; }
.tl-foot { font-size: .92rem; color: var(--ink-2); margin-top: 1.4rem; }

@keyframes draw { from { transform: scaleX(0); opacity: 0; } }
@keyframes drawY { from { transform: scaleY(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .seg { animation: none; transition: none; } }

@media (max-width: 760px) {
  .tl-track { flex-direction: column; height: auto; padding-right: 8px; }
  .seg { flex: none; margin-left: 0; margin-top: -2px; min-height: max(52px, calc(var(--d) * 15px)); flex-direction: row; align-items: center; gap: .8rem; transform-origin: top center; animation-name: drawY; }
  .seg:first-child { margin-top: 0; }
  .seg .n, .seg.narrow .n { display: block; writing-mode: horizontal-tb; transform: none; align-self: auto; white-space: normal; }
  .seg .d { min-width: 4.2rem; }
  .seg[aria-pressed="true"], .seg[aria-pressed="true"]:hover { transform: translateX(6px); }
  .seg:hover { transform: translateX(3px); }
  .tl-axis { display: none; }
  .tl-detail { grid-template-columns: 1fr; }
}

/* ---------- Listes d'offres ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem clamp(2rem, 6vw, 5rem); }
@media (max-width: 900px) { .duo { grid-template-columns: 1fr; } }
.rows { margin: 0; padding: 0; list-style: none; }
.rows > li { padding: 1rem 0; border-top: 2px solid var(--ink); display: grid; grid-template-columns: minmax(0, 13rem) 1fr; gap: .4rem 1.6rem; }
.rows > li:last-child { border-bottom: 2px solid var(--ink); }
.rows h3 { margin: 0; font-size: 1.15rem; }
.rows p { margin: 0; font-size: 1.02rem; }
.duo .rows > li { grid-template-columns: 1fr; }
@media (max-width: 640px) { .rows > li { grid-template-columns: 1fr; } }

.more { margin-top: 1.2rem; font-weight: 700; }

/* ---------- Repères ---------- */
.facts { display: grid; gap: 0; margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(0, 14rem) 1fr; gap: .3rem 2rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.facts dd { margin: 0; max-width: 60ch; }
@media (max-width: 640px) { .facts > div { grid-template-columns: 1fr; } }

/* ---------- Bandeau de contact ---------- */
.band { background: var(--ink); color: #fff; position: relative; z-index: 1; }
.band .wrap { padding-block: clamp(2.6rem, 6vw, 4rem); }
.band h2 { color: #fff; max-width: 22ch; }
.band a { color: #fff; text-decoration-color: var(--marker); }
.band .btn { background: var(--marker); color: var(--ink); border-color: var(--marker); }
.band .btn:hover { background: var(--ink); color: var(--marker); }

/* ---------- Listes simples, FAQ ---------- */
.checks { list-style: none; padding: 0; margin: 0 0 1rem; max-width: 62ch; }
.checks li { padding: .55rem 0 .55rem 2.1rem; position: relative; border-bottom: 1px solid var(--line); }
.checks li::before { content: ""; position: absolute; left: .2rem; top: 1rem; width: .9rem; height: .5rem; border-left: 3px solid var(--blue-mid); border-bottom: 3px solid var(--blue-mid); transform: rotate(-45deg); }
.principles { counter-reset: p; list-style: none; padding: 0; margin: 0; max-width: 64ch; }
.principles li { padding: .7rem 0; border-top: 1px solid var(--line); }
.principles strong { font-family: var(--display); font-weight: 600; }

details.faq { border-top: 2px solid var(--ink); padding: .2rem 0; max-width: 70ch; }
details.faq:last-of-type { border-bottom: 2px solid var(--ink); }
details.faq summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1.15rem; padding: .8rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-weight: 800; }
details.faq[open] summary::after { content: "\2212"; }
details.faq p { margin-bottom: 1rem; }

/* ---------- Formulaire ---------- */
.form { display: grid; gap: 1.1rem; max-width: 40rem; }
.form label { display: grid; gap: .3rem; font-weight: 600; }
.form .hint { font-weight: 400; font-size: .92rem; color: var(--ink-2); }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 4px; padding: .7rem .8rem; width: 100%; }
.form textarea { min-height: 9rem; resize: vertical; }
.form .check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; }
.form .check input { width: 1.3rem; height: 1.3rem; margin-top: .25rem; flex: none; }
.form .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.status { display: none; padding: 1rem 1.2rem; border: 2px solid var(--ink); border-radius: 4px; max-width: 40rem; margin-bottom: 1.5rem; font-weight: 600; }
.status.show { display: block; }
.status.ok { background: #e3f6e8; }
.status.err { background: var(--red-soft); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 40rem) 1fr; gap: 3rem 4rem; align-items: start; }
@media (max-width: 980px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Pied de page ---------- */
.site-footer { position: relative; z-index: 1; padding-block: 2.4rem 3rem; font-size: .98rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem 3rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer h2 { font-size: 1rem; letter-spacing: 0; margin-bottom: .6rem; }
.site-footer p { margin: 0 0 .5rem; }

/* ---------- Contenu à compléter ---------- */
.todo { background: var(--marker); border-bottom: 2px dashed var(--ink); padding: 0 .25em; font-weight: 600; }
.legal h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.legal p, .legal li { max-width: 70ch; }

@media print {
  body { background: none; } body::before { display: none; }
  .nav, .nav-toggle, .band .btn, .skip { display: none; }
}

.grp { font-size: 1.35rem; margin: 0 0 .9rem; padding-bottom: .4rem; border-bottom: 2px solid var(--marker); display: inline-block; }

.theme { margin-bottom: 2.4rem; }
.theme:last-child { margin-bottom: 0; }

.logos { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.logos li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; min-height: 110px; padding: 1rem; text-align: center; background: #fff; border: 1.5px solid var(--ink); font-weight: 600; }
.logos img { max-width: 140px; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.logos small { font-weight: 400; opacity: .75; }
.logos li.has-logo { min-height: 130px; }
.logos li.has-logo img { max-width: 100%; max-height: 90px; }

.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 1.1rem; min-width: 0; }
.form legend { font-family: var(--display); font-weight: 800; font-size: 1.25rem; margin-bottom: .8rem; padding: 0; }
.js .form .step { display: none; }
.js .form .step.on { display: grid; }
.form label[hidden] { display: none; }
.form .radio { display: flex; gap: .8rem; align-items: flex-start; font-weight: 400; border: 2px solid var(--ink); border-radius: 4px; padding: .8rem 1rem; background: #fff; cursor: pointer; }
.form .radio input { width: 1.2rem; height: 1.2rem; margin-top: .3rem; flex: none; }
.form .radio:has(input:checked) { background: var(--marker); }
.form .radio small { color: var(--ink-2); }

/* ---- fiches formation, sélection, avis, études de cas ---- */
.crumbs { padding-top: 1.2rem; font-size: .95rem; }
.crumbs a { color: inherit; }
.rows h3 a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .18em; }
.more-link { white-space: nowrap; font-weight: 700; margin-left: .3rem; }
.plain { list-style: none; padding: 0; margin: 0 0 1rem; max-width: 62ch; }
.plain li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.nav-pick a { font-weight: 700; background: var(--marker); color: var(--ink); padding: .25rem .6rem; border: 2px solid var(--ink); border-radius: 4px; text-decoration: none; }
.pick-group { border-top: 2px solid var(--ink); padding: .5rem 0; }
.pick-group:last-of-type { border-bottom: 2px solid var(--ink); }
.pick-group summary { font-weight: 700; cursor: pointer; padding: .3rem 0; }
.pick-group .check { display: flex; gap: .6rem; padding: .35rem 0; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.4rem; margin: 1rem 0; }
.quote { margin: 0; padding: 1rem 1.1rem; border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); }
.quote blockquote { margin: 0 0 .7rem; }
.quote blockquote p { margin: 0; font-size: 1.02rem; }
.quote figcaption { font-size: .9rem; font-weight: 700; }
.case { padding: 1.3rem 0; border-top: 2px solid var(--ink); max-width: 72ch; }
.case:last-child { border-bottom: 2px solid var(--ink); }
.case h3 { margin: 0 0 .2rem; font-size: 1.3rem; }
.cities { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .5rem 0 1rem; }
.cities li { border: 2px solid var(--ink); border-radius: 999px; padding: .1rem .7rem; font-size: .95rem; background: var(--paper); }
.more { margin-top: 1rem; }

/* ---- tableau de résultats ---- */
.tablewrap { overflow-x: auto; margin: 1rem 0 1.4rem; }
table.data { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .98rem; }
table.data caption { text-align: left; font-weight: 700; padding-bottom: .5rem; }
table.data th, table.data td { border-top: 2px solid var(--ink); padding: .55rem .6rem; text-align: left; vertical-align: middle; }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 2px solid var(--ink); }
table.data thead th { font-size: .9rem; }
table.data td.bar { position: relative; min-width: 9rem; }
table.data .barfill { position: absolute; left: .6rem; top: 50%; height: 1.15rem; transform: translateY(-50%); background: var(--marker); border: 2px solid var(--ink); border-radius: 2px; max-width: calc(100% - 1.2rem); }
table.data td.bar b { position: relative; padding-left: .4rem; }

.portrait { display: block; width: min(320px, 70vw); height: auto; aspect-ratio: 1; object-fit: cover; margin-top: 1.6rem; border: 3px solid var(--ink); }
.site-footer ul + h2 { margin-top: 1.2rem; }
.logo-brand { display: block; width: min(380px, 80vw); height: auto; margin-top: 1.6rem; }
.idcard { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 3rem; margin-top: 1.6rem; }
.idcard .portrait, .idcard .logo-brand { margin-top: 0; }
