/*
Theme Name: Hello Elementor HomeBe
Theme URI: https://homebe.fr
Author: Hugo Dumont
Author URI: https://homebe.fr
Description: Thème enfant Hello Elementor pour HomeBe — charte navy/ambre/cream + CSS atomique réutilisable (boutons pill, chips, cards, sliders, typographie DM Sans).
Template: hello-elementor
Version: 0.1.0
License: Proprietary
Text Domain: hello-elementor-homebe
*/

/* ============================================================
   1. CHARTE — Custom properties
   ============================================================ */
:root {
  --hb-navy:    #1B2A4E;
  --hb-navy2:   #0F1A33;
  --hb-amber:   #D9A441;
  --hb-amber2:  #B8852B;
  --hb-slate:   #AEBFD6;
  --hb-cream:   #F1EDE5;
  --hb-mist:    #F4F5F7;
  --hb-text:    #1B2A4E;
  --hb-sub:     #5B6577;
  --hb-mid:     #8C95A6;
  --hb-line:    #D7DBE3;
  --hb-ok:      #1E9E6B;
  --hb-err:     #D64545;
  --hb-warn:    #E0902F;
  --hb-container-max: 1280px;
  --hb-container-pad: 32px;
}

/* ============================================================
   2. RESET minimal + bases
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: var(--hb-text);
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

/* Override text-decoration — zéro soulignement partout pour le MVP.
   !important nécessaire pour battre les styles d'Elementor / Site Settings.
   Si certains contextes (ex : corps d'article blog) ont besoin du underline,
   on rétablira ciblement plus tard. */
a, a:link, a:visited, a:hover, a:active, a:focus {
  color: inherit;
  text-decoration: none !important;
}
.hb-pill, .hb-pill-primary, .hb-pill-accent, .hb-pill-secondary, .hb-pill-tertiary, .hb-pill-ghost-light {
  text-decoration: none !important;
}
.hb-bientot-avail-card, .hb-bientot-avail-card:hover { text-decoration: none !important; }

/* Couleur du texte des boutons — force par variante car a { color: inherit }
   neutralise les color: défini sur .hb-pill-*. */
.hb-pill-primary, .hb-pill-primary:visited, .hb-pill-primary:hover, .hb-pill-primary:active { color: #FFFFFF !important; }
.hb-pill-accent, .hb-pill-accent:visited, .hb-pill-accent:hover, .hb-pill-accent:active { color: #1B2A4E !important; }
.hb-pill-secondary, .hb-pill-secondary:visited, .hb-pill-secondary:hover, .hb-pill-secondary:active { color: #1B2A4E !important; }
.hb-pill-tertiary, .hb-pill-tertiary:visited, .hb-pill-tertiary:active { color: #1B2A4E !important; }
.hb-pill-tertiary:hover { color: #FFFFFF !important; }
.hb-pill-ghost-light, .hb-pill-ghost-light:visited, .hb-pill-ghost-light:hover, .hb-pill-ghost-light:active { color: #FFFFFF !important; }

button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
img, svg, video { display: block; max-width: 100%; }
section { position: relative; }

/* Hello Elementor reset le margin du body — on rétablit pour les pages standards */
body:not(.elementor-page) main { display: block; }

/* ============================================================
   3. TYPOGRAPHIE — utilitaires
   ============================================================ */
.hb-mono {
  font-family: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.hb-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hb-sub);
}

.hb-h1 {
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .98;
  color: var(--hb-navy);
  margin: 0;
  font-size: clamp(40px, 5vw, 76px);
}

.hb-h2 {
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.04;
  color: var(--hb-navy);
  margin: 0;
  font-size: clamp(28px, 3.5vw, 52px);
}

.hb-h3 {
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--hb-navy);
  margin: 0;
  font-size: clamp(20px, 2vw, 32px);
}

.hb-lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--hb-sub);
  margin: 0;
  font-weight: 400;
}

.hb-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--hb-sub);
  margin: 0;
}

.hb-caption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--hb-mid);
}

/* ============================================================
   4. CONTAINER 1280px
   ============================================================ */
.hb-container {
  width: 100%;
  max-width: var(--hb-container-max);
  margin: 0 auto;
  padding: 0 var(--hb-container-pad);
}

/* ============================================================
   5. BOUTONS EN PILULE — 5 variantes
   ============================================================ */
.hb-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.005em;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
  border: 1.4px solid transparent;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}
.hb-pill:hover { transform: translateY(-1px); }

.hb-pill-sm { padding: 9px 16px; font-size: 13.5px; }
.hb-pill-lg { padding: 16px 26px; font-size: 16px; }

.hb-pill-primary       { background: var(--hb-navy); color: #fff; border-color: var(--hb-navy); }
.hb-pill-primary:hover { background: var(--hb-navy2); }

.hb-pill-accent        { background: var(--hb-amber); color: var(--hb-navy); border-color: var(--hb-amber); }
.hb-pill-accent:hover  { background: var(--hb-amber2); color: #fff; }

.hb-pill-secondary     { background: var(--hb-slate); color: var(--hb-navy); border-color: var(--hb-slate); }

.hb-pill-tertiary      { background: transparent; color: var(--hb-navy); border-color: var(--hb-navy); }
.hb-pill-tertiary:hover{ background: var(--hb-navy); color: #fff; }

.hb-pill-ghost-light       { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.16); }
.hb-pill-ghost-light:hover { background: rgba(255,255,255,.14); }

.hb-cta-arrow { transition: transform .25s ease; display: inline-flex; }
.hb-pill:hover .hb-cta-arrow { transform: translateX(4px); }

/* ============================================================
   6. CHIPS / BADGES
   ============================================================ */
.hb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hb-chip-gratuit  { background: var(--hb-ok);    color: #fff; }
.hb-chip-premium  { background: var(--hb-amber); color: var(--hb-navy); }
.hb-chip-nouveau  { background: var(--hb-navy);  color: #fff; }
.hb-chip-soon     { background: var(--hb-mist);  color: var(--hb-sub); }

/* ============================================================
   7. CARDS
   ============================================================ */
.hb-card {
  background: #fff;
  border: 1px solid var(--hb-line);
  border-radius: 16px;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.hb-card:hover { border-color: var(--hb-navy); transform: translateY(-2px); }

.hb-card-dark {
  background: var(--hb-navy);
  border-radius: 16px;
  color: #fff;
  border: 1px solid var(--hb-navy);
  transition: transform .25s ease;
}
.hb-card-dark:hover { transform: translateY(-2px); }

/* ============================================================
   8. REVEAL ON SCROLL — animation
   ============================================================ */
.hb-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.hb-reveal.is-in { opacity: 1; transform: none; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hb-reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   9. KEYFRAMES — animations subtiles
   ============================================================ */
@keyframes hb-float-a { 0%,100%{transform:translate(0,0)} 50%{transform:translate(6px,-10px)} }
@keyframes hb-float-b { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-8px,8px)} }
@keyframes hb-float-c { 0%,100%{transform:translate(0,0)} 50%{transform:translate(10px,6px)} }
@keyframes hb-float-d { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-6px,-8px)} }
@keyframes hb-pulse-ring { 0%{transform:scale(1);opacity:.6} 100%{transform:scale(1.8);opacity:0} }
@keyframes hb-dash { to { stroke-dashoffset: -200; } }
@keyframes hb-blink { 0%,40%{opacity:.85} 50%,60%{opacity:.35} 70%,100%{opacity:.85} }
@keyframes hb-count { from{transform:translateY(8px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes hb-fill { from{transform:scaleX(0)} to{transform:scaleX(1)} }
@keyframes hb-live-pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
@keyframes hb-ticker { 0%{transform:translateY(0);opacity:1} 40%{transform:translateY(-12px);opacity:0} 60%{transform:translateY(12px);opacity:0} 100%{transform:translateY(0);opacity:1} }

.hb-live { animation: hb-live-pulse 1.8s ease-in-out infinite; }
.hb-tick { display: inline-block; animation: hb-ticker 3.2s cubic-bezier(.2,.7,.3,1) infinite; }

/* ============================================================
   10. BACKGROUNDS DÉCORATIFS
   ============================================================ */
.hb-grid-bg {
  background-image:
    linear-gradient(rgba(27,42,78,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,42,78,.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hb-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 28%, rgba(217,164,65,.10), transparent 70%),
    radial-gradient(80% 80% at 70% 90%, rgba(174,191,214,.18), transparent 60%);
}

.hb-dots {
  background-image: radial-gradient(rgba(27,42,78,.08) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* ============================================================
   11. SLIDERS — utilisé dans les outils simulateur
   ============================================================ */
input.simu-slider {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background: var(--hb-line);
}
input.simu-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--hb-navy);
  cursor: pointer;
  transition: transform .15s;
}
input.simu-slider::-webkit-slider-thumb:hover { transform: scale(1.12); }
input.simu-slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--hb-navy);
  cursor: pointer;
}

/* ============================================================
   12. DETAILS/SUMMARY — marker custom
   ============================================================ */
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
details summary::marker { content: ""; }

/* ============================================================
   13. SECTIONS — fonds alternés helpers
   Full-bleed : chaque section à fond coloré s'étend jusqu'aux bords
   du viewport. Les conteneurs internes .hb-container restent centrés
   à max 1280px. body { overflow-x: hidden } évite la scrollbar
   horizontale due au 100vw quand la scrollbar verticale existe.
   ============================================================ */
body { overflow-x: hidden; }

.hb-bg-cream,
.hb-bg-mist,
.hb-bg-navy,
.hb-bg-white-full {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.hb-bg-cream      { background: var(--hb-cream); }
.hb-bg-mist       { background: var(--hb-mist); }
.hb-bg-white-full { background: #fff; }
.hb-bg-navy       { background: var(--hb-navy); color: #fff; }

.hb-bg-navy .hb-h1, .hb-bg-navy .hb-h2, .hb-bg-navy .hb-h3 { color: #fff; }
.hb-bg-navy .hb-eyebrow { color: rgba(255,255,255,.55); }
.hb-bg-navy .hb-lead, .hb-bg-navy .hb-body { color: rgba(255,255,255,.78); }

/* ============================================================
   14. HOMEBE PAGE — cache le titre WP par défaut
   Sur les pages avec un shortcode HomeBe (body.homebe-page),
   on cache .entry-title pour que le hero du shortcode soit
   le premier élément visible — pas de doublon "Accueil" / "Bientôt".
   ============================================================ */
body.homebe-page .entry-title,
body.homebe-page .page-title,
body.homebe-page h1.entry-title,
body.homebe-page .elementor-page-title {
  display: none !important;
}

/* ============================================================
   15. HEADER HOMEBE — sticky, transparent → opaque au scroll
   Calé sur modern-nav.jsx du design v2.
   ============================================================ */
.hb-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255,255,255,0.0);
  /* Léger backdrop blur même au top pour séparer visuellement de la cream
     du hero sans casser le côté "transparent au-dessus du hero". */
  -webkit-backdrop-filter: saturate(130%) blur(6px);
  backdrop-filter: saturate(130%) blur(6px);
  border-bottom: 1px solid rgba(27,42,78,0.06);
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}

.hb-header.is-scrolled {
  background: rgba(255,255,255,0.88);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--hb-line);
}

.hb-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* +8px sur padding-top : 8-12px d'air entre viewport et logo. */
  padding: 32px 32px 24px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 24px;
}

.hb-header-logo { display: inline-flex; flex: 0 0 auto; }
.hb-header-logo img { height: 32px; width: auto; display: block; }

.hb-header-nav {
  display: flex;
  gap: 36px;
  flex: 1;
  justify-content: center;
}

.hb-header-nav-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--hb-navy);
  letter-spacing: -.005em;
  opacity: 0.92;
  transition: opacity .15s;
}
.hb-header-nav-link:hover { opacity: 1; }

.hb-header-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex: 0 0 auto;
}

.hb-header-login {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--hb-navy);
  padding: 10px 6px;
  letter-spacing: -.005em;
}

/* Override hb-pill-sm pour le header : plus présent, font-weight plus gras. */
.hb-header-actions .hb-pill-sm {
  padding: 12px 22px;
  font-size: 14.5px;
  font-weight: 700;
}

/* Burger menu (mobile) — caché par défaut sur desktop */
.hb-header-burger {
  display: none;
  width: 38px;
  height: 38px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  outline: 0;
}
.hb-header-burger span {
  width: 22px;
  height: 2px;
  background: var(--hb-navy);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.hb-header-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hb-header-burger.is-open span:nth-child(2) { opacity: 0; }
.hb-header-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu overlay (plein écran) */
.hb-header-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: #fff;
  padding: 88px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.hb-header-mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease;
}
.hb-header-mobile-menu a {
  font-size: 22px;
  font-weight: 700;
  color: var(--hb-navy);
  letter-spacing: -.015em;
  padding: 10px 0;
  border-bottom: 1px solid var(--hb-line);
}

/* Compensation pour que le contenu ne passe pas SOUS le header sticky :
   nos heros ont déjà un padding-top important (120px pour l'accueil,
   88px pour bientôt) donc le visuel reste cohérent. */

@media (max-width: 900px) {
  .hb-header-inner { padding: 22px 18px 14px; gap: 12px; }
  .hb-header-nav { display: none; }
  .hb-header-actions { gap: 8px; }
  .hb-header-login { padding: 8px 10px; font-size: 13.5px; }
  .hb-header-burger { display: inline-flex; }
  .hb-header-logo img { height: 26px; }
  .hb-header-actions .hb-pill-sm { padding: 10px 16px; font-size: 13.5px; }
}
@media (max-width: 500px) {
  .hb-header-login { display: none; }  /* On garde uniquement le bouton "Commencer" */
  .hb-header-logo img { height: 22px; }
}

/* Pill-lg sur mobile : padding réduit pour que les boutons en width: 100%
   tiennent dans 280px sans tronquer la flèche/le texte. */
@media (max-width: 600px) {
  .hb-pill-lg {
    padding: 14px 20px;
    font-size: 15px;
  }
}

/* ============================================================
   16. FOOTER HOMEBE — marine 4 colonnes
   ============================================================ */
.hb-footer {
  padding: 72px 0 32px;
}

.hb-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
}

.hb-footer-brand { color: rgba(255,255,255,.65); }
.hb-footer-logo { display: inline-flex; }

.hb-footer-tagline {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255,255,255,.65);
  line-height: 1.55;
  max-width: 280px;
}

.hb-footer-cta { margin-top: 24px; }

.hb-footer-col-h {
  font-size: 12px;
  font-weight: 700;
  color: var(--hb-amber);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hb-footer-col-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hb-footer-link {
  font-size: 14px;
  color: rgba(255,255,255,.8) !important;
  transition: color .15s;
}
.hb-footer-link:hover { color: #fff !important; }

.hb-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 56px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255,255,255,.5);
  flex-wrap: wrap;
  gap: 12px;
}

.hb-footer-mail {
  color: rgba(255,255,255,.75) !important;
  font-family: ui-monospace, monospace;
  letter-spacing: .04em;
}

@media (max-width: 900px) {
  .hb-footer { padding: 56px 0 28px; }
  .hb-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .hb-footer-brand { grid-column: span 2; }
  .hb-footer-bottom { flex-direction: column; align-items: flex-start; }
  .hb-footer-logo img { height: 22px; }
  .hb-footer-tagline { font-size: 13px; max-width: 100%; }
}
@media (max-width: 500px) {
  .hb-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hb-footer-brand { grid-column: span 1; }
}
