/* ===============================
   BURGER ICON
================================= */
.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 24px;
    height: 20px;
    cursor: pointer;
}

.burger-menu span {
    display: block;
    height: 2px;
    width: 100%;
    background: #fff;
    transition: 0.3s ease;
}

/* Animation croix */
.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.burger-menu.active span:nth-child(2) {
    opacity: 0;
}
.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}


/* ===============================
   BURGER OVERLAY (VERSION FINALE)
================================= */
.burger-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100% - 60px);
    width: 100%;
    background: #fff;

    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    overflow-y: auto;

    box-shadow: 2px 0 15px rgba(0,0,0,0.08);
    font-family: 'Poppins', sans-serif;
    padding: 20px;

    display: flex;
    flex-direction: column;
}

.burger-overlay.active {
    transform: translateX(0);
}

body.no-scroll {
    overflow: hidden;
    touch-action: none;
}


/* ===============================
   BACKDROP
================================= */
.overlay-backdrop {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100% - 60px);

    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 1050;
}

.overlay-backdrop.active {
    opacity: 1;
    visibility: visible;
}


/* ===============================
   STRUCTURE
================================= */
.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.overlay-section {
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 1px solid #e6e6e6;
}

.overlay-section:last-child {
    border-bottom: none;
}

.overlay-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #111;
    cursor: pointer;
    position: relative;
}

.overlay-section h3::after {
    content: '>';
    position: absolute;
    right: 0;
    transition: transform 0.3s ease;
}

.overlay-section.active h3::after {
    transform: rotate(90deg);
}


/* ===============================
   LISTES
================================= */
.overlay-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.overlay-section ul li {
    padding: 10px 0;
    font-size: 1rem;
}

.overlay-section ul li a {
    color: #111;
    text-decoration: none;
    display: block;
    transition: 0.2s ease;
}

.overlay-section ul li a:hover {
    color: #0652b3;
    text-decoration: underline;
    transform: translateX(4px);
}


/* ===============================
   SUBMENU
================================= */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.submenu.active {
    max-height: 500px;
}


/* ===============================
   BACK BUTTON (submenu)
================================= */
.submenu .back {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    cursor: pointer;
}

.back-arrow {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a66c2;
}

.back-title {
    font-size: 1.2rem;
    font-weight: 600;
}


/* ===============================
   SEARCH OVERLAY STYLE PREMIUM
================================= */
.overlay-search {
    display: flex;                /* Flex parent */
    flex-direction: row;          /* Ligne pour input + bouton */
    align-items: stretch;         /* Même hauteur pour input et bouton */
    width: 90%;
    max-width: 600px;
    margin: 20px auto 25px auto;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.overlay-search:focus-within {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: scale(1.02);
}

.overlay-search form {
    display: flex;
    flex-direction: row;
    align-items: stretch; /* même hauteur pour input + bouton */
    width: 100%;          /* occupe tout l’espace du parent */
    margin: 0;            /* supprime les marges par défaut */
}

/* INPUT */
.search-input {
    flex: 1;                      /* Prend tout l’espace restant */
    padding: 16px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    font-weight: 500;
    color: #111;
    border-radius: 30px 0 0 30px;
    min-width: 0;                 /* IMPORTANT pour empêcher le flex de casser */
}

/* BOUTON / LOUPE */
.search-btn {
    flex-shrink: 0;                /* Empêche le bouton de rétrécir */
    display: flex;                 
    align-items: center;           /* Centre verticalement */
    justify-content: center;       /* Centre horizontalement */
    background: #0a66c2;
    color: #fff;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    border-radius: 0 30px 30px 0;
}

.search-btn svg {
    display: block;                /* Évite les comportements bizarres du SVG */
    width: 20px;
    height: 20px;
}

/* Hover */
.search-btn:hover {
    background: #0652b3;
    transform: scale(1.05);
}

/* RESPONSIVE TABLETTE / MOBILE */
@media (max-width: 768px) {
    .overlay-search {
        width: 95%;
    }

    .search-input {
        font-size: 0.95rem;
        padding: 14px 16px;
    }

    .search-btn {
        padding: 0 16px;
    }
}

/* ===============================
   NEWSLETTER FORM
================================= */
.overlay-section form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.overlay-section input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.overlay-section button {
    background: #0a66c2;
    color: #fff;
    border-radius: 8px;
    padding: 10px 18px;
}


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

/* TABLETTE */
@media (min-width: 768px) {
    .burger-overlay {
        width: 100%;
        max-width: 600px; /* si tu veux limiter */
        padding: 0;
    }
}

/* DESKTOP */
@media (min-width: 1024px) {
    .burger-overlay {
        width: 35vw;
        max-width: 420px;
        padding: 40px;
    }

    .overlay-backdrop {
        opacity: 0 !important;
        visibility: hidden !important;
    }

    body.no-scroll {
        overflow: auto !important;
    }

    
}

/* ===============================
   icones réseaux sociaux du menu overlay
================================= */

.overlay-socials {
    margin-top: auto; /* 🔥 pousse en bas naturellement */
    padding: 20px 0;
    
    display: flex;
    justify-content: center;
    gap: 25px;
}

.overlay-socials img {
    width: 32px;
    opacity: 1;
    transition: 0.2s;
}

.overlay-socials img:hover {
    opacity: 1;
    transform: scale(1.1);
}

.overlay-section h3 a.direct-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

@media (max-height: 650px) {
  .overlay-socials {
    display: none;
  }
}

/* ===============================
  effet hover et ligne clickable de trouver un dentiste
================================= */


/* Barre entière cliquable */
.overlay-section.find-dentist .full-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Flex pour aligner texte + flèche */
.overlay-section.find-dentist h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding-right: 1.5em; /* espace pour la flèche */
  padding-bottom: 12px; /* ajuste la valeur pour que ça corresponde */
  margin: 0;
}

/* Flèche via pseudo-élément, comme les autres sections */
.overlay-section.find-dentist h3::after {
  content: '>'; /* ou ton icône SVG */
  position: absolute;
  right: 0;
  font-size: 1.2em;
}


/* ===============================
   WRAPPER SLIDER (FIX STABLE TABLETTE)
================================= */

.overlay-panels {
  display: flex;
  height: 100%;
  width: 100%;
  max-width: 100%;

  transition: transform 0.35s ease;
  will-change: transform;

  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;

  /* 🔥 IMPORTANT FIX */
  flex-wrap: nowrap;
  overflow: visible; /* NE PAS couper ici */

  flex: 1;
  
}

/* ===============================
   PANELS
================================= */

.overlay-panel {
  flex: 0 0 100%;
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  /* ❌ height: 100%;  → SUPPRIME */
  
  flex: 1; /* 🔥 IMPORTANT */

  overflow-y: auto;
  overflow-x: clip;

  padding: 20px;

  position: relative;
  flex-shrink: 0;

  display: flex;
  flex-direction: column;

  transform: translateZ(0);
  backface-visibility: hidden;
}


.overlay-panel ul {
    display: flex;
    flex-direction: column;
    gap: 12px; /* 👈 meilleur que margin */
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 0;
}

.overlay-panel li {
    line-height: 1.4;
}

.overlay-panel h3 {
    margin-bottom: 20px;
    font-weight: 600;
}

/* ===============================
   BACK BUTTON
================================= */

.overlay-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  border-radius: 10px;
  border: none;

  background: #1e73be; /* bleu Dentopedia */
  color: #fff;

  cursor: pointer;

  margin-bottom: 12px;

  transition: all 0.2s ease;
  box-shadow: 0 6px 16px rgba(30, 115, 190, 0.25);
}

/* hover */
.overlay-back:hover {
  transform: translateY(-2px);
  background: #155a96;
  box-shadow: 0 10px 20px rgba(30, 115, 190, 0.35);
}

/* active */
.overlay-back:active {
  transform: scale(0.95);
}


/* ===============================
   BACK ICON
================================= */

.overlay-back-icon {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}


.overlay-search {
    flex-shrink: 0;
}

.overlay-subtitle {
    margin-top: 22px;
    margin-bottom: 10px;
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
}
