/*
 * Cerveline — le site. Une page de cahier Séyès : papier, marge rose, encre
 * framboise et annotations à la main dans la marge ; l'ardoise pour Axone.
 * Les polices sont celles de l'app, servies d'ici (pas de Google Fonts).
 */

@font-face { font-family: 'Literata'; src: url('fonts/literata-latin-opsz-normal.woff2') format('woff2'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Literata'; src: url('fonts/literata-latin-opsz-italic.woff2') format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('fonts/ibm-plex-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 100 700; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('fonts/caveat-latin-wght-normal.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --papier: #ffffff;
  --papier-ombre: #f6f4f1;
  --ligne: #e3e7f5;
  --ligne-forte: #ccd3ee;
  --marge: #ec9fb8;
  --encre: #840b55;
  --encre-vive: #a3176c;
  --encre-pale: #fbeef5;
  --texte: #1c1f26;
  --texte-doux: #555b68;
  --ardoise: #141719;
  --ardoise-2: #1d2124;
  --craie: #ecebe6;
  --craie-douce: #a6abb3;
  --ocre: #c98a12;
  --rayon: 14px;
  --marge-x: clamp(20px, 9vw, 132px);
  --colonne: min(1180px, calc(100vw - var(--marge-x) - 40px));
  --interligne: 32px;
  color-scheme: light;
}

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

body {
  margin: 0;
  font-family: 'Plex', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--texte);
  background-color: var(--papier);
  /* Le Séyès : une ligne forte toutes les 32 px, trois fines entre elles */
  background-image:
    linear-gradient(var(--ligne-forte) 1px, transparent 1px),
    linear-gradient(var(--ligne) 1px, transparent 1px);
  background-size: 100% var(--interligne), 100% calc(var(--interligne) / 4);
  -webkit-font-smoothing: antialiased;
}

/* La marge rose, du haut en bas de la page */
body::before {
  content: '';
  position: fixed;
  inset: 0 auto 0 var(--marge-x);
  width: 2px;
  background: var(--marge);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--encre); text-underline-offset: 3px; }
a:hover { color: var(--encre-vive); }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; display: block; }

.sauter { position: absolute; left: -999px; top: 8px; background: var(--encre); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.sauter:focus { left: 16px; }

/* ===== Mise en page : tout s'aligne après la marge ===== */
.page { position: relative; z-index: 1; padding-left: calc(var(--marge-x) + 28px); padding-right: 20px; }
.colonne { max-width: var(--colonne); position: relative; }

/* Les annotations à la main, dans la marge (sous le texte sur petit écran) */
.note-marge {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 25px;
  line-height: 1.1;
  color: var(--encre);
  transform: rotate(-3deg);
  display: block;
}
/* Dans la marge : à la hauteur du texte qu'elle annote, à gauche du trait rose */
@media (min-width: 1100px) {
  .note-marge { position: absolute; left: calc(-1 * (var(--marge-x) + 28px)); width: calc(var(--marge-x) - 10px); text-align: right; font-size: 24px; margin-top: 6px; }
}
@media (max-width: 1099px) { .note-marge { margin-bottom: 6px; } }

/* ===== En-tête ===== */
.entete {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ligne-forte);
}
.entete .page { display: flex; align-items: center; gap: 24px; height: 64px; }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texte); font-family: 'Literata', serif; font-weight: 650; font-size: 21px; }
.marque img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--texte-doux); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--encre); }
@media (max-width: 760px) { .nav { display: none; } .entete .bouton { margin-left: auto; } }

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px;
  font: 600 15px/1.2 'Plex', sans-serif; text-decoration: none;
  background: var(--encre); color: #fff; border: 1px solid var(--encre);
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
}
.bouton:hover { background: var(--encre-vive); color: #fff; }
.bouton:active { transform: translateY(1px); }
.bouton.discret { background: transparent; color: var(--encre); }
.bouton.discret:hover { background: var(--encre-pale); color: var(--encre); }
.bouton.petit { padding: 9px 14px; font-size: 14px; }
.bouton svg { width: 18px; height: 18px; flex: none; }

kbd {
  font-family: 'Plex Mono', monospace; font-size: 0.82em;
  padding: 2px 7px; border-radius: 6px;
  background: var(--papier); border: 1px solid var(--ligne-forte); border-bottom-width: 2px;
  color: var(--texte); white-space: nowrap;
}

/* ===== Titres ===== */
h1, h2, h3 { font-family: 'Literata', serif; font-weight: 650; letter-spacing: -0.01em; margin: 0; color: var(--texte); }
h1 { font-size: clamp(44px, 5.8vw, 80px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.08; letter-spacing: -0.02em; }
h3 { font-size: 23px; line-height: 1.25; }
.chapeau { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--texte-doux); max-width: 34em; margin: 22px 0 0; }

section { position: relative; }
.bloc { padding: 120px 0; }
.bloc-titre { margin-bottom: 48px; }
.bloc-titre .chapeau { margin-top: 18px; }

/* ===== Accueil ===== */
.accueil { padding: 72px 0 40px; overflow-x: clip; }
.accueil .colonne { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.date-manuscrite { font-family: 'Caveat', cursive; font-size: 30px; color: var(--encre); margin: 0 0 14px; transform: rotate(-1.5deg); display: inline-block; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 34px; }
.actions .precision { font-size: 14px; color: var(--texte-doux); }

.fenetre {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d9dce6;
  background: #fff;
  box-shadow: 0 1px 0 rgba(20, 23, 25, 0.04), 0 24px 60px -24px rgba(40, 20, 40, 0.28);
}
.fenetre img { width: 100%; height: auto; }
.accueil-visuel { position: relative; }
.accueil-visuel .fenetre { transform-origin: top left; }
.post-it {
  position: absolute; right: -8px; bottom: -30px;
  width: 210px; padding: 18px 18px 22px;
  background: #fff3a8; color: #3d3510;
  font-family: 'Caveat', cursive; font-size: 25px; line-height: 1.15;
  transform: rotate(3deg);
  box-shadow: 0 14px 28px -12px rgba(60, 50, 0, 0.35);
}
@media (max-width: 700px) { .post-it { position: relative; right: auto; bottom: auto; margin: -24px 0 0 auto; width: 190px; } }

@media (min-width: 1100px) {
  .accueil .colonne { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 56px; }
  .accueil-visuel .fenetre { width: 128%; }
}

/* L'arrivée : le titre s'écrit à l'encre, une seule fois */
@keyframes encre { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.arrivee > * { animation: encre 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.arrivee > *:nth-child(2) { animation-delay: 0.08s; }
.arrivee > *:nth-child(3) { animation-delay: 0.16s; }
.arrivee > *:nth-child(4) { animation-delay: 0.24s; }

/* ===== Les trois promesses ===== */
.promesses { display: grid; gap: 64px; }
.promesse { display: grid; gap: 28px; align-items: center; }
.promesse h3 { font-size: clamp(26px, 2.6vw, 34px); }
.promesse p { color: var(--texte-doux); margin: 12px 0 0; max-width: 32em; }
.promesse ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.promesse li { padding-left: 26px; position: relative; color: var(--texte); }
.promesse li::before { content: ''; position: absolute; left: 4px; top: 0.55em; width: 10px; height: 10px; border: 2px solid var(--encre); border-radius: 3px; }
@media (min-width: 960px) {
  .promesse { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; }
  .promesse.inverse > :first-child { order: 2; }
}
.exemple {
  font-family: 'Plex Mono', monospace; font-size: 15px;
  background: var(--papier); border: 1px dashed var(--marge); border-radius: 10px;
  padding: 14px 16px; margin-top: 18px; color: var(--texte); max-width: 30em;
}
.exemple b { color: var(--encre); font-weight: 400; }

/* ===== L'ardoise : Axone et Mon cerveau ===== */
.ardoise {
  background: var(--ardoise);
  color: var(--craie);
  background-image: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 22px 22px;
}
.ardoise h2, .ardoise h3 { color: #fff; }
.ardoise .chapeau, .ardoise p { color: var(--craie-douce); }
.ardoise .note-marge { color: #f4a3c7; }
.ardoise a { color: #f4a3c7; }
.ardoise .fenetre { border-color: #2c3136; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7); }
.ardoise .bloc { padding: 120px 0; }

.jarvis { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1100px) { .jarvis { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; } }
.capacites { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.capacites li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.capacites strong { color: #fff; font-weight: 600; display: block; }
.capacites span { color: var(--craie-douce); }
.pastille { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(244, 163, 199, 0.12); color: #f4a3c7; }
.pastille svg { width: 19px; height: 19px; }
.cle-perso {
  margin-top: 30px; padding: 16px 18px; border-radius: 12px;
  border: 1px solid #2e3338; background: var(--ardoise-2);
  font-size: 15px; color: var(--craie-douce);
}
.cle-perso strong { color: var(--craie); }

.cerveau { display: grid; gap: 40px; margin-top: 120px; }
@media (min-width: 1100px) { .cerveau { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: center; } }

/* ===== Le sommaire des modules ===== */
.sommaire { list-style: none; margin: 0; padding: 0; columns: 2 380px; column-gap: 64px; }
.sommaire li { break-inside: avoid; display: flex; align-items: baseline; gap: 10px; padding: 7px 0; }
.sommaire .titre { font-family: 'Literata', serif; font-weight: 600; font-size: 19px; white-space: nowrap; }
.sommaire .pointilles { flex: 1; border-bottom: 2px dotted var(--ligne-forte); transform: translateY(-5px); min-width: 24px; }
.sommaire .quoi { color: var(--texte-doux); font-size: 15px; text-align: right; }

/* ===== Les vues, en onglets ===== */
.onglets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.onglets button {
  font: 500 15px 'Plex', sans-serif; color: var(--texte-doux);
  background: var(--papier); border: 1px solid var(--ligne-forte); border-radius: 999px;
  padding: 8px 16px; cursor: pointer;
}
.onglets button[aria-selected='true'] { background: var(--encre); border-color: var(--encre); color: #fff; }
.onglets button:hover:not([aria-selected='true']) { border-color: var(--encre); color: var(--encre); }
.panneau { display: grid; gap: 28px; }
.panneau[hidden] { display: none; }
.panneau p { margin: 0; color: var(--texte-doux); max-width: 44em; }
.panneau p strong { color: var(--texte); }

/* ===== Confidentialité ===== */
.coffre { display: grid; gap: 22px; }
@media (min-width: 900px) { .coffre { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.coffre h3 { font-size: 21px; margin-bottom: 8px; }
.coffre p { margin: 0; color: var(--texte-doux); }
.coffre .tampon { display: inline-block; font-family: 'Caveat', cursive; font-size: 22px; color: var(--encre); border: 2px solid var(--encre); border-radius: 8px; padding: 0 10px; transform: rotate(-4deg); margin-bottom: 14px; }

/* ===== Tarifs : des fiches bristol ===== */
.fiches { display: grid; gap: 28px; }
@media (min-width: 980px) { .fiches { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fiche {
  position: relative;
  background: #fffdf6;
  border-radius: 6px;
  padding: 26px 28px 30px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 18px 40px -22px rgba(40, 20, 40, 0.35);
  /* Lignes bleues de bristol, ligne rouge en tête */
  background-image: linear-gradient(transparent 63px, #e7546c 63px, #e7546c 65px, transparent 65px), repeating-linear-gradient(transparent 0 31px, #cfe0f3 31px 32px);
  background-position: 0 0, 0 66px;
}
.fiche:nth-child(2) { transform: rotate(0.6deg); }
.fiche:nth-child(1) { transform: rotate(-0.4deg); }
.fiche:nth-child(3) { transform: rotate(-0.3deg); }
.fiche .prix-barre { font-size: 26px; font-weight: 500; color: var(--texte-doux); }
.fiche .prix small { white-space: nowrap; }
@media (max-width: 480px) { .fiche .prix { font-size: 42px; } .fiche .prix-barre { font-size: 20px; } .fiche .prix small { font-size: 16px; } }
.fiche h3 { font-size: 24px; height: 40px; }
.fiche .prix { font-family: 'Literata', serif; font-size: 52px; font-weight: 650; line-height: 64px; margin-top: 24px; color: var(--texte); }
.fiche .prix small { font-size: 18px; font-weight: 500; color: var(--texte-doux); font-family: 'Plex', sans-serif; }
.fiche ul { margin: 0 0 28px; padding: 0; list-style: none; }
.fiche li { line-height: 32px; padding-left: 26px; position: relative; }
.fiche li::before { content: '✓'; position: absolute; left: 2px; color: var(--encre); font-weight: 700; }
.fiche .bouton { width: 100%; }
.fiche .tampon-fiche { position: absolute; top: 14px; right: 18px; font-family: 'Caveat', cursive; font-size: 24px; color: var(--encre); transform: rotate(6deg); }
.mentions-paiement { margin-top: 26px; font-size: 14px; color: var(--texte-doux); }

/* ===== Questions ===== */
.questions { display: grid; gap: 0; max-width: 820px; border-top: 1px solid var(--ligne-forte); }
.questions details { border-bottom: 1px solid var(--ligne-forte); background: rgba(255, 255, 255, 0.75); }
.questions summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 4px; font-family: 'Literata', serif; font-size: 19px; font-weight: 600; position: relative; }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after { content: '+'; position: absolute; right: 8px; top: 14px; font-family: 'Plex', sans-serif; font-size: 24px; font-weight: 300; color: var(--encre); transition: transform 0.2s; }
.questions details[open] summary::after { transform: rotate(45deg); }
.questions details p { margin: 0 0 20px 4px; color: var(--texte-doux); max-width: 46em; }

/* ===== Téléchargement ===== */
.telecharger { text-align: left; }
.telecharger .actions { margin-top: 28px; }
.autres { margin-top: 14px; font-size: 14px; color: var(--texte-doux); }
.autres a { margin-right: 14px; }

/* ===== Pied de page ===== */
.pied { border-top: 1px solid var(--ligne-forte); background: rgba(255, 255, 255, 0.9); padding: 36px 0 44px; font-size: 14px; color: var(--texte-doux); }
.pied .page { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.pied nav { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
.pied a { color: var(--texte-doux); }

/* ===== Pages légales ===== */
.legal { padding: 64px 0 96px; }
.legal .colonne { max-width: 760px; background: rgba(255, 255, 255, 0.88); }
.legal h1 { font-size: clamp(34px, 4.4vw, 52px); }
.legal h2 { font-size: 24px; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--texte); }
.legal .maj { color: var(--texte-doux); margin-top: 8px; }
.legal .a-completer { background: #fff3a8; padding: 0 4px; border-radius: 3px; }

.liens-dessin { width: 100%; max-width: 560px; height: auto; justify-self: center; }

/* Sur téléphone : le sommaire passe en deux lignes par module, le bouton d'en-tête reste court */
@media (max-width: 640px) {
  .sommaire li { flex-direction: column; align-items: flex-start; gap: 0; padding: 9px 0; border-bottom: 1px dotted var(--ligne-forte); }
  .sommaire .pointilles { display: none; }
  .sommaire .titre { white-space: normal; }
  .sommaire .quoi { text-align: left; }
  .entete .bouton { white-space: nowrap; padding: 8px 12px; font-size: 13px; }
  .bloc { padding: 80px 0; }
  .ardoise .bloc { padding: 80px 0; }
}
