/* ============================================
   RESPONSIVE.CSS - Gîte de Laboule
   Mobile First Responsive Design
   ============================================ */

/* ============================================
   MENU HAMBURGER - Structure de base
   ============================================ */

/* Bouton hamburger (caché sur desktop) */
.hamburger {
    display: none;
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 1000;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
  }
  
  .hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #90cafd;
    margin: 6px 0;
    transition: 0.3s;
    border-radius: 3px;
  }
  
  /* Animation hamburger en X quand ouvert */
  .hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
  }
  
  /* ============================================
     TABLETTE LANDSCAPE (1025px - 1280px)
     ============================================ */
  @media (min-width: 1025px) and (max-width: 1280px) {
    
    /* Conteneur principal */
    #conteneur {
      width: 95%;
      max-width: 1050px;
    }
    
    #galerie-bloc {
      width: 100%;
    }
    
    /* Blocs texte */
    #texte {
      width: 45%;
      right: 5%;
    }
    
    #texte-fond-transparent-index,
    #texte-fond-transparent-gite,
    #texte-fond-transparent-presentation,
    #texte-fond-transparent-village,
    #texte-fond-transparent-massif,
    #texte-fond-transparent-rando,
    #texte-fond-transparent-baignades,
    #texte-fond-transparent-liens,
    #texte-fond-transparent-situation {
      width: 45%;
      right: 5%;
    }
    
    #texte p {
      width: 85%;
    }
  }
  
  /* ============================================
     TABLETTE PORTRAIT (768px - 1024px)
     ============================================ */
  @media (min-width: 768px) and (max-width: 1024px) {
    
    /* Navigation */
    nav {
      min-width: auto;
      height: 60px;
    }
    
    nav ul {
      width: 100%;
      margin: 0;
      padding: 5px 0;
      position: static;
    }
    
    nav ul li {
      width: 12.5%;
      height: auto;
      font-size: 10px;
      padding: 5px 0;
    }
    
    nav a, nav .pageencours {
      font-size: 10px;
      line-height: 1.2;
    }
    
    /* Header */
    header {
      width: 90%;
      left: 5%;
      top: 80px;
    }
    
    header h1 {
      font-size: 45px;
    }
    
    /* Blocs texte - Meilleure gestion sur tablette */
    #texte-fond-transparent-index,
    #texte-fond-transparent-gite,
    #texte-fond-transparent-presentation,
    #texte-fond-transparent-village,
    #texte-fond-transparent-massif,
    #texte-fond-transparent-rando,
    #texte-fond-transparent-baignades,
    #texte-fond-transparent-liens,
    #texte-fond-transparent-situation {
      width: 70%;
      max-width: 600px;
      right: 5%;
      left: auto;
      top: 200px;
      position: absolute;
      margin: 0;
      opacity: 0.6;
      padding-bottom: 100px;
    }
    
    #texte {
      width: 70%;
      max-width: 600px;
      right: 5%;
      left: auto;
      top: 200px;
      position: absolute;
      margin: 0;
      padding-bottom: 100px;
    }
    
    #texte p {
      width: 90%;
      margin-left: auto;
      margin-right: auto;
    }
    
    /* Conteneur */
    #conteneur {
      width: 95%;
      margin-top: 150px;
      padding-bottom: 100px;
    }
    
    #galerie-bloc {
      width: 100%;
      padding-bottom: 20px;
    }
    
    /* Galeries photos - 3 colonnes sur tablette avec FLEXBOX */
    .set {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-start;
      gap: 10px;
      padding: 0 10px;
    }
    
    .single {
      width: calc(33.333% - 10px) !important;
      float: none !important;
      margin: 0 !important;
      box-sizing: border-box;
    }
    
    .single img {
      width: 100%;
      height: auto;
      display: block;
    }
    
    /* Annuler les clear en dur dans le HTML */
    .single[style*="clear"] {
      clear: none !important;
    }
    
    /* Blocs PDF/Liens */
    #bloc-pdf,
    #bloc-liens {
      width: 45%;
      height: auto;
      margin: 10px 2%;
    }
    
    /* Footer */
    footer {
      min-width: auto;
      height: auto;
      padding: 10px 0;
    }
    
    #centrage-groupe-footer {
      width: 95%;
      margin: 0 auto;
      position: static;
    }
    
    #footer-adresse {
      width: 70%;
      font-size: 11px;
    }
  }
  
  /* ============================================
     MOBILE (max 767px)
     ============================================ */
  @media (max-width: 767px) {
    
    /* Réinitialisation body pour scroll */
    body {
      overflow-y: auto;
      overflow-x: hidden;
      padding-top: 60px;
    }
    
    /* ============================================
       NAVIGATION MOBILE
       ============================================ */
    
    /* Afficher le bouton hamburger */
    .hamburger {
      display: block;
    }
    
    nav {
      min-width: auto;
      width: 100%;
      height: 60px;
      overflow: hidden;
      transition: height 0.3s ease;
    }
    
    /* Menu fermé */
    nav.closed {
      height: 60px;
    }
    
    /* Menu ouvert */
    nav.open {
      height: auto;
      max-height: 100vh;
      overflow-y: auto;
    }
    
    nav ul {
      width: 100%;
      height: auto;
      margin: 0;
      padding: 60px 0 20px 0;
      position: static;
      display: none;
    }
    
    nav.open ul {
      display: block;
    }
    
    nav ul li {
      width: 100%;
      height: auto;
      float: none;
      display: block;
      text-align: center;
      padding: 15px 0;
      border-bottom: 1px solid #444;
    }
    
    nav a, nav .pageencours {
      font-size: 16px;
      display: block;
      padding: 10px;
    }
    
    nav a br, nav .pageencours br {
      display: none;
    }
    
    /* ============================================
       HEADER
       ============================================ */
    
    /* Header APRÈS le slideshow - visible */
    header {
      width: 90%;
      left: 5%;
      top: auto;
      margin: 10px auto 20px;
      height: auto;
      position: relative;
      z-index: 6;
      background: rgba(0, 0, 0, 0.85);
      padding: 15px 10px;
      border-radius: 10px;
    }
    
    header h1 {
      font-size: 28px;
      text-align: center;
      margin: 0;
    }
    
    /* ============================================
       SLIDESHOW
       ============================================ */
    
    /* Slideshow en haut - Annuler le position:fixed inline */
    .slideshow {
      position: static !important;
      width: 100%;
      height: 40vh;
      min-height: 280px;
      margin-bottom: 0;
    }
    
    .slideshow[style*="position: fixed"] {
      position: static !important;
    }
    
    .cover {
      height: 40vh;
      min-height: 280px;
    }
    
    /* Flèches du slideshow plus grosses */
    .slideshow .arrows {
      display: flex;
      justify-content: space-between;
      position: absolute;
      bottom: 20px;
      left: 0;
      right: 0;
      padding: 0 20px;
      z-index: 5;
    }
    
    .slideshow .arrow {
      background: rgba(0, 0, 0, 0.5);
      border: 2px solid #90cafd;
      border-radius: 50%;
      width: 50px;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }
    
    .slideshow .arrow span {
      border: solid #90cafd;
      border-width: 0 3px 3px 0;
      display: inline-block;
      padding: 8px;
    }
    
    .arrow-prev span {
      transform: rotate(135deg);
      margin-left: 5px;
    }
    
    .arrow-next span {
      transform: rotate(-45deg);
      margin-right: 5px;
    }
    
    /* ============================================
       BLOCS TEXTE
       ============================================ */
    
    /* Blocs texte - Position relative après le header */
    #texte-fond-transparent-index,
    #texte-fond-transparent-gite,
    #texte-fond-transparent-presentation,
    #texte-fond-transparent-village,
    #texte-fond-transparent-massif,
    #texte-fond-transparent-rando,
    #texte-fond-transparent-baignades,
    #texte-fond-transparent-liens,
    #texte-fond-transparent-situation {
        display: none;
    }
    #texte {
      width: 90%;
      max-width: 500px;
      height: auto !important;
      right: auto;
      left: 5%;
      top: auto;
      position: relative;
      margin: 10px auto 30px;
      padding: 20px 0 30px;
    }
    
    #texte h2 {
      font-size: 20px;
      margin: 10px 20px;
    }
    
    #texte h3 {
      font-size: 16px;
      margin: 10px 20px;
    }
    
    #texte p {
      width: 85%;
      margin: 15px auto;
      font-size: 14px;
    }
    
    #texte ul {
      width: 85%;
      margin: 15px auto;
      padding-left: 0;
    }
    
    #texte ul li {
      margin: 10px 0;
      list-style: none;
    }
    
    /* ============================================
       CONTENEUR & GALERIES
       ============================================ */
    
    #conteneur {
      width: 95%;
      margin-top: 20px;
    }
    
    #galerie-bloc {
      width: 100%;
      padding: 10px 0;
    }
    
    #galerie-bloc h2 {
      font-size: 18px;
      text-align: center;
      margin: 40px 10px 30px;
    }
    
/* Galeries photos - 1 colonne CENTRÉ sur mobile */
.set {
    display: block !important;
    width: 100%;
    text-align: center;
    padding: 0;
  }
  
  .single {
    width: 90% !important;
    max-width: 200px;
    float: none !important;
    margin: 15px auto !important;
    clear: both !important;
    display: block !important;
    text-align: center;
  }
  
  .single a {
    display: block;
    margin: 0 auto;
  }
  
  .single img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
  }

    /* ============================================
       BLOCS PDF / LIENS
       ============================================ */
    
    #bloc-pdf,
    #bloc-liens {
      width: 90%;
      height: auto;
      float: none;
      margin: 20px auto;
    }
    
    #bloc-pdf table,
    #bloc-liens table {
      width: 100%;
    }
    
    #bloc-pdf table td,
    #bloc-liens table td {
      display: block;
      text-align: center !important;
      padding: 10px 5px !important;
    }
    
    #bloc-pdf table img,
    #bloc-liens table img {
      margin: 0 auto;
    }
    
    /* ============================================
       CARTE (page situation)
       ============================================ */
    
    #carte {
      margin-top: 60px;
      height: 400px;
    }
    
    /* ============================================
       INTER (page massif)
       ============================================ */
    
    #inter-droite,
    #inter-gauche {
      width: 100%;
      float: none;
      margin: 10px 0;
      text-align: center;
    }
    
    /* ============================================
       FOOTER
       ============================================ */
    
    footer {
      min-width: auto;
      position: relative;
      height: auto;
      padding: 20px 0;
      margin-top: 30px;
    }
    
    #centrage-groupe-footer {
        width: 100%;
        margin: 0;
        left: auto;
        position: static;
        text-align: center;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
      }
      
      #gdf,
      #fb {
        float: none;
        display: inline-block;
        margin: 10px 8px;
        vertical-align: middle;
        flex: 0 0 auto;
      }

      #fb {
        margin: 40px;
      }
      
      #footer-adresse {
        width: 100%;
        float: none;
        margin: 15px auto;
        font-size: 11px;
        padding-top: 0;
        line-height: 1.6;
        flex-basis: 100%;
      }
  }
  
  /* ============================================
     PETIT MOBILE (max 480px)
     ============================================ */
  @media (max-width: 480px) {
    
    header h1 {
      font-size: 28px;
    }
    
    #texte h2 {
      font-size: 18px;
    }
    
    #texte h3 {
      font-size: 14px;
    }
    
    #texte p,
    #texte a {
      font-size: 13px;
    }
    
    .slideshow .arrow {
      width: 45px;
      height: 45px;
    }
    
    .slideshow .arrow span {
      padding: 6px;
    }
    
    #footer-adresse {
      font-size: 10px;
    }
    
    #galerie-bloc h2 {
      font-size: 16px;
    }
  }
  
  /* ============================================
     UTILITAIRES RESPONSIVE
     ============================================ */
  
  /* Images responsive par défaut */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Empêcher le zoom sur les inputs sur iOS */
  @media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
      font-size: 16px !important;
    }
  }
  
  /* Amélioration du touch sur mobile */
  @media (max-width: 767px) {
    a, button {
      min-height: 44px;
      min-width: 44px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
  }
  
  /* GLightbox responsive (pour les galeries) */
  @media (max-width: 767px) {
    .gslide-description {
      font-size: 14px;
    }
    
    .gslide-title {
      font-size: 16px;
    }
  }