/* Correctifs pour l'affichage mobile - Alliance Luxury Multiservices */

/*** 1. CORRECTION SÉLECTEUR DE LANGUE ET BOUTONS FLOTTANTS ***/
.language-selector {
    position: fixed;
    left: 15px;
    bottom: 15px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.language-toggle {
    width: 45px;
    height: 45px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--gold-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.language-toggle:hover, .language-toggle:active {
    transform: scale(1.1);
}

/* Animation pour l'ouverture du dropdown de langue */
@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-dropdown {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 150px;
    background-color: var(--card-bg);
    border: 1px solid var(--gold-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    flex-direction: column;
    opacity: 0;
}

.language-dropdown.active {
    display: flex;
    animation: fadeInDropdown 0.2s forwards;
}

.lang-option {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.lang-option:hover {
    background-color: rgba(192, 164, 110, 0.1);
    transform: translateX(3px);
}

.lang-option.active {
    background-color: rgba(192, 164, 110, 0.2);
    font-weight: 500;
}

@media (max-width: 768px) {
    .language-selector {
        left: 70px;
        bottom: 15px;
    }
}

/* Style du bouton de contact mobile */
.contact-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--gold-color);
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.contact-btn:hover, .contact-btn:active {
    transform: scale(1.05);
}

@media (max-width: 991px) {
    .contact-btn {
        display: flex;
    }
}

/*** 2. AMÉLIORATION DU MENU HAMBURGER ET NAVIGATION MOBILE ***/
/* Par défaut, cacher les éléments mobiles sur desktop */
.mobile-only {
    display: none;
}

/* Configuration générale de la navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-nav-container {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
}

@media (max-width: 991px) {
    /* Afficher les éléments mobiles */
    .mobile-only {
        display: flex;
    }
    
    /* Ajustement du logo et du bouton hamburger */
    .logo-nav-container {
        flex: 1;
        justify-content: space-between;
        padding-right: 15px;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    /* Bouton hamburger */
    .nav-toggle {
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        background: transparent;
        border: none;
        padding: 0;
        z-index: 1500;
        margin-left: 15px;
    }
    
    .toggle-bar {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--text-color);
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.33, 1, 0.68, 1);
    }
    
    .nav-toggle.active .toggle-bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .nav-toggle.active .toggle-bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .toggle-bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    /* Menu de navigation mobile */
    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--bg-color);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        z-index: 1400;
        transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow-y: auto;
        padding: 80px 20px 20px;
    }
    
    .nav-wrapper.active {
        right: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-item {
        margin: 0;
        width: 100%;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 15px;
        width: 100%;
        text-align: center;
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }
    
    .nav-link:hover, .nav-link.active {
        background-color: rgba(192, 164, 110, 0.1);
    }
}

/*** 3. CORRECTION POUR LE SLOGAN PRINCIPAL EN MOBILE ***/
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
        line-height: 1.3;
        margin-bottom: 20px;
        text-align: center;
        width: 100%;
        overflow: visible;
        white-space: normal;
    }
    
    .main-title .gold-effect {
        display: inline;
        width: auto;
        white-space: normal;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    .subtitle {
        font-size: 1rem;
        line-height: 1.5;
        max-width: 100%;
        text-align: center;
        margin-bottom: 30px;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
        padding: 0 5px;
    }
    
    .subtitle {
        font-size: 0.95rem;
        padding: 0 5px;
    }
}

/*** 4. REPOSITIONNEMENT DE LA CARTE "VALORISEZ VOTRE BIEN" ***/
@media (max-width: 991px) {
    .floating-card {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        max-width: 320px;
        margin: 20px auto 40px;
        animation: none;
        transform: none !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        border: 1px solid var(--gold-color);
    }
}

@media (max-width: 480px) {
    .floating-card {
        padding: 15px;
        margin: 10px auto 30px;
        width: 90%;
    }
}

/*** 5. ANIMATION DE LA BARRE DE NAVIGATION ***/
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1), 
                background-color 0.3s ease, 
                box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header.hidden {
    transform: translateY(-100%);
}

.header.visible {
    transform: translateY(0);
}

.header.scrolled {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background-color: var(--header-bg);
}

/*** 6. ANIMATIONS DE TRANSITION ENTRE SECTIONS ***/
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
    transition-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}

[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/*** TRANSITIONS POUR LE CHANGEMENT DE THÈME ***/
.theme-toggle {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                background-color 0.3s ease,
                box-shadow 0.3s ease;
    position: fixed;
    right: 15px;
    bottom: 15px;
    width: 45px;
    height: 45px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--gold-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover, .theme-toggle:active {
    transform: scale(1.1);
}

/* Animation flash pour indiquer le changement de thème */
@keyframes themeFlash {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

body.theme-changing {
    animation: themeFlash 0.3s ease-in-out;
}

/* Animation pour le changement de thème complet */
@keyframes themeTransition {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Transition globale pour le changement de thème */
body, html {
    transition: background-color 0.5s ease;
}

/* Transition fluide pour le changement de thème */
body, .header, .footer, section, .service-card, .feature-card, 
.testimonial-card, .floating-card, .contact-form-wrapper, 
.contact-info, input, textarea, select {
    transition: background-color 0.3s ease,
                color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Améliorer l'animation de la langue active */
.lang-option.active::after {
    content: '';
    position: absolute;
    left: 0;
    width: 3px;
    height: 60%;
    background: var(--gold-gradient);
    border-radius: 0 2px 2px 0;
}

/* Animation pour le changement de langue */
@keyframes langChanged {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

[data-i18n].changed {
    animation: langChanged 0.5s ease-out;
}

/* Overlay pour le menu mobile */
@media (max-width: 991px) {
    .nav-wrapper::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: -1;
    }
    
    .nav-wrapper.active::before {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-item {
        opacity: 0;
        transform: translateX(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        transition-delay: 0s;
    }
    
    .nav-wrapper.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-wrapper.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
    .nav-wrapper.active .nav-item:nth-child(2) { transition-delay: 0.15s; }
    .nav-wrapper.active .nav-item:nth-child(3) { transition-delay: 0.2s; }
    .nav-wrapper.active .nav-item:nth-child(4) { transition-delay: 0.25s; }
    .nav-wrapper.active .nav-item:nth-child(5) { transition-delay: 0.3s; }
    .nav-wrapper.active .nav-item:nth-child(6) { transition-delay: 0.35s; }
}

/* Amélioration des effets de survol sur tactile */
@media (hover: none) {
    .service-card:hover,
    .feature-card:hover,
    .cta-button:hover,
    .submit-btn:hover,
    .nav-link:hover {
        transform: none;
    }
    
    .service-card:active,
    .feature-card:active,
    .cta-button:active,
    .submit-btn:active {
        transform: scale(0.98);
    }
} 