/* Responsive Styles - Desktop First Approach */

/* =========================
   RÈGLE ABSOLUE : Desktop (≥1200px) = style.css par défaut
   Aucune modification du desktop dans ce fichier
   ========================= */

/* =========================
   TABLETTE (769px - 1024px)
   ========================= */
@media (max-width: 1024px) and (min-width: 769px) {
  /* Ajustements tablette - reprendre logique desktop avec largeurs ajustées */
  .services-container {
    gap: 30px;
  }
  
  .services-video {
    width: 45%;
  }
  
  .services-accordion {
    width: 55%;
  }
  
  .destination-block {
    gap: 20px;
  }
  
  .destination-image {
    width: 47%;
  }
  
  .destination-content {
    width: 53%;
  }
  
  .contact-container {
    gap: 30px;
  }
}

/* =========================
   MOBILE (≤768px)
   ========================= */
@media (max-width: 768px) {
  /* Header Mobile */
  header {
    padding: var(--spacing-sm);
  }
  
  .logo {
    font-size: 1.2rem;
    letter-spacing: 1.5px;
  }
  
  .logo-subtitle {
    font-size: 0.65rem;
    letter-spacing: 1.2px;
  }
  
  nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: rgba(0, 0, 0, 0.98);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-medium);
  }
  
  nav.active {
    left: 0;
  }
  
  nav ul {
    flex-direction: column;
    padding: var(--spacing-lg) var(--spacing-md);
    gap: var(--spacing-md);
    align-items: flex-start;
  }
  
  nav a {
    font-size: 1.2rem;
    padding: var(--spacing-sm) 0;
    width: 100%;
    border-bottom: 1px solid rgba(216, 196, 155, 0.2);
    color: var(--white);
  }
  
  nav a:hover {
    color: #D8C49B;
  }
  
  /* Menu déroulant mobile - CORRECTION BUG DÉCALAGE */
  .nav-dropdown {
    width: 100%;
  }
  
  .dropdown-menu {
    position: static !important;
    transform: none !important;
    left: auto !important;
    opacity: 1;
    visibility: visible;
    background-color: rgba(244, 233, 212, 0.1);
    margin-top: 0;
    margin-left: var(--spacing-md);
    border-radius: 0;
    box-shadow: none;
    padding: 8px 0;
    min-width: auto;
    width: calc(100% - var(--spacing-md) * 2);
  }
  
  .dropdown-menu li {
    margin: 4px 0;
  }
  
  .dropdown-menu a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    padding: 8px var(--spacing-sm);
    border-bottom: 1px solid rgba(216, 196, 155, 0.15);
  }
  
  .dropdown-menu a:hover {
    color: #D8C49B;
    background-color: rgba(216, 196, 155, 0.1);
    padding-left: var(--spacing-sm);
  }
  
  .dropdown-item-luxury {
    background: linear-gradient(135deg, rgba(214, 196, 155, 0.2), rgba(214, 196, 155, 0.1));
    border-top: 1px solid rgba(214, 196, 155, 0.3);
    margin-top: 8px;
  }
  
  .dropdown-item-luxury a {
    color: #D8C49B;
    font-weight: 500;
  }
  
  .menu-burger {
    display: flex !important;
    z-index: 1001;
    position: relative;
  }
  
  /* S'assurer que le menu burger est visible et cliquable */
  .menu-burger span {
    background-color: var(--beige-dark) !important;
    width: 25px;
    height: 3px;
    display: block;
    transition: all 0.3s ease;
  }
  
  /* Forcer la couleur du menu burger sur mobile pour meilleur contraste */
  header .menu-burger span {
    background-color: var(--beige-dark) !important;
  }
  
  /* Assurer la visibilité même sur fond sombre du hero */
  body:has(.hero) header .menu-burger span,
  body:has(.luxury-hero) header .menu-burger span {
    background-color: var(--beige-dark) !important;
  }
  
  /* Menu mobile - S'assurer qu'il ne chevauche pas le hero */
  body:has(.luxury-villa-hero) nav.active,
  body:has(.luxury-hero) nav.active,
  body:has(.property-gallery-section) nav.active {
    top: 60px;
    z-index: 999;
  }
  
  .menu-burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }
  
  .menu-burger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }
  
  /* Hero Mobile */
  .hero {
    height: 100vh;
    margin: 0;
    padding: 0;
  }
  
  .hero-content h1 {
    font-size: 36px;
    margin-bottom: 12px;
    letter-spacing: 1.5px;
  }
  
  .hero-content p {
    font-size: 16px;
    margin-top: 0;
    letter-spacing: 0.8px;
  }
  
  /* Sections Mobile */
  section {
    padding: var(--spacing-lg) var(--spacing-sm);
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
  }
  
  /* Services Mobile */
  .services-container {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: stretch;
  }
  
  .services {
    padding: var(--spacing-lg) 0;
  }
  
  .services-content {
    padding: 20px var(--spacing-md);
  }
  
  .services-video {
    order: 1;
    width: 100%;
    height: auto;
    min-height: 200px;
  }
  
  .services-video video,
  .services-video img,
  .services-video iframe {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: none;
  }
  
  .services-accordion {
    order: 2;
    width: 100%;
  }
  
  .accordion-header {
    padding: 12px;
  }
  
  .accordion-header h3 {
    font-size: 1.1rem;
  }
  
  .accordion-content-inner {
    padding: 12px;
  }
  
  /* Destinations Mobile */
  .destination-block {
    flex-direction: column;
    max-width: 95%;
    margin-bottom: 50px;
  }
  
  .destination-link {
    flex-direction: column;
  }
  
  .destination-image {
    width: 100%;
    order: 1;
    margin-bottom: 20px;
  }
  
  .destination-image img {
    height: 220px;
    border-radius: 12px;
  }
  
  .destination-content {
    width: 100%;
    order: 2;
    padding: 0 10px;
  }
  
  .destination-content h3 {
    font-size: 22px;
    margin-bottom: 12px;
  }
  
  .destination-content p {
    font-size: 15px;
    margin-bottom: 10px;
  }
  
  /* Contact Mobile */
  .contact {
    padding: 40px 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .contact-content {
    padding: 30px 20px;
    margin: 0 auto;
    max-width: 100%;
    width: calc(100% - 40px);
    box-sizing: border-box;
  }
  
  .contact-intro {
    font-size: 15px;
    line-height: 1.8;
    padding: 0;
    max-width: 100%;
    margin-bottom: 30px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  .contact-intro-first {
    white-space: normal;
    display: block;
    text-align: center;
    margin-bottom: 10px;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    padding: 0;
    width: 100%;
    max-width: 100%;
  }
  
  .contact-info {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: var(--spacing-lg);
    width: 100%;
    max-width: 100%;
  }
  
  .contact-form {
    padding-left: 0;
    padding-top: var(--spacing-lg);
    width: 100%;
    max-width: 100%;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    width: 100%;
  }
  
  .submit-button {
    width: 100%;
  }
  
  .contact-details p {
    font-size: 15px;
    line-height: 1.7;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  
  .contact-item {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }
  
  /* Footer Mobile */
  .footer-links {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
}

/* =========================
   CORRECTION BUG MENU BURGER - DÉCALAGE HOVER
   ========================= */
/* Empêcher le décalage horizontal du menu dropdown au hover */
.nav-dropdown:hover .dropdown-menu {
  transform: translateX(-50%) translateY(0) !important;
  left: 50% !important;
}

.nav-dropdown:focus-within .dropdown-menu {
  transform: translateX(-50%) translateY(0) !important;
  left: 50% !important;
}

/* =========================
   FOOTER DES PAGES LOGEMENTS - HORIZONTAL SUR DESKTOP
   ========================= */
/* S'assurer que le footer reste horizontal sur desktop pour toutes les pages */
footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer .footer-social {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

footer .footer-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
}

footer .footer-copyright {
  margin-top: var(--spacing-md);
}

/* Mobile : footer vertical */
@media (max-width: 768px) {
  footer .footer-links {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
}

/* Très petits écrans */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 32px;
    letter-spacing: 1px;
    margin-bottom: 10px;
  }
  
  .hero-content p {
    font-size: 14px;
    margin-top: 0;
    letter-spacing: 0.8px;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .accordion-header {
    padding: var(--spacing-sm);
  }
  
  .accordion-header h3 {
    font-size: 1.1rem;
  }
}
