/* ==========================================================================
   Dessine-Moi Une École — « Carnet d'atelier »
   Papier crème, encre bleu nuit, crayons de couleur, feuille de cahier Seyès.
   ========================================================================== */

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Covered By Your Grace"; src: url("../fonts/covered-by-your-grace.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #f5efe2;
  --paper-2: #ece3cf;
  --sheet: #fcf9f1;
  --ink: #1b2a49;
  --ink-soft: #465270;
  --sun: #f2b632;
  --sun-soft: #fbe7a1;
  --terra: #c8553d;
  --terra-deep: #a4402b;
  --ultra: #2e4b8f;
  --leaf: #5b8c5a;
  --leaf-deep: #3f6b3f;
  --sky: #a8cbe8;
  --rule: rgba(27, 42, 73, 0.14);
  --seyes: rgba(84, 104, 168, 0.3);
  --seyes-fine: rgba(84, 104, 168, 0.14);
  --margin: rgba(214, 92, 92, 0.55);

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hand: "Covered By Your Grace", "Segoe Print", "Bradley Hand", cursive;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 14px 16px 13px 15px; /* coins légèrement irréguliers, comme découpés à la main */
  --shadow: 0 1px 0 rgba(27, 42, 73, 0.06), 0 10px 24px -12px rgba(27, 42, 73, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper) url("../img/paper.svg");
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--ultra); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--terra-deep); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; box-shadow: 0 0 0 5px var(--ink); }
::selection { background: var(--sun); color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 0.5em; font-variation-settings: "SOFT" 100, "WONK" 1; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); font-weight: 450; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
em, i { font-style: italic; }
.lead { font-size: clamp(1.15rem, 1.6vw + 0.6rem, 1.4rem); line-height: 1.55; color: var(--ink-soft); max-width: 38em; }
.small { font-size: 0.9rem; }
.muted { color: var(--ink-soft); }
.hand { font-family: var(--hand); font-weight: 400; letter-spacing: 0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 46rem); margin-inline: auto; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: 0.7rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }

/* --- Soulignements au feutre -------------------------------------------------- */
.mark { background: url("../img/swash-sun.svg") no-repeat 0 92% / 100% 0.36em; padding-bottom: 0.08em; }
.mark-terra { background-image: url("../img/swash-terra.svg"); }
.mark-ink { background-image: url("../img/swash-ink.svg"); }
.circled { position: relative; display: inline-block; padding: 0.15em 0.6em; }
.circled::before { content: ""; position: absolute; inset: -0.25em -0.35em; background: url("../img/loop.svg") no-repeat center / 100% 100%; pointer-events: none; }

.kicker { font-family: var(--hand); font-size: 1.5rem; line-height: 1; color: var(--terra-deep); margin: 0 0 0.35rem; transform: rotate(-1.5deg); transform-origin: left; display: inline-block; }

/* --- En-tête -------------------------------------------------------------------- */
.site-header { position: relative; z-index: 20; padding-block: 1rem; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 2.6rem; height: 2.6rem; flex: none; }
.brand-name { font-family: var(--serif); font-weight: 560; font-size: 1.22rem; line-height: 1.05; letter-spacing: -0.01em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.brand-sub { display: block; font-family: var(--hand); font-weight: 400; font-size: 1.05rem; color: var(--terra-deep); letter-spacing: 0.02em; }

.nav { display: flex; align-items: center; gap: 0.25rem 1.4rem; flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.98rem; padding: 0.4rem 0; background: linear-gradient(var(--terra), var(--terra)) no-repeat 0 100% / 0 2px; transition: background-size 0.25s ease; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { background-size: 100% 2px; color: var(--ink); }
.nav-toggle { display: none; }

@media (max-width: 52rem) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: 0.5rem; background: none; border: 2px solid var(--ink); border-radius: 999px; padding: 0.45rem 0.95rem; font: 600 0.95rem var(--sans); color: var(--ink); cursor: pointer; }
  .js .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 0 1rem; border-top: 1px solid var(--rule); margin-top: 0.4rem; }
  .js .nav.open { display: flex; }
  .js .nav a:not(.btn) { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); background: none; }
  .js .nav .btn { margin-top: 0.8rem; text-align: center; }
  .nav { gap: 0.2rem 1rem; }
}

/* --- Boutons -------------------------------------------------------------------- */
.btn { --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem; padding: 0.8rem 1.4rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font: 600 1rem/1.1 var(--sans); text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 var(--sun); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { color: var(--paper); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--sun); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--sun); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn-ghost:hover { color: var(--ink); background: var(--sun-soft); box-shadow: none; transform: none; }
.btn-sun { background: var(--sun); color: var(--ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn-sun:hover { color: var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.btn-danger { background: transparent; color: var(--terra-deep); border-color: var(--terra-deep); box-shadow: none; }
.btn-danger:hover { background: var(--terra-deep); color: #fff; box-shadow: none; transform: none; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.92rem; box-shadow: 2px 2px 0 var(--sun); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* --- Héros ---------------------------------------------------------------------- */
.hero { padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: 1.02fr 0.98fr; } }
.hero h1 { margin-bottom: 0.45em; }
.hero h1 em { font-style: italic; }
.hero .lead { margin-bottom: 1.6rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem 1.1rem; align-items: center; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; margin: 2rem 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: 0.95rem; }
.hero-facts strong { color: var(--ink); font-weight: 600; }

/* Feuille de cahier Seyès : grands carreaux de 8 mm, trait fin entre chaque, marge rouge */
.seyes {
  --sq: 32px;
  background-color: var(--sheet);
  background-image:
    linear-gradient(90deg, transparent calc(var(--sq) * 2.25), var(--margin) calc(var(--sq) * 2.25), var(--margin) calc(var(--sq) * 2.25 + 2px), transparent calc(var(--sq) * 2.25 + 2px)),
    linear-gradient(90deg, var(--seyes) 1px, transparent 1px),
    linear-gradient(0deg, var(--seyes) 1px, transparent 1px),
    linear-gradient(0deg, var(--seyes-fine) 1px, transparent 1px);
  background-size: 100% 100%, var(--sq) var(--sq), var(--sq) var(--sq), var(--sq) calc(var(--sq) / 4);
}
.sheet { position: relative; border-radius: 4px 6px 5px 3px; box-shadow: var(--shadow), 0 40px 60px -40px rgba(27, 42, 73, 0.4); transform: rotate(1.4deg); padding: clamp(0.6rem, 2vw, 1.2rem); }
.sheet::before, .sheet::after { content: ""; position: absolute; top: -14px; width: 92px; height: 30px; background: rgba(242, 182, 50, 0.72); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); clip-path: polygon(0 10%, 4% 0, 8% 12%, 12% 0, 92% 4%, 96% 0, 100% 14%, 97% 52%, 100% 90%, 94% 100%, 88% 88%, 10% 100%, 5% 88%, 0 96%, 3% 50%); }
.sheet::before { left: 10%; transform: rotate(-5deg); }
.sheet::after { right: 9%; transform: rotate(4deg); background: rgba(168, 203, 232, 0.8); }
.sheet .caption { font-family: var(--hand); font-size: 1.35rem; color: var(--ink-soft); text-align: right; margin: 0.25rem 0.5rem 0; transform: rotate(-1deg); }

/* --- Dessins ---------------------------------------------------------------------- */
.sketch { display: block; width: 100%; overflow: visible; }
.sketch .ink { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
.sketch .faint { stroke: var(--ink-soft); }
.sketch .guide { fill: none; stroke: var(--ultra); stroke-opacity: 0.35; stroke-linecap: round; stroke-dasharray: 1; }
.sketch .guide.dashed { stroke-dasharray: 0.012 0.012; }
.sketch .crayon { stroke-linecap: round; stroke-linejoin: round; mix-blend-mode: multiply; opacity: 0.8; }
.sketch .terra { stroke: var(--terra); }
.sketch .ultra { stroke: var(--ultra); }
.sketch .leaf { stroke: var(--leaf); }
.sketch .sun { stroke: var(--sun); }
.sketch .sky { stroke: var(--sky); }
.sketch .brick { stroke: #b2533a; }
.sketch .tint { stroke: var(--tint, var(--terra)); }
.sketch .hand { font-family: var(--hand); fill: var(--ink); }
.sketch .letter { letter-spacing: 0.08em; }
.pencil-tool .wood { fill: #e8c79a; stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.pencil-tool .lead { fill: var(--ink); }
.pencil-tool .body { fill: var(--sun); stroke: var(--ink); stroke-width: 1.4; }
.pencil-tool .stripe { stroke: #c98f0b; stroke-width: 1.1; fill: none; }
.pencil-tool .ferrule { fill: #c6cbd6; stroke: var(--ink); stroke-width: 1.2; }
.pencil-tool .eraser { fill: var(--terra); stroke: var(--ink); stroke-width: 1.3; }

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes tint-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pencil-in { from { opacity: 0; translate: 24px 18px; } to { opacity: 1; translate: 0 0; } }

@media (prefers-reduced-motion: no-preference) {
  .sketch .ink, .sketch .guide { animation: draw 0.9s cubic-bezier(0.5, 0.1, 0.2, 1) both; }
  .sketch .fill { animation: tint-in 1s ease both; }
  .sketch .pencil-tool { animation: pencil-in 0.9s 2.4s ease-out both; }
  .sketch .st1 { animation-delay: 0.05s; } .sketch .st2 { animation-delay: 0.35s; } .sketch .st3 { animation-delay: 0.65s; }
  .sketch .st4 { animation-delay: 0.95s; } .sketch .st5 { animation-delay: 1.25s; } .sketch .st6 { animation-delay: 1.5s; }
  .sketch .st7 { animation-delay: 1.75s; } .sketch .st8 { animation-delay: 2s; } .sketch .st9 { animation-delay: 2.25s; }
  .sketch .st10 { animation-delay: 2.5s; }
  .sketch .f3 { animation-delay: 1.2s; } .sketch .f4 { animation-delay: 1.5s; } .sketch .f5 { animation-delay: 1.8s; }
  .sketch .f6 { animation-delay: 2.1s; } .sketch .f7 { animation-delay: 2.4s; } .sketch .f8 { animation-delay: 2.7s; } .sketch .f9 { animation-delay: 3s; }
  /* Les vignettes se dessinent plus vite */
  .sketch-spot .ink { animation-duration: 0.6s; }
  .sketch-spot .st1 { animation-delay: 0s; } .sketch-spot .st2 { animation-delay: 0.15s; } .sketch-spot .st3 { animation-delay: 0.3s; }
  .sketch-spot .st4 { animation-delay: 0.45s; } .sketch-spot .st5 { animation-delay: 0.6s; } .sketch-spot .st6 { animation-delay: 0.75s; }
  .sketch-spot .f3, .sketch-spot .f4, .sketch-spot .f5, .sketch-spot .f6, .sketch-spot .f7 { animation-delay: 0.6s; }
}

/* --- Sections ----------------------------------------------------------------------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { max-width: 40rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-head p { color: var(--ink-soft); font-size: 1.12rem; }
.section-head .kicker { font-size: 1.5rem; color: var(--terra-deep); }
.band-ink .section-head .kicker, .band-ink .kicker { color: var(--sun); }
.band { background: var(--paper-2); background-image: url("../img/paper.svg"); border-block: 1px solid var(--rule); }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink .kicker { color: var(--sun); }
.band-ink a:not(.btn) { color: var(--sun); }
.band-ink .btn-sun { color: var(--ink); }
.band-ink .btn-sun:hover { color: var(--ink); }

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }

/* --- Cartes ---------------------------------------------------------------------------- */
.card { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(1.2rem, 2.5vw, 1.8rem); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 0.4em; }
.card > :last-child { margin-bottom: 0; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
a.card:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 1px 0 rgba(27, 42, 73, 0.06), 0 18px 30px -14px rgba(27, 42, 73, 0.35); color: inherit; }
.card-link { font-weight: 600; color: var(--ultra); margin-top: 1rem; display: inline-flex; gap: 0.4rem; align-items: center; }
a.card:hover .card-link { color: var(--terra-deep); }

.school-card .sketch-school { width: 5.2rem; margin-bottom: 1rem; }
.school-card.baker { --tint: var(--sun); }
.school-card.albrecht { --tint: var(--terra); }
.school-card.germain { --tint: var(--ultra); }
.school-card .level { font-family: var(--hand); font-size: 1.25rem; color: var(--ink-soft); margin: 0 0 0.3rem; }

.pillars { counter-reset: p; }
.pillar { position: relative; padding-top: 3.2rem; }
.pillar::before { counter-increment: p; content: counter(p); position: absolute; top: 0; left: 0; font-family: var(--hand); font-size: 3.2rem; line-height: 1; color: var(--terra); }
.pillar p { color: var(--ink-soft); margin: 0; }

/* Bandeau de campagne : un ticket perforé */
.ticket { position: relative; display: grid; gap: 1.2rem 2rem; align-items: center; background: var(--sun-soft); border: 2px solid var(--ink); border-radius: 12px; padding: clamp(1.2rem, 3vw, 2rem) clamp(1.2rem, 3vw, 2.2rem); box-shadow: 6px 6px 0 var(--ink); color: var(--ink); text-decoration: none; transform: rotate(-0.6deg); }
.ticket:hover { color: var(--ink); transform: rotate(0deg) translateY(-2px); }
@media (min-width: 46rem) { .ticket { grid-template-columns: 7rem 1fr auto; } }
.ticket .sketch-spot { width: 6rem; }
.ticket h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 0.2rem; }
.ticket p { margin: 0; }
.ticket .when { font-family: var(--hand); font-size: 1.5rem; line-height: 1.1; color: var(--terra-deep); }
.ticket::before, .ticket::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); top: 50%; translate: 0 -50%; }
.ticket::before { left: -13px; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -13px; clip-path: inset(0 50% 0 0); }

/* Actualités */
.post-card { display: flex; flex-direction: column; gap: 0.6rem; height: 100%; padding: 0; overflow: hidden; }
.post-card .cover { aspect-ratio: 16 / 9; background: var(--paper-2); overflow: hidden; border-bottom: 1px solid var(--rule); }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .cover.blank { display: grid; place-items: center; background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(27, 42, 73, 0.04) 10px 11px); }
.post-card .cover.blank svg { width: 3rem; opacity: 0.5; }
.post-card .body { padding: 0.4rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.post-card h3 { font-size: 1.35rem; margin: 0; }
.post-card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }
.meta { font-family: var(--hand); font-size: 1.2rem; color: var(--terra-deep); line-height: 1; }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--sun-soft); color: var(--ink); border: 1px solid rgba(27, 42, 73, 0.2); }
.tag.open { background: #d9ecd2; }
.tag.closed { background: #ebe3d3; color: var(--ink-soft); }

.prose { font-size: 1.1rem; }
.prose h3 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h4 { font-size: 1.25rem; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.3em; }
.prose blockquote { margin: 1.5em 0; padding: 0.2em 0 0.2em 1.2em; border-left: 4px solid var(--sun); font-family: var(--serif); font-size: 1.25rem; font-style: italic; color: var(--ink-soft); }
.prose blockquote p { margin: 0; }

.page-head { padding-block: clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 18em; margin-bottom: 0.3em; }
.crumbs { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 1rem; }
.crumbs a { color: inherit; }

.article-cover { margin: 0 0 2rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); box-shadow: var(--shadow); }
.article-cover img { display: block; width: 100%; height: auto; }

/* Empty states */
.empty { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1rem; background: var(--sheet); border: 2px dashed var(--rule); border-radius: var(--radius); color: var(--ink-soft); }
.empty .sketch-spot { width: 5rem; margin: 0 auto 1rem; opacity: 0.85; }
.empty p { max-width: 30rem; margin-inline: auto; }

/* --- Formulaires -------------------------------------------------------------------------- */
.form { display: grid; gap: 1.3rem; }
.field { display: grid; gap: 0.4rem; }
.field label, .field .label, legend { font-weight: 600; font-size: 0.98rem; }
.field .hint { font-size: 0.88rem; color: var(--ink-soft); margin: 0; }
.req { color: var(--terra-deep); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="date"], input[type="url"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 10px 12px 9px 11px; padding: 0.7rem 0.85rem; min-height: 3rem;
  box-shadow: 2px 2px 0 rgba(27, 42, 73, 0.12); transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ultra); box-shadow: 0 0 0 4px var(--sun), 2px 2px 0 var(--ink); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--terra-deep); background: #fff6f3; }
.field .err { color: var(--terra-deep); font-weight: 600; font-size: 0.92rem; margin: 0; }
input[type="checkbox"], input[type="radio"] { width: 1.3rem; height: 1.3rem; accent-color: var(--ink); margin: 0.2rem 0 0; flex: none; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 400; }
.check label { font-weight: 400; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.row { display: grid; gap: 1.3rem; }
@media (min-width: 40rem) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: 2fr 1fr 1fr; } }

.alert { padding: 1rem 1.2rem; border-radius: 10px; border: 2px solid var(--ink); background: var(--sun-soft); margin-bottom: 1.5rem; }
.alert.error { background: #fde8e2; border-color: var(--terra-deep); }
.alert.ok { background: #dcefd6; border-color: var(--leaf-deep); }
.alert h2, .alert h3 { font-size: 1.15rem; margin-bottom: 0.3em; font-family: var(--sans); font-weight: 700; font-variation-settings: normal; letter-spacing: 0; }
.alert ul { margin: 0.4em 0 0; padding-left: 1.2em; }

/* --- Catalogue & commande ------------------------------------------------------------------ */
.shop { display: grid; gap: 2.5rem; }
@media (min-width: 62rem) { .shop { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } .shop-side { position: sticky; top: 1.5rem; } }
.cat-title { font-family: var(--hand); font-size: 1.8rem; color: var(--terra-deep); margin: 2rem 0 0.8rem; line-height: 1; }
.cat-title:first-child { margin-top: 0; }
.products { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.product { position: relative; display: flex; flex-direction: column; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.product .photo { aspect-ratio: 4 / 3; background: var(--paper-2); border-bottom: 1px solid var(--rule); position: relative; }
.product .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product .photo.blank { display: grid; place-items: center; background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(27, 42, 73, 0.04) 10px 11px); }
.product .photo.blank svg { width: 4.2rem; opacity: 0.8; }
.product .info { padding: 0.9rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.product h4 { margin: 0; font-size: 1.18rem; }
.product .fmt { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.product .desc { font-size: 0.93rem; color: var(--ink-soft); margin: 0; }
.product .allergens { font-size: 0.82rem; color: var(--ink-soft); margin: 0; }
.product .allergens b { color: var(--ink); }
.product .buy { margin-top: auto; padding-top: 0.7rem; display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; }
.price { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; font-variation-settings: "SOFT" 100; white-space: nowrap; }
.qty { display: inline-flex; align-items: stretch; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.qty input { width: 3rem; min-height: 2.5rem; border: 0; border-radius: 0; text-align: center; padding: 0; box-shadow: none; -moz-appearance: textfield; appearance: textfield; font-weight: 600; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty button { width: 2.5rem; border: 0; background: var(--sun-soft); color: var(--ink); font: 700 1.25rem/1 var(--sans); cursor: pointer; }
.qty button:hover { background: var(--sun); }
.product.in-cart { border-color: var(--ink); box-shadow: 4px 4px 0 var(--sun); }
.soldout { font-family: var(--hand); font-size: 1.3rem; color: var(--terra-deep); }

.summary { background: var(--sheet); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--ink); padding: 1.4rem; }
.summary h3 { margin-bottom: 0.6rem; }
.summary ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.summary li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px dashed var(--rule); font-size: 0.97rem; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--serif); font-size: 1.6rem; font-weight: 600; margin: 0.4rem 0 1.2rem; }
.summary .empty-line { color: var(--ink-soft); justify-content: center; border: 0; font-family: var(--hand); font-size: 1.25rem; }

.receipt { background: var(--sheet); border: 1px solid var(--rule); box-shadow: var(--shadow); padding: clamp(1.4rem, 4vw, 2.5rem); position: relative; transform: rotate(-0.4deg); }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(-45deg, transparent 6px, var(--sheet) 0) 0 0 / 14px 10px, linear-gradient(45deg, transparent 6px, var(--sheet) 0) 0 0 / 14px 10px; }
.receipt .ref { font-family: var(--hand); font-size: clamp(2rem, 6vw, 3rem); color: var(--terra-deep); line-height: 1; margin: 0.2rem 0 1rem; }
.receipt table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.receipt th, .receipt td { text-align: left; padding: 0.5rem 0; border-bottom: 1px dashed var(--rule); }
.receipt td:last-child, .receipt th:last-child { text-align: right; }
.receipt tfoot td { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; border: 0; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1.2rem; margin: 0; }
dl.facts dt { color: var(--ink-soft); }
dl.facts dd { margin: 0; font-weight: 500; }

/* Note collée (post-it) */
.postit { color: var(--ink); background: var(--sun-soft); padding: 1.2rem 1.3rem 1.4rem; border-radius: 2px 2px 14px 2px; box-shadow: 0 10px 18px -10px rgba(27, 42, 73, 0.45); transform: rotate(1.2deg); font-family: var(--hand); font-size: 1.4rem; line-height: 1.25; }
.postit p { margin: 0; }
.postit small { display: block; font-family: var(--sans); font-size: 0.85rem; margin-top: 0.6rem; color: var(--ink-soft); }

/* --- Pied de page ------------------------------------------------------------------------------ */
.site-footer { position: relative; margin-top: clamp(3rem, 8vw, 6rem); background: var(--ink); color: rgba(245, 239, 226, 0.88); padding: clamp(3.5rem, 7vw, 5rem) 0 2rem; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 18px; background: var(--ink); clip-path: polygon(0 100%, 0 55%, 2% 30%, 4% 70%, 6% 20%, 8% 60%, 10% 35%, 12% 75%, 14% 25%, 16% 65%, 18% 40%, 20% 80%, 22% 30%, 24% 62%, 26% 15%, 28% 58%, 30% 38%, 32% 72%, 34% 22%, 36% 64%, 38% 42%, 40% 78%, 42% 26%, 44% 60%, 46% 18%, 48% 68%, 50% 36%, 52% 74%, 54% 24%, 56% 62%, 58% 44%, 60% 80%, 62% 28%, 64% 58%, 66% 16%, 68% 66%, 70% 38%, 72% 76%, 74% 22%, 76% 60%, 78% 34%, 80% 70%, 82% 20%, 84% 64%, 86% 40%, 88% 78%, 90% 28%, 92% 62%, 94% 18%, 96% 56%, 98% 32%, 100% 60%, 100% 100%); }
.site-footer a { color: var(--paper); text-decoration-color: rgba(245, 239, 226, 0.4); }
.site-footer a:hover { color: var(--sun); }
.site-footer h2 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--sun); margin-bottom: 0.9rem; font-variation-settings: normal; }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.footer-grid > :first-child { grid-column: span 1; }
@media (min-width: 56rem) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer-brand { font-family: var(--serif); font-size: 1.8rem; line-height: 1.05; color: var(--paper); margin: 0 0 0.6rem; font-variation-settings: "SOFT" 100, "WONK" 1; }
.footer-brand em { color: var(--sun); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.site-footer .fine { margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(245, 239, 226, 0.18); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem 2rem; font-size: 0.88rem; color: rgba(245, 239, 226, 0.65); }

/* --- Bandeau d'annonce ------------------------------------------------------------------------ */
.announce { background: var(--ink); color: var(--paper); text-align: center; padding: 0.55rem var(--gutter); font-size: 0.95rem; }
.announce a { color: var(--sun); }

/* --- Divers -------------------------------------------------------------------------------------- */
.not-found-num { font-family: var(--hand); font-size: clamp(5rem, 20vw, 10rem); line-height: 0.9; color: var(--terra); margin: 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
hr.scribble { border: 0; height: 14px; background: url("../img/swash-ink.svg") center / 100% 100% no-repeat; opacity: 0.35; margin: 2.5rem 0; }

@media print {
  body { background: #fff; font-size: 11pt; }
  .site-header, .site-footer, .announce, .no-print, .skip { display: none !important; }
  .receipt, .card, .summary { box-shadow: none; transform: none; }
  a { color: inherit; text-decoration: none; }
}

/* Utilitaires (la CSP interdit les attributs style) */
.section-flush { padding-top: 0; }
.big-hand { font-size: 1.5rem; }
.band-ink .lead { color: rgba(245, 239, 226, 0.85); }
.center .lead { margin-inline: auto; }
.list-plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem; }
.receipt ~ .cta-row { margin-top: 2.4rem; }

/* Page association */
.assoc-grid { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 62rem) { .assoc-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.assoc-grid .prose { max-width: 42rem; }
.assoc-grid .prose h3:first-child { margin-top: 0; }
.key-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.key-facts strong { display: block; font-family: var(--serif); font-size: 1.8rem; line-height: 1.1; font-variation-settings: "SOFT" 100, "WONK" 1; }
.grid-center { align-items: center; }

/* Barre de total collée en bas d'écran (mobile) */
.shop-bar { display: none; }
@media (max-width: 61.99rem) {
  .js .shop-bar:not([hidden]) { position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem var(--gutter); background: var(--ink); color: var(--paper); box-shadow: 0 -8px 24px rgba(27, 42, 73, 0.25); }
  .shop-bar strong { font-family: var(--serif); font-size: 1.35rem; margin-left: 0.4rem; }
  .shop-bar .btn { box-shadow: none; }
  .js .shop { padding-bottom: 4.5rem; }
}

.team { list-style: none; padding: 0; margin: 0 0 2rem; }
.team h3 { margin-bottom: 0.2em; }
.team .muted { margin: 0 0 0.6rem; }
