:root {
    --primary: #001276;
    --primary-dark: #000b46;
    --secondary: #D4AF37;
    --accent: #FFC107;
    --text: #1E293B;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --shadow: 0 10px 30px rgba(0, 18, 118, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { overflow-x: hidden; width: 100%; position: relative; scroll-behavior: smooth; }
img, iframe, video { max-width: 100%; height: auto; }
body { font-family: 'Inter', 'Outfit', sans-serif; background: var(--white); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }

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

@media (max-width: 480px) {
    .container { padding: 0 16px; }
}

/* Header Ultra-Mobile-Pro */
header { background: var(--primary); padding: 15px 0; color: white; position: fixed; width: 100%; top:0; z-index: 1000; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
header.scrolled { padding: 10px 0; background: rgba(0, 18, 118, 0.95); backdrop-filter: blur(10px); }

.navbar { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 22px; font-weight: 800; color: white; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo span { color: var(--secondary); }

/* Menu Desktop */
.nav-links { display: flex; list-style: none; gap: 30px; align-items: center; }
.nav-links a { color: white; text-decoration: none; font-weight: 500; font-size: 14px; opacity: 0.8; transition: 0.3s; }
.nav-links a:hover { opacity: 1; color: var(--secondary); }
.btn-nav { background: var(--secondary); color: white !important; padding: 10px 20px; border-radius: 50px; opacity: 1 !important; font-weight: 700; }

/* Hamburger pour Mobile */
.mobile-toggle { display: none; font-size: 24px; cursor: pointer; color: white; }

/* Hero Ultra-Responsive */
.hero { min-height: 85vh; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); position: relative; overflow: hidden; display: flex; align-items: center; color: white; padding-top: 80px; }
.hero::after { content: ''; position: absolute; top:0; left:0; width:100%; height:100%; background: url('../img/pattern.svg'); opacity: 0.05; }
.hero-inner { position: relative; z-index: 2; width: 100%; }
.hero h1 { font-size: clamp(32px, 8vw, 64px); line-height: 1.1; font-weight: 900; margin-bottom: 20px; }
.hero h1 span { background: linear-gradient(to right, var(--secondary), #FFF); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: clamp(16px, 3vw, 20px); opacity: 0.8; margin-bottom: 40px; max-width: 600px; }

/* Grid Services Mobile-First */
.grid-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; padding: 60px 0; }
.card { background: var(--white); padding: 40px; border-radius: 20px; box-shadow: var(--shadow); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border: 1px solid #F1F5F9; }
.card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0, 18, 118, 0.12); }
.card-icon { width: 64px; height: 64px; background: rgba(0, 18, 118, 0.05); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--primary); margin-bottom: 24px; }

/* Grid & Layout Utilities */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.grid-2-1 { display: grid; grid-template-columns: 2.2fr 1fr; gap: 40px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2.2fr; gap: 40px; }

/* Buttons & Links System */
.btn { 
    display: inline-flex; 
    align-items: center; 
    gap: 12px; 
    padding: 14px 28px; 
    border-radius: 12px; 
    font-weight: 600; 
    font-size: 15px; 
    text-decoration: none; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    cursor: pointer; 
    border: none; 
    font-family: inherit;
}

.btn-primary { 
    background: var(--primary); 
    color: var(--white); 
    box-shadow: 0 4px 15px rgba(0, 18, 118, 0.2); 
}
.btn-primary:hover { 
    background: var(--primary-dark); 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(0, 18, 118, 0.3); 
}

.btn-secondary { 
    background: var(--secondary); 
    color: var(--white); 
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2); 
}
.btn-secondary:hover { 
    background: #b8972f; 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3); 
}

.btn-outline { 
    background: transparent; 
    border: 2px solid var(--primary); 
    color: var(--primary); 
}
.btn-outline:hover { 
    background: var(--primary); 
    color: var(--white); 
    transform: translateY(-3px); 
}

.btn-white { 
    background: var(--white); 
    color: var(--primary); 
}
.btn-white:hover { 
    background: var(--light); 
    transform: translateY(-3px); 
}

.btn-sm { padding: 10px 20px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }

/* Links Interaction */
a.link-animate { 
    color: var(--primary); 
    text-decoration: none; 
    font-weight: 700; 
    position: relative; 
    display: inline-flex; 
    align-items: center; 
    gap: 5px; 
}
a.link-animate::after { 
    content: ''; 
    position: absolute; 
    width: 0; 
    height: 2px; 
    bottom: -2px; 
    left: 0; 
    background-color: var(--secondary); 
    transition: width 0.3s ease; 
}
a.link-animate:hover::after { width: 100%; }

/* Feedback & Alerts */
.alert { padding: 16px; border-radius: 12px; margin-bottom: 24px; font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 12px; }
.alert-success { background: #E6FFFA; color: #234E52; border: 1px solid #B2F5EA; }
.alert-error { background: #FFF5F5; color: #822727; border: 1px solid #FEB2B2; }

/* CSS Transitions Utility */
.transition-all { transition: all 0.3s ease; }

/* Grid & Layout Utilities - Mobile First */
.grid-4, .grid-3, .grid-2, .grid-2-1, .grid-1-2 { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 30px; 
}

@media (min-width: 768px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-2-1 { grid-template-columns: 2.2fr 1fr; gap: 40px; }
    .grid-1-2 { grid-template-columns: 1fr 2.2fr; gap: 40px; }
}

@media (max-width: 991px) {
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
}

@media (max-width: 375px) {
    .logo { font-size: 18px !important; }
    .mobile-toggle { font-size: 20px !important; }
}

@media (max-width: 768px) {
    section { padding: 60px 0 !important; }
    .hero { padding: 120px 0 60px !important; }
    .hero h1 { font-size: 32px !important; }
}

@media (max-width: 576px) {
    .container { padding: 0 20px; }
    .hero-btns { flex-direction: column; }
    .hero-btns .btn { width: 100%; }
}

/* Floating Contact Buttons */
.floating-contact { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    z-index: 1500; 
}
.f-btn { 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    font-size: 26px; 
    text-decoration: none; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.f-whatsapp { background: #25D366; }
.f-phone { background: var(--secondary); }
.f-btn:hover { transform: scale(1.1) translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.3); }

/* Samsung-Style Gallery */
.gallery-nav { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    margin: 40px 0; 
}
.filter-btn { 
    padding: 10px 25px; 
    border-radius: 50px; 
    border: 1px solid #ddd; 
    background: white; 
    cursor: pointer; 
    font-weight: 600; 
    transition: 0.3s; 
}
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.gallery-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 15px; 
    padding-bottom: 80px;
}
.gallery-item { 
    position: relative; 
    height: 350px; 
    border-radius: 15px; 
    overflow: hidden; 
    cursor: pointer; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}
.gallery-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: 0.6s cubic-bezier(0.4, 0, 0.2, 1); 
}
.gallery-item:hover img { transform: scale(1.08); }

.gallery-overlay { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    padding: 30px 20px 20px; 
    background: linear-gradient(transparent, rgba(0,0,0,0.8)); 
    color: white; 
    opacity: 0; 
    transition: 0.4s; 
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

.video-icon-play { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 70px; 
    height: 70px; 
    background: rgba(255,255,255,0.2); 
    color: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 30px; 
    backdrop-filter: blur(10px); 
    border: 2px solid white; 
}

/* Modal Lightbox */
.gallery-modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.95); 
    z-index: 3000; 
    display: none; 
    justify-content: center; 
    align-items: center; 
    padding: 40px; 
}
.modal-content { max-width: 90%; max-height: 85%; }
.modal-close { 
    position: absolute; 
    top: 30px; 
    right: 40px; 
    color: white; 
    font-size: 35px; 
    cursor: pointer; 
}

/* Premium Preloader ... (existing preloader styles) ... */

/* Premium Preloader - Liaison Hertzienne */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.loader-container { 
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.hertzian-scene {
    display: flex;
    align-items: center;
    gap: 80px;
    position: relative;
    padding: 20px;
}

.tower-icon {
    font-size: 50px;
    color: var(--secondary);
    animation: towerPulse 2s infinite;
}

.device-icon {
    font-size: 40px;
    color: white;
    animation: deviceFloat 3s infinite ease-in-out;
}

.signal-waves {
    display: flex;
    gap: 15px;
}

.wave {
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    opacity: 0.2;
    animation: waveFlow 1.5s infinite;
}

.wave:nth-child(2) { animation-delay: 0.3s; }
.wave:nth-child(3) { animation-delay: 0.6s; }

.loader-text {
    color: white;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
}

@keyframes towerPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(212, 175, 55, 0)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.5)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(212, 175, 55, 0)); }
}

@keyframes deviceFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes waveFlow {
    0% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.8); opacity: 1; box-shadow: 0 0 10px var(--secondary); }
    100% { transform: scale(1); opacity: 0.2; }
}

body.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}

/* Connection Status Pulse */
.conn-status { 
    width: 10px; 
    height: 10px; 
    border-radius: 50%; 
    display: inline-block; 
    position: relative;
    background: #CBD5E0;
    transition: 0.3s background;
}
.conn-status.online { background: #10B981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.conn-status.offline { background: #EF4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
.conn-status.online::after {
    content: '';
    position: absolute;
    width: 260%; height: 260%;
    top: -80%; left: -80%;
    border-radius: 50%;
    border: 1px solid #10B981;
    animation: connPulse 2s infinite ease-out;
}
@keyframes connPulse {
    0% { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}
