/* SCRINIA — feuille de style du site vitrine */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations"),
       url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0C2D62;
  --navy-deep: #08214A;
  --emerald: #0E9C7F;
  --emerald-dark: #0A7A63;
  --emerald-light: #E3F5F0;
  --paper: #F4F6F9;
  --white: #FFFFFF;
  --ink: #102039;
  --muted: #4B5A73;
  --rule: #D5DDE8;
  --rule-soft: #E7ECF2;
  --amber: #B7791F;
  --amber-light: #FDF3DC;

  --wide: 116%;
  --measure: 66ch;
  --page: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-s: 4px;
  --radius-m: 10px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  font-stretch: 100%;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald-dark); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--navy); color: var(--white); padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 8px; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Typographie ---------- */

h1, h2, h3, h4 {
  font-stretch: var(--wide);
  color: var(--navy);
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(36px, 5.4vw, 62px); font-weight: 760; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 720; }
h3 { font-size: clamp(20px, 2vw, 24px); font-weight: 680; }
h4 { font-size: 17px; font-weight: 680; font-stretch: 108%; }

p { margin: 0 0 1em; max-width: var(--measure); }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); }
.small { font-size: 15px; color: var(--muted); }

ul.plain { list-style: none; padding: 0; margin: 0; }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 24px;
}
.brand img { height: 38px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 520;
  padding: 8px 12px; border-radius: var(--radius-s);
}
.nav a:hover { color: var(--emerald-dark); }
.nav a[aria-current="page"] { color: var(--navy); box-shadow: inset 0 -2px 0 var(--emerald); border-radius: 0; }
.nav .btn { margin-left: 10px; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule); border-radius: var(--radius-s);
  padding: 8px 10px; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer;
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--rule-soft); }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--emerald); padding-left: 14px; }
  .nav .btn { margin: 16px 0 0; text-align: center; }
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-block; text-decoration: none; font-weight: 640; font-size: 16px;
  padding: 12px 22px; border-radius: var(--radius-s); line-height: 1.3;
  border: 2px solid transparent; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--emerald-dark); color: var(--white); }
.btn-primary:hover { background: var(--navy); color: var(--white); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--emerald-light); color: var(--navy); }
.nav .btn-primary { color: var(--white); padding: 9px 16px; font-size: 15px; }
.nav .btn-primary:hover { color: var(--white); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-paper { background: var(--paper); }
.section-navy { background: var(--navy); color: #DCE5F2; }
.section-navy h2, .section-navy h3, .section-navy h4 { color: var(--white); }
.section-navy a { color: #9EE3D2; }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { color: var(--muted); font-size: 18.5px; }
.section-navy .section-head p { color: #B9C6DA; }

/* ---------- Accueil : hero ---------- */

.hero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); background: linear-gradient(180deg, var(--white) 0%, var(--paper) 100%); border-bottom: 1px solid var(--rule-soft); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 17ch; font-size: clamp(34px, 4.4vw, 54px); }
.hero .lead { max-width: 48ch; }
@media (max-width: 980px) { .hero .wrap { grid-template-columns: 1fr; } .hero h1 { max-width: 16ch; } }

/* Le dossier : maquette de l'eTMF */
.dossier {
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-m);
  box-shadow: 0 1px 0 var(--rule-soft), 0 24px 48px -28px rgba(12,45,98,.35);
  overflow: hidden; font-size: 14px; line-height: 1.45;
}
.dossier-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--navy); color: var(--white); padding: 10px 16px; font-size: 13.5px;
}
.dossier-bar strong { font-stretch: var(--wide); font-weight: 650; letter-spacing: .01em; }
.dossier-bar span { color: #AFC0DA; }
.dossier-body { display: grid; grid-template-columns: 190px minmax(0,1fr); }
.tree { border-right: 1px solid var(--rule-soft); padding: 12px 0; background: #FAFBFD; }
.tree li { padding: 5px 14px; color: var(--muted); display: flex; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree li b { color: var(--navy); font-weight: 600; min-width: 1.6em; font-variant-numeric: tabular-nums; }
.tree li.on { background: var(--emerald-light); color: var(--navy); box-shadow: inset 3px 0 0 var(--emerald); }
.doc { padding: 16px 18px 18px; min-width: 0; }
.doc-title { font-weight: 650; color: var(--navy); font-size: 15.5px; margin: 0 0 2px; max-width: none; }
.doc-meta { color: var(--muted); font-size: 13px; margin: 0 0 14px; max-width: none; }

.lifecycle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: st; }
.lifecycle li {
  font-size: 12.5px; text-align: center; padding: 7px 4px; border-radius: 3px;
  background: var(--rule-soft); color: var(--muted); transition: background .35s, color .35s;
}
.lifecycle li.done { background: var(--emerald-light); color: var(--emerald-dark); }
.lifecycle li.now { background: var(--emerald-dark); color: var(--white); font-weight: 600; }
.lifecycle li.lock.now { background: var(--navy); }

.trail-h { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; font-weight: 600; max-width: none; }
.trail { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.trail td { padding: 6px 0; border-top: 1px solid var(--rule-soft); vertical-align: top; }
.trail td:first-child { color: var(--muted); white-space: nowrap; padding-right: 12px; font-variant-numeric: tabular-nums; width: 1%; }
.trail tr.new td { animation: rowin .45s ease-out; }
@keyframes rowin { from { background: var(--emerald-light); } to { background: transparent; } }
.sig { display: inline-block; margin-left: 4px; color: var(--emerald-dark); font-weight: 600; }
.dossier-note { font-size: 13px; color: var(--muted); margin: 10px 2px 0; }

@media (max-width: 560px) {
  .dossier-body { grid-template-columns: 1fr; }
  .tree { border-right: 0; border-bottom: 1px solid var(--rule-soft); display: grid; grid-template-columns: 1fr 1fr; padding: 6px 0; }
  .tree li { padding: 4px 10px; font-size: 12.5px; }
  .lifecycle li { font-size: 11.5px; }
}

/* ---------- Deux côtés ---------- */

.sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; }
.side { padding: 32px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.side h3 { margin-bottom: 4px; }
.side .who { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.side ul { margin: 0; padding-left: 1.1em; }
.side li { margin: 6px 0; }
.side li::marker { color: var(--emerald); }
.bridge { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 0 18px; min-width: 210px; }
.bridge p { margin: 0; font-size: 14px; color: var(--navy); background: var(--emerald-light); padding: 8px 12px; border-radius: var(--radius-s); text-align: center; position: relative; }
@media (max-width: 900px) {
  .sides { grid-template-columns: 1fr; gap: 14px; }
  .bridge { padding: 0; min-width: 0; flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

/* ---------- Produits (accueil) ---------- */

.products { border-top: 2px solid var(--navy); }
.product-row {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px);
  padding: clamp(32px, 4vw, 48px) 0; border-bottom: 1px solid var(--rule);
}
.product-row .name { font-stretch: var(--wide); font-size: 15px; color: var(--emerald-dark); font-weight: 650; margin: 0 0 8px; }
.product-row h3 { font-size: clamp(24px, 2.6vw, 32px); }
.product-row .more { font-weight: 620; }
.features { align-content: start; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; list-style: none; padding: 0; margin: 0; }
.features li { padding: 10px 0 10px 18px; border-top: 1px solid var(--rule-soft); position: relative; font-size: 16px; }
.features li::before { content: ""; position: absolute; left: 0; top: 19px; width: 7px; height: 7px; background: var(--emerald); border-radius: 1px; }
@media (max-width: 820px) { .product-row { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

/* Liaison entre produits */
.links-flow { display: flex; align-items: center; justify-content: center; gap: 0; margin: 48px auto 0; flex-wrap: wrap; }
.links-flow .node { border: 1.5px solid var(--navy); color: var(--navy); font-weight: 650; font-stretch: var(--wide); padding: 10px 18px; border-radius: var(--radius-s); background: var(--white); font-size: 15px; }
.links-flow .edge { display: flex; flex-direction: column; align-items: center; padding: 0 10px; font-size: 13px; color: var(--muted); min-width: 140px; text-align: center; }
.links-flow .edge svg { width: 100%; height: 14px; color: var(--emerald); }
@media (max-width: 640px) { .links-flow { flex-direction: column; } .links-flow .edge { padding: 6px 0; } .links-flow .edge svg { transform: rotate(90deg); width: 40px; } }

/* ---------- Conformité ---------- */

.proofs { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,.18); }
.proof { padding: 28px 32px 28px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.proof:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.18); }
.proof:nth-child(even) { padding-left: 32px; padding-right: 0; }
.proof h3 { font-size: 21px; }
.proof p { margin: 0; color: #C3CFE1; font-size: 16px; }
.status { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 9px; border-radius: 20px; margin-left: 6px; vertical-align: 3px; font-stretch: 100%; }
.status-ok { background: rgba(14,156,127,.22); color: #9EE3D2; }
.status-wip { background: rgba(253,243,220,.16); color: #F5D58E; }
@media (max-width: 760px) {
  .proofs { grid-template-columns: 1fr; }
  .proof, .proof:nth-child(even) { padding: 24px 0; border-right: 0; }
  .proof:nth-child(odd) { border-right: 0; }
}

/* ---------- Fondateur ---------- */

.founder { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.etym { border-left: 3px solid var(--emerald); padding: 4px 0 4px 22px; }
.etym .word { font-stretch: var(--wide); font-size: clamp(30px, 3.4vw, 42px); color: var(--navy); font-weight: 700; margin: 0; line-height: 1.1; }
.etym .gram { color: var(--muted); font-size: 15px; margin: 6px 0 12px; font-style: italic; }
.etym p { font-size: 16px; }
@media (max-width: 820px) { .founder { grid-template-columns: 1fr; } }

/* ---------- Bandeau démo ---------- */

.cta-band { background: var(--emerald-dark); color: var(--white); padding: clamp(48px, 6vw, 72px) 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin: 0 0 6px; font-size: clamp(26px, 3vw, 34px); }
.cta-band p { margin: 0; color: #D5F1E9; }

/* ---------- Pages intérieures ---------- */

.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px); background: var(--paper); border-bottom: 1px solid var(--rule-soft); }
.page-hero .kicker { font-stretch: var(--wide); font-weight: 650; color: var(--emerald-dark); margin: 0 0 12px; font-size: 16px; }
.page-hero h1 { font-size: clamp(34px, 4.6vw, 54px); max-width: 20ch; }
.page-hero .lead { max-width: 60ch; }

.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }

.modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 64px); }
.module { padding: 28px 0; border-top: 1px solid var(--rule); }
.module h3 { font-size: 21px; margin-bottom: 10px; }
.module ul { margin: 0; padding-left: 1.1em; color: var(--ink); }
.module li { margin: 5px 0; }
.module li::marker { color: var(--emerald); }
.module p { color: var(--muted); }
@media (max-width: 760px) { .modules { grid-template-columns: 1fr; } }

/* Séquence numérotée : uniquement pour un vrai cycle */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); counter-reset: step; }
.steps li { counter-increment: step; padding: 20px 20px 20px 0; border-top: 3px solid var(--emerald); position: relative; }
.steps li:last-child { border-top-color: var(--navy); }
.steps li::before { content: counter(step); display: block; font-stretch: var(--wide); font-weight: 700; font-size: 15px; color: var(--emerald-dark); margin-bottom: 6px; }
.steps li:last-child::before { color: var(--navy); }
.steps h3 { font-size: 20px; margin-bottom: 6px; }
.steps p { font-size: 15.5px; color: var(--muted); margin: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr 1fr; gap: 0 24px; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.note {
  background: var(--emerald-light); border-left: 3px solid var(--emerald); padding: 16px 20px;
  border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: 16px; max-width: 70ch;
}
.note p { margin: 0; }

.ref-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.ref-table th, .ref-table td { text-align: left; padding: 14px 16px 14px 0; border-top: 1px solid var(--rule); vertical-align: top; }
.ref-table th { width: 32%; color: var(--navy); font-weight: 650; }
@media (max-width: 600px) { .ref-table th, .ref-table td { display: block; width: auto; padding: 6px 0; } .ref-table th { padding-top: 16px; } .ref-table td { border-top: 0; } }

/* ---------- Texte long (légal) ---------- */

.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin-top: 2em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 4px 0; }

.todo { background: var(--amber-light); color: #7A4E0B; padding: 1px 6px; border-radius: 3px; font-weight: 600; border: 1px dashed var(--amber); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }
label { font-weight: 600; font-size: 15px; color: var(--navy); }
label .opt { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
  border: 1.5px solid var(--rule); border-radius: var(--radius-s); padding: 11px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--emerald); outline: none; box-shadow: 0 0 0 3px rgba(14,156,127,.18); }
textarea { min-height: 150px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 15px; color: var(--navy); margin-bottom: 8px; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.checks label, .consent label { font-weight: 400; color: var(--ink); display: flex; gap: 8px; align-items: flex-start; font-size: 15.5px; }
.checks input, .consent input { margin-top: 5px; accent-color: var(--emerald-dark); width: 16px; height: 16px; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: var(--radius-s); margin-bottom: 24px; font-size: 16px; display: none; }
.alert.show { display: block; }
.alert-err { background: #FDECEC; border-left: 3px solid #C0392B; color: #7B1F16; }
.aside-box { border-top: 2px solid var(--navy); padding-top: 20px; }
.aside-box h3 { font-size: 19px; }
.aside-box p { font-size: 16px; }

/* ---------- Pied de page ---------- */

.site-footer { background: var(--navy-deep); color: #B6C3D8; padding: 56px 0 28px; font-size: 15px; }
.site-footer a { color: #DCE5F2; text-decoration: none; }
.site-footer a:hover { color: #9EE3D2; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { color: var(--white); font-size: 15px; margin-bottom: 12px; }
.foot-grid li { margin: 7px 0; }
.foot-brand img { height: 34px; width: auto; margin-bottom: 14px; }
.foot-brand p { color: #9FB0C9; max-width: 34ch; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #8597B3; font-size: 14px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
