/* School Note, site vitrine. DA « cahier d'écolier » : papier ligné, marge, encre, coche. */

:root {
  --paper: #F7F3EA;
  --paper-deep: #F1EBDE;
  --card: #FFFDF8;
  --ink: #1C2433;
  --ink-soft: #3D4456;
  --muted: #6E6A5E;
  --subtle: #9C968A;
  --line: #E5DECF;
  --line-soft: #EEE8DA;
  --rule: #E9E2D2;
  --orange: #D64507;
  --orange-dark: #B53A06;
  --orange-tint: #FBEEE4;
  --orange-soft: #F2D8C8;
  --board: #1E3D32;
  --board-deep: #163027;
  --chalk: #EDE7D8;
  --pen: #2B4C9B;
  --ok: #2D5240;
  --ok-soft: #E4EDE6;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;
  --hand: 'Caveat', cursive;
  --mono: 'JetBrains Mono', monospace;

  --shadow: 0 4px 18px rgba(28, 36, 51, 0.07);
  --shadow-lg: 0 26px 60px -24px rgba(28, 36, 51, 0.28);
  --r: 14px;
  --r-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Papier ligné + marge de cahier sur toute la page */
body {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(var(--rule) 1px, transparent 1px);
  background-size: 100% 34px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  top: 0; bottom: 0; left: clamp(18px, 4vw, 64px);
  width: 2px;
  background: var(--orange-soft);
  pointer-events: none;
  z-index: 1;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
section { padding: 76px 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- Typo ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.015em; }
h1 { font-size: clamp(36px, 5.2vw, 56px); }
h2 { font-size: clamp(27px, 3.8vw, 38px); }
h3 { font-size: 20px; }
em.tone { font-style: italic; color: var(--orange-dark); font-weight: 400; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.17em; text-transform: uppercase;
  color: var(--orange-dark); margin-bottom: 14px; display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--orange); }
.lede { color: var(--ink-soft); font-size: 16.5px; max-width: 600px; margin-top: 14px; }
.hand-note { font-family: var(--hand); color: var(--pen); font-size: 25px; line-height: 1.2; }

/* Soulignement « coup de stylo » */
.pen-u { position: relative; white-space: nowrap; }
.pen-u svg { position: absolute; left: -2%; bottom: -0.14em; width: 104%; height: 0.32em; overflow: visible; }
.pen-u svg path {
  stroke: var(--orange); stroke-width: 7; fill: none; stroke-linecap: round;
  stroke-dasharray: 230; stroke-dashoffset: 230;
  animation: penstroke 0.9s 0.55s cubic-bezier(0.6, 0, 0.3, 1) forwards;
}
@keyframes penstroke { to { stroke-dashoffset: 0; } }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247, 243, 234, 0.93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .name { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.brand .name em { font-style: italic; color: var(--orange-dark); font-weight: 400; }
nav.links { display: flex; gap: 4px; }
nav.links a {
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-soft);
  padding: 9px 14px; border-radius: 9px; position: relative; transition: color 0.16s, background 0.16s;
}
nav.links a:hover { color: var(--ink); background: var(--line-soft); }
nav.links a.on { color: var(--orange-dark); font-weight: 600; }
nav.links a.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 3px;
  background: var(--orange); border-radius: 3px 5px 4px 6px; transform: rotate(-0.6deg);
}
.nav-cta { display: flex; align-items: center; gap: 10px; }

.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--ink); }
@media (max-width: 920px) {
  nav.links {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: var(--card); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 12px 20px 18px; gap: 2px;
    box-shadow: var(--shadow-lg);
  }
  nav.links.open { display: flex; }
  nav.links a { padding: 13px 12px; font-size: 15px; }
  .burger { display: inline-flex; }
  .nav-cta .btn { display: none; }
  .nav-cta .burger { display: inline-flex; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none; cursor: pointer;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  border-radius: 11px; padding: 13px 24px; border: none;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, color 0.16s;
}
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 8px 20px -10px rgba(214, 69, 7, 0.6); }
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); }
.btn-ink { background: transparent; color: var(--ink); border: 1.6px solid var(--ink); }
.btn-ink:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn-chalk { background: transparent; color: var(--chalk); border: 1.6px solid rgba(237, 231, 216, 0.55); }
.btn-chalk:hover { background: var(--chalk); color: var(--board); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn svg { transition: transform 0.18s; }
.btn:hover svg { transform: translateX(3px); }

/* ---------- Cartes & blocs ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px; box-shadow: var(--shadow);
}
.copy-card { position: relative; }
.copy-card::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 22px; width: 1.5px;
  background: var(--orange-soft); border-radius: 2px;
}

/* Numéro d'exercice dans la marge */
.ex-num {
  font-family: var(--hand); font-size: 27px; color: var(--orange-dark); line-height: 1;
}

/* Cadre navigateur pour les captures */
.browser {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.browser .bar {
  display: flex; align-items: center; gap: 7px; padding: 11px 15px;
  background: var(--paper-deep); border-bottom: 1px solid var(--line);
}
.browser .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser .dot.o { background: var(--orange-soft); }
.browser .url {
  margin-left: 10px; flex: 1; min-width: 0; max-width: 360px;
  background: var(--card); border: 1px solid var(--line); border-radius: 7px;
  font-family: var(--mono); font-size: 10.5px; color: var(--muted); padding: 4px 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Tampon d'école */
.stamp {
  width: 118px; height: 118px; flex: none;
  transform: rotate(-9deg);
  opacity: 0.92;
}

/* ---------- Sections sombres (tableau) ---------- */
.board {
  background: var(--board);
  background-image: radial-gradient(ellipse at 18% 0%, rgba(237, 231, 216, 0.07), transparent 55%),
                    radial-gradient(ellipse at 90% 110%, rgba(214, 69, 7, 0.16), transparent 50%);
  color: var(--chalk);
  border-radius: var(--r-lg);
  padding: 58px 54px;
  position: relative; overflow: hidden;
}
.board .eyebrow { color: var(--orange-soft); }
.board .eyebrow::before { background: var(--orange-soft); }
.board h2 em { color: #F0A47E; font-style: italic; font-weight: 400; }
.board p { color: #C9D2C5; }
@media (max-width: 760px) { .board { padding: 38px 26px; } }

/* ---------- Listes à coche ---------- */
.ticks { list-style: none; display: grid; gap: 11px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks li svg { flex: none; margin-top: 3px; }

/* ---------- Tableau comparatif ---------- */
.table-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 24px 12px; overflow-x: auto; box-shadow: var(--shadow); }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.cmp th, table.cmp td { text-align: left; padding: 15px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp thead th { font-size: 10.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }
table.cmp .sn { color: var(--orange-dark); font-weight: 600; }
table.cmp td:first-child { font-weight: 600; color: var(--ink); }
table.cmp .dim { color: var(--subtle); }

/* ---------- Tarifs ---------- */
.prices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .prices { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .prices { grid-template-columns: 1fr; } }
.price {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 28px 22px; text-align: center; position: relative;
  transition: transform 0.18s, box-shadow 0.18s;
}
.price:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.price.hot { border: 1.6px solid var(--orange); }
.price .flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%) rotate(-1.5deg);
  background: var(--orange); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; border-radius: 100px; padding: 4px 13px;
}
.price .size { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.price .amt { font-family: var(--serif); font-size: 36px; font-weight: 500; color: var(--orange-dark); margin-top: 10px; }
.price .per { font-size: 11.5px; color: var(--subtle); }

/* ---------- Étapes ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--orange-tint); border: 1px solid var(--orange-soft); border-radius: var(--r); padding: 24px 20px; }
.step .n { font-family: var(--hand); font-size: 30px; color: var(--orange-dark); line-height: 1; }
.step h3 { font-size: 16.5px; margin: 9px 0 5px; font-family: var(--sans); font-weight: 700; }
.step p { font-size: 13px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 0; overflow: hidden; }
.faq summary {
  cursor: pointer; list-style: none; padding: 19px 22px; font-weight: 600; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--serif); font-size: 22px; color: var(--orange); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 22px 20px; color: var(--ink-soft); font-size: 14px; max-width: 640px; }

/* ---------- Footer ---------- */
footer.site {
  margin-top: 30px; background: var(--ink); color: #C8CBD4; position: relative; z-index: 2;
}
footer.site .foot { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; padding: 52px 0 40px; }
@media (max-width: 760px) { footer.site .foot { grid-template-columns: 1fr; gap: 26px; } }
footer.site .brand .name { color: #F4F1E8; }
footer.site p { font-size: 13px; line-height: 1.6; }
footer.site h4 { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: #8C909C; margin-bottom: 13px; }
footer.site ul { list-style: none; display: grid; gap: 8px; font-size: 13.5px; }
footer.site a { text-decoration: none; opacity: 0.85; transition: opacity 0.15s, color 0.15s; }
footer.site a:hover { opacity: 1; color: #F0A47E; }
footer.site .legal {
  border-top: 1px solid rgba(200, 203, 212, 0.18); padding: 18px 0 22px;
  font-size: 12px; color: #8C909C; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}

/* ---------- Reveals ---------- */
.js-sr .sr { opacity: 0; transform: translateY(20px); transition: opacity 0.65s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.65s cubic-bezier(0.2, 0.7, 0.3, 1); }
.js-sr .sr.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js-sr .sr { opacity: 1; transform: none; }
}

/* ---------- Helpers ---------- */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; }
@media (max-width: 880px) { .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 30px; } }
/* Les items de grille ne doivent jamais imposer leur min-content (barres d'URL nowrap, etc.) */
.grid-2 > *, .hero-grid > *, .board-grid > * { min-width: 0; }
.center { text-align: center; }
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 34px; } .mt-4 { margin-top: 48px; }
.mono { font-family: var(--mono); }
