/* Gradifon — couche « direction artistique du logiciel » (v0.7).
   Chargée APRÈS style.css / content.css / responsive.css : aligne le site sur l'interface actuelle de
   l'application (cartes rounded-2xl à bord ardoise, titres de carte en capitales espacées, tuiles
   chiffrées tabulaires, bouton indigo à reflet, onglets à pastille glissante, rail sombre à lueur
   indigo) et ajoute les composants de l'atelier (fenêtre d'appli, modules, KPI). */

:root {
  --radius: 16px;
  --radius-sm: 11px;
  --line: rgb(226 232 240 / 0.9);
  --app-border: rgb(226 232 240 / 0.7);
  --app-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 8px 24px -16px rgb(15 23 42 / 0.12);
  --app-lift: 0 12px 32px -14px rgb(79 70 229 / 0.28);
  --emerald: #059669;
  --violet-app: #6d28d9;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Cartes : même carte que le logiciel ------------------------------------------------------ */
.card, .step, .access__step, .panel, .test, .faq details {
  border-color: var(--app-border);
  box-shadow: var(--app-shadow);
}
.card { border-radius: var(--radius); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.card:hover { transform: translateY(-2px); border-color: rgb(165 180 252 / 0.6); box-shadow: var(--app-lift); }
.section--dark .access__step { box-shadow: none; }

/* Titres de section : l'étiquette reprend les titres de carte de l'appli */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }

/* --- Bouton principal : dégradé indigo + reflet, comme PrimaryButton ----------------------------- */
.btn--primary {
  background: linear-gradient(180deg, #6366f1, #4f46e5);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 6px 16px -8px rgb(79 70 229 / 0.8);
}
.btn--primary:hover { background: #6366f1; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 10px 22px -10px rgb(79 70 229 / 0.9); }

/* --- Sections sombres : lueur indigo du rail de l'appli ----------------------------------------- */
.section--dark { position: relative; isolation: isolate; overflow: hidden; }
.section--dark::before {
  content: ''; position: absolute; z-index: -1; left: -140px; top: -180px; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(99 102 241 / 0.24), transparent);
  pointer-events: none;
}

/* --- Sommaire en onglets à pastille glissante (segmented control de l'appli) --------------------- */
.jump {
  position: relative; display: inline-flex; flex-wrap: wrap; gap: 2px; margin-top: 28px; padding: 4px;
  border-radius: 14px; background: rgb(255 255 255 / 0.06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
}
.jump a {
  position: relative; z-index: 1; padding: 7px 13px; border-radius: 10px; font-size: 14px; font-weight: 600;
  color: var(--dark-muted); transition: color 0.2s ease, background 0.2s ease;
}
.jump a:hover { color: #fff; background: rgb(255 255 255 / 0.07); }

/* --- Modules de l'atelier -------------------------------------------------------------------------- */
.mods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); margin-top: var(--head-gap); }
.mod { position: relative; padding: 22px 22px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--app-border); box-shadow: var(--app-shadow); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.mod:hover { transform: translateY(-2px); border-color: rgb(165 180 252 / 0.6); box-shadow: var(--app-lift); }
.mod__k { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #64748b; }
.mod__k i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #eef2ff; color: #4f46e5; }
.mod__k i svg { width: 18px; height: 18px; }
.mod--green .mod__k i { background: #ecfdf5; color: var(--emerald); }
.mod--violet .mod__k i { background: #f5f3ff; color: var(--violet-app); }
.mod--amber .mod__k i { background: #fffbeb; color: #b45309; }
.mod--rose .mod__k i { background: #fff1f2; color: #be123c; }
.mod h3 { margin-top: 14px; font-size: 18px; }
.mod p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.mod ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.mod li { position: relative; padding-left: 18px; font-size: 14px; color: #334155; }
.mod li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: #c7d2fe; }
.mod--green li::before { background: #a7f3d0; }
.mod--violet li::before { background: #ddd6fe; }

/* --- Encadré conformité -------------------------------------------------------------------------- */
.note-law { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; margin-top: var(--grid-gap); padding: 20px 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--app-border); box-shadow: var(--app-shadow); }
.note-law i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: #a5b4fc; }
.note-law i svg { width: 22px; height: 22px; }
.note-law b { display: block; font-size: 16px; }
.note-law p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* --- Tuiles chiffrées (KPI de l'appli) ------------------------------------------------------------ */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kpi { min-width: 0; padding: 12px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--app-border); box-shadow: var(--app-shadow); }
.kpi__k { font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #64748b; hyphens: auto; overflow-wrap: anywhere; }
.kpi__v { margin-top: 5px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; color: #0f172a; white-space: nowrap; }
.kpi__s { margin-top: 5px; font-size: 10.5px; color: #64748b; }
.kpi--indigo .kpi__v { color: #4f46e5; }
.kpi--green .kpi__v { color: var(--emerald); }
.kpi--violet .kpi__v { color: var(--violet-app); }
.kpi--amber .kpi__v { color: #d97706; }

/* --- Fenêtre d'appli (signature visuelle : l'atelier, cliquable) -------------------------------- */
.appwin { position: relative; margin-top: var(--head-gap); border-radius: 20px; overflow: hidden; background: #f6f7f9; border: 1px solid rgb(15 23 42 / 0.08); box-shadow: 0 40px 90px -40px rgb(11 18 32 / 0.55), 0 1px 2px rgb(15 23 42 / 0.06); }
.appwin__bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #0b1220; border-bottom: 1px solid rgb(255 255 255 / 0.06); }
.appwin__bar i { width: 11px; height: 11px; border-radius: 50%; background: #334155; }
.appwin__bar i:nth-child(1) { background: #f87171; } .appwin__bar i:nth-child(2) { background: #fbbf24; } .appwin__bar i:nth-child(3) { background: #34d399; }
.appwin__bar span { flex: 1; text-align: center; margin-right: 50px; font-size: 12px; color: #94a3b8; }
.appwin__body { display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 520px; }

.appwin__side { position: relative; isolation: isolate; overflow: hidden; background: #0b1220; padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; }
.appwin__side::before { content: ''; position: absolute; z-index: -1; left: -70px; top: -90px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(closest-side, rgb(99 102 241 / 0.24), transparent); }
.appwin__brand { display: flex; align-items: center; gap: 9px; padding: 0 6px 14px; color: #fff; font-weight: 800; font-size: 14px; }
.appwin__brand img { width: 28px; height: 28px; border-radius: 8px; }
.appwin__brand small { display: block; font-size: 9.5px; font-weight: 500; color: #64748b; margin-top: 2px; }
.appwin__nav { position: relative; display: flex; flex-direction: column; gap: 2px; }
.appwin__item { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; color: #94a3b8; font-size: 13px; font-weight: 500; text-align: left; cursor: default; }
.appwin__item svg { width: 16px; height: 16px; flex: none; }
.appwin__item[data-target] { cursor: pointer; }
.appwin__item[data-target]:hover { color: #e2e8f0; background: rgb(255 255 255 / 0.05); }
.appwin__item[aria-selected='true'] { color: #fff; }
.appwin__item[aria-selected='true'] svg { color: #a5b4fc; }
.appwin__div { height: 1px; margin: 6px 10px; background: rgb(255 255 255 / 0.07); }
.appwin__glow { position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: 30px; border-radius: 10px; background: rgb(255 255 255 / 0.08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06); transition: transform 0.32s var(--ease), height 0.32s var(--ease); }
.appwin__glow::before { content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 16px; transform: translateY(-50%); border-radius: 3px; background: #818cf8; box-shadow: 0 0 12px rgb(129 140 248 / 0.8); }
.appwin__user { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 12px 6px 0; border-top: 1px solid rgb(255 255 255 / 0.06); color: #e2e8f0; font-size: 12px; font-weight: 600; }
.appwin__user b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #1e293b; font-size: 10px; }
.appwin__user small { display: block; color: #64748b; font-weight: 500; font-size: 10px; }

.appwin__main { position: relative; padding: 20px 22px; min-width: 0; }
.appwin__screen { display: none; }
.appwin__screen.is-on { display: block; animation: aw-in 0.36s var(--ease) backwards; }
@keyframes aw-in { from { opacity: 0; transform: translateY(6px); } }
.aw-h { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: #0f172a; }
.aw-p { margin-top: 3px; font-size: 12px; color: #5b6577; }
.aw-row { display: grid; gap: 10px; margin-top: 12px; }
.aw-row--2 { grid-template-columns: 1.4fr 1fr; }
.aw-card { min-width: 0; padding: 13px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--app-border); box-shadow: var(--app-shadow); }
.aw-card__t { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 2px 10px; margin-bottom: 8px; font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #64748b; }
.aw-card__t span { letter-spacing: 0; text-transform: none; font-weight: 500; color: #64748b; }
.aw-list { margin: 0; padding: 0; list-style: none; }
.aw-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid #f1f5f9; font-size: 11.5px; color: #334155; }
.aw-list li:first-child { border-top: 0; }
.aw-list small { display: block; font-size: 10px; color: #64748b; }
.aw-list b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.aw-neg { color: #e11d48; }
.aw-vio { color: var(--violet-app); }
.aw-strike { color: #64748b; text-decoration: line-through; }
.aw-split { display: flex; justify-content: space-between; font-size: 11.5px; padding: 4px 0; color: #475569; }
.aw-split b { font-variant-numeric: tabular-nums; color: #0f172a; }
.aw-total { margin-top: 4px; padding-top: 7px; border-top: 1px solid #e2e8f0; font-weight: 700; }
.aw-btn { display: block; width: 100%; margin-top: 10px; padding: 7px; border-radius: 9px; background: linear-gradient(180deg, #6366f1, #4f46e5); color: #fff; font-size: 11.5px; font-weight: 600; text-align: center; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 6px 14px -8px rgb(79 70 229 / 0.8); }
.aw-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.aw-chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.aw-chip--amber { background: #fffbeb; color: #b45309; box-shadow: inset 0 0 0 1px #fde68a; }
.aw-chip--indigo { background: #eef2ff; color: #4338ca; box-shadow: inset 0 0 0 1px #c7d2fe; }
.aw-chip--green { background: #ecfdf5; color: #047857; box-shadow: inset 0 0 0 1px #a7f3d0; }
.aw-seg { display: inline-flex; gap: 2px; margin-top: 10px; padding: 3px; border-radius: 10px; background: rgb(226 232 240 / 0.7); font-size: 10.5px; font-weight: 600; color: #475569; }
.aw-seg span { padding: 4px 9px; border-radius: 7px; }
.aw-seg .on { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgb(15 23 42 / 0.08); }
.aw-chart { width: 100%; height: 150px; }
.aw-chart .grid { stroke: #e2e8f0; stroke-dasharray: 3 3; }
.aw-chart .line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 600; stroke-dashoffset: 0; }
.appwin__screen.is-on .aw-chart .line { animation: aw-draw 1.1s var(--ease) backwards; }
@keyframes aw-draw { from { stroke-dashoffset: 600; } }
.aw-bars li { display: block; }
.aw-bar { height: 6px; margin-top: 5px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.aw-bar i { display: block; height: 100%; border-radius: inherit; background: #4f46e5; transform-origin: left; }
.aw-bar--vio i { background: #8b5cf6; }
.appwin__screen.is-on .aw-bar i { animation: aw-grow 0.8s var(--ease) backwards; }
@keyframes aw-grow { from { transform: scaleX(0); } }
.aw-legend { display: flex; gap: 12px; font-size: 10px; color: #64748b; letter-spacing: 0; text-transform: none; font-weight: 500; }
.aw-legend > span { white-space: nowrap; }
.aw-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.aw-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.aw-table th { text-align: left; font-size: 9.5px; font-weight: 600; color: #64748b; padding: 0 0 6px; }
.aw-table td { padding: 7px 0; border-top: 1px solid #f1f5f9; color: #334155; }
.aw-table td:last-child, .aw-table th:last-child { text-align: right; }
.aw-table td b, .aw-table td.tnum { white-space: nowrap; }
.aw-table small { color: #64748b; }
.aw-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: #475569; }
.aw-rule b { display: inline-grid; place-items: center; min-width: 46px; padding: 5px 8px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: #0f172a; font-variant-numeric: tabular-nums; }
.appwin__hint { position: absolute; right: 18px; bottom: 14px; font-size: 11px; color: #5b6577; }

/* Légende sous la fenêtre */
.appwin-caption { margin: 16px auto 0; max-width: 60ch; text-align: center; font-size: 14px; color: var(--muted); }
.appwin-caption b { color: var(--text); }
/* Pause du défilement automatique de la maquette (affiché par site.js quand le défilement tourne) */
.appwin-pause { display: inline-flex; align-items: center; min-height: 32px; margin-left: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.appwin-pause:hover { border-color: #b9c2d0; background: #f8f9fb; }

/* --- Panneaux « mini-appli » dans les pages Fonctionnalités --------------------------------------- */
.minipanel { padding: 18px; border-radius: 20px; background: #f6f7f9; border: 1px solid rgb(15 23 42 / 0.06); box-shadow: var(--shadow-lg); }
.minipanel .aw-card + .aw-card { margin-top: 10px; }
.minipanel .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1024px) {
  .mods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appwin__body { grid-template-columns: 60px minmax(0, 1fr); }
  .appwin__item span, .appwin__brand b, .appwin__user div { display: none; }
  .appwin__item { justify-content: center; padding: 7px 0; }
  .appwin__brand { justify-content: center; padding: 0 0 14px; }
  .appwin__user { justify-content: center; padding: 12px 0 0; }
  .appwin__glow::before { display: none; }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aw-row--2 { grid-template-columns: 1fr; }
  .appwin__body { min-height: 0; }
  .appwin__hint { display: none; }
}
@media (max-width: 640px) {
  .mods { grid-template-columns: 1fr; }
  .appwin__body { grid-template-columns: 1fr; }
  .appwin__side { flex-direction: row; align-items: center; padding: 8px; overflow-x: auto; }
  .appwin__brand, .appwin__user, .appwin__div, .appwin__glow { display: none; }
  .appwin__nav { flex-direction: row; gap: 4px; }
  .appwin__item:not([data-target]) { display: none; }
  .appwin__item { width: auto; min-height: 44px; padding: 7px 12px; gap: 6px; }
  .appwin-pause { min-height: 44px; margin: 8px 0 0; }
  .appwin__item span { display: inline; }
  .appwin__item[aria-selected='true'] { background: rgb(255 255 255 / 0.1); }
  .appwin__main { padding: 14px; }
  .note-law { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .appwin__screen.is-on, .appwin__screen.is-on .aw-chart .line, .appwin__screen.is-on .aw-bar i { animation: none; }
  .appwin__glow, .card, .mod { transition: none; }
}

/* Blocs .feature placés sous un titre de section (Atelier) : pas de filet collé au chapeau */
.section-head + .feature { border-top: 0; padding-top: var(--head-gap); }
/* Les listes des mini-panneaux ne prennent pas les coches des listes de fonctionnalités */
.minipanel ul { margin: 0; gap: 0; display: block; }
.minipanel li { font-size: 11.5px; line-height: 1.4; align-items: center; gap: 10px; }
.minipanel li::before { content: none; }
.minipanel .aw-list li { justify-content: space-between; }
.minipanel .aw-bars li { display: block; }

/* ---------- Vidéo de présentation ---------- */
.vid { position: relative; margin: var(--head-gap, 40px) auto 0; max-width: 1080px; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink); box-shadow: var(--shadow-lg); outline: 1px solid rgb(255 255 255 / 0.06); outline-offset: -1px; }
.vid video { display: block; width: 100%; height: auto; background: var(--ink); }
.vid__wide { aspect-ratio: 16 / 9; }
.vid .vid__tall { display: none; aspect-ratio: 9 / 16; }
.vid__poster { position: absolute; inset: 0; }
.vid__poster img { width: 100%; height: 100%; object-fit: cover; }
.vid.is-playing .vid__poster { display: none; }
.vid__play { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; cursor: pointer; color: #fff; font: inherit; background: radial-gradient(ellipse at 50% 50%, rgb(11 18 32 / 0.35), rgb(11 18 32 / 0.68)); }
/* Cercle, triangle et libellé positionnés depuis le même centre : rien ne dépend du flux */
.vid__play::before { content: ''; position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; border-radius: 50%; transform: translate(-50%, -50%); background: linear-gradient(180deg, #6366f1, #4f46e5); box-shadow: 0 0 0 10px rgb(99 102 241 / 0.22), 0 24px 50px -12px rgb(79 70 229 / 0.9); transition: transform .2s ease, box-shadow .2s ease; }
.vid__play svg { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; fill: #fff; transform: translate(calc(-50% + 3px), -50%); } /* +3px : centre optique du triangle */
.vid__play span { position: absolute; left: 50%; top: calc(50% + 66px); transform: translateX(-50%); white-space: nowrap; font-weight: 700; font-size: 17px; text-shadow: 0 2px 12px rgb(0 0 0 / 0.6); }
.vid__play:hover::before { transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 0 0 14px rgb(99 102 241 / 0.26), 0 24px 50px -12px rgb(79 70 229 / 0.9); }
.vid__play:focus-visible { outline: 3px solid #c7d2fe; outline-offset: -6px; }
.vid.is-playing .vid__play { display: none; }
@media (max-width: 640px) {
  .vid { max-width: min(420px, 100%); }
  .vid .vid__wide { display: none; }
  .vid .vid__tall { display: block; max-height: 82svh; width: auto; margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) { .vid__play, .vid__play::before { transition: none; } }
