/* ==========================================================================
   1. VARIABLES & BLINDAGE ANTI-DÉBORDEMENT ABSOLU (MOBILE/TABLETTE/PC)
   ========================================================================== */
:root {
    --bg-dark: #040d1a;
    --bg-panel: #0a172e;
    --accent-cyan: #00e5ff;
    --text-light: #e6f1ff;
    --text-muted: #8892b0;
    --border-glass: rgba(0, 229, 255, 0.15);
}

/* STOP AU DÉBORDEMENT ET RESET */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    max-width: 100vw; /* Empêche tout élément de dépasser l'écran */
}

html, body {
    background: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Urbanist', sans-serif;
    line-height: 1.6;
    width: 100vw !important;
    max-width: 100%;
    overflow-x: hidden !important; /* INTERDIT LE DÉBORDEMENT HORIZONTAL */
    position: relative;
    /* EMPÊCHE ANDROID DE "GONFLER" LE TEXTE AU CHANGEMENT DE LANGUE (font boosting) */
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* iOS : un champ dont la police fait < 16px provoque un ZOOM automatique au focus
   (c'est ce qui "dilatait" l'écran en ouvrant la recherche de langue). On force 16px. */
@media (max-width: 768px) {
    input, select, textarea { font-size: 16px !important; }
}

/* Verrouillage strict pour les langues RTL (Arabe, Hébreu) */
html[dir="rtl"], body.rtl {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100% !important;
    position: relative;
}

a { text-decoration: none !important; color: inherit; }

/* ==========================================================================
   2. TUEUR DE BANNIÈRE GOOGLE TRANSLATE (NUCLÉAIRE)
   ========================================================================== */
.goog-te-banner-frame, 
iframe.goog-te-banner-frame, 
.skiptranslate > iframe, 
body > .skiptranslate { 
    display: none !important; 
    visibility: hidden !important; 
    height: 0 !important; 
    opacity: 0 !important; 
}
body { top: 0px !important; position: static !important; }
.goog-text-highlight { background-color: transparent !important; box-shadow: none !important; }

/* ==========================================================================
   3. TYPOGRAPHIE ÉLASTIQUE
   ========================================================================== */
h1, h2, h3, h4 { 
    word-wrap: break-word !important; 
    overflow-wrap: break-word !important; 
    hyphens: auto !important; 
}
h1 { font-size: min(10vw, 4.5rem) !important; line-height: 1.1; margin-bottom: 25px; }
h2 { font-size: min(8vw, 3.5rem) !important; line-height: 1.2; margin-bottom: 20px; }
h3 { font-size: min(6vw, 2.5rem) !important; margin-bottom: 10px; }
p { font-size: clamp(0.95rem, 1.5vw, 1.2rem); color: var(--text-light); }

/* ==========================================================================
   4. HEADER & MENU DES LANGUES (PC)
   ========================================================================== */
.header { display: flex; justify-content: space-between; align-items: center; padding: 20px 5%; background: rgba(10, 23, 46, 0.95); border-bottom: 1px solid var(--border-glass); position: sticky; top: 0; z-index: 1000; width: 100%; overflow: visible !important; }
.logo-group { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: clamp(1.2rem, 3vw, 1.5rem); color: #fff !important; }
.logo-img { width: 50px; height: 50px; border-radius: 10px; }
.nav-links { display: flex; align-items: center; gap: 20px; font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; flex-wrap: wrap; justify-content: center; overflow: visible !important; }
.nav-links a { color: #fff !important; }

.lang-wrapper { position: relative !important; z-index: 999999 !important; }
.lang-trigger {
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent; 
    touch-action: manipulation; 
}
.lang-flag { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.lang-panel { display: none; position: absolute; top: 100%; right: 0; background: #060e1b; border: 1px solid var(--accent-cyan); width: 300px; max-width: 90vw; border-radius: 12px; z-index: 10000; margin-top: 10px; overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.8); }
.lang-panel.open { display: block; }
.lang-search-box { padding: 12px; border-bottom: 1px solid var(--border-glass); background: #020813; }
.lang-search-box input { width: 100%; padding: 10px 15px; background: var(--bg-dark); border: 1px solid var(--border-glass); color: #fff; border-radius: 20px; outline: none; }
.lang-list-scroll { max-height: 350px; overflow-y: auto; padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.lang-link { display: flex; align-items: center; gap: 10px; padding: 8px; color: var(--text-muted) !important; border-radius: 8px; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-link:hover { background: rgba(0, 229, 255, 0.1); color: #fff !important; }
.lang-flag-img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }

/* ==========================================================================
   5. SECTIONS DISPOSITION (HERO, PILLARS)
   ========================================================================== */
.hero-container { display: flex; align-items: center; justify-content: space-between; width: 90%; max-width: 1400px; margin: 80px auto; gap: 40px; min-height: 65vh; }
.hero-text { flex: 1.2; text-align: left; }
.hero-text p { color: var(--text-muted); margin-bottom: 40px; }
.hero-image-wrapper { flex: 1; text-align: center; border: 2px solid var(--accent-cyan); border-radius: 25px; overflow: hidden; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7); max-width: 500px; margin: 0 auto;}
.hero-image-wrapper img { width: 100%; height: auto; display: block; }

.trust-banner { display: flex; justify-content: space-around; flex-wrap: wrap; padding: 30px 5%; background: var(--bg-panel); border-top: 1px solid var(--border-glass); border-bottom: 1px solid var(--border-glass); margin-bottom: 80px; width: 100%; gap: 15px; }
.trust-item { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: clamp(0.9rem, 1.5vw, 1.1rem); font-weight: 600; text-transform: uppercase; }

.pillars-section, .team-section, .pricing-section { padding: 60px 5%; text-align: center; width: 100%; }
.pillars-subtitle, .pricing-subtitle { color: var(--accent-cyan); margin-bottom: 40px; text-transform: uppercase; letter-spacing: 2px; }

.pillars-grid, .cards-container, .pricing-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; width: 100%; max-width: 1300px; margin: 0 auto; align-items: stretch;
}
.pillar-card, .card { background: var(--bg-panel); padding: 40px 20px; border-radius: 25px; border: 1px solid var(--border-glass); width: 100%; }
.pillar-icon { font-size: 3.5rem; color: var(--accent-cyan); margin-bottom: 20px; }
.card-img { width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--bg-dark); outline: 2px solid var(--accent-cyan); margin-bottom: 20px; object-fit: cover; margin: 0 auto 20px auto; display: block;}

/* ==========================================================================
   6. TARIFS ET MATIÈRES DE LUXE 3D
   ========================================================================== */
.price-card { 
    background: linear-gradient(145deg, rgba(10, 23, 46, 0.9) 0%, rgba(4, 13, 26, 0.98) 100%) !important; 
    border-radius: 15px !important; padding: 30px 20px !important; 
    display: flex !important; flex-direction: column !important; text-align: center !important; 
    position: relative !important; width: 100% !important; transition: 0.4s !important;
}

.card-express  { border: 2px solid #00e676 !important; box-shadow: 0 4px 15px rgba(0, 230, 118, 0.1) !important; }
.card-bronze   { border: 2px solid #cd7f32 !important; box-shadow: 0 4px 15px rgba(205, 127, 50, 0.1) !important; }
.card-silver   { border: 2px solid #c0c0c0 !important; box-shadow: 0 4px 15px rgba(192, 192, 192, 0.1) !important; }
.card-gold     { border: 2px solid #ffd700 !important; z-index: 10 !important; box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2) !important; }
.card-platinum { border: 2px solid #e5e4e2 !important; box-shadow: 0 4px 15px rgba(229, 228, 226, 0.1) !important; }
.card-privilege{ border: 2px solid #d4af37 !important; box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15) !important; }

.price-header h3 { color: #fff !important; text-transform: uppercase !important; letter-spacing: 1px !important; }
.price-amount { font-weight: 800 !important; color: #fff !important; display: flex !important; align-items: baseline !important; justify-content: center !important; gap: 4px !important; margin: 15px 0 !important; }
.price-amount span { font-size: 0.9rem !important; color: var(--text-muted) !important; font-weight: 400 !important; }
.price-features { list-style: none !important; margin-bottom: 25px !important; flex-grow: 1 !important; text-align: left !important; padding-left: 8px !important; }
.price-features li { margin-bottom: 10px !important; font-size: 0.9rem !important; display: flex; gap: 10px; align-items: center !important; }
.price-features li i { font-size: 0.8rem !important; color: var(--accent-cyan) !important; }

.badge { position: absolute !important; top: -12px !important; right: 15px !important; padding: 5px 12px !important; border-radius: 20px !important; font-size: 0.75rem !important; font-weight: 800 !important; text-transform: uppercase; }
.badge-express { background: #00e676; color: #000; }
.badge-elite { background: #ffd700; color: #000; }

/* BOUTONS MATIÈRE PURE */
.btn-group-column { display: flex !important; flex-direction: column !important; gap: 10px !important; margin-top: auto !important; }
.btn-matiere {
    display: block !important; width: 100% !important; padding: 15px !important; border-radius: 10px !important;
    font-weight: 900 !important; font-size: 0.95rem !important; text-transform: uppercase !important; letter-spacing: 1px !important;
    text-align: center !important; border: none !important; position: relative !important; transition: all 0.15s ease-in-out !important;
    box-shadow: 0 6px 12px rgba(0,0,0,0.6), inset 0 3px 2px rgba(255,255,255,0.3), inset 0 -4px 3px rgba(0,0,0,0.4); text-shadow: 0 1px 2px rgba(0,0,0,0.4); cursor: pointer !important;
}
.btn-matiere:active { transform: translateY(3px) !important; box-shadow: 0 2px 4px rgba(0,0,0,0.6), inset 0 2px 3px rgba(0,0,0,0.4) !important; }

.btn-mat-express { background-image: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%), linear-gradient(135deg, #18f187 0%, #00e676 25%, #00c853 50%, #00a041 100%) !important; color: #000 !important; border: 1px solid #00c853 !important; }
.btn-mat-bronze { background-image: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 100%), linear-gradient(135deg, #c48c66 0%, #b87333 25%, #a0522d 50%, #8b4513 100%) !important; color: #fff !important; border: 1px solid #8b4513 !important; }
.btn-mat-silver { background-image: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%), linear-gradient(135deg, #ffffff 0%, #f1f5f9 15%, #c0c0c0 50%, #94a3b8 100%) !important; color: #000 !important; border: 1px solid #a0b2c6 !important; }
.btn-mat-gold { background-image: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%), linear-gradient(135deg, #ffea70 0%, #ffd700 25%, #ffb300 50%, #d97706 100%) !important; color: #000 !important; border: 1px solid #d97706 !important; }
.btn-mat-platinum { background-image: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.15) 100%), linear-gradient(135deg, #f0f4f8 0%, #ffffff 25%, #e5e4e2 50%, #b0c4de 100%) !important; color: #000 !important; border: 1px solid #c0d0e0 !important; }
.btn-mat-privilege { background-image: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%), linear-gradient(135deg, #f7dcd1 0%, #eac2b1 25%, #d4af37 50%, #b87333 75%, #a0522d 100%) !important; color: #000 !important; border: 1px solid #d4af37 !important; }

/* ==========================================================================
   7. RTL & ARCHITECTURE EXTRÊME RESPONSIVE TOUS APPAREILS
   ========================================================================== */
body.rtl { direction: rtl; text-align: right; }
body.rtl .header, body.rtl .nav-links, body.rtl .hero-container { flex-direction: row-reverse; }
body.rtl .price-features li i { margin-left: 8px; margin-right: 0; }
body.rtl .badge { left: 15px; right: auto; }

.footer { padding: 40px; text-align: center; background: var(--bg-panel); border-top: 1px solid var(--border-glass); width: 100%; }

/* ==========================================================================
   8. FIX DÉFINITIF MOBILE (STRUCTURE + MENU LANGUES)
   ========================================================================== */
@media (max-width: 992px) {
    /* Ajustements du Header */
    .header { flex-direction: column !important; padding: 15px 10px !important; gap: 15px !important; }
    .logo-group { width: 100% !important; justify-content: center !important; }
    
    /* Ajustements Hero */
    .hero-container { flex-direction: column !important; text-align: center !important; gap: 35px !important; padding: 20px !important; }
    .hero-text { width: 100% !important; text-align: center !important; }
    .hero-text div[style*="display: flex"] { justify-content: center !important; }

    /* Force UNE SEULE colonne sur mobile pour empêcher le débordement des grilles */
    .pricing-grid, .pillars-grid, .cards-container { 
        grid-template-columns: 1fr !important; 
        gap: 20px !important; 
        padding: 0 10px !important; 
        width: 100% !important;
        display: flex !important; flex-direction: column !important; align-items: center !important;
    }
    
    .price-card, .pillar-card, .card { 
        width: 100% !important; 
        max-width: 90vw !important; 
        min-width: unset !important; 
        margin: 0 auto !important; 
    }
    
    .card-gold { transform: scale(1) !important; }

    /* MENU LANGUE MOBILE : FIX ANTI-CHEVAUCHEMENT ET ANTI-DÉCALAGE (LTR & RTL) */
    .lang-panel {
        /* Annulation des effets de flou Safari iOS */
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        
        /* Fond 100% solide */
        background: #0a172e !important; 
        border: 2px solid #00e5ff !important;
        
        /* Centrage Fixe Absolu */
        position: fixed !important; 
        top: 80px !important; 
        left: 5vw !important; 
        right: 5vw !important; 
        width: 90vw !important; 
        transform: none !important; 
        margin: 0 !important;
        
        /* Z-index maximal */
        z-index: 2147483647 !important; 
        
        /* Esthétique */
        border-radius: 12px !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.9) !important;
        padding: 15px !important;
        
        display: none; 
    }

    /* Activation propre */
    .lang-panel.open {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}