/* Chevêche — feuille de style du site.
   Reprend le design system du jeu (ds/ds.gd) : papier ivoire, encre anthracite,
   deux familles de caractères, rayon de 4 px, filets fins. */

@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/Newsreader-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/DMSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ivoire: #F1EDE3;
  --carte: #F8F5EC;
  --ivoire-fonce: #E7E1D1;
  --encre: #292D2A;
  --encre-douce: #5F625F;
  --feutre: #2E3A33;
  --ardoise: #34423A;
  --ocre: #C2A66D;
  --terre: #B66F55;
  --filet: #D9D3C6;
  --filet-fort: #C9C4B6;
  --ivoire-doux: #D8D5CA;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --marge: clamp(56px, 8vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivoire); color: var(--encre); font-family: var(--sans); font-size: 17px; line-height: 1.55; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
a:hover { color: var(--encre-douce); }
:focus-visible { outline: 3px solid var(--terre); outline-offset: 3px; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.picto { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.conteneur { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.section { padding-block: var(--marge); }
.section--feutre { background: var(--feutre); color: var(--ivoire); }
.section--fonce { background: var(--ivoire-fonce); }
.pile { display: flex; flex-direction: column; gap: 32px; }
.titre-2 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; text-wrap: balance; }
.titre-3 { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.25; }
.chapeau { max-width: 38em; }
.doux { color: var(--encre-douce); }
.section--feutre .doux, .section--feutre .chapeau { color: var(--ivoire-doux); }

/* En-tête et pied de page */
.entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 12px; }
.marque { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-family: var(--serif); font-weight: 500; font-size: 22px; }
.marque img { width: 36px; height: 36px; }
.entete nav { display: flex; align-items: center; gap: 24px; }
.entete nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; font-weight: 500; text-decoration: none; }
.entete nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.pied { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 48px; padding-block: 32px 48px; font-size: 15px; }
.pied nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.pied nav a { display: inline-flex; align-items: center; min-height: 44px; }
.pied p { padding-top: 10px; color: var(--encre-douce); }

/* Boutons */
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; background: var(--encre); color: var(--ivoire); border-radius: 4px; font-size: 18px; font-weight: 600; text-decoration: none; }
.bouton:hover { background: #3A403C; color: var(--ivoire); }
.bouton--clair { background: var(--ivoire); color: var(--encre); }
.bouton--clair:hover { background: #FFFFFF; color: var(--encre); }
.note-bouton { max-width: 32em; font-size: 15px; color: var(--encre-douce); text-wrap: pretty; }
.section--feutre .note-bouton { color: var(--ivoire-doux); }
.lien-fort { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* Couverture */
.couverture { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: 12px var(--marge); }
.couverture__image { align-self: center; width: clamp(220px, 34vw, 440px); height: auto; }
.couverture__texte { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.surtitre { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--encre-douce); }
.nom { font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 12vw, 80px); line-height: 1; letter-spacing: 0.12em; }
.accroche { max-width: 30em; margin-top: 8px; font-size: 19px; line-height: 1.5; text-wrap: pretty; }
.couverture .bouton { margin-top: 16px; }
@media (min-width: 860px) {
  .couverture { flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 64px; padding-top: 48px; }
  .couverture__texte { flex: 1 1 0; }
  .couverture__image { flex: 0 0 auto; }
}

/* Le principe : la carte d'un dossier et les règles */
.principe { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 72px; }
.dossier { flex: 1 1 320px; max-width: 460px; min-width: 0; background: var(--carte); color: var(--encre); border-radius: 4px; overflow: hidden; }
.dossier__tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.dossier__tete > span { display: flex; align-items: center; gap: 10px; }
.dossier__discipline { font-size: 15px; font-weight: 600; }
.dossier__numero { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--encre-douce); }
.pastille { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 4px; color: var(--carte); }
.pastille--grande { width: 40px; height: 40px; }
.dossier__image { position: relative; aspect-ratio: 16 / 9; background: var(--ardoise); }
.dossier__image img { width: 100%; height: 100%; object-fit: cover; }
.dossier__image svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dossier__image span { position: absolute; right: 16px; bottom: 14px; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--ivoire); }
.dossier__question { padding: 20px 16px 16px; font-family: var(--serif); font-size: 24px; line-height: 1.3; text-wrap: pretty; }
.dossier__reponses { padding-inline: 16px; }
.dossier__reponses li { display: flex; align-items: center; min-height: 52px; border-top: 1px solid var(--filet); }
.dossier__points { margin-top: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--filet); font-size: 14px; color: var(--encre-douce); }
.regles { flex: 1 1 340px; min-width: 0; }
.regles ol { display: flex; flex-direction: column; gap: 28px; }
.regles li { display: flex; gap: 20px; }
.regles li > span { flex: 0 0 24px; font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1; color: var(--ocre); }
.regles li div { display: flex; flex-direction: column; gap: 6px; }
.regles li p { color: var(--ivoire-doux); }

/* Ce qu'on y apprend : disciplines et page de carnet */
.apprendre { display: flex; flex-wrap: wrap; align-items: center; gap: 48px 72px; }
.apprendre > div { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.disciplines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 16px; max-width: 520px; }
.disciplines li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.carnet { flex: 1 1 320px; max-width: 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 28px 24px 24px; border-radius: 4px; background-color: var(--carte); background-image: radial-gradient(rgba(41, 45, 42, 0.12) 1px, transparent 1.5px); background-size: 16px 16px; box-shadow: 0 1px 0 var(--filet), 0 10px 24px rgba(41, 45, 42, 0.08); }
.carnet figure { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.carnet figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 6px solid #FFFDF7; transform: rotate(-1.2deg); box-shadow: 0 2px 8px rgba(41, 45, 42, 0.18); }
.carnet figcaption { font-size: 13px; color: var(--encre-douce); }
.carnet__question { font-size: 15px; color: var(--encre-douce); }
.carnet__reponse { font-family: var(--serif); font-style: italic; font-size: 34px; line-height: 1.1; }
.note-marge { padding-left: 14px; border-left: 2px solid var(--ocre); font-size: 15px; }
.carnet .note-marge { color: var(--encre-douce); }
.tampon { align-self: flex-end; margin-top: 4px; padding: 4px 10px; border: 1.5px solid var(--terre); border-radius: 4px; font-size: 13px; font-weight: 600; transform: rotate(-3deg); }

/* Votre collection : frise et réseau */
.panneaux { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.panneau { flex: 1 1 320px; max-width: 548px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 20px; background: var(--carte); color: var(--encre); border-radius: 4px; }
.panneau h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.2; }
.panneau > p { font-size: 16px; }
.section--feutre .panneau .doux { color: var(--encre-douce); }
.frise { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: center; gap: 10px 6px; }
.frise::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--filet-fort); }
.frise li { position: relative; }
.frise__periode { grid-column: 1 / -1; justify-self: center; margin-top: 6px; padding: 3px 12px; background: var(--ivoire-fonce); border-radius: 4px; font-family: var(--serif); font-style: italic; font-size: 15px; }
.frise__annee { justify-self: center; padding: 2px 6px; background: var(--carte); font-family: var(--serif); font-style: italic; font-size: 16px; }
.frise__fiche { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #FFFDF7; border: 1px solid var(--filet); border-radius: 4px; font-size: 14px; line-height: 1.25; }
.frise__fiche::before { content: ""; flex: 0 0 10px; height: 10px; border-radius: 50%; background: var(--couleur); }
.reseau { position: relative; align-self: center; width: 100%; max-width: 380px; aspect-ratio: 1 / 1.08; }
.reseau > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.reseau line { stroke: var(--encre-douce); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.reseau .tirets { stroke-dasharray: 6 4; }
.reseau .points { stroke-dasharray: 1 5; stroke-linecap: round; stroke-width: 2.5; }
.noeud { position: absolute; width: 100px; margin: -26px 0 0 -50px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.noeud > :first-child { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--carte); color: var(--carte); object-fit: cover; object-position: 70% 40%; }
.noeud--inconnu > :first-child { background: var(--ivoire-fonce); border: 2px dashed var(--encre-douce); color: var(--encre); font-family: var(--serif); font-style: italic; font-size: 24px; }
.noeud > :last-child { padding: 0 4px; background: var(--carte); font-size: 13px; line-height: 1.2; }
.legende { font-size: 14px; color: var(--encre-douce); }

/* Collections */
.collections { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 16px; }
.collection { display: flex; gap: 16px; padding: 16px; background: var(--carte); border-radius: 4px; }
.collection__dos { position: relative; flex: 0 0 48px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 3px; overflow: hidden; color: var(--carte); }
.collection__dos::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 6px; background: rgba(0, 0, 0, 0.22); }
.collection div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.collection__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 14px; font-weight: 600; color: var(--encre-douce); }
.collection h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.2; }
.collection p { font-size: 16px; text-wrap: pretty; }
.etiquette { padding: 1px 8px; border: 1px solid var(--encre); border-radius: 4px; font-size: 13px; color: var(--encre); }

/* Faits en colonnes */
.faits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 28px 32px; }
.faits--larges { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.faits li { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid var(--filet-fort); }
.faits p { color: var(--encre-douce); }

/* Appel final */
.appel { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.appel img { width: 72px; height: 72px; }
.appel .titre-2 { max-width: 18em; }
.appel .bouton { margin-top: 12px; }
.appel .lien-fort { align-self: center; }

/* Pages de texte */
.page-titre { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 5vw, 46px); line-height: 1.1; }
.intro-page { padding-block: clamp(24px, 5vw, 56px) clamp(40px, 6vw, 64px); display: flex; flex-direction: column; gap: 16px; }
.intro-page p { max-width: 34em; font-size: 19px; line-height: 1.5; }
.texte { max-width: 720px; padding-block: clamp(24px, 5vw, 56px) var(--marge); display: flex; flex-direction: column; gap: 14px; }
.texte h2 { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--filet); font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.2; }
.texte ul { padding-left: 20px; list-style: disc; display: flex; flex-direction: column; gap: 6px; }
.texte .date { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--encre-douce); }
.texte .adresse { font-family: var(--serif); font-size: clamp(20px, 5.5vw, 26px); line-height: 1.2; overflow-wrap: anywhere; }
.texte .bouton { align-self: flex-start; margin-top: 8px; }

@media (prefers-reduced-motion: no-preference) {
  .bouton { transition: background-color 0.15s; }
}
