/* ========================================
   RESPONSIVE CSS - Serrurerie Pro
   Media queries pour mobile et tablette
   ======================================== */

/* ========================================
   TABLETTE (769px - 1024px)
   ======================================== */

@media (max-width: 1024px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

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

@media (max-width: 768px) {
    /* Spacing mobile */
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    section {
        padding: var(--spacing-lg) 0;
    }
    
    /* Header / Nav */
    .nav {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .nav-links {
        flex-direction: column;
        gap: var(--spacing-sm);
        width: 100%;
    }
    
    .header-phone {
        width: 100%;
        justify-content: center;
    }
    
    /* Hero */
    .hero {
        padding: var(--spacing-lg) 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Why us grid */
    .why-us-grid {
        grid-template-columns: 1fr;
    }
    
    .why-item {
        flex-direction: column;
        text-align: center;
    }
    
    /* Zone */
    .zone-list {
        gap: var(--spacing-xs);
    }
    
    .zone-item {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Boutons */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        width: 100%;
    }
    
    .btn-group {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    /* Sticky phone */
    .sticky-phone {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .sticky-phone-text {
        display: none;
    }
    
    .sticky-phone-icon {
        font-size: 1.5rem;
    }
    
    /* Form */
    .form {
        padding: var(--spacing-md);
    }
}

/* ========================================
   TRÈS PETIT MOBILE (< 480px)
   ======================================== */

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .service-card,
    .why-item {
        padding: var(--spacing-md);
    }
    
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }
}

/* ========================================
   PAYSAGE MOBILE
   ======================================== */

@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: var(--spacing-md) 0;
    }
    
    section {
        padding: var(--spacing-md) 0;
    }
}

/* ========================================
   GRANDS ÉCRANS (> 1400px)
   ======================================== */

@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

/* ========================================
   NAVIGATION & LANGUAGE SELECTOR
   ======================================== */

/* Menu burger (mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary);
    transition: all 0.3s;
    border-radius: 2px;
}

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

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

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

/* Sélecteur de langue */
.language-selector {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-accent);
    border: 2px solid var(--accent);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.language-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.language-btn .arrow {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.language-btn.active .arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: var(--bg-accent);
    color: var(--accent);
}

.language-option .flag {
    font-size: 1.5rem;
}

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

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform 0.3s;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links a {
        padding: 1rem 0;
        font-size: 1.125rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .language-selector {
        margin-top: 1rem;
        width: 100%;
    }
    
    .language-btn {
        width: 100%;
        justify-content: center;
    }
    
    .language-dropdown {
        position: static;
        margin-top: 0.5rem;
        width: 100%;
    }
}