/* =========================================================
   MesResiliation.com – STYLE.CSS (CARAMEL PRO + DROPDOWN SCROLL)
   Objectifs :
   ✅ Fond caramel clair sur TOUTES les pages (y compris index)
   ✅ Header + Topbar premium sombre (lisible)
   ✅ Dropdown Guides : scroll interne, stable, sans bug
   ✅ Pages guides centrées + cartes propres
   ✅ Boutons illisibles corrigés (ex: "Copier la lettre")
   ========================================================= */

/* =========================
   RESET + BASE
   ========================= */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,.10), 0 0 0 6px rgba(212,175,55,.22);
}

.container{ width: min(1160px, 92%); margin-inline: auto; }

/* =========================
   TOKENS (palette)
   ========================= */
:root{
  --cream-1:#f8f2e9;
  --cream-2:#f4efe4;
  --cream-3:#f3eadc;

  --ink:#151515;
  --ink-soft:#2a2a2a;

  --gold:#D4AF37;
  --gold-soft: rgba(212,175,55,.22);

  --dark:#0b0f16;
  --dark-2:#07090d;

  --stroke: rgba(0,0,0,.08);
  --stroke2: rgba(0,0,0,.12);

  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --shadow-strong: 0 18px 50px rgba(0,0,0,.45);

  --radius: 18px;
}

/* =========================
   FOND GLOBAL (TOUTES PAGES)
   ========================= */
body{
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 520px at 15% -10%, rgba(212,175,55,.22), transparent 60%),
    radial-gradient(700px 420px at 90% 10%, rgba(212,175,55,.10), transparent 55%),
    linear-gradient(180deg, var(--cream-1) 0%, var(--cream-3) 55%, var(--cream-2) 100%);
  color: var(--ink);
  line-height: 1.55;
}

.site-wrapper{ min-height:100vh; display:flex; flex-direction:column; }

/* =========================================================
   TOPBAR + HEADER (premium sombre)
   ========================================================= */
.topbar{
  background: rgba(11,15,22,.92);
  color: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
}
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  padding: 10px 0;
  text-align:center;
}
.topbar-phone{
  color:#fff;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:1.2rem;
}
.topbar-info{ font-size:.95rem; }
.topbar-info .price{ color: var(--gold); font-weight:900; }

@media (max-width:768px){
  .topbar-inner{ flex-direction:column; gap:6px; padding:10px 0; }
  .topbar-phone{ font-size:1.1rem; }
}

.header{
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(11,15,22,.78);
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:220px;
  color:#fff;
  font-weight:900;
}
.brand-badge{
  width:38px; height:38px;
  border-radius:12px;
  background:
    radial-gradient(circle at 30% 30%, rgba(212,175,55,.35), rgba(212,175,55,.08)),
    rgba(255,255,255,.04);
  border:1px solid rgba(212,175,55,.25);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.brand b{ color: var(--gold); }

/* nav */
.nav{
  display:flex;
  align-items:center;
  gap:12px;
  color: rgba(255,255,255,.78);
}
.nav-link{
  padding: .55rem .75rem;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.nav-link:hover{
  color:#fff;
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
}
.nav-link.active{
  color:#fff;
  border-color: rgba(212,175,55,.28);
  background: rgba(212,175,55,.08);
}

/* CTA */
.cta{ display:flex; align-items:center; gap:10px; min-width:260px; justify-content:flex-end; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: .72rem 1.05rem;
  border-radius: 16px;
  font-weight:900;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  color:#fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
}
.btn:hover{ transform: translateY(-2px); filter: brightness(1.03); }
.btn:active{ transform: translateY(0) scale(.99); }

.btn-primary{
  border-color: rgba(212,175,55,.40);
  background:
    radial-gradient(circle at 30% 30%, rgba(212,175,55,.20), rgba(212,175,55,.07)),
    rgba(255,255,255,.02);
}
.btn-primary:hover{
  border-color: rgba(212,175,55,.55);
  box-shadow: 0 18px 45px rgba(0,0,0,.45), 0 0 28px rgba(212,175,55,.16);
}
.btn-secondary{
  background: rgba(31,36,51,.88);
  border-color: rgba(255,255,255,.14);
}

@media (max-width:980px){
  .nav{ display:none; }
  .brand{ min-width:auto; }
  .cta{ min-width:auto; }
}

/* =========================================================
   ✅ DROPDOWN GUIDES (UN SEUL SYSTEME)
   - HTML : .dropdown / .drop-btn / .drop-menu
   - ouverture : .dropdown.open .drop-menu  (via ton JS)
   - scroll interne si long
   ========================================================= */

/* IMPORTANT : ne jamais couper le dropdown */
.header, .header-inner, .nav, .dropdown { overflow: visible !important; }

.dropdown{ position:relative; }

.header .drop-btn{
  cursor:pointer;
  padding: .55rem .75rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color: #fff !important;              /* ✅ lisible */
  font-weight: 900;
}

.drop-menu{
  display:none;
  position:absolute;
  top: calc(100% + 10px);
  left:0;
  width: 360px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(20,24,36,.98);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow-strong);
  z-index: 99999;

  /* ✅ scroll interne */
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding-right: 6px;
}
.dropdown.open .drop-menu{ display:block; }

.drop-menu a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(255,255,255,.86);
  border: 1px solid transparent;
}
.drop-menu a:hover{
  color:#fff;
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12);
}

.drop-sep{ height:1px; background: rgba(255,255,255,.10); margin: 8px 6px; }

.drop-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 8px 10px;
  font-weight:900;
  color:#fff;
  opacity:.95;
}
.drop-right{
  opacity:.70;
  font-weight:700;
  font-size:.92rem;
}

/* scrollbar */
.drop-menu::-webkit-scrollbar{ width: 10px; }
.drop-menu::-webkit-scrollbar-thumb{ border-radius: 10px; background: rgba(255,255,255,.14); }

/* =========================================================
   ✅ CENTRAGE GLOBAL DES PAGES GUIDES (ET PAGES INTERNES)
   ========================================================= */
main{ width:100%; }

.page-interne-main{
  padding: 34px 0 70px;
}

.sheet,
.sheet-inner,
.page,
.page-content,
.guide,
.guide-wrap{
  width: min(1100px, 92%);
  margin-inline: auto;
}

/* titres */
.sheet-head h1, h1{
  letter-spacing: -0.02em;
  color: #121212;
}
.lead{
  color: #2a2a2a;
  line-height: 1.65;
  max-width: 900px;
}

/* notices + cartes */
.notice{
  background: #fff6e9;
  border: 1px solid rgba(212,175,55,.35);
  border-radius: 14px;
  padding: 12px 14px;
  color: #1a1a1a;
  box-shadow: var(--shadow);
}

.grid-2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
@media (max-width: 900px){ .grid-2{ grid-template-columns:1fr; } }

.card{
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  color: #151515;
}
.card h2{ margin:0 0 8px; color:#141414; font-size:1.15rem; }
.muted{ color:#444; line-height:1.6; }

/* =========================================================
   ✅ FIX “ACCUEIL TROP NOIR” + TEXTE ILLISIBLE
   On force l’accueil à rester caramel et lisible,
   même si ton HTML a des sections sombres.
   ========================================================= */
.hero, .hero-section, .home-hero, .index-hero{
  background: transparent !important;
}

/* textes accueil lisibles */
.hero h1, .hero p, .hero .kicker,
.index-hero h1, .index-hero p{
  color: #111 !important;
}

/* si tu as des blocs “glass” sombres sur l’accueil */
.glass, .panel, .hero-card{
  background: rgba(255,255,255,.72) !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  color: #151515 !important;
  box-shadow: var(--shadow) !important;
}
.glass *,.panel *,.hero-card *{ color:#151515 !important; }

/* =========================================================
   ✅ BOUTONS ILLISIBLES (ex: "Copier la lettre")
   On force les boutons des pages claires à avoir un texte foncé.
   ========================================================= */

/* boutons dans le contenu (pas dans le header) */
main .btn,
main button,
main .btn-full,
main a.btn{
  color: #151515 !important;
}

/* si le bouton est clair */
main .btn,
main .btn-secondary,
main .btn-full,
main button[type="button"],
main button[type="submit"]{
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.08) !important;
}

/* hover */
main .btn:hover,
main button:hover{
  filter: brightness(0.98);
}

/* MAIS on garde les boutons du header en blanc */
.header .btn,
.header a.btn,
.header button.btn{
  color: #fff !important;
  background: rgba(255,255,255,.03) !important;
  border-color: rgba(255,255,255,.14) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.35) !important;
}
.header .btn-primary{
  border-color: rgba(212,175,55,.40) !important;
  background:
    radial-gradient(circle at 30% 30%, rgba(212,175,55,.20), rgba(212,175,55,.07)),
    rgba(255,255,255,.02) !important;
}

/* =========================================================
   FOOTER PRO (premium sombre)
   ========================================================= */
.footer-pro{
  background: var(--dark-2);
  color:#ddd;
  margin-top:auto;
}
.footer-pro-inner{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap:28px;
  padding: 34px 16px;
  max-width:1100px;
  margin:0 auto;
  align-items:start;
}
@media (max-width:900px){
  .footer-pro-inner{ grid-template-columns:1fr; }
}
.footer-pro .ftitle{ font-weight:900; color:#fff; margin-bottom:10px; }
.footer-pro .ftext{ color:#b9b9b9; line-height:1.6; margin:0; max-width:420px; }
.footer-pro .flink{ display:block; color:#d8d8d8; margin:8px 0; }
.footer-pro .flink:hover{ color: var(--gold); }

.footer-bottom{ border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom-inner{
  max-width:1100px;
  margin:0 auto;
  padding: 14px 16px;
  color:#bdbdbd;
  font-size:.92rem;
  text-align:center;
}

/* =========================================================
   PAGES LEGALES (lisibles)
   ========================================================= */
body.legal-page{
  background: var(--cream-2) !important;
  color: #151515 !important;
}
body.legal-page .topbar,
body.legal-page .header{ background:#0b0f16 !important; }

body.legal-page h1,
body.legal-page h2,
body.legal-page h3{ color:#121212 !important; }

body.legal-page p,
body.legal-page li{ color:#2a2a2a !important; }

body.legal-page a{ color:#1a1a1a !important; }
body.legal-page a:hover{ color:#d4af37 !important; }
/* =========================================================
   PATCH INDEX (ACCUEIL) : enlever le noir des sections
   + garder header/topbar sombres
   ========================================================= */

/* Fond global caramel (au cas où un style le force) */
body{
  background:
    radial-gradient(900px 520px at 15% -10%, rgba(212,175,55,.22), transparent 60%),
    radial-gradient(700px 420px at 90% 10%, rgba(212,175,55,.10), transparent 55%),
    linear-gradient(180deg, #f8f2e9 0%, #f3eadc 55%, #f4efe4 100%) !important;
  color:#151515 !important;
}

/* ✅ Sur l'ACCUEIL : forcer les gros blocs à être clairs
   (ça neutralise les anciens styles "dark hero") */
.hero,
.hero-wrap,
.hero-inner,
.hero-grid,
.hero-left,
.hero-right,
.home-hero,
.index-hero,
.section-hero,
.glass,
.panel,
.card-dark,
.dark,
.bg-dark,
main,
main > section{
  background: transparent !important;
}

/* ✅ Cartes / panneaux de l'accueil : clair + lisible */
.hero .card,
.hero .panel,
.hero .glass,
.hero-right,
.box,
.feature,
.features,
.notice,
.transparency,
.home-card,
.hero-card{
  background: rgba(255,255,255,.72) !important;
  border: 1px solid rgba(0,0,0,.06) !important;
  color:#151515 !important;
}

/* ✅ Texte de l'accueil : tout redevient lisible */
.hero h1, .hero h2, .hero h3,
.hero p, .hero li, .hero small,
.hero .muted, .hero .lead,
.hero-left *, .hero-right *,
main > section *{
  color:#151515 !important;
}

/* ✅ Garder le header/topbar sombres (on ne touche pas) */
.header, .topbar{
  background: rgba(11,15,22,.78) !important;
  color: rgba(255,255,255,.88) !important;
}

/* =========================================================
   FIX : "Guides de résiliation" doit être visible (blanc)
   ========================================================= */
.drop-btn,
.nav .drop-btn,
.nav-link.drop-btn{
  color: rgba(255,255,255,.92) !important;
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.14) !important;
}

/* =========================================================
   FIX BOUTONS PAGES MODÈLES : "Copier la lettre" lisible
   (couvre plusieurs classes possibles)
   ========================================================= */
button,
.btn,
.btn-full,
.copy-btn,
.btn-copy,
button[type="button"],
button[type="submit"]{
  color:#151515 !important;
}

/* Si un bouton a un fond clair -> texte foncé */
button[style*="background"],
.btn[style*="background"]{
  color:#151515 !important;
}
