/* ============================================================
   ENFIN CLAIR — enfin-clair.fr
   Esthétique : maison d'édition française. Papier crème, encre
   bleu marine, or du logo. Grande typographie serif, lisibilité
   d'abord (public 45-65 ans). Zéro dépendance externe.
   ============================================================ */

:root {
  --encre: #1c2b53;
  --encre-claire: #2c3f74;
  --or: #dd9a10;
  --or-vif: #f0ad2a;
  --papier: #fbf7ee;
  --creme: #f4ecda;
  --ligne: #e0d5ba;
  --texte: #2b2c34;
  --texte-doux: #585a66;
  --blanc: #ffffff;
  --serif: "Charter", "Bitstream Charter", "Sitka Text", Cambria,
           Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-size: 1.25rem;            /* 20 px : on lit sans lunettes neuves */
  line-height: 1.65;
  color: var(--texte);
  background-color: var(--papier);
  /* très léger vignettage papier, sans image */
  background-image:
    linear-gradient(180deg, rgba(28, 43, 83, 0.025), rgba(28, 43, 83, 0) 220px),
    linear-gradient(0deg, rgba(28, 43, 83, 0.03), rgba(28, 43, 83, 0) 180px);
  -webkit-font-smoothing: antialiased;
}

/* Liseré or en haut de chaque page, comme une tranche dorée */
body::before {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--or), var(--or-vif), var(--or));
}

::selection { background: var(--or-vif); color: var(--encre); }

/* ---------- En-tête ---------- */

.entete {
  max-width: 70rem;
  margin: 0 auto;
  padding: 1.4rem 1.5rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.marque {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}

.marque img { width: 52px; height: 52px; }

.marque-nom {
  font-variant: small-caps;
  letter-spacing: 0.22em;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--encre);
}

.marque-sous {
  display: block;
  font-variant: normal;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--texte-doux);
}

.entete nav { display: flex; gap: 1.6rem; }

.entete nav a {
  color: var(--encre);
  font-size: 1.02rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.entete nav a:hover,
.entete nav a:focus-visible { border-bottom-color: var(--or); }

/* ---------- Filets et ornements ---------- */

.filet {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  color: var(--or);
}

.filet::before,
.filet::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ligne);
}

.ornement {
  text-align: center;
  color: var(--or);
  font-size: 1.3rem;
  letter-spacing: 0.9em;
  padding-left: 0.9em; /* compense le letter-spacing du dernier signe */
  margin: 3rem 0;
}

/* ---------- Blocs de page ---------- */

main { display: block; }

.heros {
  max-width: 70rem;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 56rem) {
  .heros { grid-template-columns: 1fr; gap: 2.5rem; padding-top: 2.2rem; }
}

.heros h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.1rem);
  line-height: 1.18;
  color: var(--encre);
  font-weight: 700;
  margin-bottom: 1.3rem;
}

.heros h1 .souligne {
  box-shadow: inset 0 -0.32em 0 0 rgba(240, 173, 42, 0.45);
}

.heros .accroche {
  font-size: 1.32rem;
  color: var(--texte);
  margin-bottom: 1.1rem;
}

.heros .precision {
  font-size: 1.05rem;
  color: var(--texte-doux);
  font-style: italic;
}

/* ---------- Couverture de livre en CSS ---------- */

.couverture-cadre { display: flex; justify-content: center; }

.couverture {
  width: min(300px, 78vw);
  aspect-ratio: 1 / 1.38;
  background:
    linear-gradient(105deg, rgba(255,255,255,0.10), rgba(255,255,255,0) 28%),
    linear-gradient(180deg, var(--encre-claire), var(--encre) 60%);
  border-radius: 4px 10px 10px 4px;
  box-shadow:
    -6px 0 0 -2px var(--or),              /* tranche dorée */
    0 18px 38px rgba(28, 43, 83, 0.30),
    0 4px 10px rgba(28, 43, 83, 0.22);
  transform: rotate(-2.2deg);
  padding: 1.7rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--papier);
}

.couverture .cadre-int {
  border: 1px solid rgba(240, 173, 42, 0.7);
  border-radius: 3px;
  padding: 1.5rem 1rem;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.couverture img { width: 76px; height: 76px; }

.couverture .c-titre {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.couverture .c-edition {
  font-size: 0.92rem;
  color: var(--or-vif);
  font-variant: small-caps;
  letter-spacing: 0.18em;
}

.couverture .c-sous {
  font-size: 0.88rem;
  font-style: italic;
  color: rgba(251, 247, 238, 0.85);
  line-height: 1.45;
}

.couverture .c-auteur {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  font-variant: small-caps;
  color: rgba(251, 247, 238, 0.9);
}

/* ---------- Sections de contenu ---------- */

.section {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.6rem 1.5rem;
}

.section-large { max-width: 70rem; }

.section h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  color: var(--encre);
  line-height: 1.25;
  margin-bottom: 1.4rem;
}

.section h2 .numero {
  color: var(--or);
  font-style: italic;
  margin-right: 0.35em;
}

.section h3 {
  font-size: 1.25rem;
  color: var(--encre);
  margin: 1.8rem 0 0.7rem;
}

.section p { margin-bottom: 1.05rem; }

.section ul, .section ol { padding-left: 1.4rem; margin-bottom: 1.05rem; }

.section li { margin-bottom: 0.55rem; }

.lettrine::first-letter {
  font-size: 3.4em;
  float: left;
  line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: var(--encre);
  font-weight: 700;
}

/* ---------- Encadré or (à retenir / offre) ---------- */

.encadre {
  background: var(--creme);
  border: 1px solid var(--ligne);
  border-left: 5px solid var(--or);
  border-radius: 6px;
  padding: 1.4rem 1.6rem;
  margin: 1.8rem 0;
}

.encadre .etiquette {
  font-variant: small-caps;
  letter-spacing: 0.18em;
  color: var(--or);
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* ---------- Liste « ce que vous saurez faire » ---------- */

.coches { list-style: none; padding-left: 0; }

.coches li {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 0.8rem;
}

.coches li::before {
  content: "◆";
  position: absolute;
  left: 0.2rem;
  color: var(--or);
}

/* ---------- Formulaire ---------- */

.bloc-form {
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(28, 43, 83, 0.08);
  padding: 2rem 1.8rem;
  margin: 2rem 0 1rem;
}

.bloc-form h2, .bloc-form h3 { margin-top: 0; }

.formulaire { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1.2rem; }

.formulaire label {
  font-weight: 700;
  color: var(--encre);
  font-size: 1.05rem;
}

.formulaire input[type="email"],
.formulaire input[type="text"] {
  font-family: var(--serif);
  font-size: 1.15rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--encre);
  border-radius: 6px;
  background: var(--papier);
  color: var(--texte);
  width: 100%;
}

.formulaire input:focus-visible {
  outline: 3px solid var(--or-vif);
  outline-offset: 1px;
}

.mention-form {
  font-size: 0.92rem;
  color: var(--texte-doux);
  line-height: 1.5;
}

.champ-cache { position: absolute; left: -6000px; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-align: center;
  color: var(--papier);
  background: var(--encre);
  border: 2px solid var(--encre);
  border-radius: 6px;
  padding: 0.95rem 2.1rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.btn:hover, .btn:focus-visible {
  background: var(--or);
  border-color: var(--or);
  color: var(--encre);
}

.btn:active { transform: translateY(1px); }

.btn-or {
  background: var(--or);
  border-color: var(--or);
  color: var(--encre);
}

.btn-or:hover, .btn-or:focus-visible {
  background: var(--encre);
  border-color: var(--encre);
  color: var(--papier);
}

.btn-bloc { display: block; width: 100%; }

/* ---------- Réassurance ---------- */

.reassurance {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.2rem;
  justify-content: center;
  font-size: 0.98rem;
  color: var(--texte-doux);
  padding: 0 1.5rem;
  max-width: 70rem;
  margin: 0 auto 1rem;
}

.reassurance span::before { content: "✓ "; color: var(--or); font-weight: 700; }

/* ---------- Prix ---------- */

.carte-prix {
  background: var(--blanc);
  border: 2px solid var(--encre);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(28, 43, 83, 0.10);
  padding: 2.2rem 2rem;
  text-align: center;
  margin: 2rem 0;
}

.carte-prix .prix {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--encre);
  line-height: 1;
}

.carte-prix .prix-detail {
  color: var(--texte-doux);
  font-size: 1rem;
  margin: 0.6rem 0 1.4rem;
}

/* ---------- FAQ ---------- */

details {
  border-bottom: 1px solid var(--ligne);
  padding: 0.9rem 0;
}

details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--encre);
  font-size: 1.12rem;
  list-style-position: outside;
}

details summary:hover { color: var(--encre-claire); }

details[open] summary { margin-bottom: 0.6rem; }

details p { font-size: 1.08rem; }

/* ---------- Pages légales ---------- */

.legal { font-size: 1.05rem; }

.legal h2 { font-size: 1.45rem; margin-top: 2.2rem; }

.legal h3 { font-size: 1.15rem; }

.legal table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.98rem; }

.legal th, .legal td { border: 1px solid var(--ligne); padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }

.legal th { background: var(--creme); color: var(--encre); }

.a-completer { background: #fff3cd; padding: 0 0.25em; }

/* ---------- Pied de page ---------- */

.pied {
  background: var(--encre);
  color: rgba(251, 247, 238, 0.92);
  margin-top: 4rem;
  padding: 2.6rem 1.5rem 2.2rem;
  font-size: 1rem;
}

.pied-int {
  max-width: 70rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.pied .p-marque {
  font-variant: small-caps;
  letter-spacing: 0.2em;
  font-size: 1.15rem;
  color: var(--papier);
}

.pied .p-marque .etoile { color: var(--or-vif); }

.pied nav { display: flex; flex-direction: column; gap: 0.45rem; }

.pied a { color: rgba(251, 247, 238, 0.92); text-decoration: underline; text-decoration-color: rgba(240, 173, 42, 0.7); text-underline-offset: 3px; }

.pied a:hover { color: var(--or-vif); }

.pied .p-transparence {
  max-width: 26rem;
  font-size: 0.92rem;
  font-style: italic;
  color: rgba(251, 247, 238, 0.78);
  line-height: 1.55;
}

/* ---------- Bandeau consentement (pixel Meta) ---------- */

.bandeau-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--blanc);
  border-top: 3px solid var(--or);
  box-shadow: 0 -8px 24px rgba(28, 43, 83, 0.18);
  padding: 1.1rem 1.5rem;
  z-index: 50;
  display: none;
}

.bandeau-consent.visible { display: block; }

.bandeau-int {
  max-width: 70rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.bandeau-int p { font-size: 0.95rem; color: var(--texte); max-width: 42rem; }

.bandeau-boutons { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.btn-consent {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.55rem 1.3rem;
  border-radius: 6px;
  cursor: pointer;
}

.btn-consent.accepter { background: var(--encre); color: var(--papier); border: 2px solid var(--encre); }

.btn-consent.refuser { background: var(--blanc); color: var(--encre); border: 2px solid var(--encre); }

.btn-consent:hover { background: var(--or); border-color: var(--or); color: var(--encre); }

/* ---------- Animation d'entrée sobre ---------- */

@media (prefers-reduced-motion: no-preference) {
  .apparait {
    opacity: 0;
    transform: translateY(14px);
    animation: apparait 0.7s ease forwards;
  }
  .apparait-2 { animation-delay: 0.15s; }
  .apparait-3 { animation-delay: 0.3s; }
  @keyframes apparait {
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Impression ---------- */

@media print {
  .bandeau-consent, .pied nav, .entete nav { display: none; }
}
