/* =====================================================
   MON COMPTOIR – HEADER COMPLET + MENU BURGER
===================================================== */

:root{
  --primary:#405f4e;
  --accent:#eaaa42;
  --bg:#ffffff;
  --text:#1f2937;
}

/* ===== TRIAL BAR ===== */

.trialbar{
  background: #cfe0b5;
  border-bottom: 1px solid rgba(17,24,39,.06);
  padding: 10px 0;
}

.trialbar-inner{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Mini badge */
.trial-badge{
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(64,95,78,.25);
}

/* Texte */
.trial-text{
  font-weight: 800;
  font-size: 16px;
  color: rgba(17,24,39,.75);
}

/* Bouton */
.trial-btn{
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(234,170,66,.25);
  transition: .15s ease;
}

.trial-btn:hover{
  filter: brightness(.97);
  transform: translateY(-1px);
  color: #fff;
}

/* Responsive topbar */
@media (max-width: 768px) and (hover: none) and (pointer: coarse){
  .trialbar-inner{
    text-align: center;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 10px;
  }

  .trial-badge,
  .trial-text{
    display: none;
  }

  .trial-btn{
    font-size: 13px;
    padding: 10px 16px;
    white-space: nowrap;
  }
}

@media (max-width: 380px) and (hover: none) and (pointer: coarse){
  .trialbar-inner{ gap: 8px; }
  .trial-btn{ padding: 7px 10px; }
}

/* Libellés desktop/mobile pour le bouton de la trialbar */
.trial-btn-label-mobile{ display: none; }
@media (max-width: 768px) and (hover: none) and (pointer: coarse){
  .trial-btn-label-desktop{ display: none; }
  .trial-btn-label-mobile{ display: inline; }
}

/* ===== HEADER ===== */

.header-main{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(17,24,39,.06);
  box-shadow: 0 12px 24px rgba(17,24,39,.06);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 20px;
  padding: 16px 0;
}

/* ===== LOGO ===== */

.brand-img{
  width: 260px;
  max-width: 42vw;
  height: auto;
  display:block;
}

/* ===== NAV DESKTOP ===== */

.main-nav{
  display:flex;
  align-items:center;
  gap: 26px;
}

.nav-link{
  position: relative;
  text-decoration:none;
  color: rgba(31,41,55,.78);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .2px;
  padding: 8px 0;
  transition: .15s ease;
}

.nav-link:hover{
  color: var(--primary);
}

.nav-link.active{
  color: var(--primary);
}

.nav-link.active::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-10px;
  height:3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

/* ===== CTA DESKTOP ===== */

.header-cta{
  display:flex;
  align-items:center;
}

.btn-cta{
  background: var(--primary);
  color:#fff;
  text-decoration:none;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(64,95,78,.25);
  transition: .15s ease;
  white-space: nowrap;
}

.btn-cta:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  color:#fff;
}

.btn-arrow{
  margin-left: 6px;
  transition: transform .15s ease;
}

.btn-cta:hover .btn-arrow{
  transform: translateX(3px);
}

/* ===== BURGER BUTTON ===== */

.burger-btn{
  display:none;
  width:44px;
  height:44px;
  border:1px solid rgba(17,24,39,.12);
  background:#fff;
  border-radius:12px;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow: 0 10px 20px rgba(17,24,39,.06);
}

.burger-lines{
  width:18px;
  height:2px;
  background: var(--primary);
  position: relative;
  border-radius: 999px;
}

.burger-lines::before,
.burger-lines::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  background: var(--primary);
  border-radius: 999px;
}

.burger-lines::before{ top:-6px; }
.burger-lines::after{ top:6px; }

/* ===== MOBILE MENU (CACHÉ PAR DÉFAUT) ===== */

.mobile-overlay{
  display:none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 999;
}

.mobile-menu{
  display:none;
  position: fixed;
  top:0;
  left:0;
  width:min(320px, 88vw);
  height:100vh;
  background:#fff;
  z-index:1000;
  padding:18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

.mobile-menu-inner{
  display:flex;
  flex-direction:column;
  height:100%;
}

.mobile-menu-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 20px;
}

.mobile-title{
  font-weight:900;
  color: var(--text);
}

.mobile-close{
  width:40px;
  height:40px;
  border:1px solid rgba(17,24,39,.12);
  background:#fff;
  border-radius:12px;
  cursor:pointer;
}

.mobile-nav{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.mobile-link{
  text-decoration:none;
  color: rgba(31,41,55,.85);
  font-weight:800;
  font-size:16px;
}

.mobile-link.active{
  color: var(--primary);
}

.mobile-cta{
  margin-top:auto;
  padding-top:20px;
}

/* ===== MENU OUVERT ===== */

.header-main.is-open .mobile-overlay{
  display:block;
}

.header-main.is-open .mobile-menu{
  display:block;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 992px){
  .main-nav{ display:none; }
  .header-cta{ display:none; }
  .burger-btn{ display:flex; }
  .brand-img{ width:220px; }
  .header-inner{
    position: relative;
    justify-content:center;
    padding-left: 68px;
    padding-right: 68px;
  }
  .brand-logo{
    margin-left:auto;
    margin-right:auto;
  }
  .burger-btn{
    position: absolute;
    left: calc(14px + env(safe-area-inset-left));
    top: 50%;
    transform: translateY(-50%);
  }

  .trialbar{
    position: static;
    top: auto;
  }
  .header-main{
    top: 0;
  }
}

/* --- Fix: trialbar visible + header décalé --- */
:root{
  --trialbar-h: 0px; /* sera calculé en JS */
}

/* la trialbar reste au-dessus */
.trialbar{
  position: sticky;
  top: 0;
  z-index: 1001;
}

/* le header se colle sous la trialbar */
.header-main{
  top: var(--trialbar-h);
  z-index: 1000;
}

