/* ==========================================================================
   CYBERCLAIR - MASTER STYLE (V6 ULTIMATE - SCROLL & CONTACT FIX)
   - Scroll Reveal : Les éléments apparaissent au défilement
   - Formulaire : Validation & Fallback intelligent
   - Design : Cyber-Glow, Birds, Glassmorphism
   ========================================================================== */

:root {
    --bg-darkest: #050c17;
    --bg-dark: #0a1628;
    --bg-card: #0f2038;
    --cyan: #5FC3D7;
    --cyan-glow: rgba(95, 195, 215, 0.6);
    --orange: #F8A055;
    --orange-glow: rgba(248, 160, 85, 0.6);
    --text-main: #ffffff;
    --text-muted: #b0c4de;
    --nav-height: 80px;
    --radius: 20px;
}

/* --- RESET & GLOBAL --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at 50% 0%, #1b3a5f 0%, var(--bg-dark) 60%, var(--bg-darkest) 100%);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-user-select: none; -moz-user-select: none; user-select: none;
}

input, textarea, select { -webkit-user-select: text; -moz-user-select: text; user-select: text; }
a { text-decoration: none; color: inherit; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
ul { list-style: none; }
strong { color: var(--orange); font-weight: 700; }

/* --- SCROLL REVEAL ANIMATION (Nouveau !) --- */
.reveal {
    opacity: 0;
    transform: translateY(50px); /* Décalage vers le bas */
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1); /* Transition douce */
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Délai en cascade pour les grilles */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- ANIMATION OISEAUX --- */
.bird-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.bird { position: absolute; opacity: 0; filter: drop-shadow(0 0 5px var(--cyan)); will-change: transform, opacity; }
@keyframes flyRight {
    0% { transform: translateX(-10vw) translateY(5vh) scale(0.5) rotate(5deg); opacity: 0; }
    10% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { transform: translateX(110vw) translateY(-5vh) scale(1) rotate(-5deg); opacity: 0; }
}

/* --- LAYOUT --- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 25px; position: relative; z-index: 5; }
.section { padding: 120px 0; position: relative; z-index: 5; }
.section-alt {
    background: linear-gradient(180deg, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0.01) 100%);
    border-top: 1px solid rgba(95, 195, 215, 0.1); border-bottom: 1px solid rgba(95, 195, 215, 0.1);
}
.section-header { text-align: center; max-width: 900px; margin: 0 auto 70px; }
.section-header h2 {
    font-size: 3rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1.5rem; color: #fff;
    text-shadow: 0 0 20px rgba(95, 195, 215, 0.3);
}
.section-header h2::after {
    content:''; display:block; width:80px; height:4px;
    background: linear-gradient(90deg, var(--cyan), transparent); margin: 20px auto 0; border-radius: 2px;
}
.section-header p { font-size: 1.2rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; }

/* --- NAVIGATION --- */
nav {
    position: fixed; top: 0; width: 100%; height: var(--nav-height);
    background: rgba(10, 22, 40, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(95, 195, 215, 0.15); z-index: 1000; display: flex; align-items: center; transition: 0.4s ease;
}
.nav-container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 25px; display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 1.6rem; font-weight: 800; color: var(--cyan); letter-spacing: 1px; text-shadow: 0 0 10px var(--cyan-glow); }
.logo img { height: 42px; filter: drop-shadow(0 0 8px var(--cyan-glow)); }

.nav-links { display: flex; gap: 5px; align-items: center; height: 100%; }
.nav-links > li { position: relative; height: 100%; display: flex; align-items: center; }
.nav-links > li > a {
    font-weight: 600; font-size: 1rem; color: #fff; position: relative; padding: 10px 20px; border-radius: 30px; transition: 0.4s;
}
.nav-links > li > a:hover, .nav-links > li > a.active { color: var(--bg-dark); background: var(--cyan); box-shadow: 0 0 20px var(--cyan-glow); }

/* --- DROPDOWNS --- */
.dropdown {
    position: absolute; top: 100%; left: 0;
    background: rgba(13, 25, 45, 0.95); backdrop-filter: blur(25px);
    min-width: 340px; padding: 25px; border-radius: 0 0 var(--radius) var(--radius);
    border: 1px solid rgba(95,195,215,0.2); border-top: 3px solid var(--cyan);
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 30px 60px rgba(0,0,0,0.7); display: flex; flex-direction: column; gap: 15px;
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a {
    display: block; padding: 15px 20px; border-radius: 12px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); transition: 0.3s;
}
.dropdown li a:hover {
    background: rgba(95,195,215,0.15); border-color: var(--cyan);
    transform: translateX(8px) scale(1.02); box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.dropdown li a span.title { display: block; font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.dropdown li a span.desc { display: block; font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }

.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 6px; z-index: 1001; }
.bar { width: 30px; height: 3px; background-color: var(--cyan); transition: 0.4s; border-radius: 3px; }
.nav-links.active + .hamburger .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-links.active + .hamburger .bar:nth-child(2) { opacity: 0; }
.nav-links.active + .hamburger .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* --- BOUTONS --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 38px; border-radius: 50px;
    font-weight: 700; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px;
    transition: all 0.4s ease; cursor: pointer; border: none; position: relative; overflow: hidden;
}
.btn-primary {
    background: linear-gradient(135deg, var(--cyan), #2A4C70); color: #fff;
    box-shadow: 0 10px 30px rgba(95, 195, 215, 0.3);
}
.btn-primary::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); transition: 0.6s;
}
.btn-primary:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 20px 40px rgba(95, 195, 215, 0.5), 0 0 20px var(--cyan-glow); }
.btn-primary:hover::before { left: 100%; }

.btn-secondary { background: transparent; border: 2px solid var(--orange); color: var(--orange); }
.btn-secondary:hover { background: var(--orange); color: var(--bg-dark); transform: translateY(-4px) scale(1.03); box-shadow: 0 20px 40px rgba(248, 160, 85, 0.4), 0 0 20px var(--orange-glow); }

/* --- HERO --- */
.hero { min-height: 100vh; padding-top: var(--nav-height); display: flex; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; }
.hero h1 {
    font-size: 4.5rem; font-weight: 900; margin-bottom: 30px; line-height: 1.1;
    background: linear-gradient(to right, #ffffff 20%, var(--cyan) 50%, var(--orange) 80%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    position: relative; z-index: 5; filter: drop-shadow(0 0 15px rgba(95,195,215,0.3));
}
.hero .lead { font-size: 1.5rem; max-width: 850px; margin: 0 auto 50px; font-weight: 400; color: #d0e0f0; position: relative; z-index: 5; }
.hero-buttons { position: relative; z-index: 5; display: flex; gap: 25px; justify-content: center; margin-top: 20px; }

/* --- GRIDS & CARDS --- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 50px; }

.card-base {
    background: linear-gradient(160deg, rgba(20, 40, 70, 0.9), rgba(10, 20, 40, 0.95));
    backdrop-filter: blur(10px); padding: 45px; border-radius: var(--radius);
    border: 1px solid rgba(95, 195, 215, 0.1); box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.card-base::after {
    content: ''; position: absolute; inset: 0; border-radius: var(--radius); padding: 2px;
    background: linear-gradient(135deg, var(--cyan), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.5; transition: opacity 0.5s; pointer-events: none;
}
.card-base.orange::after { background: linear-gradient(135deg, var(--orange), transparent 60%); }
.card-base h3 { font-size: 1.8rem; color: #fff; margin-bottom: 20px; position: relative; z-index: 2; }
.card-base p { color: var(--text-muted); font-size: 1.1rem; position: relative; z-index: 2; }

.card-hover { @extend .card-base; height: 100%; }
.card-hover:hover { transform: translateY(-15px) scale(1.03); box-shadow: 0 30px 70px rgba(0,0,0,0.6), 0 0 40px var(--cyan-glow); border-color: var(--cyan); }
.card-hover:hover::after { opacity: 1; }
.card-hover.orange:hover { box-shadow: 0 30px 70px rgba(0,0,0,0.6), 0 0 40px var(--orange-glow); border-color: var(--orange); }

.card-expand { @extend .card-base; min-height: 400px; justify-content: flex-start; }
.card-expand:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 40px 80px rgba(0,0,0,0.7), 0 0 30px var(--cyan-glow); border-color: var(--cyan); z-index: 10; }
.card-expand.orange:hover { box-shadow: 0 40px 80px rgba(0,0,0,0.7), 0 0 30px var(--orange-glow); border-color: var(--orange); }
.card-expand:hover::after { opacity: 1; }
.expand-content { max-height: 0; opacity: 0; overflow: hidden; transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1); transform: translateY(20px); position: relative; z-index: 2; }
.card-expand:hover .expand-content { max-height: 600px; opacity: 1; margin-top: 30px; transform: translateY(0); }

/* --- STATS DETAILED --- */
.stats-grid-detailed { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1280px; margin: 0 auto; }
.stat-card-detail {
    background: rgba(20, 40, 70, 0.8); padding: 40px 30px; border-radius: var(--radius);
    border: 1px solid rgba(95, 195, 215, 0.2); box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    display: flex; flex-direction: column; justify-content: center; min-height: 220px; text-align: center;
    transition: all 0.4s ease; position: relative; overflow: hidden;
}
.stat-card-detail::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(95,195,215,0.1) 0%, transparent 70%); opacity: 0; transition: 0.4s; transform: scale(0.8);
}
.stat-card-detail:hover { transform: translateY(-10px); border-color: var(--orange); box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 20px var(--orange-glow); }
.stat-card-detail:hover::before { opacity: 1; transform: scale(1); }
.stat-card-detail h3 { font-size: 3.5rem; font-weight: 900; margin-bottom: 15px; line-height: 1; background: linear-gradient(135deg, var(--cyan), var(--orange)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; position: relative; z-index: 2; }
.stat-card-detail p { font-size: 1.1rem; color: #d0d0d0; margin-bottom: 20px; flex-grow: 1; position: relative; z-index: 2; }
.stat-card-detail small { display: block; font-size: 0.85rem; color: #8899a6; font-style: italic; position: relative; z-index: 2; }

/* --- FORM BOX ANIMATED --- */
.form-box-animated {
    position: relative; background: rgba(13, 25, 45, 0.9); padding: 3px; border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6); overflow: hidden;
}
.form-box-animated::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: conic-gradient(transparent, var(--cyan), transparent 30%); animation: rotate 4s linear infinite; z-index: 0;
}
@keyframes rotate { 100% { transform: rotate(360deg); } }
.form-inner { position: relative; z-index: 1; background: #0b182d; padding: 50px; border-radius: calc(var(--radius) - 3px); height: 100%; }
.form-group { margin-bottom: 25px; position: relative; }
input, select, textarea {
    width: 100%; padding: 15px 20px; margin-bottom: 5px; background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(95, 195, 215, 0.2); border-radius: 10px; color: #fff; font-size: 1rem; transition: all 0.3s ease;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--cyan); box-shadow: 0 0 20px rgba(95, 195, 215, 0.3); background: rgba(255, 255, 255, 0.07); outline: none; transform: scale(1.01);
}
textarea { resize: vertical; min-height: 150px; }
label { display: block; margin-bottom: 8px; color: var(--cyan); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.5px; text-transform: uppercase; }

/* Status Messages */
.status-message {
    padding: 15px; border-radius: 10px; font-weight: 600; text-align: center; margin-top: 20px;
    display: none; animation: slideDown 0.4s ease;
}
.status-error { background: rgba(255, 87, 87, 0.15); border: 1px solid #ff5757; color: #ff8e8e; }
.status-success { background: rgba(95, 215, 140, 0.15); border: 1px solid #5fd78c; color: #8effba; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* --- FOOTER --- */
footer { background: #050c17; padding: 80px 0 40px; border-top: 1px solid #1a2f4a; color: #8899a6; font-size: 1rem; position: relative; z-index: 5; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 50px; }
.footer-col h4 { color: var(--cyan); margin-bottom: 25px; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a:hover { color: var(--orange); padding-left: 5px; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 3.5rem; }
}
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        position: fixed; top: var(--nav-height); right: -100%; width: 100%; height: calc(100vh - var(--nav-height));
        background: rgba(10, 22, 40, 0.98); backdrop-filter: blur(20px);
        flex-direction: column; justify-content: flex-start; padding: 30px 0;
        transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1); overflow-y: auto; border-top: 1px solid rgba(95,195,215,0.2); display: flex !important;
    }
    .nav-links.active { right: 0; }
    .nav-links > li { width: 100%; display: block; height: auto; }
    .nav-links > li > a { display: block; padding: 20px 30px; font-size: 1.3rem; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .nav-links > li > a:hover { background: rgba(95,195,215,0.1); box-shadow: none; color: var(--cyan); }
    .dropdown { position: static; opacity: 1; visibility: visible; transform: none; background: transparent; border: none; box-shadow: none; padding: 0 0 0 30px; min-width: auto; border-top: none; backdrop-filter: none; }
    .dropdown li a { padding: 15px 20px; background: transparent; border: none; border-left: 2px solid rgba(255,255,255,0.1); border-radius: 0; }
    .dropdown li a:hover { transform: none; background: transparent; border-left-color: var(--orange); box-shadow: none; }
    
    .grid-3, .grid-2, .footer-grid, .stats-grid-detailed { grid-template-columns: 1fr; gap: 30px; }
    .hero { padding: 150px 20px 80px; }
    .hero h1 { font-size: 2.5rem; }
    .hero-buttons { flex-direction: column; width: 100%; max-width: 400px; margin: 30px auto 0; }
    .btn { width: 100%; }
    .form-inner { padding: 30px; }
    .card-expand:active .expand-content { max-height: 800px; opacity: 1; margin-top: 30px; transform: translateY(0); }
}
