/* Esterel Edit : roche rouge de l'Esterel, mer profonde, pierre claire.
   Mise en page : une colonne large et aérée, gros caractères pour un lectorat 55-75 ans. */
:root {
  --pierre: #f6f5f2;      /* fond */
  --surface: #ffffff;
  --encre: #1f2a33;       /* texte */
  --doux: #55626d;        /* texte secondaire */
  --porphyre: #a8442a;    /* accent, roche de l'Esterel */
  --mer: #1d4f6e;         /* bleu profond */
  --trait: #dcdcd6;
  --a-completer: #fff1b8; /* surlignage des éléments à fournir */
  --a-completer-txt: #5c4700;
  --titre: "Lora", Georgia, "Times New Roman", serif;
  --texte: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --pierre: #141b21; --surface: #1c252d; --encre: #ecebe6; --doux: #a9b3ba;
    --porphyre: #e07c5c; --mer: #7fb6d6; --trait: #2f3a43;
    --a-completer: #4a3d0c; --a-completer-txt: #ffe9a3; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --pierre: #141b21; --surface: #1c252d; --encre: #ecebe6; --doux: #a9b3ba;
  --porphyre: #e07c5c; --mer: #7fb6d6; --trait: #2f3a43;
  --a-completer: #4a3d0c; --a-completer-txt: #ffe9a3; color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--pierre);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.15rem;
  line-height: 1.65;
}
img { max-width: 100%; }
a { color: var(--mer); text-underline-offset: 3px; }
a:focus-visible, .bouton:focus-visible { outline: 3px solid var(--porphyre); outline-offset: 3px; }

.cadre {
  max-width: 68rem;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* En-tête */
.entete { background: var(--surface); border-bottom: 1px solid var(--trait); }
.entete .cadre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1.1rem; }
.marque { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--encre); }
.marque .embleme { width: 3.4rem; height: 3.4rem; flex: none; border-radius: 0.7rem; }
.marque span { font-family: var(--titre); font-size: 1.55rem; font-weight: 600; letter-spacing: 0.01em; }
.menu { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; list-style: none; margin: 0; padding: 0; }
.menu a { text-decoration: none; color: var(--encre); font-weight: 600; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.menu a:hover { border-bottom-color: var(--trait); }
.menu a[aria-current="page"] { color: var(--porphyre); border-bottom-color: var(--porphyre); }

/* Bandeau d'aperçu */
.apercu { background: var(--a-completer); color: var(--a-completer-txt); font-size: 0.95rem; }
.apercu .cadre { padding-block: 0.55rem; }

/* Titres */
h1, h2, h3 { font-family: var(--titre); line-height: 1.2; text-wrap: balance; margin: 0; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.4rem; }
.surtitre { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; font-weight: 700; color: var(--porphyre); margin: 0; }
.chapo { font-size: 1.3rem; color: var(--doux); max-width: 38em; margin: 0; }

main { display: block; }
.section { padding-block: 3.5rem; }
.section + .section { border-top: 1px solid var(--trait); }
.pile { display: flex; flex-direction: column; gap: 1.1rem; }
.texte { max-width: 38em; }
.texte p { margin: 0; }

/* Accueil */
.ouverture { padding-block: 4rem 3.5rem; }
.ouverture .cadre { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.ouverture .pile { gap: 1.4rem; }
.crete { width: 100%; height: auto; display: block; }

.boutons { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.bouton {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 1.1rem;
  padding: 0.85rem 1.5rem; border-radius: 6px; border: 2px solid var(--mer);
  background: var(--mer); color: var(--surface);
}
.bouton.secondaire { background: transparent; color: var(--mer); }
.bouton[aria-disabled="true"] { background: transparent; color: var(--doux); border-color: var(--trait); cursor: default; }

/* Livres */
.grille-livres { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 2.2rem; }
.livre { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.couverture {
  aspect-ratio: 8.5 / 11; max-width: 100%; border-radius: 3px 8px 8px 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 10px 24px -12px rgba(0,0,0,.35);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.4rem 1.2rem; color: #fff; position: relative; overflow: hidden;
}
.couverture::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 7px; background: rgba(0,0,0,.18); }
.couverture .collection { font-family: var(--titre); font-size: 1.7rem; line-height: 1.1; font-weight: 600; }
.couverture .edition { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; opacity: .9; }
.couverture .contenu { font-size: 0.95rem; opacity: .92; }
.hiver { background: linear-gradient(165deg, #3d6a98 0%, #24426c 70%); }
.noel { background: linear-gradient(165deg, #9a2f2a 0%, #5e1b1d 75%); }
.printemps { background: linear-gradient(165deg, #d98aa3 0%, #a4566f 80%); }
.ete { background: linear-gradient(165deg, #5aa7b8 0%, #2f6f80 80%); }
.automne { background: linear-gradient(165deg, #d98a3d 0%, #9c5420 80%); }
.livre h3 { font-size: 1.3rem; }
.livre p { margin: 0; color: var(--doux); }
.statut { align-self: flex-start; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; padding: 0.2rem 0.65rem; border-radius: 999px; border: 1px solid var(--trait); color: var(--doux); }
.statut.dispo { border-color: var(--mer); color: var(--mer); }

/* Liste du contenu */
.contenu-livre { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.6rem 2rem; list-style: none; padding: 0; margin: 0; }
.contenu-livre li { padding-block: 0.6rem; border-bottom: 1px solid var(--trait); display: flex; gap: 0.8rem; align-items: baseline; }
.contenu-livre b { font-family: var(--titre); font-size: 1.5rem; color: var(--porphyre); min-width: 2.2rem; font-variant-numeric: tabular-nums; }

/* Contact */
.carte-contact { background: var(--surface); border: 1px solid var(--trait); border-radius: 8px; padding: 1.6rem; max-width: 34rem; display: flex; flex-direction: column; gap: 0.6rem; }
.adresse { font-size: 1.35rem; font-weight: 700; word-break: break-word; }

/* À compléter */
.a-completer { background: var(--a-completer); color: var(--a-completer-txt); padding: 0 0.3em; border-radius: 3px; }

/* Pied de page */
.pied { background: var(--surface); border-top: 1px solid var(--trait); color: var(--doux); font-size: 1rem; }
.pied .cadre { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem 2rem; padding-block: 1.8rem; }
.pied a { color: var(--doux); }
.pied ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }

@media (max-width: 760px) {
  .ouverture .cadre { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding-block: 2.6rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ===== Version multilingue ===== */
.langues { display: flex; gap: 0.3rem; list-style: none; margin: 0; padding: 0; }
.langues a { text-decoration: none; font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; padding: 0.25rem 0.55rem; border-radius: 4px; color: var(--doux); border: 1px solid transparent; }
.langues a[aria-current="true"] { color: var(--porphyre); border-color: var(--porphyre); }
.droite { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.6rem; }

.choix-langue { padding-block: 4rem; }
.choix-langue .cadre { display: flex; flex-direction: column; gap: 2rem; align-items: flex-start; }
.cartes-langue { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.2rem; width: 100%; }
.carte-langue { display: flex; flex-direction: column; gap: 0.4rem; text-decoration: none; color: var(--encre); background: var(--surface); border: 2px solid var(--trait); border-radius: 10px; padding: 1.4rem 1.5rem; }
.carte-langue:hover { border-color: var(--mer); }
.carte-langue.suggeree { border-color: var(--porphyre); }
.carte-langue b { font-family: var(--titre); font-size: 1.6rem; font-weight: 600; }
.carte-langue span { color: var(--doux); }
.carte-langue small { color: var(--porphyre); font-weight: 700; min-height: 1.3em; }

.grille-series { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.6rem; }
.serie { display: flex; flex-direction: column; gap: 0.8rem; text-decoration: none; color: var(--encre); background: var(--surface); border: 1px solid var(--trait); border-radius: 10px; padding: 1.3rem; min-width: 0; }
.serie:hover { border-color: var(--mer); }
.serie .rangee { display: flex; gap: 0.5rem; }
.serie .rangee .couv { width: 4.2rem; }
.serie h3 { font-size: 1.35rem; }
.serie p { margin: 0; color: var(--doux); }
.serie .meta { font-size: 0.95rem; font-weight: 700; color: var(--porphyre); }

.couv { position: relative; aspect-ratio: 2 / 3; max-width: 100%; border-radius: 2px 6px 6px 2px; overflow: hidden; background: var(--teinte, #3d6a98); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 8px 18px -10px rgba(0,0,0,.4); flex: none; }
.couv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.couv .repli { position: absolute; inset: 0; padding: 12% 10%; display: flex; flex-direction: column; justify-content: space-between; font-family: var(--titre); line-height: 1.15; font-size: clamp(0.55rem, 1.1vw, 1rem); background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(0,0,0,.18)); }
.couv .repli::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6%; background: rgba(0,0,0,.18); }
.couv .repli small { font-family: var(--texte); font-size: .75em; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.serie .couv .repli { font-size: 0.5rem; }

.livres { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 2rem 1.6rem; }
.fiche { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }
.fiche a.titre { color: var(--encre); text-decoration: none; font-family: var(--titre); font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.fiche a.titre:hover { color: var(--mer); text-decoration: underline; }
.fiche p { margin: 0; color: var(--doux); font-size: 1rem; }
.fiche .num { font-size: 0.85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--porphyre); }

.auteur { display: flex; gap: 1.2rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--trait); border-radius: 10px; padding: 1.3rem 1.4rem; max-width: 44rem; }
.auteur .initiale { flex: none; width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center; font-family: var(--titre); font-size: 1.5rem; color: #fff; background: var(--teinte, var(--mer)); }
.auteur p { margin: 0; }

.livre-detail { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.livre-detail .couv { width: 100%; }
.livre-detail .pile { gap: 1rem; }
.sous-titre { font-size: 1.25rem; color: var(--doux); margin: 0; font-style: italic; }
.fil { font-size: 0.95rem; color: var(--doux); }
.fil a { color: var(--doux); }
.bouton.amazon { background: var(--porphyre); border-color: var(--porphyre); }
.note { font-size: 0.95rem; color: var(--doux); margin: 0; }

@media (max-width: 760px) {
  .livre-detail { grid-template-columns: 1fr; }
  .livre-detail .couv { width: 60%; }
}
.couv.ok { background: transparent; box-shadow: none; aspect-ratio: auto; overflow: visible; }
.couv.ok .repli { display: none; }
.couv.ok img { position: static; display: block; height: auto; border-radius: 2px 5px 5px 2px; box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 8px 18px -10px rgba(0,0,0,.4); }
.serie .rangee { align-items: flex-end; }

/* Bandeau promo défilant. Couleurs fixes, lisibles en clair comme en sombre. */
.bandeau { background: #1d4f6e; color: #fff; font-size: 1rem; line-height: 1.4; }
.bandeau .promo { display: block; color: inherit; text-decoration: none; overflow: hidden; white-space: nowrap; }
.bandeau .promo:focus-visible { outline: 3px solid #f2c14e; outline-offset: -3px; }
.bandeau .promo-bonus, .apres-noel .bandeau .promo-noel { display: none; }
.apres-noel .bandeau .promo-bonus { display: block; }
.promo-piste { display: inline-flex; animation: defile 40s linear infinite; padding-block: .55rem; }
.promo:hover .promo-piste, .promo:focus .promo-piste { animation-play-state: paused; }
.promo-item { padding-inline: 2.5rem; }
.promo-item b { color: #f2c14e; font-weight: 700; white-space: nowrap; }
.promo-fixe { display: none; }
@keyframes defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 600px) { .bandeau { font-size: .95rem; } .promo-piste { animation-duration: 30s; } .promo-item { padding-inline: 1.5rem; } }
@media (prefers-reduced-motion: reduce) {
  .promo-piste { display: none; }
  .promo-fixe { display: block; white-space: normal; text-align: center; padding: .55rem 1rem; }
  .promo-fixe .promo-item { padding: 0; }
}

/* Logo officiel en tête, ancien logo en signature du pied de page */
.signature { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.signature svg { width: 1.8rem; height: 1.8rem; flex: none; }
@media (max-width: 30rem) { .marque .embleme { width: 2.8rem; height: 2.8rem; } .marque span { font-size: 1.35rem; } }
