/* style.css : L'Atelier des Collections. Toutes les valeurs viennent de tokens.css.
   Motif unique : la niche de vitrine en plein cintre (logo, piste 3) et la tomette hexagonale. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--e-4); }
body {
  margin: 0; background: var(--c-fond); color: var(--c-encre);
  font-family: var(--f-texte); font-size: var(--t-base); line-height: var(--lh-texte);
  font-kerning: normal; text-rendering: optimizeLegibility; overflow-wrap: break-word;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--c-accent-fonce); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; border-radius: var(--r-petit); }
h1, h2, h3 { font-family: var(--f-titre); font-weight: 600; line-height: var(--lh-titre); letter-spacing: -0.01em;
  font-variation-settings: "SOFT" 50, "WONK" 0; color: var(--c-encre); text-wrap: balance; }
h1 { font-size: var(--t-h1); margin: 0 0 var(--e-3); }
h2 { font-size: var(--t-h2); margin: var(--e-6) 0 var(--e-3); }
h3 { font-size: var(--t-h3); margin: var(--e-5) 0 var(--e-2); }
p { margin: 0 0 var(--e-3); }

.evitement { position: absolute; left: -9999px; top: 0; background: var(--c-encre); color: var(--c-sur-sombre); padding: var(--e-2) var(--e-3); z-index: 10; }
.evitement:focus { left: var(--e-2); top: var(--e-2); }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere); }
.etroit { max-width: calc(var(--mesure) + 2 * var(--gouttiere)); }

/* ------------------------------------------------------------------ en-tête */
.entete { border-bottom: var(--filet); background: var(--c-fond); }
.entete-in { display: flex; align-items: center; justify-content: space-between; gap: var(--e-4); min-height: 84px; flex-wrap: wrap; }
.marque { display: block; padding: var(--e-2) 0; }
.marque img { width: 160px; height: auto; }
.menu { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--e-1) var(--e-3); }
.nav a { display: inline-block; padding: var(--e-1) 0; color: var(--c-encre); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--c-accent); border-bottom-color: var(--c-bordure-forte); }
.nav a[aria-current="page"] { color: var(--c-accent); border-bottom-color: var(--c-accent); }
@media (max-width: 899px) {
  .nav-large { display: none; }
  .menu { display: block; }
  .menu > summary { display: inline-flex; align-items: center; gap: var(--e-2); cursor: pointer; list-style: none;
    padding: var(--e-1) var(--e-2); border: 1px solid var(--c-bordure-forte); border-radius: var(--r-moyen); font-weight: 500; }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu-barres, .menu-barres::before, .menu-barres::after { display: block; width: 16px; height: 2px; background: currentColor; position: relative; }
  .menu-barres::before, .menu-barres::after { content: ""; position: absolute; left: 0; }
  .menu-barres::before { top: -5px; } .menu-barres::after { top: 5px; }
  .menu[open] { width: 100%; }
  .menu[open] > summary { margin-bottom: var(--e-2); }
  .nav ul { flex-direction: column; gap: 0; padding-bottom: var(--e-3); }
  .nav a { padding: var(--e-2) 0; width: 100%; border-bottom: var(--filet); }
  .entete-in { min-height: 72px; }
  .marque img { width: 140px; }
}

/* ------------------------------------------------------------------ fil d'Ariane, héros */
.ariane ol { list-style: none; margin: 0 0 var(--e-4); padding: 0; display: flex; flex-wrap: wrap; gap: var(--e-1); font-size: var(--t-petit); color: var(--c-muted); }
.ariane li + li::before { content: "/"; margin-right: var(--e-1); color: var(--c-bordure-forte); }
.ariane a { color: var(--c-muted); }

.hero { padding: var(--e-5) 0 var(--e-5); border-bottom: var(--filet); }
.hero-grille { display: grid; gap: var(--e-5); align-items: end; }
@media (min-width: 860px) { .hero-avec-image .hero-grille, .hero-rubrique .hero-grille, .hero-404 .hero-grille { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (min-width: 860px) { .hero-avec-image .hero-grille { grid-template-columns: minmax(0, 1fr) 400px; } }
.hero-texte { max-width: 44rem; }
.surtitre { font-family: var(--f-titre); font-style: italic; font-weight: 400; font-variation-settings: "SOFT" 100; font-size: 1.12rem; color: var(--c-secondaire); margin: 0 0 var(--e-2); }
.surtitre a { color: var(--c-secondaire); }
.chapo { font-size: 1.16rem; line-height: 1.55; color: var(--c-encre); max-width: 40rem; margin: 0 0 var(--e-4); }
.niche-cadre { border-radius: var(--r-arc); overflow: hidden; background: var(--c-surface); border: var(--filet); }
.niche-cadre img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.meta-fiche { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-5); margin: 0; padding-top: var(--e-3); border-top: var(--filet); font-size: var(--t-petit); }
.meta-fiche div { display: flex; flex-direction: column; }
.meta-fiche dt { color: var(--c-muted); }
.meta-fiche dd { margin: 0; font-weight: 500; }

/* niche décorative des rubriques et de la 404 */
.niche-decor { display: none; }
@media (min-width: 860px) {
  .niche-decor { display: grid; place-items: end center; height: 260px; width: 200px; justify-self: end;
    border-radius: var(--r-arc); border: 14px solid var(--c-accent); border-bottom: 0; padding-bottom: var(--e-5); }
  .niche-decor .tomette { width: 64px; height: 74px; }
  .niche-vide { border-color: var(--c-bordure-forte); }
}

/* ------------------------------------------------------------------ tomette (hexagone) */
.tomette { display: inline-block; width: 14px; height: 16px; background: var(--c-accent); clip-path: var(--hexagone); flex: none; }

/* ------------------------------------------------------------------ accueil */
.accueil-hero { padding: var(--e-6) 0 var(--e-6); border-bottom: var(--filet); }
.accueil-grille { display: grid; gap: var(--e-6); }
@media (min-width: 960px) { .accueil-grille { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; } }
.titre-geant { font-size: var(--t-geant); line-height: 1.02; letter-spacing: -0.02em; font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 144; margin-bottom: var(--e-4); }
.vitrine { background: #3A2A22; background: color-mix(in srgb, var(--c-encre) 92%, var(--c-accent)); color: var(--c-sur-sombre);
  border-radius: var(--r-carte); padding: var(--e-4) var(--e-3) 0; }
.vitrine-titre { font-family: var(--f-titre); font-style: italic; font-variation-settings: "SOFT" 100; margin: 0 var(--e-1) var(--e-3); color: var(--c-sur-sombre); }
.vitrine ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-3) var(--e-2); }
@media (min-width: 560px) { .vitrine ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.niche a { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: var(--e-3);
  min-height: 190px; padding: var(--e-5) var(--e-2) 0; text-align: center; text-decoration: none;
  background: var(--c-fond); color: var(--c-encre); border-radius: var(--r-arc);
  box-shadow: inset 0 -10px 0 var(--c-bordure); transition: background-color .2s ease; }
.niche-nom { font-family: var(--f-titre); font-weight: 600; font-size: 1.06rem; line-height: 1.15; hyphens: manual; text-wrap: balance; }
.niche .tomette { width: 40px; height: 46px; margin-bottom: 16px; transition: transform .25s ease; }
.niche:nth-child(even) .tomette { background: var(--c-secondaire); }
.niche a:hover { background: var(--c-surface); color: var(--c-accent); }
.niche a:hover .tomette { transform: translateY(-4px); }
.vitrine ul::after { content: ""; grid-column: 1 / -1; height: 14px; margin: 0 calc(-1 * var(--e-3)); background: var(--c-accent); border-radius: 0 0 var(--r-carte) var(--r-carte); }

.section { padding: var(--e-6) 0; }
.section + .section { border-top: var(--filet); }
.section-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--e-2) var(--e-4); margin-bottom: var(--e-4); }
.section-titre { margin: 0 0 var(--e-4); }
.section-tete .section-titre { margin: 0; }
.lien-fort { font-weight: 600; }
.vide { max-width: 42rem; padding: var(--e-4); background: var(--c-surface); border: 1px dashed var(--c-bordure-forte); border-radius: var(--r-carte); color: var(--c-muted); margin: 0; }
.section-etiquette .prose { font-size: 1.05rem; }

.bande-sombre { background: var(--c-encre); color: var(--c-sur-sombre); border-top: 0; }
.bande-sombre .section-titre { color: var(--c-sur-sombre); }
.duo { display: grid; gap: var(--e-4); }
@media (min-width: 760px) { .duo { grid-template-columns: 1fr 1fr; } }
.bande-sombre .auteur-encart { background: transparent; border-color: rgba(245, 239, 228, .25); color: var(--c-sur-sombre); margin: 0; }
.bande-sombre .auteur-nom a, .duo-lien a { color: var(--c-sur-sombre); }
.bande-sombre .auteur-bio { color: var(--c-sur-sombre); opacity: .9; }
.duo-lien { margin: var(--e-4) 0 0; }

/* ------------------------------------------------------------------ cartes (étiquettes d'inventaire) */
.grille-cartes { display: grid; gap: var(--e-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.carte { display: flex; flex-direction: column; background: var(--c-surface); border: var(--filet); border-radius: var(--r-carte); position: relative; }
.carte-img { margin: var(--e-3) var(--e-3) 0; }
.carte-img img { aspect-ratio: 4 / 3; }
.carte-corps { padding: var(--e-3) var(--e-4) var(--e-4); display: flex; flex-direction: column; flex: 1; }
.carte-corps::before { content: ""; width: 12px; height: 14px; background: var(--c-accent); clip-path: var(--hexagone); margin-bottom: var(--e-2); }
.carte-meta { display: flex; flex-wrap: wrap; gap: var(--e-1) var(--e-3); font-size: var(--t-mini); color: var(--c-muted); margin: 0 0 var(--e-1); }
.carte-rub { color: var(--c-secondaire); font-weight: 600; }
.carte h3 { font-size: 1.22rem; margin: 0 0 var(--e-2); }
.carte h3 a { color: var(--c-encre); text-decoration: none; }
.carte h3 a::after { content: ""; position: absolute; inset: 0; }
.carte:hover { border-color: var(--c-accent); }
.carte:hover h3 a { color: var(--c-accent); }
.carte:focus-within { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.carte h3 a:focus-visible { outline: none; }
.carte-desc { font-size: 0.94rem; color: var(--c-muted); margin: 0; }

/* ------------------------------------------------------------------ prose */
.corps { padding-top: var(--e-5); padding-bottom: var(--e-5); }
.article-grille { padding-top: var(--e-5); padding-bottom: var(--e-6); }
.prose { max-width: var(--mesure); }
.article-corps { margin: 0 auto 0 0; }
@media (min-width: 1000px) { .article-corps { margin-left: 120px; } }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--e-3); }
.prose li { margin-bottom: var(--e-1); }
.prose li::marker { color: var(--c-accent); }
.prose h2 { padding-top: var(--e-3); border-top: var(--filet); }
.prose blockquote { margin: var(--e-4) 0; padding: 0 0 0 var(--e-4); border-left: 3px solid var(--c-secondaire);
  font-family: var(--f-titre); font-style: italic; font-variation-settings: "SOFT" 100; font-size: 1.15rem; }
.prose table { width: 100%; border-collapse: collapse; margin: var(--e-4) 0; font-size: 0.93rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: var(--e-2) var(--e-2); border-bottom: var(--filet); min-width: 8rem; }
.prose th { font-weight: 600; background: var(--c-surface); border-bottom: 2px solid var(--c-accent); }
.prose strong { font-weight: 600; }
.prose hr { border: 0; border-top: var(--filet); margin: var(--e-5) 0; }

/* cartel : résumé en tête */
.cartel { background: var(--c-surface); border: var(--filet); border-radius: var(--r-carte); padding: var(--e-4); margin: 0 0 var(--e-5); }
.cartel-titre { display: flex; align-items: center; gap: var(--e-2); font-family: var(--f-titre); font-style: italic; font-variation-settings: "SOFT" 100;
  font-size: 1.15rem; color: var(--c-accent); margin: 0 0 var(--e-2); }
.cartel ul { margin: 0; }
.cartel li:last-child { margin-bottom: 0; }

.sommaire { margin: 0 0 var(--e-5); padding: var(--e-3) 0 var(--e-3) var(--e-4); border-left: 3px solid var(--c-bordure-forte); }
.sommaire-titre { font-weight: 600; margin: 0 0 var(--e-1); }
.sommaire ol { margin: 0; padding-left: 1.2em; }
.sommaire a { color: var(--c-encre); }
.sommaire a:hover { color: var(--c-accent); }

/* encadré « Sur l'établi » : bleu canard */
.encadre { background: var(--c-secondaire); color: var(--c-sur-accent); border-radius: var(--r-carte); padding: var(--e-4) var(--e-4) var(--e-3); margin: var(--e-5) 0; }
.encadre-titre { font-family: var(--f-titre); font-weight: 600; font-size: 1.2rem; margin: 0 0 var(--e-2); color: var(--c-sur-accent); }
.encadre a { color: var(--c-sur-accent); }
.encadre li::marker { color: var(--c-secondaire-clair); }
.encadre :last-child { margin-bottom: 0; }

.figure { margin: var(--e-5) 0; }
.figure img { border-radius: var(--r-carte); }
.figure figcaption { font-family: var(--f-titre); font-style: italic; font-variation-settings: "SOFT" 100; color: var(--c-muted); font-size: 0.95rem; margin-top: var(--e-2); }

/* FAQ */
.faq { margin-top: var(--e-6); }
.faq details { border-bottom: var(--filet); }
.faq summary { cursor: pointer; padding: var(--e-3) var(--e-5) var(--e-3) 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: var(--e-1); top: var(--e-2); font-family: var(--f-titre); font-size: 1.5rem; line-height: 1.2; color: var(--c-accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 var(--e-3); }

/* auteur */
.pastille { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: var(--c-accent); color: var(--c-sur-accent); font-family: var(--f-titre); font-weight: 600; font-size: 1.15rem; letter-spacing: .02em; }
.pastille[data-auteur*="bastien"] { background: var(--c-secondaire); }
.pastille[data-auteur*="monique"] > span, .pastille[data-auteur*="bastien"] > span { display: none; }
.pastille[data-auteur*="monique"]::before { content: "MR"; }
.pastille[data-auteur*="bastien"]::before { content: "BC"; }
.pastille-grande { width: 112px; height: 112px; font-size: 2.2rem; }
.auteur-encart { display: flex; gap: var(--e-3); align-items: flex-start; margin: var(--e-6) 0 var(--e-4); padding: var(--e-4); border: var(--filet); border-radius: var(--r-carte); background: var(--c-surface); }
.auteur-nom { font-family: var(--f-titre); font-weight: 600; font-size: 1.15rem; margin: 0 0 var(--e-1); }
.auteur-nom a { color: var(--c-encre); }
.auteur-bio { margin: 0; font-size: 0.95rem; color: var(--c-muted); }
.auteur-tete { display: flex; gap: var(--e-4); align-items: center; flex-wrap: wrap; }

/* relais IA */
.relais { margin: var(--e-4) 0 0; padding: var(--e-4); border: 1px dashed var(--c-bordure-forte); border-radius: var(--r-carte); }
.relais-titre { font-size: 1.15rem; margin: 0 0 var(--e-1); padding: 0; border: 0; }
.relais-note { font-size: var(--t-petit); color: var(--c-muted); margin: 0 0 var(--e-3); }
.relais-liste { list-style: none; padding: 0 !important; margin: 0 0 var(--e-3) !important; display: flex; flex-wrap: wrap; gap: var(--e-2); }
.relais-liste li { margin: 0; }
.relais-liste a { display: inline-block; padding: var(--e-1) var(--e-3); border: 1px solid var(--c-secondaire); border-radius: var(--r-moyen); color: var(--c-secondaire); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.relais-liste a:hover { background: var(--c-secondaire); color: var(--c-sur-accent); }
.relais-md { font-size: var(--t-petit); margin: 0; display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-3); align-items: center; }
.relais-md button { font: inherit; color: var(--c-encre); background: var(--c-surface); border: 1px solid var(--c-bordure-forte); border-radius: var(--r-moyen); padding: var(--e-1) var(--e-2); cursor: pointer; }

/* « Sur la même étagère » */
.a-lire { background: var(--c-surface); border-top: var(--filet); }
.a-lire .carte { background: var(--c-fond); }

/* ------------------------------------------------------------------ pied */
.pied { background: var(--c-encre); color: var(--c-sur-sombre); padding: var(--e-6) 0 var(--e-4); }
.section.bande-sombre + .pied, .bande-sombre + .pied { border-top: 1px solid rgba(245, 239, 228, .18); }
.pied-in { display: grid; gap: var(--e-5); }
@media (min-width: 760px) { .pied-in { grid-template-columns: 220px 1fr; } }
.pied-marque img { width: 170px; margin-bottom: var(--e-2); }
.pied-marque p { font-family: var(--f-titre); font-style: italic; font-variation-settings: "SOFT" 100; margin: 0; }
.pied-liens { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--e-1) var(--e-4); }
.pied a { color: var(--c-sur-sombre); }
.pied-bas { margin-top: var(--e-5); padding-top: var(--e-3); border-top: 1px solid rgba(245, 239, 228, .2); font-size: var(--t-mini); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--e-2); }
.pied-bas p { margin: 0; max-width: 46rem; }
.pied :focus-visible, .bande-sombre :focus-visible { outline-color: var(--c-sur-sombre); }

/* ------------------------------------------------------------------ mouvement : apparitions au défilement, CSS seul */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .carte, .auteur-encart, .encadre {
      animation: monte linear both; animation-timeline: view(); animation-range: entry 0% entry 35%;
    }
  }
  .niche { animation: pose .5s ease-out both; }
  .niche-2 { animation-delay: .05s; } .niche-3 { animation-delay: .1s; } .niche-4 { animation-delay: .15s; }
  .niche-5 { animation-delay: .2s; } .niche-6 { animation-delay: .25s; }
}
@keyframes monte { from { opacity: .35; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pose { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

@media print {
  .entete, .pied, .relais, .a-lire, .sommaire { display: none; }
  body { background: #fff; }
}
