/* ===================================================
   ÉDITIONS DES MERVEILLES — Feuille de style principale
   Fond doré étoilé, menu à étoiles, cadres dorés.
   =================================================== */

:root {
  --or-clair: #fff3b8;
  --or: #e9d58f;
  --or-fonce: #cdbd8e;
  --orange: #c8700f;
  --orange-fonce: #b66108;
  --cadre: #b08a2a;
  --cadre-clair: #d9b95a;
  --texte: #1a1208;
  --brun: #9a5a0f;
  --rose-bouton: #c98bb0;

  --font-texte: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Great Vibes', 'Pinyon Script', cursive;
  --font-gras: 'Libre Baskerville', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { min-height: 100%; }
body {
  font-family: var(--font-texte);
  font-size: 1.15rem;
  color: var(--texte);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* fond doré à rayons de lumière (image fournie) */
  background: var(--or) url('../assets/fond-dore.jpg') center top / cover no-repeat fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- Étoiles scintillantes (générées par layout.js) --- */
.etoiles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.etoiles i {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 2px rgba(255,255,255,0.9);
  animation: scintille 4s ease-in-out infinite;
}
@keyframes scintille {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
@media (prefers-reduced-motion: reduce) { .etoiles i { animation: none; opacity: 0.6; } }

#en-tete, main, #pied-de-page { position: relative; z-index: 1; }
main { flex: 1; }

/* --- En-tête --- */
.site-header { padding: 1.2rem 3rem 1rem; }
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.logo-img { height: 150px; width: auto; }
.tagline {
  font-family: var(--font-script);
  font-size: 2.6rem;
  color: var(--orange);
  line-height: 1.1;
}
.icones { display: flex; gap: 1.2rem; align-items: center; }
.icones svg { width: 46px; height: 46px; display: block; }

/* --- Menu principal avec étoiles sur les filets --- */
nav.menu-principal {
  position: relative;
  margin: 1.2rem 0 0;
  padding: 1rem 0;
  border-top: 2px solid var(--orange);
  border-bottom: 2px solid var(--orange);
}
nav.menu-principal ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.9rem;
}
nav.menu-principal li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
}
nav.menu-principal a:hover,
nav.menu-principal a.actif { color: var(--orange); }
nav.menu-principal .etoile {
  position: absolute;
  color: var(--orange);
  font-size: 1.7rem;
  line-height: 1;
  transform: translate(-50%, -50%);
}
nav.menu-principal .etoile.haut { top: -1px; }
nav.menu-principal .etoile.bas { top: calc(100% + 1px); }

/* --- Contenu général --- */
.page { padding: 1.5rem 3rem 3rem; max-width: 1280px; margin: 0 auto; width: 100%; }
.fil-ariane { font-size: 1.15rem; margin-bottom: 1.2rem; }
.fil-ariane a:hover { color: var(--orange); }
h1.titre-page { font-weight: 400; font-size: 2.3rem; text-align: center; margin-bottom: 1rem; }

/* --- Cadre doré (double filet) --- */
.cadre {
  position: relative;
  display: block;
  padding: 14px;
  border: 3px solid var(--cadre-clair);
  outline: 2px solid var(--cadre);
  outline-offset: -11px;
  text-align: center;
  background: rgba(255,255,255,0.12);
  transition: transform .25s ease;
}
a.cadre:hover { transform: translateY(-4px); }
.cadre img.couv { margin: 0 auto 0.3rem; max-height: 250px; width: auto; }
.cadre .legende { font-size: 1.15rem; line-height: 1.35; }

.ruban {
  position: absolute;
  top: -16px;
  left: -14px;
  background: #fff;
  color: var(--texte);
  border: 2px solid #f2a93b;
  padding: 0.1rem 1.2rem 0.1rem 1rem;
  font-size: 1.25rem;
  border-radius: 6px 10px 6px 10px;
  transform: rotate(-3deg);
  z-index: 2;
}

.grille-cadres {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding-top: 1rem;
}
.grille-cadres .cadre { width: 260px; }
.grille-cadres.large .cadre { width: 260px; }

/* --- Accueil : bande carrousel --- */
.bande-blanche {
  background: #fff;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.6rem 1.2rem;
  margin: 0;
  overflow: hidden;
}
.bande-blanche h2 {
  flex: 0 0 auto;
  font-family: var(--font-gras);
  font-weight: 700;
  color: var(--brun);
  font-size: 2.6rem;
  line-height: 1.1;
  max-width: 17ch;
}
.carrousel {
  display: flex;
  gap: 2.4rem;
  overflow-x: auto;
  padding: 0.4rem 0.5rem;
  scroll-snap-type: x mandatory;
  margin-left: auto;
  scrollbar-width: thin;
}
.carrousel a { flex: 0 0 auto; width: 170px; text-align: center; font-size: 0.95rem; line-height: 1.25; scroll-snap-align: start; }
.carrousel img { height: 150px; width: auto; margin: 0 auto 0.3rem; }

.bloc-texte-accueil {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 3rem 3rem 4rem;
}
.bloc-texte-accueil .texte { max-width: 70ch; font-size: 1.5rem; }
.recherche { position: relative; }
.recherche .champ {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1.5px solid var(--texte);
  border-radius: 999px;
  padding: 0.25rem 1rem;
  width: 200px;
  background: transparent;
}
.recherche input { border: none; outline: none; background: transparent; font-family: inherit; font-size: 1.1rem; width: 100%; }
.recherche ul {
  list-style: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: 280px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  z-index: 5;
}
.recherche li a { display: block; padding: 0.5rem 0.9rem; }
.recherche li a:hover { background: var(--or-clair); }

/* --- La maison --- */
.maison { display: flex; gap: 3rem; align-items: center; flex-wrap: wrap; }
.maison .marque { flex: 0 0 340px; }
.maison .marque img { width: 300px; margin: 0 auto; }
.maison .texte { flex: 1 1 380px; font-size: 1.45rem; }
.maison .texte p { margin-bottom: 0.2rem; }

/* --- Catalogue : cercles --- */
.cercles { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; padding-top: 1rem; }
.cercle {
  width: 360px;
  height: 360px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  padding: 3.4rem 2rem 1rem;
  text-align: center;
  position: relative;
  transition: transform .25s ease;
}
.cercle:hover { transform: translateY(-4px); }
.cercle::before {
  content: "\2726  \2727";
  position: absolute;
  top: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--orange);
  letter-spacing: 0.8rem;
  font-size: 1.1rem;
}
.cercle h2 { font-weight: 400; font-size: 1.9rem; line-height: 1.15; margin-bottom: 0.6rem; }
.cercle p { font-size: 1.1rem; line-height: 1.4; }

/* --- Fiche livre --- */
.fiche { display: flex; gap: 3rem; align-items: flex-start; flex-wrap: wrap; }
.fiche .gauche { flex: 0 0 auto; width: 230px; margin-left: 165px; text-align: center; position: relative; }
.fiche .gauche img.couv-grande { width: 200px; margin: 0 auto 1rem; }
.fiche .badge { position: absolute; left: -160px; top: 40px; width: 140px; }
.bouton-acheter {
  display: inline-block;
  background: linear-gradient(180deg, #dca5c6, var(--rose-bouton));
  border-radius: 999px;
  padding: 0.4rem 3rem;
  font-size: 1.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}
.bouton-acheter:hover { filter: brightness(1.08); }
.fiche .droite { flex: 1 1 380px; font-size: 1.1rem; }
.fiche .droite p { margin-bottom: 0.9rem; }
.fiche .droite a.souligne { text-decoration: underline; }

/* --- Auteurs --- */
.portraits { display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap; padding-top: 1rem; }
.portraits .cadre { width: 300px; padding: 22px 18px 14px; }
.portraits .cadre img.portrait { width: 250px; height: 250px; object-fit: cover; border-radius: 16px; margin: 0 auto 0.5rem; }
.portraits .cadre .legende { font-size: 1.6rem; }

.auteur { display: flex; gap: 3rem; align-items: flex-start; flex-wrap: wrap; }
.auteur .photo-ronde { flex: 0 0 360px; display: flex; justify-content: center; }
.auteur .anneau {
  width: 340px; height: 340px;
  padding: 52px;
  background: url('../assets/anneau-etoiles.png') center / contain no-repeat;
}
.auteur .anneau img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.auteur .texte { flex: 1 1 380px; font-size: 1.3rem; }
.auteur .texte h1 { font-weight: 400; font-size: 2.2rem; text-align: center; margin-bottom: 0.4rem; }
.auteur .texte p { margin-bottom: 0.9rem; }
.auteur .texte a { text-decoration: underline; }

/* --- Tirages --- */
.paquets { display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap; padding-top: 1rem; }
.paquet { text-align: center; font-size: 2rem; }
.dos-carte {
  width: 210px; height: 290px;
  margin: 0 auto 0.5rem;
  border-radius: 14px;
  background: #e8cdbf;
  border: 6px solid #e3c4b4;
  box-shadow: inset 0 0 0 5px #e8cdbf, inset 0 0 0 7px #3a2a20, 0 6px 14px rgba(0,0,0,0.2);
  transition: transform .25s ease;
}
.paquet:hover .dos-carte { transform: translateY(-5px) rotate(-1.5deg); }

.tirage { display: flex; gap: 2rem; align-items: flex-start; flex-wrap: wrap; }
.tirage .eventail { position: relative; width: 480px; height: 360px; flex: 0 0 480px; }
.tirage .eventail .dos {
  position: absolute;
  width: 120px; height: 190px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .3s ease, opacity .3s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.tirage .eventail .dos:hover { filter: brightness(1.06); }
.tirage .eventail .dos.tiree { opacity: 0.25; cursor: default; }
.tirage .carte-tiree {
  position: absolute;
  left: 175px; top: 120px;
  width: 120px; height: 200px;
  background: #fff;
  border: 2px solid #8b7b70;
  border-radius: 8px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 0.5rem;
  z-index: 5;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.tirage .carte-tiree .num { font-size: 0.9rem; margin-bottom: 0.4rem; }
.tirage .carte-tiree .etoile-carte { font-size: 2.6rem; color: #7b6a60; line-height: 1; margin: 0.3rem 0; }
.tirage .droite { flex: 1 1 340px; text-align: center; padding-top: 0.5rem; }
.tirage .droite h1 { font-weight: 400; font-size: 2.2rem; margin-bottom: 1.5rem; }
.tirage .droite p { text-align: left; font-size: 1.5rem; }
.tirage .bouton-reset {
  margin-top: 1.5rem;
  font-family: inherit;
  font-size: 1.2rem;
  padding: 0.3rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid var(--orange);
  background: transparent;
  color: var(--orange-fonce);
  cursor: pointer;
}
.tirage .bouton-reset:hover { background: var(--orange); color: #fff; }

/* --- Contact --- */
.contact { display: flex; gap: 4rem; align-items: flex-start; justify-content: center; flex-wrap: wrap; padding-top: 0.5rem; }
.form-contact {
  background: #eee;
  padding: 1rem 1.2rem 1.2rem;
  width: 370px;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
  color: #444;
  text-align: left;
}
.form-contact h2 { font-weight: 400; font-size: 1.15rem; margin-bottom: 0.7rem; color: #333; }
.form-contact label { display: block; margin-bottom: 0.8rem; }
.form-contact input, .form-contact textarea {
  display: block;
  width: 100%;
  margin-top: 0.2rem;
  padding: 0.25rem;
  border: 1px solid #bbb;
  background: #fff;
  font-family: inherit;
}
.form-contact textarea { height: 120px; }
.form-contact button { padding: 0.3rem 1rem; font-family: inherit; cursor: pointer; }
.form-contact .mention { margin-bottom: 0.8rem; }
.newsletter { padding-top: 2rem; font-size: 2.2rem; text-align: center; }
.newsletter p.note { font-size: 1.1rem; margin-top: 1rem; max-width: 30ch; }

/* --- Pied de page --- */
footer.site-footer {
  background: var(--orange-fonce);
  color: var(--texte);
  font-size: 2rem;
  padding: 0.7rem 3rem 0.7rem 12rem;
}
footer.site-footer a:hover { color: #fff; }

/* --- Page d'entrée --- */
body.entree { align-items: center; justify-content: center; text-align: center; cursor: pointer; }
body.entree .logo-entree { width: min(480px, 70vw); margin: 0 auto; position: relative; z-index: 1; }
body.entree .poussez {
  position: relative; z-index: 1;
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: var(--orange);
  margin-top: 2rem;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .site-header { padding: 1rem 1.2rem 0; }
  .tagline { font-size: 1.8rem; }
  .logo-img { height: 80px; }
  nav.menu-principal ul { font-size: 1.25rem; }
  nav.menu-principal .etoile { display: none; }
  .page, .bloc-texte-accueil { padding: 1.2rem; }
  .bande-blanche { flex-direction: column; align-items: flex-start; }
  .bande-blanche h2 { font-size: 1.8rem; }
  .carrousel { margin-left: 0; width: 100%; }
  .fiche .gauche { margin-left: 0; }
  .fiche .badge { position: static; margin: 0 auto 1rem; }
  .tirage .eventail { width: 100%; flex-basis: auto; }
  footer.site-footer { padding-left: 1.2rem; font-size: 1.5rem; }
  .cercle { width: 320px; height: 320px; padding-top: 3rem; }
}

/* --- Couverture manquante : cadre de repli avec le titre --- */
.couv-vide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 220px;
  margin: 0 auto 0.4rem;
  padding: 0.8rem;
  background: linear-gradient(160deg, #1b2a3d, #0c1826);
  color: #f0c977;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.2;
}
