
:root{
  --bg:#e0dedb;
  --ink:#1a1a1a;
  --muted:#5a5a5a;
  --accent:#a81a13;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.08);
  --max: 960px;
}

/* RESET + BASE */
*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--ink);
  font-family:'Open Sans', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size:17px;
  line-height:1.6;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--accent);text-decoration:none}

/* ACCESSIBILITÉ */
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.btn:focus-visible, input:focus-visible { box-shadow:0 0 0 3px rgba(168,26,19,.25); }

/* TYPOGRAPHIE */
h1,h2,h3{
  font-family:'Playfair Display', serif;
  font-weight:600;
  letter-spacing:0.2px;
}
blockquote{
  font-family:'EB Garamond', serif;
  font-size:1.4em;
  letter-spacing:0.3px;
  line-height:1.3;
  color:#3a3a3a;
  margin:1rem 0;
  padding:.75rem 1rem;
  border-left:3px solid var(--accent);
  background:#fff;
  border-radius:10px;
  font-style:italic;
}

/* LAYOUT GLOBAL */
.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:clamp(16px,3vw,28px);
}

/* HERO (accroche + grille) */
.hero{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:88svh;
}


/* Accroche (chapeau) */
.chapeau{
  font-family:'EB Garamond', serif;
  font-weight:500;
  font-style:italic;
  font-size:clamp(24px,6vw,40px);
  line-height:1.2;
  text-align:center;
  margin-bottom:0.5rem;
  color:var(--ink);
  opacity:0; transform:translateY(6px);
  animation:fadeUp .6s ease-out .05s forwards;
}
.lead{
  text-align: center;          /* le h1 reste centré en texte */
  display: flex;               /* on passe en flex colonne */
  flex-direction: column;
  align-items: center;         /* centre horizontalement TOUS les enfants */
}

/* === Centre le badge "Parution officielle" de façon robuste === */
.lead p.meta{
  display: block;
  /* width: fit-content;  ← retire cette ligne, ou remplace par : */
  width: auto;
  margin: .5rem auto 0 auto;
  text-align: center;
  color: #fff;
  background: #a81a13;
  padding: 0.35em 0.75em;
  border-radius: 0.6em;
  font-weight: 500;
  opacity: 0;
  transform: translateY(6px);
  animation: fadeUp .6s ease-out .12s forwards;
}

/* Grille couverture + formulaire */
.hero-grid{
  display:grid;
  gap:clamp(16px,3vw,24px);
  grid-template-columns:1fr;
  align-items:center;
  margin-top:clamp(16px,3vw,24px);
  width:100%;
}
.cover{
  justify-self:center;
  width:min(68vw,420px);
  opacity:0; transform:translateY(6px);
  animation:fadeUp .6s ease-out .16s forwards;
}
@media (min-width:960px){
  .hero-grid{
    grid-template-columns:1fr 1fr;
    align-items:center;
  }
  .cover{
    justify-self:end;
    width:min(36vw,460px);
  }
}

/* Bouton générique */
.btn{
  display:inline-block;
  width:100%;
  text-align:center;
  padding:14px 16px;
  border-radius:10px;
  font-weight:600;
  background:var(--ink);
  background-color: #451803;
  color:#fff;
  border:none;
  cursor:pointer;
  transition:transform .05s ease, opacity .2s ease;
}
.btn:hover{ opacity:.95; }
.btn:active{ transform:translateY(1px); }

/* SECTIONS */
section{ margin:clamp(28px,5vw,56px) 0; }
h3{ font-size:clamp(20px,3.6vw,28px); margin:.2rem 0 .6rem; }
p{ line-height:1.6; margin:.6rem 0; }

.footer{
  color:var(--muted);
  font-size:.9rem;
  text-align:center;
  padding:28px 0 12px;
}

/* RAPPEL CTA BAS DE PAGE */
.sticky-cta{
  background:#fff;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
  display:grid;
  gap:10px;
  align-items:center;
}
@media (min-width:960px){
  .sticky-cta{
    grid-template-columns:1fr auto;
    padding:18px 20px;
  }
  .sticky-cta .btn{
    width:auto;
    padding:12px 18px;
  }
}

/* ANIMATIONS */
@keyframes fadeUp{
  to { opacity:1; transform:translateY(0); }
}

/* Respect des préférences utilisateurs */
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}

/* ——— Séparateur élégant avant la section ——— */
.section-sep {
  position: relative;
  padding-top: clamp(24px, 4vw, 40px);
  margin-top: clamp(28px, 5vw, 56px);
}
.section-sep::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.12), transparent);
}
.section-sep::after {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 72px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ——— Layout Auteur ——— */
.author-grid {
  display: grid;
  gap: clamp(14px, 2.5vw, 24px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 960px) {
  .author-grid {
    grid-template-columns: auto 1fr;
  }
  .author-photo {
    justify-self: start;
    width: min(20vw, 180px);
  }
}
.author-photo {
  justify-self: center;
  width: min(30vw, 200px);
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  object-fit: cover;
}
@media (min-width: 960px) {
  .author-photo { justify-self: start; }
}
.author-text p { margin-top: .4rem; }

/* ====== Brevo form – overrides locaux ====== */
.sib-form {
  text-align: center;
  background-color: var(--bg);
}

/* Panneaux message erreur / succès */
#error-message.sib-form-message-panel {
  font-size: 16px;
  text-align: left;
  font-family: Helvetica, sans-serif;
  color: #661d1d;
  background-color: #ffeded;
  border-radius: 3px;
  border-color: #ff4949;
  max-width: 540px;
}
#success-message.sib-form-message-panel {
  font-size: 16px;
  text-align: left;
  font-family: Helvetica, sans-serif;
  color: #085229;
  background-color: #e7faf0;
  border-radius: 3px;
  border-color: #13ce66;
  max-width: 540px;
}

/* Carte centrale */
#sib-container.sib-container--large.sib-container--vertical {
  text-align: center;
  background-color: #fff;
  max-width: 540px;
  border-radius: 8px;
  border-width: 0;
  border-color: #C0CCD9;
  border-style: solid;
  direction: ltr;
}

/* Titre + sous-titre */
.sib-form .sib-form-block--title,
.sib-form .sib-form-block--subtitle {
  text-align: left;
  background-color: transparent;
}
.sib-form .sib-form-block--title {
  font-size: 27px;
  font-weight: 700;
  font-family: Garamond, serif;
  color: #3C4858;
}
.sib-form .sib-form-block--subtitle {
  font-size: 15px;
  font-family: Futura, sans-serif;
  color: #3C4858;
}

/* Champs (hérités de sib-styles.css) */
#sib-container input::placeholder,
#sib-container textarea::placeholder {
  text-align: left;
  font-family: Helvetica, sans-serif;
  color: #c0ccda;
}

/* Libellés d’erreur sous champs */
#sib-container .entry__error.entry__error--primary {
  font-size: 16px;
  text-align: left;
  font-family: Helvetica, sans-serif;
  color: #661d1d;
  background-color: #ffeded;
  border-radius: 3px;
  border-color: #ff4949;
}

/* Texte RGPD sous la case opt-in */
#sib-container .entry__specification {
  font-size: 12px;
  text-align: left;
  font-family: Helvetica, sans-serif;
  color: #8390A4;
}

/* Bouton */
#sib-container .sib-form-block__button {
  font-size: 16px;
  text-align: left;
  font-weight: 700;
  font-family: Helvetica, sans-serif;
  color: #FFFFFF;
  background-color: #451803;
  border-radius: 8px;
  border-width: 0;
}

/* Liens à l’intérieur du conteneur */
#sib-container a {
  text-decoration: underline;
  color: #2BB2FC;
}

/* Espacements verticaux homogènes entre blocs du formulaire */
.sib-form .sib-spacer {
  padding: 8px 0;
}

/* ===== Fix header → main spacing (v4) =====
   Problème réel : combinaison de min-height du header .hero + collapse du margin-top
   de la première <section> dans <main>. On corrige sans casser le reste.
*/
header.wrap.hero{
  min-height: auto !important;            /* supprime l'effet "quasi plein écran" */
}

main.wrap{
  /* Empêche le margin-collapse de la 1ère section de "remonter" au-dessus du main */
  padding-top: clamp(8px, 1.6vw, 20px) !important;
}

main.wrap > section:first-of-type{
  /* Réduit uniquement l'espace avant la 1ère section du main */
  margin-top: clamp(8px, 1.6vw, 20px) !important;
}

/* ——— Boutons de partage : styles unifiés ——— */
.share {
  text-align: center; /* Centre l'ensemble du bloc */
}

.share .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;   /* Centre texte + icône dans chaque bouton */
  gap: 8px;                  /* Espace entre icône et texte */
  text-align: center;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  background: var(--ink);
  background-color: #451803;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform .05s ease, opacity .2s ease;
  margin: 6px 4px;           /* Légère marge entre les boutons */
}

.share .btn:hover {
  opacity: .95;
}

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

.share .btn i {
  font-size: 1.1rem;
  opacity: 0.9;
  transition: all 0.2s ease;
}

.share .btn:hover i {
  opacity: 1;
  transform: scale(1.1);
}

/* ——— Disposition mobile ——— */
@media (max-width: 600px) {
  .share {
    display: grid;
    grid-template-columns: 1fr;  /* Empile les boutons */
    gap: 10px;
    justify-items: center;
  }

  .share .btn {
    width: 100%;
    max-width: 320px;
  }
}
/* Mentions légales */
.header-legal {
  text-align: center;
  margin: 3rem auto 2rem;
  padding: 1rem;
}
.header-legal h1 {
  font-family: 'EB Garamond', serif;
  font-size: 2rem;
  margin-bottom: 0.3rem;
}
.header-legal .subtitle {
  font-style: italic;
  color: #555;
}
.legal-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  line-height: 1.7;
}
.legal-container h3 {
  margin-top: 2rem;
  font-size: 1.3rem;
}
.legal-container h4 {
  margin-top: 1.2rem;
  font-size: 1.1rem;
}
.legal-container a {
  color: #8b0000;
  text-decoration: none;
}
.legal-container a:hover {
  text-decoration: underline;
}
.back-home {
  display: inline-block;
  margin: 1rem 0;
  color: #8b0000;
  font-weight: 500;
}
.footer-legal {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
  color: #555;
}

/* ===== Overlays YouTube personnalisés ===== */
.video-16x9 { position: relative; }
.yt-overlay,
.yt-ended{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 3;
  pointer-events: auto;
}
.yt-overlay{
  background: linear-gradient(0deg, rgba(0,0,0,.35), rgba(0,0,0,.15));
}
.yt-ended{
  display:none;
  background: radial-gradient(circle at 50% 45%, rgba(0,0,0,.4), rgba(0,0,0,.7));
  color:#fff;
  text-align:center;
  padding: 24px;
}
.yt-ended .ended-inner{
  backdrop-filter: blur(2px);
  padding: 16px 22px;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
}
.yt-play, .yt-replay{
  appearance:none;
  border:none;
  border-radius: 999px;
  padding: 18px 24px;
  font-size: clamp(24px, 4.5vw, 34px);
  line-height: 1;
  background:#000;
  color:#fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  cursor:pointer;
  transition: transform .06s ease;
}
.yt-play:hover, .yt-replay:hover{ transform: scale(1.03); }
.yt-play:active, .yt-replay:active{ transform: scale(.98); }

/* États */
.video-16x9.is-playing .yt-overlay{ display:none; }
.video-16x9.is-ended .yt-ended{ display:flex; }

/* Assure que l'iframe est sous l'overlay */
.video-16x9 iframe{ z-index: 1; position:absolute; inset:0; }


/* ===== Correctifs largeur + anti-pillarbox + overlay fin opaque ===== */

/* Le header ne force pas une hauteur d'écran qui ferait "flotter" la vidéo */
header.wrap.hero{ min-height:auto !important; }

/* Le bloc vidéo doit occuper toute la largeur de la colonne */
.video-wrap{ width:100%; max-width:var(--max); margin:clamp(12px,3vw,20px) auto 0; display:block; clear:both; }
.video-16x9{ width:100%; position:relative; aspect-ratio:16/9; background:#000; border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.video-16x9 iframe{ position:absolute; inset:0; width:100%; height:100%; transform:scale(var(--video-zoom, 1)); transform-origin:center; }
/* Active un léger zoom par défaut pour masquer les bandes latérales YouTube */
.video-16x9.video-zoom{ --video-zoom:1.0; } /* ajuste entre 1.03 et 1.10 si besoin */

/* Overlay FIN : opacité totale couleur fond de page pour masquer totalement les suggestions */
.yt-ended{
  display:none;
  background:#e0dedb !important;
  color:var(--ink);
  z-index:4;
}
/* Quand terminé, on cache visuellement l'iframe pour que rien ne transparesse */
.video-16x9.is-ended iframe{ visibility:hidden; }

/* Bouton play/replay: contraste adapté au fond clair aussi */
.yt-replay{
  background:var(--ink);
  color:#fff;
}

/* CTA sous la vidéo */
.cta-holder{
  margin-top: clamp(10px, 2vw, 16px);
}

.big-cta{
  display: none;           /* masqué par défaut — révélé par JS */
  width: 100%;
  font-size: clamp(16px, 2.4vw, 18px);
  padding: 16px 18px;
  border-radius: 10px;     /* cohérent avec .btn */
}

.big-cta.is-visible{
  display: inline-block;   /* montré quand le JS ajoute la classe */
}

/* ===== Bandes transparentes anti-clic YouTube (haut/bas) ===== */
.yt-guard{
  position: absolute;
  left: 0; right: 0;
  z-index: 2;                /* > iframe (1), < overlays Play/End (3/4) */
  pointer-events: auto;      /* intercepte le clic */
  background: transparent;   /* invisible, mais cliquable */
  /* Debug éventuel : background: rgba(255,0,0,.06); */
  touch-action: none;        /* évite gestes parasites sur mobile */
}

.yt-guard--top{
  top: 0;
  height: clamp(28px, 8.5vw, 80px);   /* couvre la zone titre/chaîne */
}

.yt-guard--bottom{
  bottom: 0;
  height: clamp(38px, 10vw, 96px);    /* couvre la barre de contrôle/partage */
}

/* ----- Section témoignages ----- */
.testimonials {
  background-color: #faf9f7;
  padding: 3rem 1.5rem;
  text-align: center;
  overflow: hidden;
}

.testimonials h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: #2c2c2c;
}

.testimonials-container {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: #a81a13 #f1f1f1;
}

/* Pour le scroll horizontal au doigt (mobile) */
.testimonials-container::-webkit-scrollbar {
  height: 6px;
}
.testimonials-container::-webkit-scrollbar-thumb {
  background-color: #a81a13;
  border-radius: 3px;
}

.testimonial {
  flex: 0 0 280px;
  background: #fff;
  border-radius: 1.2rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: left;
  transition: transform 0.3s ease;
}

.testimonial:hover {
  transform: translateY(-4px);
}

.testimonial p {
  font-family: "EB Garamond", serif;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #333;
}

.testimonial em {
  color: #a81a13;
  font-style: italic;
}

.testimonial .author {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #555;
  text-align: right;
}


/* === Bouton principal CTA "Je veux mes bonnes pages" (rouge-brun signature) === */
.cta {
  display: block;
  width: 100%;
  max-width: 800px;
  margin: 1.2rem auto;
  padding: 1rem 1.5rem;
  background: #451803;           /* ton rouge-brun caractéristique */
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  border-radius: 0.6em;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.cta:hover,
.cta:focus {
  background: #6a2606;           /* léger éclaircissement au survol */
  transform: scale(1.025);
}

/* Mobile */
@media (max-width: 600px) {
  .cta {
    font-size: 1.1rem;
    padding: 0.9rem 1.1rem;
    border-radius: 0.5em;
  }
}
/* Force l'affichage du CTA quand on met .cta-visible */
.cta-visible{
  opacity: 1 !important;
  pointer-events: auto !important;
  filter: none !important;
}

/* === Bouton "Activer le son" sur la vidéo === */
.unmute-btn {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  background: #451803;
  color: #fff;
  font-family: "Open Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .2s ease;
  z-index: 5;
}
.unmute-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.unmute-btn:hover {
  transform: translateX(-50%) scale(1.05);
  background: #6a2606;
}