/* Variables de la charte Zuacoop */
:root {
    --royal: #060b18;          /* Bleu nuit très profond */
    --cyan-tech: #00a8b5;      /* Bleu cyan issu des circuits du logo */
    --blue-connect: #0f4c81;   /* Bleu roi de la structure du Z */
    --glass: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.07);
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(circle at top right, #0d2040 0%, var(--royal) 100%);
    min-height: 100vh;
    color: white; margin: 0; padding: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* BARRE DE NAVIGATION LUXE - FOND NOIR OPAQUE FIXÉ */
/* ==========================================
   CORRECTIF GLOBAL ET BANDEAU NOIR RESPONSIVE
   ========================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Bloque impérativement le défilement horizontal sur mobile */
}

header {
    background: rgba(6, 11, 24, 0.98) !important; /* Fond noir opaque luxe */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100% !important; /* Force le header à aller jusqu'au bout de l'écran */
    left: 0;
}

/* Alignement parfait des trois blocs */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 85px;
    padding: 0 15px !important; /* Marge de sécurité sur les bords */
    width: 100%;
}

/* COIN GAUCHE : LOGO */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-img {
    height: 55px; /* Taille idéale pour mobile et ordinateur */
    width: auto;
    object-fit: contain;
}
.logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    color: #ffffff;
}

/* CENTRE : SLOGAN */
.header-slogan {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    text-align: center;
    padding: 0 10px;
    flex: 1;
}

/* COIN DROIT : BOUTON */
.auth-container {
    flex-shrink: 0;
}
.nav-auth-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap; /* Empêche le texte "Espace Pro" de se couper */
}
.nav-auth-btn:hover {
    border-color: var(--cyan-tech);
    background: rgba(0, 168, 181, 0.1);
}

/* ==========================================
   ADAPTATION STRICTE POUR SMARTPHONES (MOBILE)
   ========================================== */
@media (max-width: 768px) {
    .header-flex {
        height: 70px; /* Légèrement plus compact sur mobile */
        padding: 0 10px !important;
    }
    
    .logo-text {
        display: none; /* Masque le texte "Zuacoop" sur mobile car le logo suffit */
    }
    
    .logo-img {
        height: 45px; /* Ajuste la taille du logo au coin gauche */
    }

    .header-slogan {
        font-size: 0.8rem; /* Réduit le slogan pour qu'il tienne au centre */
        line-height: 1.2;
    }

    .nav-auth-btn {
        padding: 8px 12px; /* Rend le bouton moins large sur petit écran */
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    /* Sur les écrans minuscules, on masque le slogan pour laisser respirer le logo et le bouton */
    .header-slogan {
        display: none;
    }
}


.logo-container {
    display: flex; align-items: center; 
    gap: 15px; /* Espace légèrement augmenté entre l'icône et le texte */
    text-decoration: none; color: white;
}
.logo-img {
    height: 100px; /* Nettement agrandi (ancienne valeur : 38px) */
    width: auto; object-fit: contain;
    transition: transform 0.3s ease; /* Préparation pour un effet au survol */
}
.logo-img:hover {
    transform: scale(1.05); /* Léger effet de zoom au survol pour le côté luxe */
}
.logo-text {
    font-size: 1.6rem; /* Agrandi (ancienne valeur : 1.3rem) */
    font-weight: 900; letter-spacing: 0.8px;
    color: #ffffff;
}
.nav-auth-btn {
    background: var(--glass); border: 1px solid var(--glass-border); color: white;
    padding: 10px 22px; border-radius: 20px; font-size: 0.9rem; font-weight: 600;
    text-decoration: none; display: flex; align-items: center; gap: 8px; transition: all 0.3s;
}
.nav-auth-btn:hover {
    border-color: var(--cyan-tech); background: rgba(0, 168, 181, 0.05);
}


/* ========================================================
   CORRECTIF BARRE DE RECHERCHE LUXE - 100% MOBILE COMPATIBLE
   ======================================================== */

.search-wrapper-luxury {
    display: flex; 
    gap: 10px; 
    margin: 30px 0; 
    background: var(--glass);
    padding: 10px; 
    border-radius: 30px; 
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    align-items: center;
    width: 100%; /* S'assure de prendre toute la largeur disponible */
}

.search-wrapper-luxury input {
    flex: 1; 
    background: transparent; 
    border: none; 
    padding: 0 15px;
    color: white; 
    font-size: 0.95rem; 
    outline: none;
    min-width: 0; /* TRÈS IMPORTANT : empêche l'input d'écraser le bouton sur mobile */
    height: 45px;
}

.btn-search-luxury {
    background: linear-gradient(135deg, var(--cyan-tech), var(--blue-connect));
    color: white; 
    border: none; 
    padding: 12px 25px; 
    border-radius: 25px;
    font-weight: 700; 
    cursor: pointer; 
    transition: opacity 0.2s; 
    font-size: 0.9rem;
    
    /* CORRECTIFS ANTI-COUPURE SUR SMARTPHONE */
    white-space: nowrap; /* Interdit au texte "Trouver" de se couper ou d'aller à la ligne */
    flex-shrink: 0;      /* Interdit catégoriquement à Android d'écraser la largeur du bouton */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 45px;        /* Aligne la hauteur sur celle du champ de texte */
}

/* RESPONSIVE STRICT POUR PETITS ÉCRANS */
@media (max-width: 500px) {
    .search-wrapper-luxury {
        padding: 6px;
        border-radius: 15px; /* Forme légèrement plus carrée et moderne sur petit écran */
        margin: 20px 0;
    }
    
    .search-wrapper-luxury input {
        padding: 0 8px;
        font-size: 0.85rem; /* Réduit un peu le texte pour les petits écrans de téléphone */
    }
    
    .btn-search-luxury {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}


/* GRILLE DE PRESTATIONS */
.grid-prestige {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px; margin-bottom: 60px;
}
.spec-card {
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 25px; text-align: center; position: relative;
    transition: transform 0.3s, border-color 0.3s; backdrop-filter: blur(10px);
    display: flex; flex-direction: column; justify-content: space-between;
}
.spec-card:hover {
    transform: translateY(-5px); border-color: rgba(0, 168, 181, 0.3);
}
.spec-card.boosted {
    border: 1px solid rgba(0, 168, 181, 0.4);
    background: radial-gradient(circle at top left, rgba(0, 168, 181, 0.03), var(--glass));
}

/* BADGE PREMIUM BOOSTED */
.boosted-tag {
    position: absolute; top: 15px; right: 15px; background: rgba(0, 168, 181, 0.15);
    color: var(--cyan-tech); font-size: 0.65rem; font-weight: 800;
    padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px;
    border: 1px solid rgba(0, 168, 181, 0.2);
}

/* AVATAR */
.spec-avatar {
    width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
    margin: 10px auto 15px; border: 2px solid var(--glass-border); display: block;
}
.spec-card.boosted .spec-avatar { border-color: var(--cyan-tech); }

.spec-name { font-size: 1.15rem; margin: 0 0 8px 0; font-weight: 700; color: white; }

.spec-info { font-size: 0.85rem; color: var(--cyan-tech); font-weight: 600; margin-bottom: 12px; line-height: 1.4; }
.spec-info small { color: rgba(255,255,255,0.5); font-weight: 400; }

.spec-loc { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin: 4px 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
/* CAPSULE SPÉCIALE INTERNE POUR LA DESCRIPTION */
.desc-block-wrapper {
    margin: 18px 0 12px 0;
    text-align: justify !important; /* Force l'alignement justifié */
}

.spec-desc {
    /* Style de texte Premium et Italique forcé */
    font-family: 'Georgia', 'Cambria', 'Segoe UI', serif !important;
    font-size: 0.82rem !important;
    font-style: italic !important; /* Force l'italique de manière stricte */
    line-height: 1.55 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    margin: 0 !important;
    
    /* Design de "Carte Spéciale Interne" */
    background: rgba(6, 11, 24, 0.4) !important; /* Fond sombre contrasté interne */
    padding: 12px 15px !important;
    border-radius: 12px !important; /* Bords bien arrondis pour l'effet carte */
    border: 1px solid rgba(0, 168, 181, 0.15) !important; /* Bordure cyan translucide */
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Effet lumineux lorsque la carte interne est dépliée */
.spec-desc.expanded {
    background: rgba(6, 11, 24, 0.7) !important;
    border-color: rgba(0, 168, 181, 0.4) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(0, 168, 181, 0.1), inset 0 2px 8px rgba(0, 0, 0, 0.5) !important;
}

/* Design de la carte interne spécifique pour les prestataires VIP / Boosted */
.spec-card.boosted .spec-desc {
    background: rgba(0, 168, 181, 0.03) !important;
    border-color: rgba(0, 168, 181, 0.3) !important;
}

/* Bouton interactif positionné élégamment sous la capsule */
.toggle-desc-btn {
    display: table !important;
    margin: 6px 0 0 auto !important; /* Aligne le bouton à droite */
    font-size: 0.7rem !important;
    color: var(--cyan-tech) !important;
    cursor: pointer !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: all 0.2s ease;
    user-select: none !important;
}

.toggle-desc-btn:hover {
    color: #ffffff !important;
    background: var(--cyan-tech) !important;
    border-color: var(--cyan-tech) !important;
}

/* Lien Voir plus / Moins repensé */
.toggle-desc-btn {
    display: block;
    text-align: right; /* Aligne le bouton à droite sous le texte justifié */
    font-size: 0.72rem;
    color: var(--cyan-tech);
    cursor: pointer;
    font-weight: 700;
    margin-top: 6px;
    padding-right: 5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: color 0.2s, transform 0.2s;
    user-select: none;
}
.toggle-desc-btn:hover {
    color: white;
    text-decoration: none;
}


/* INDICATEUR DE STATUT */
.status-indicator {
    display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem;
    font-weight: 700; padding: 4px 12px; border-radius: 20px; margin: 15px 0;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.status-available { background: rgba(46, 204, 113, 0.1); color: #2ecc71; }
.status-busy { background: rgba(231, 76, 60, 0.1); color: #e74c3c; }
.dot-status { width: 6px; height: 6px; border-radius: 50%; }

/* BOUTON VOIR PROFIL */
.btn-view {
    display: block; width: 100%; padding: 10px; background: var(--glass);
    border: 1px solid var(--glass-border); color: white; text-decoration: none;
    border-radius: 10px; font-size: 0.85rem; font-weight: 600; transition: all 0.2s;
}
.btn-view:hover {
    background: white; color: var(--royal); font-weight: 700;
}

/* LOADER ELEMENT */
#loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--royal);
    display: flex; justify-content: center; align-items: center; z-index: 9999; transition: opacity 0.4s;
}
.spinner {
    width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.05);
    border-top-color: var(--cyan-tech); border-radius: 50%; animation: spin 1s infinite linear;
}
@keyframes spin { to { transform: rotate(360deg); } }
