/* ============================================
   TAXI VIDAL - Responsive Stylesheet
   Media Queries & Mobile Adaptations
   ============================================ */

/* ============================================
   TABLET & MOBILE (< 1024px)
   ============================================ */

@media (max-width: 1024px) {
  :root {
    --spacing-3xl: 4rem;
    --spacing-2xl: 3rem;
    --container-padding: 1.25rem;
  }

  /* Header */
  .nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--color-white);
    z-index: 999;
    padding: 5rem 2rem 2rem;
    transition: left 0.3s ease-out;
  }

  .nav.active {
    left: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-lg);
  }

  .nav-link {
    font-size: 1.25rem;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  .header-actions {
    gap: var(--spacing-xs);
  }

  .btn-call {
    display: none;
  }

  .btn-call-fixed {
    display: flex;
  }

  /* Services grid */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Vehicule */
  .vehicule-grid {
    grid-template-columns: 1fr;
  }

  /* Galerie d'images - Adaptation tablette */
  .vehicule-images-gallery {
    min-height: 450px;
  }

  .gallery-image-1 {
    width: 70%;
    max-width: 400px;
  }

  .gallery-image-2 {
    width: 65%;
    max-width: 370px;
  }

  /* Processus */
  .processus-timeline {
    flex-direction: column;
    align-items: center;
  }

  .processus-connector {
    width: 2px;
    height: 60px;
    margin: 0;
  }

  /* Avis */
  .avis-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
  }
}

/* ============================================
   MOBILE (< 768px)
   ============================================ */

@media (max-width: 768px) {
  :root {
    --spacing-3xl: 3rem;
    --spacing-2xl: 2rem;
    --spacing-xl: 2rem;
    --container-padding: 1rem;
  }

  /* Typography */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }

  /* Section spacing */
  section {
    padding: var(--spacing-2xl) 0;
  }

  .section-header {
    margin-bottom: var(--spacing-xl);
  }

  /* Hero */
  .hero {
    min-height: 90vh;
    padding-top: 70px;
  }

  .hero-content {
    gap: var(--spacing-lg);
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .hero-title {
    margin-bottom: 0;
  }

  .hero-subtitle {
    margin-bottom: 0;
  }

  /* Optimisation vidéo pour mobile */
  .hero-video {
    animation: none; /* Désactive l'animation zoom sur mobile pour les performances */
  }

  .hero-bg::after {
    background: linear-gradient(135deg, rgba(10, 26, 47, 0.85) 0%, rgba(10, 26, 47, 0.5) 50%, rgba(10, 26, 47, 0.75) 100%);
  }

  /* ============================================
     HERO MOBILE - LAYOUT SIMPLIFIÉ
     ============================================ */

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-sm);
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Cacher les badges sur mobile */
  .hero-badges {
    display: none;
  }

  /* Services - Amélioration mobile */
  .service-card {
    padding: var(--spacing-lg);
  }

  /* Sur mobile, l'icône et le titre sont alignés horizontalement */
  .service-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr auto;
    gap: var(--spacing-sm) var(--spacing-md);
    align-items: start;
  }

  .service-icon {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
    width: 56px;
    height: 56px;
  }

  .service-icon svg {
    width: 32px;
    height: 32px;
  }

  .service-title {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin-bottom: 0;
  }

  .service-description {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: var(--spacing-xs);
  }

  .service-cta {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  /* Vehicule */
  .vehicule-features {
    gap: var(--spacing-md);
  }

  /* ============================================
     GALERIE CAROUSEL MOBILE - Une image à la fois
     ============================================ */
  
  .vehicule-images-gallery {
    min-height: 300px;
    position: relative;
    overflow: visible;
    margin-bottom: var(--spacing-sm);
    padding-bottom: 1.5rem;
  }

  /* Sur mobile, les images sont centrées et occupent tout l'espace */
  .gallery-image {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    border-radius: 1.5rem;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
    overflow: hidden;
  }

  /* Forcer toutes les images à avoir la même hauteur sur mobile */
  .gallery-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
  }

  /* Image active visible */
  .gallery-image.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
  }

  /* Réinitialiser les transformations spécifiques */
  .gallery-image-1,
  .gallery-image-2 {
    width: 90%;
    max-width: 400px;
    top: 0;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
  }

  /* Désactiver les animations desktop sur mobile */
  .gallery-image-1,
  .gallery-image-2 {
    animation: none;
  }

  /* Désactiver les hover effects sur mobile */
  .gallery-image:hover,
  .gallery-image-1:hover,
  .gallery-image-2:hover {
    transform: translateX(-50%);
    box-shadow: 
      0 8px 30px rgba(10, 26, 47, 0.12),
      0 2px 8px rgba(10, 26, 47, 0.08);
  }

  /* Indicateurs de pagination (dots) - Espace minimal */
  .gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding-top: 0.375rem;
  }

  .gallery-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(10, 26, 47, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .gallery-indicator.active {
    width: 24px;
    border-radius: 4px;
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
  }

  /* Réduire l'espacement du contenu véhicule */
  .vehicule-content {
    margin-top: 0;
  }

  /* Masquer le bouton de réservation véhicule sur mobile tout en gardant l'espace */
  #btnReserverVehicule {
    visibility: hidden;
  }

  /* Map */
  .map-container {
    height: 400px;
  }

  /* Avis */
  .avis-card {
    padding: var(--spacing-lg);
  }

  /* CTA Final */
  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions .btn {
    width: 100%;
  }

  /* ============================================
     FOOTER MOBILE - Version premium simplifiée
     ============================================ */
  
  .footer {
    padding: var(--spacing-xl) 0 var(--spacing-lg);
  }

  /* Masquer la grille desktop */
  .footer-grid {
    display: none;
  }

  /* Afficher les éléments mobile */
  .footer-contact-mobile,
  .footer-legal-mobile {
    display: flex;
  }

  /* Layout mobile élégant et centré */
  .footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--spacing-md);
  }

  /* Logo/Titre premium */
  .footer .container::before {
    content: 'Taxi Vidal';
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-white);
    letter-spacing: -0.01em;
    margin-bottom: var(--spacing-xs);
  }

  /* Section contact élégante - typographie sobre */
  .footer-contact-mobile {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 320px;
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-contact-mobile a {
    display: block;
    padding: 0.375rem 0;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: 0.01em;
  }

  .footer-contact-mobile a:active {
    color: var(--color-secondary);
  }

  /* Liens légaux discrets */
  .footer-legal-mobile {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    margin: 0;
    font-family: var(--font-body);
  }

  .footer-legal-mobile a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 400;
  }

  .footer-legal-mobile a:active {
    color: var(--color-secondary);
  }

  .footer-legal-mobile span {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.625rem;
  }

  /* Copyright élégant */
  .footer-bottom {
    width: 100%;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
  }

  .footer-bottom p {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.6;
    letter-spacing: 0.02em;
  }

  .footer-credit {
    margin-top: 0.5rem;
    font-size: 0.75rem;
  }

  .footer-credit a {
    color: rgba(255, 255, 255, 0.85);
  }

  /* Modal */
  .modal-content {
    padding: var(--spacing-xl) var(--spacing-md);
    max-height: 95vh;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  /* Form */
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  /* Form message - Style mobile élégant */
  .form-message {
    padding: var(--spacing-2xl) var(--spacing-md);
    font-size: 1rem;
    min-height: 300px;
    gap: var(--spacing-lg);
  }

  .form-message.success::before {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
  }

  .form-message.error::before {
    width: 75px;
    height: 75px;
    font-size: 2.25rem;
  }

  /* Buttons */
  .btn-large {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }

  .btn-call-fixed {
    bottom: 1rem;
    right: 1rem;
    padding: 0.875rem 1.25rem;
  }

  .btn-call-fixed span {
    display: none;
  }

  /* ============================================
     HEADER MOBILE - DESIGN PREMIUM
     ============================================ */

  .header {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(10, 26, 47, 0.08);
  }

  .header-content {
    padding: 0.875rem var(--container-padding);
    gap: var(--spacing-md);
  }

  /* Logo - Design épuré */
  .logo {
    flex: 1;
    display: flex;
    align-items: center;
  }

  .logo-image {
    height: 42px;
    max-width: 140px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .logo-image:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
  }

  /* Header Actions - Group WhatsApp & Menu */
  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
  }

  /* Cacher le bouton Réserver du header sur mobile */
  .header-actions #btnReserver {
    display: none;
  }

  /* WhatsApp - Style Premium */
  .btn-whatsapp {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .btn-whatsapp:hover {
    background: linear-gradient(135deg, #20BA5A 0%, #1DA851 100%);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
    transform: translateY(-1px);
  }

  .btn-whatsapp svg {
    width: 22px;
    height: 22px;
  }

  /* Menu Toggle - Style Premium */
  .menu-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background-color: rgba(10, 26, 47, 0.06);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .menu-toggle:hover {
    background-color: rgba(10, 26, 47, 0.1);
    transform: translateY(-1px);
  }

  .menu-toggle:active {
    transform: scale(0.95);
  }

  .menu-toggle span {
    width: 20px;
    height: 2.5px;
    background-color: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .menu-toggle.active {
    background-color: rgba(10, 26, 47, 0.08);
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5.5px, 5.5px);
  }

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
  }

  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5.5px, -5.5px);
  }

  /* Navigation Mobile - Menu Full Screen Premium */
  .nav {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 245, 242, 0.98) 100%);
    backdrop-filter: blur(20px);
    padding: 6rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(10, 26, 47, 0.1) 50%, transparent 100%);
  }

  .nav-list {
    gap: 0.375rem;
    margin-bottom: auto;
  }

  .nav-link {
    font-size: 1.375rem;
    font-weight: 500;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
  }

  .nav-link:hover {
    background-color: rgba(229, 214, 189, 0.2);
    transform: translateX(8px);
    color: var(--color-primary);
  }

  .nav-link::after {
    display: none;
  }

  /* Actions du menu mobile - AFFICHAGE UNIQUEMENT SUR MOBILE */
  .nav-actions {
    display: flex !important;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(10, 26, 47, 0.1);
  }

  .nav-actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 1.0625rem;
  }

  /* Corriger le bouton outline dans le menu mobile */
  .nav-actions .btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
  }

  .nav-actions .btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
  }

  /* Bouton de fermeture du menu - Belle croix */
  .nav-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(10, 26, 47, 0.06);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
  }

  .nav-close:hover {
    background-color: rgba(10, 26, 47, 0.12);
    transform: rotate(90deg);
  }

  .nav-close:active {
    transform: scale(0.95);
  }

  .nav-close svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
  }
}

/* Cacher le bouton de fermeture et les actions sur tablette et desktop */
@media (min-width: 769px) {
  .nav-close {
    display: none !important;
  }

  .nav-actions {
    display: none !important;
  }
}

/* ============================================
   SMALL MOBILE (< 480px)
   ============================================ */

@media (max-width: 480px) {
  :root {
    --spacing-3xl: 2.5rem;
    --spacing-2xl: 1.75rem;
    --spacing-xl: 1.5rem;
    --container-padding: 1rem;
  }

  /* Hero */
  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.5;
  }

  /* Hero actions - Ajustement petit écran */
  .hero-actions .btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }

  /* Services - Petits écrans */
  .service-card {
    padding: var(--spacing-md);
    gap: var(--spacing-xs) var(--spacing-sm);
  }

  .service-icon {
    width: 48px;
    height: 48px;
  }

  .service-icon svg {
    width: 28px;
    height: 28px;
  }

  .service-title {
    font-size: 1.125rem;
  }

  /* Processus */
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .processus-connector {
    height: 50px;
  }

  /* Map */
  .map-container {
    height: 350px;
  }

  /* Modal */
  .modal {
    padding: var(--spacing-sm);
  }

  .modal-content {
    padding: var(--spacing-lg) var(--spacing-md);
    border-radius: var(--radius);
  }

  .modal-close {
    width: 36px;
    height: 36px;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
  }

  .modal-title {
    font-size: 1.375rem;
    padding-right: var(--spacing-lg);
  }

  /* Form message - Ajustement petit écran */
  .form-message {
    padding: var(--spacing-xl) var(--spacing-md);
    font-size: 0.9375rem;
    min-height: 280px;
    gap: var(--spacing-md);
  }

  .form-message.success::before {
    width: 75px;
    height: 75px;
    font-size: 2.25rem;
  }

  .form-message.error::before {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }

  /* Footer */
  .footer {
    padding: var(--spacing-2xl) 0 var(--spacing-md);
  }

  /* Presence */
  .presence-text {
    font-size: 1rem;
  }

  /* ============================================
     HEADER MOBILE SMALL - Ajustements fins
     ============================================ */

  .header-content {
    padding: 0.75rem 0.875rem;
  }

  .logo-image {
    height: 38px;
    max-width: 130px;
  }

  .btn-whatsapp {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .btn-whatsapp svg {
    width: 20px;
    height: 20px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .menu-toggle span {
    width: 18px;
    height: 2.5px;
  }

  .nav-link {
    font-size: 1.25rem;
    padding: 0.875rem 1rem;
  }
}

/* ============================================
   LARGE SCREENS (> 1440px)
   ============================================ */

@media (min-width: 1440px) {
  :root {
    --container-max: 1440px;
    --spacing-3xl: 8rem;
  }

  .hero {
    min-height: 100vh;
  }

  .map-container {
    height: 600px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .header,
  .btn-call-fixed,
  .modal,
  .hero-actions,
  .cta-final,
  .footer {
    display: none;
  }

  body {
    background-color: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
  }

  .hero-bg {
    display: none;
  }

  .hero-content {
    color: black;
  }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */

@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 6rem 0 3rem;
  }

  .modal-content {
    max-height: 95vh;
  }
}

/* ============================================
   TOUCH DEVICES
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    min-height: 48px;
  }

  .faq-question {
    min-height: 60px;
  }

  .nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  /* Remove hover effects on touch */
  .service-card:hover,
  .avis-card:hover {
    transform: none;
  }

  /* Keep basic hover for buttons */
  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.98);
  }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
  :root {
    --color-primary: #000000;
    --color-light: #FFFFFF;
    --shadow: none;
    --shadow-sm: none;
    --shadow-lg: none;
  }

  .service-card,
  .avis-card,
  .modal-content {
    border: 2px solid var(--color-primary);
  }

  .btn {
    border: 2px solid currentColor;
  }

  .hero-bg::after {
    background: rgba(0, 0, 0, 0.9);
  }
}

/* ============================================
   DARK MODE (optional, future implementation)
   ============================================ */

@media (prefers-color-scheme: dark) {
  /* Le site utilise un thème clair fixe, mais on peut ajouter 
     un mode sombre plus tard si souhaité */
}

/* ============================================
   REDUCED TRANSPARENCY
   ============================================ */

@media (prefers-reduced-transparency: reduce) {
  .header {
    background-color: var(--color-white);
    backdrop-filter: none;
  }

  .modal-overlay {
    backdrop-filter: none;
    background-color: rgba(10, 26, 47, 0.95);
  }

  .badge {
    background-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: none;
  }
}

