/* points-a-relier.com : charte « cahier d'activités ».
   Papier crème quadrillé de points, contours noirs épais et ombres franches comme des autocollants
   découpés (le liseré du logo), les 7 couleurs des lettres du logo, Fredoka pour les titres
   (lettres rondes proches du logo) et Nunito pour le texte. Les titres de section sont numérotés
   comme des points à relier, reliés par un pointillé. */

@font-face { font-family: "Fredoka"; src: url(/assets/fonts/fredoka-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(/assets/fonts/fredoka-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(/assets/fonts/nunito-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(/assets/fonts/nunito-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(/assets/fonts/nunito-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --paper: #FFF8EC;
  --card: #FFFFFF;
  --ink: #1E1A2B;
  --muted: #5E5770;
  --red: #FF4B4B; --yellow: #FFD93D; --green: #7ED321; --blue: #3DB2FF;
  --orange: #FF8A3C; --violet: #A78BFA; --pink: #FF70A6;
  --red-l: #FFE1E1; --yellow-l: #FFF3C4; --green-l: #E6F7D2; --blue-l: #DDF1FF;
  --orange-l: #FFE6D6; --violet-l: #ECE6FF; --pink-l: #FFE0EC;
  --line: 3px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --r: 18px;
  --display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6;
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(30, 26, 43, .14) 1.3px, transparent 1.6px);
  background-size: 24px 24px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.4vw, 56px); letter-spacing: -.01em; }
h2 { font-size: clamp(25px, 3.2vw, 32px); }
h3 { font-size: 22px; font-weight: 600; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
main.wrap > section, main.wrap > article, main.wrap > div, main.wrap > p { margin-block: 56px; }
main.wrap > :first-child { margin-top: 28px; }

/* ---- Titres de section numérotés : 1 — 2 — 3, comme des points à relier ---- */
main { counter-reset: point; }
.section-head, main.wrap > section > h2, .finder > h2, .banner h2 { counter-increment: point; }
main.wrap > section > h2, .section-head h2, .finder > h2 { display: flex; align-items: center; gap: 14px; }
main.wrap > section > h2::before, .section-head h2::before, .finder > h2::before {
  content: counter(point); flex: none; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 19px; font-weight: 700;
}
main.wrap > section > h2::after, .section-head h2::after {
  content: ""; flex: 1; min-width: 30px; border-top: 3px dashed var(--ink); opacity: .35; margin-left: 4px;
}
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; margin-bottom: 4px; }
.section-head h2 { flex: 1 1 420px; }
.more-link { font-family: var(--display); font-weight: 600; text-decoration: none; border-bottom: 3px solid var(--yellow); }
.more-link:hover { border-color: var(--ink); }

/* ---- En-tête ---- */
.top { background: var(--card); border-bottom: var(--line); position: relative; z-index: 2; }
.top-in { width: min(1180px, 100% - 32px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; padding-block: 10px; flex-wrap: wrap; }
.logo img { width: auto; height: 74px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-family: var(--display); font-weight: 600; font-size: 17px; }
.nav a { text-decoration: none; padding: 4px 0; border-bottom: 3px solid transparent; }
.nav a:hover { border-color: var(--pink); }
.nav .nav-search { border: var(--line); border-radius: 999px; padding: 5px 16px; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); }
.nav .nav-search:hover { border-color: var(--ink); transform: translate(-1px, -1px); }

.crumbs { margin-top: 18px; font-size: 15px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--ink); }

/* ---- Boutons, pastilles, badges ---- */
.btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: 18px;
  color: var(--ink); text-decoration: none; background: var(--yellow); border: var(--line); border-radius: 999px;
  padding: 10px 22px; box-shadow: var(--shadow); cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { background: var(--card); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 600; font-size: 16px;
  text-decoration: none; background: var(--card); border: 2.5px solid var(--ink); border-radius: 999px; padding: 4px 14px;
}
a.chip:hover, .chip.is-on { background: var(--blue-l); }
.chip.is-on { background: var(--blue); }
.chip small { font-size: 13px; opacity: .7; }
.badge { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 14px; border: 2px solid var(--ink); border-radius: 8px; padding: 1px 9px; text-decoration: none; background: var(--card); }
.badge-f { background: var(--green); }
.badge-m { background: var(--orange); }
.badge-d { background: var(--violet); }
.pts { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 600; font-size: 14px; color: #fff; background: var(--ink); border-radius: 999px; padding: 2px 11px 2px 8px; }
.pts::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.pts-big { font-size: 17px; padding: 4px 14px 4px 10px; }

/* ---- Accueil : bandeau ---- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 92%, transparent 92%); }
.hero-text > p { font-size: 19px; max-width: 54ch; }
.feature { position: relative; display: block; text-decoration: none; transform: rotate(-2deg); transition: transform .2s; }
.feature:hover { transform: rotate(0); }
.feature-art { display: block; background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: 8px 8px 0 var(--ink); padding: 22px; }
.feature-art img { max-height: 420px; width: auto; margin-inline: auto; }
.feature-tag { position: absolute; left: -14px; bottom: -18px; background: var(--pink); border: var(--line); border-radius: 14px; padding: 6px 14px; font-family: var(--display); font-weight: 600; font-size: 16px; transform: rotate(3deg); box-shadow: 3px 3px 0 var(--ink); }
.feature-tag b { display: block; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* ---- Filtres (accueil et recherche) ---- */
.finder { background: var(--card); border: 3px dashed var(--ink); border-radius: 24px; padding: 28px clamp(18px, 4vw, 36px); }
.finder > p { color: var(--muted); }
.filtres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 14px; align-items: end; counter-reset: f; }
.f { display: flex; flex-direction: column; gap: 6px; font-family: var(--display); font-weight: 600; counter-increment: f; }
.f > span { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.f > span::before { content: counter(f); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid var(--ink); font-size: 13px; }
.f:nth-child(1) > span::before { background: var(--red); }
.f:nth-child(2) > span::before { background: var(--yellow); }
.f:nth-child(3) > span::before { background: var(--green); }
.f:nth-child(4) > span::before { background: var(--blue); }
.f select, .search input {
  font: 600 16px var(--body); color: var(--ink); background: var(--paper); border: 2.5px solid var(--ink); border-radius: 12px;
  padding: 10px 12px; width: 100%; min-width: 0; appearance: none;
}
.f select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 32px; }
.filtres .btn { box-shadow: 3px 3px 0 var(--ink); padding: 9px 20px; }
.search { display: flex; gap: 12px; margin-top: 18px; max-width: 640px; }
.count { font-family: var(--display); font-weight: 600; font-size: 20px; }

/* ---- Grilles de vignettes ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px; }
.card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: var(--card);
  border: var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 10px 10px 14px;
  transition: transform .12s, box-shadow .12s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--ink); }
.card-img { display: block; border-radius: 10px; overflow: hidden; background: #fff; border: 2px solid #EEE7DA; }
.card-img img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.card-title { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.2; padding: 4px 4px 0; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 4px; font-size: 15px; color: var(--muted); }
.card-theme .card-meta { justify-content: space-between; font-weight: 700; }
.card-theme .card-img { border: 0; padding: 12px; }
.c0 .card-img { background: var(--red-l); } .c1 .card-img { background: var(--yellow-l); } .c2 .card-img { background: var(--green-l); }
.c3 .card-img { background: var(--blue-l); } .c4 .card-img { background: var(--orange-l); } .c5 .card-img { background: var(--violet-l); }
.c6 .card-img { background: var(--pink-l); }
.card-theme .card-img img { border-radius: 8px; border: 2px solid var(--ink); }
.card-theme .card-title { font-size: 21px; }

/* ---- Bannière fiche ---- */
.banner { display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center; background: var(--blue-l); border: var(--line); border-radius: 26px; padding: 32px clamp(20px, 4vw, 44px); box-shadow: var(--shadow); }
.banner p { font-size: 18px; max-width: 58ch; margin: 0; }
.banner img { width: 210px; background: #fff; border: 2.5px solid var(--ink); border-radius: 6px; transform: rotate(3deg); box-shadow: var(--shadow); }

.raccourcis { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
.raccourcis h2 { font-size: 24px; }

/* ---- Page thème ---- */
.band { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; }
.band-count { display: inline-block; font-family: var(--display); font-weight: 600; background: var(--yellow); border: 2.5px solid var(--ink); border-radius: 10px; padding: 2px 12px; }
.band-text > p { font-size: 18px; max-width: 64ch; }
.band-art { display: block; background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: 8px 8px 0 var(--ink); padding: 14px; transform: rotate(2deg); }
.pick-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 24px; margin-bottom: 22px; }
.pick-head h2 { margin: 0; }
.level { margin-top: 30px; }
.level h3 { display: inline-block; background: var(--card); border: 2.5px solid var(--ink); border-radius: 10px; padding: 2px 12px; }
.outro { background: var(--card); border: var(--line); border-radius: var(--r); padding: 26px clamp(18px, 4vw, 36px); }

/* ---- Page dessin ---- */
.sheet { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.sheet-img { background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: 8px 8px 0 var(--ink); padding: clamp(14px, 3vw, 30px); }
.sheet-img img { margin-inline: auto; max-height: 78vh; width: auto; }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sheet h1 { font-size: clamp(30px, 4vw, 44px); }
.sheet-sub { font-size: 18px; }
.tip { margin-top: 26px; background: var(--yellow-l); border: 2.5px solid var(--ink); border-radius: 14px; padding: 14px 18px; }
.tip h2 { font-size: 20px; margin-bottom: 4px; }
.tip p { margin: 0; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 16px; border-top: 3px dashed rgba(30, 26, 43, .35); font-family: var(--display); font-weight: 600; }
.pager a { text-decoration: none; }
.pager a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--pink); }
.item-text { max-width: 820px; }
.side-preview { display: flex; align-items: center; gap: 18px; margin: 28px 0 0; }
.side-preview img { width: 150px; transform: rotate(-2deg); }
.sheet-preview img { background: #fff; border: 2.5px solid var(--ink); border-radius: 6px; box-shadow: var(--shadow); }
.sheet-preview figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.fact { background: var(--pink-l); border: 2.5px solid var(--ink); border-radius: 14px; padding: 14px 18px; }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mini { display: flex; align-items: center; gap: 12px; text-decoration: none; background: var(--card); border: 2.5px solid var(--ink); border-radius: 14px; padding: 8px; }
.mini:hover { background: var(--yellow-l); }
.mini img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.mini span { font-family: var(--display); font-weight: 600; line-height: 1.2; }
.mini small { display: block; font-family: var(--body); font-weight: 700; font-size: 13px; color: var(--muted); }
.more { margin-top: 22px; }

/* ---- Textes, blog, pages simples ---- */
.intro { max-width: 860px; }
.intro.finder { max-width: none; }
.intro.center { text-align: center; margin-inline: auto; }
.prose h2 { margin-top: 1.4em; font-size: 26px; }
.prose a { text-decoration-thickness: 2px; text-decoration-color: var(--pink); text-underline-offset: 3px; }
.big-dots { display: flex; justify-content: center; gap: 14px; }
.big-dots span { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--display); font-weight: 700; font-size: 34px; }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.post-card { display: flex; flex-direction: column; text-decoration: none; background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.post-card-txt { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.post-card-title { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.2; }
.post-card-ex { color: var(--muted); }
.post-date { font-size: 14px; color: var(--muted); }
.post { max-width: 780px; }
.post-meta { color: var(--muted); }
.post-chapo { font-size: 20px; }
.post-une img { border: var(--line); border-radius: var(--r); }

/* ---- Pied ---- */
.foot { background: var(--ink); color: #fff; margin-top: 80px; padding: 44px 0 34px; }
.foot-in { display: flex; flex-direction: column; gap: 20px; }
.foot-slogan { font-family: var(--display); font-weight: 600; font-size: 22px; display: flex; align-items: center; gap: 12px; margin: 0; }
.foot .dot { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow); color: var(--ink); }
.foot-themes { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-themes a { color: #fff; text-decoration: none; opacity: .85; }
.foot-themes a:hover { opacity: 1; text-decoration: underline; }
.foot-legal { font-size: 14px; opacity: .75; margin: 0; }

[hidden] { display: none !important; }

/* ---- Petits écrans ---- */
@media (max-width: 900px) {
  .hero, .band, .sheet { grid-template-columns: 1fr; }
  .feature { max-width: 460px; margin: 10px auto 20px; }
  .band-art { max-width: 300px; }
  .filtres { grid-template-columns: 1fr 1fr; }
  .filtres .btn { grid-column: 1 / -1; justify-content: center; }
  .banner { grid-template-columns: 1fr; }
  .banner img { width: 170px; }
  .raccourcis { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .logo img { height: 48px; }
  .nav { font-size: 15px; gap: 2px 14px; }
  .filtres { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .card { padding: 7px 7px 10px; box-shadow: 3px 3px 0 var(--ink); }
  .card-title { font-size: 16px; }
  .card-theme .card-title { font-size: 17px; }
  .card-meta { font-size: 13px; }
  main.wrap > section, main.wrap > article { margin-block: 42px; }
  .search { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .card, .feature { transition: none; }
  .feature, .band-art { transform: none; }
}

/* ---- Impression : seule la fiche A4 sort ---- */
#print-sheet { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  body > *:not(#print-sheet) { display: none !important; }
  #print-sheet { display: block; width: 210mm; height: 297mm; object-fit: contain; }
}
