/* scribkat.fr : couleurs et polices du logiciel (thème « papier »), terracotta un peu plus vif ; Caveat pour les annotations au crayon rouge */
@font-face { font-family: "Literata"; src: url(/fonts/literata.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Literata"; src: url(/fonts/literata-italique.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url(/fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(/fonts/caveat.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #f6f3ee; --bg-sunk: #efebe4; --page: #fffdfa; --line: #e4ded4; --line-strong: #d3cbbf;
  --ink: #26221e; --ink-2: #5d564e; --accent: #b5432a; --accent-dark: #93361f; --accent-soft: #b5432a17; --pencil: #c2402a;
  --night: #2a2521; --night-2: #b8afa4;
  --shadow: 0 1px 2px #3a2a1a14, 0 8px 28px #3a2a1a14;
  --serif: "Literata", Georgia, serif; --sans: "Inter", system-ui, "Segoe UI", sans-serif; --hand: "Caveat", "Segoe Print", cursive;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 12px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); margin: 0 0 .45em; letter-spacing: -.03em; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0 0 .5em; }
h3 { font-size: 1.25rem; margin: 0 0 .35em; }
p { margin: 0 0 1em; }
.lead { font: 1.2rem/1.6 var(--serif); color: var(--ink-2); max-width: 40em; }
.muted { color: var(--ink-2); }
.kicker { font: 600 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; display: block; }

/* boutons en pilule : 44 px de haut au moins (cible tactile) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 99px; font: 600 1rem/1 var(--sans); text-decoration: none; border: 1.5px solid var(--line-strong); background: var(--page); color: var(--ink); cursor: pointer; transition: transform .15s, background .2s, border-color .2s, color .2s, box-shadow .2s; }
.btn:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px -8px var(--accent); }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; box-shadow: 0 12px 26px -10px var(--accent); }
.btn.sm { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { font-size: .9rem; color: var(--ink-2); }

/* en-tête */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
/* un lien vers une section (/aide/#antidote) la pose sous le bandeau du haut, pas derrière */
html { scroll-padding-top: 96px; }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 1.2rem/1 var(--serif); color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: .93rem; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 900px) { .nav { display: none; } .top .btn { margin-left: auto; } }

/* sections */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.alt { background: var(--page); border-block: 1px solid var(--line); }
.hero { padding: clamp(48px, 7vw, 92px) 0 0; text-align: center; }
.hero .lead { margin-inline: auto; }
.hero .actions { justify-content: center; margin: 28px 0 10px; }
.shot { margin: clamp(36px, 5vw, 56px) auto 0; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--page); }
.shot img { width: 100%; }
figure { margin: 0; }
figcaption { font-size: .88rem; color: var(--ink-2); padding: 10px 4px 0; text-align: center; }

/* promesses et fonctions */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; margin-top: 36px; }
.pillar h3 { font-size: 1.15rem; }
.pillar p { color: var(--ink-2); margin: 0; }
.ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.ico svg { width: 21px; height: 21px; }
.feature { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(36px, 5vw, 64px) 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip > :first-child { order: 2; }
.feature ul { padding-left: 1.1em; color: var(--ink-2); margin: 0; }
.feature li { margin: .3em 0; }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } .feature.flip > :first-child { order: 0; } }

/* contenu long (guides) */
.prose { font-size: 1.06rem; }
.prose h2 { font-size: 1.75rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 3px solid var(--accent); background: var(--page); font-family: var(--serif); }
.prose .shot { margin: 1.8em 0; }
.example { font-family: var(--serif); background: var(--page); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.example .bad { color: #a32f2f; text-decoration: line-through; text-decoration-thickness: 1px; }
.page-head { padding: clamp(44px, 6vw, 80px) 0 12px; }
.crumbs { font-size: .88rem; color: var(--ink-2); margin-bottom: 18px; }
.crumbs a { color: var(--ink-2); }

/* tableau comparatif */
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 18px; background: var(--page); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 600 .9rem/1.3 var(--sans); background: var(--bg-sunk); }
tbody tr:last-child td { border-bottom: none; }
td.yes { color: #3f7a3e; font-weight: 600; }

/* questions */
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { cursor: pointer; font: 600 1.08rem/1.4 var(--serif); padding: 14px 28px 14px 0; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 1.4rem/1 var(--sans); color: var(--accent); }
details[open] summary::after { content: "−"; }
details > div { padding: 0 0 16px; color: var(--ink-2); }

/* bandeau d'appel */
.cta-band { text-align: center; }
.cta-band .actions { justify-content: center; margin-top: 22px; }
.beta-badge { display: inline-block; font: 600 .8rem/1 var(--sans); color: var(--accent); background: var(--accent-soft); padding: 8px 14px; border-radius: 99px; margin-bottom: 20px; }

/* pied de page */
.foot { border-top: 1px solid var(--line); padding: 44px 0 26px; background: var(--bg-sunk); font-size: .93rem; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.foot p { color: var(--ink-2); margin: 10px 0 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.foot nav a { color: var(--ink-2); }
.legal { margin-top: 30px; font-size: .84rem; color: var(--ink-2); }

/* vitrine animée de l'accueil : 4 vues de 4 s, fondu et léger travelling */
.showcase { margin: clamp(36px, 5vw, 56px) auto 0; }
.sc-frame { position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--page); }
.sc-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; animation: sc-show 16s infinite; transform-origin: 30% 20%; }
.sc-frame img:nth-child(1) { opacity: 1; animation-delay: 0s; }
.sc-frame img:nth-child(2) { animation-delay: 4s; }
.sc-frame img:nth-child(3) { animation-delay: 8s; }
.sc-frame img:nth-child(4) { animation-delay: 12s; transform-origin: 70% 40%; }
@keyframes sc-show {
  0% { opacity: 0; transform: scale(1.04); }
  5% { opacity: 1; }
  25% { opacity: 1; transform: scale(1); }
  30% { opacity: 0; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.04); }
}
.sc-steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; padding-top: 18px; font: 600 .9rem/1 var(--sans); color: var(--ink-2); }
.sc-steps span { position: relative; padding-bottom: 8px; }
.sc-steps span::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; animation: sc-bar 16s linear infinite; }
.sc-steps span:nth-child(2)::after { animation-delay: 4s; }
.sc-steps span:nth-child(3)::after { animation-delay: 8s; }
.sc-steps span:nth-child(4)::after { animation-delay: 12s; }
@keyframes sc-bar { 0% { transform: scaleX(0); } 25% { transform: scaleX(1); } 26%, 100% { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  .sc-frame img, .sc-steps span::after { animation: none; }
  .sc-frame img:not(:first-child) { display: none; }
}

/* blocs de texte qui se suivent (bas de l'accueil) : le même écart partout, comme entre les fonctions */
.blocks .block + .block { margin-top: clamp(36px, 5vw, 56px); padding-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--line); }
.blocks h2 { margin-top: 0; }
.prose > h2:first-child { margin-top: 0; }
.blocks .block > :last-child { margin-bottom: 0; }

/* formulaire d'inscription à la bêta */
.signup { display: grid; gap: 16px; max-width: 560px; margin: 28px 0 8px; padding: 26px; background: var(--page); border: 1px solid var(--line); border-radius: 18px; }
.f-field { display: grid; gap: 6px; font: 600 .95rem/1.3 var(--sans); }
.f-field .req { font-weight: 400; color: var(--ink-2); }
.signup input[type="email"], .signup input[type="text"], .signup textarea, .signup select {
  font: 400 1rem/1.4 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; padding: 11px 13px; min-height: 46px; width: 100%;
}
.signup textarea { resize: vertical; }
.signup :is(input, textarea, select):focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.f-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.f-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.f-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup .btn { justify-self: start; }
.signup .note { margin: 0; }
.form-error { margin: 0; padding: 10px 14px; border-radius: 8px; background: #a32f2f12; color: #8a2a2a; font-weight: 600; }
.foot .legal { margin: 30px auto 0; }

/* touches du clavier et noms de fichiers (page d'aide) */
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; font: 600 .82em/1.5 var(--sans); text-align: center; color: var(--ink); background: var(--page); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; }
code { font: .9em ui-monospace, Consolas, monospace; background: var(--bg-sunk); padding: 1px 5px; border-radius: 4px; }
.aide td:first-child { white-space: nowrap; }

/* ===== annotations au crayon rouge (décoratives : aria-hidden, invisibles pour les lecteurs d'écran) ===== */
.hand { font: 700 1.55rem/1.05 var(--hand); color: var(--pencil); }
.anno { position: absolute; pointer-events: none; }
.anno svg { overflow: visible; }
.anno path, .underlined path { fill: none; stroke: var(--pencil); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* note sous un paragraphe, comme écrite dans la marge */
.margin-note { display: block; margin: -.4em 0 1em; transform: rotate(-2deg); transform-origin: left; }
/* mot souligné d'un trait de crayon */
.underlined { position: relative; white-space: nowrap; }
.underlined svg { position: absolute; left: -2%; bottom: -.16em; width: 104%; height: .32em; overflow: visible; pointer-events: none; }
/* mot souligné d'un trait ondulé */
.squig { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='8' viewBox='0 0 40 8'%3E%3Cpath d='M0 5 Q5 1 10 4.5 T20 4.5 T30 4 T40 4.5' fill='none' stroke='%23c2402a' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left bottom / 40px 8px; padding-bottom: 5px; }
/* mot barré puis réécrit à la main */
.struck { position: relative; color: var(--ink-2); }
.struck::after { content: ""; position: absolute; left: -4%; right: -4%; top: 52%; height: 3px; background: var(--pencil); border-radius: 3px; transform: rotate(-4deg); }
.rewrite { font: 700 1.25em/1 var(--hand); color: var(--pencil); display: inline-block; transform: rotate(-3deg) translateY(-.15em); margin-left: .15em; }
/* le trait se dessine à l'arrivée */
.draw path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: trace 1.1s .5s ease-out forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .draw path { animation: none; stroke-dashoffset: 0; } }

/* accueil : note à droite du titre, flèche vers le soulignement */
.h1-box { position: relative; max-width: 900px; margin-inline: auto; }
.anno-h1 { right: -190px; bottom: 6px; width: 200px; display: flex; align-items: center; gap: 4px; text-align: left; transform: rotate(-3deg); }
.anno-h1 svg { width: 46px; height: 24px; flex: none; }
/* accueil : note au-dessus de la vitrine, flèche vers le nom du projet */
.showcase-box { position: relative; }
.anno-shot { left: -150px; top: -4px; width: 150px; text-align: right; transform: rotate(-7deg); }
.anno-shot svg { width: 64px; height: 40px; margin: 2px 0 0 auto; display: block; }
/* sur écran étroit, les notes reviennent dans le flux, sans flèche */
@media (max-width: 1260px) {
  .anno-h1 { position: static; transform: rotate(-2deg); margin: -6px auto 14px; justify-content: center; width: auto; }
  .anno-shot { left: 4px; top: -34px; transform: rotate(-4deg); text-align: left; width: auto; }
  .anno-h1 svg, .anno-shot svg { display: none; }
}
@media (max-width: 600px) { .underlined { white-space: normal; } .underlined svg { display: none; } .anno-shot { display: none; } }
/* accueil : accolade qui embrasse les lignes du tableau, la note à côté */
.annotated { position: relative; margin: 1.6em 0; }
.annotated .table-wrap { margin: 0; }
.anno-table { right: -200px; top: 50px; bottom: 2px; width: 200px; display: flex; align-items: center; gap: 6px; }
.anno-table svg { width: 22px; height: 100%; flex: none; }
.anno-table .hand { transform: rotate(-3deg); }
@media (max-width: 1100px) { .anno-table { position: static; margin: 12px 0 0 auto; width: auto; justify-content: flex-end; } .anno-table svg { display: none; } }

/* ===== bande sombre aux bords de papier déchiré ===== */
.night { position: relative; background: var(--night); color: #f3ede4; padding: clamp(72px, 9vw, 120px) 0; }
.night::before, .night::after { content: ""; position: absolute; left: 0; right: 0; height: 18px; background: var(--night);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 18' preserveAspectRatio='none'%3E%3Cpath d='M0 18 L0 9 L14 11 L27 6 L41 10 L52 4 L66 9 L79 7 L93 12 L104 5 L118 8 L131 3 L146 9 L158 6 L171 11 L185 5 L197 8 L212 4 L224 10 L238 6 L251 9 L263 3 L278 8 L290 5 L304 11 L317 6 L331 9 L344 4 L357 10 L371 6 L384 9 L400 5 L400 18 Z'/%3E%3C/svg%3E") 0 0 / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 18' preserveAspectRatio='none'%3E%3Cpath d='M0 18 L0 9 L14 11 L27 6 L41 10 L52 4 L66 9 L79 7 L93 12 L104 5 L118 8 L131 3 L146 9 L158 6 L171 11 L185 5 L197 8 L212 4 L224 10 L238 6 L251 9 L263 3 L278 8 L290 5 L304 11 L317 6 L331 9 L344 4 L357 10 L371 6 L384 9 L400 5 L400 18 Z'/%3E%3C/svg%3E") 0 0 / 100% 100%; }
.night::before { top: -17px; }
.night::after { bottom: -17px; transform: scaleY(-1); }
/* pas de filet gris au-dessus du papier déchiré */
.section.alt:has(+ .night) { border-bottom: 0; }
.night h2 { color: #fff; text-align: center; }
.night .lead { color: var(--night-2); margin: 0 auto; text-align: center; }
.night .after { color: var(--night-2); text-align: center; max-width: 40em; margin: clamp(40px, 5vw, 56px) auto 0; }

/* fiches lignées, punaisées un peu de travers */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); margin-top: clamp(40px, 5vw, 60px); }
.card { position: relative; background: #fbf6ec; color: var(--ink); border-radius: 6px; padding: 30px 24px 22px; box-shadow: 0 2px 0 #0000000d, 0 18px 34px -18px #000c;
  background-image: repeating-linear-gradient(transparent 0 31px, #d9e2ea 31px 32px); background-position: 0 65px; } /* lignes 3 px sous la ligne de pied du texte */
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 56px; height: 2px; background: #e8a79a; opacity: .7; }
.card::after { content: ""; position: absolute; top: -9px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e56a4f, var(--accent-dark) 70%); box-shadow: 0 3px 4px #0006; }
.card:nth-child(1) { transform: rotate(-2.2deg); }
.card:nth-child(2) { transform: rotate(1.4deg) translateY(10px); }
.card:nth-child(3) { transform: rotate(-.8deg); }
.card .when { font: 700 1.5rem/1 var(--hand); color: var(--pencil); display: block; margin-bottom: 18px; }
.card p { margin: 0; line-height: 32px; font-size: .97rem; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } .card:nth-child(2) { transform: rotate(1.4deg); } }

/* Antidote : logo de Druide */
.partner-logo { display: block; margin: 20px 0 8px; }
.small { font-size: .88em; color: var(--ink-2, inherit); }
