/* ============================================================
   Rendy — Header partagé (style Fresha)
   ============================================================
   Inclus sur : connexion.html, inscription.html, paiement.html,
   annulation.html (et plus tard dashboard éventuellement).

   Contient :
   - Bouton burger (3 lignes animées → X)
   - Drawer slide-in depuis la droite (gauche en RTL)
   - Bouton WhatsApp flottant (bottom-right)
   ============================================================ */

/* -------- BURGER BUTTON -------- */
.rh-burger{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:transparent;
  border:0;
  padding:8px;
  cursor:pointer;
  position:relative;
  width:46px;
  height:46px;
  z-index:1003;
  border-radius:10px;
  transition:background .2s ease;
}
.rh-burger:hover{ background:#f4f4f4; }
.rh-burger span{
  display:block;
  width:26px;
  height:2.5px;
  background:#000;
  margin:4px auto;
  border-radius:2px;
  transition:transform .3s ease, opacity .25s ease, background .2s;
}
body.menu-open .rh-burger span:nth-child(1){ transform:translateY(6.5px) rotate(45deg); }
body.menu-open .rh-burger span:nth-child(2){ opacity:0; }
body.menu-open .rh-burger span:nth-child(3){ transform:translateY(-6.5px) rotate(-45deg); }
body.menu-open .rh-burger:hover{ background:transparent; }

/* -------- DRAWER OVERLAY + PANEL -------- */
.rh-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transition:opacity .3s ease;
  z-index:1001;
  backdrop-filter:blur(2px);
}
.rh-overlay.show{ opacity:1; pointer-events:auto; }

.rh-drawer{
  position:fixed;
  top:0; right:0; bottom:0;
  width:min(84vw, 340px);
  background:#fff;
  box-shadow:-8px 0 32px rgba(0,0,0,.15);
  transform:translateX(100%);
  transition:transform .35s cubic-bezier(.25,.46,.45,.94);
  z-index:1002;
  display:flex;
  flex-direction:column;
  overflow-y:auto;
  color:#111;
  font-family:'Manrope',system-ui,-apple-system,sans-serif;
}
.rh-drawer.show{ transform:translateX(0); }
body.rtl .rh-drawer{
  right:auto; left:0;
  box-shadow:8px 0 32px rgba(0,0,0,.15);
  transform:translateX(-100%);
}
body.rtl .rh-drawer.show{ transform:translateX(0); }

.rh-drawer-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:20px 22px 16px;
  border-bottom:1px solid #eee;
}
.rh-drawer-header .rh-brand-text{
  font-size:18px;
  font-weight:800;
  letter-spacing:-.3px;
  color:#111;
}
.rh-drawer-close{
  background:transparent;
  border:0;
  font-size:28px;
  line-height:1;
  color:#666;
  cursor:pointer;
  padding:0 4px;
}

.rh-drawer-nav{
  padding:12px 10px;
  display:flex;
  flex-direction:column;
}
.rh-drawer-nav a,
.rh-drawer-nav button{
  padding:14px 14px;
  font-size:16px;
  font-weight:700;
  color:#111;
  text-decoration:none;
  border-radius:10px;
  transition:background .15s;
  display:flex;
  align-items:center;
  gap:10px;
  background:transparent;
  border:0;
  width:100%;
  text-align:left;
  cursor:pointer;
  font-family:inherit;
}
.rh-drawer-nav a:hover,
.rh-drawer-nav a:active,
.rh-drawer-nav button:hover{
  background:#f6f4ee;
}
.rh-drawer-nav a .rh-arrow,
.rh-drawer-nav button .rh-arrow{
  margin-left:auto;
  color:#999;
  font-size:18px;
}
body.rtl .rh-drawer-nav a .rh-arrow,
body.rtl .rh-drawer-nav button .rh-arrow{
  margin-left:0; margin-right:auto; transform:rotate(180deg);
}

.rh-drawer-section-title{
  padding:18px 22px 8px;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:1px;
  color:#999;
  font-weight:700;
}

.rh-drawer-actions{
  padding:14px 20px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.rh-drawer-actions .rh-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:14px 18px;
  border-radius:12px;
  font-weight:700;
  font-size:15px;
  text-decoration:none;
  transition:.15s;
  cursor:pointer;
  border:1px solid transparent;
  font-family:inherit;
}
.rh-drawer-actions .rh-btn-primary{
  background:#111;
  color:#fff;
}
.rh-drawer-actions .rh-btn-primary:hover{ background:#000; }
.rh-drawer-actions .rh-btn-secondary{
  background:#fff;
  color:#111;
  border-color:#d6d4cd;
}
.rh-drawer-actions .rh-btn-secondary:hover{ background:#f4f4f4; }

.rh-drawer-lang{
  padding:12px 20px 20px;
  display:flex;
  justify-content:center;
}
.rh-drawer-lang .lang-switcher{
  width:100%;
  display:flex;
  justify-content:space-around;
  padding:4px;
  background:#f4f4f4;
  border:1px solid rgba(0,0,0,.08);
  border-radius:999px;
  gap:2px;
}
.rh-drawer-lang .lang-switcher button{
  flex:1;
  background:transparent;
  border:0;
  padding:10px;
  font-size:13px;
  font-weight:700;
  letter-spacing:.5px;
  border-radius:999px;
  cursor:pointer;
  color:#666;
  text-transform:uppercase;
  font-family:inherit;
}
.rh-drawer-lang .lang-switcher button.active{
  background:#000;
  color:#fff;
}

.rh-drawer-support{
  margin-top:auto;
  padding:18px 20px 24px;
  border-top:1px solid #f0eee8;
  background:#fbfaf5;
}
.rh-drawer-support a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  background:#25d366;
  color:#fff;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  font-size:14px;
  justify-content:center;
}
.rh-drawer-support a:hover{ background:#1fb353; }

/* Lock body scroll when drawer is open */
body.menu-open{ overflow:hidden; }

/* -------- FLOATING WHATSAPP BUTTON -------- */
.rh-floating-wa{
  position:fixed;
  bottom:22px;
  right:22px;
  width:58px;
  height:58px;
  border-radius:50%;
  background:#25d366;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  text-decoration:none;
  box-shadow:0 6px 24px rgba(37,211,102,.4);
  z-index:9999;
  transition:.2s;
  animation:rhFloatingWaPulse 2.4s ease-in-out infinite;
}
.rh-floating-wa:hover{
  transform:scale(1.08);
  box-shadow:0 8px 32px rgba(37,211,102,.5);
  animation:none;
}
.rh-floating-wa::after{
  content:attr(data-tooltip);
  position:absolute;
  right:68px;
  background:#111;
  color:#fff;
  padding:8px 14px;
  border-radius:10px;
  font-size:13px;
  white-space:nowrap;
  opacity:0;
  transform:translateX(10px);
  pointer-events:none;
  transition:.2s;
  font-weight:600;
}
.rh-floating-wa:hover::after{ opacity:1; transform:translateX(0); }
@keyframes rhFloatingWaPulse{
  0%,100% { box-shadow:0 6px 24px rgba(37,211,102,.4); }
  50%     { box-shadow:0 6px 24px rgba(37,211,102,.4), 0 0 0 14px rgba(37,211,102,0); }
}
@media (max-width:640px){
  .rh-floating-wa{
    width:52px; height:52px; font-size:24px;
    bottom:16px; right:16px;
  }
  .rh-floating-wa::after{ display:none; }
}
body.rtl .rh-floating-wa{ right:auto; left:22px; }
body.rtl .rh-floating-wa::after{ right:auto; left:68px; transform:translateX(-10px); }
body.rtl .rh-floating-wa:hover::after{ transform:translateX(0); }
