/* =========================================
   1. VARIABLES & THÈMES (Le Cerveau du Design)
   ========================================= */
:root {
    /* Couleurs Fixes */
    --white: #ffffff;
    --gold: #D4AF37;
    --gold-glow: rgba(212, 175, 55, 0.4);
    --dark-text: #2C3E50;
    
    /* VALEURS PAR DÉFAUT (Mode Sérénité - Chaud) */
    --bg-color: #FAF9F6;  /* Sable très clair */
    --text-main: #4a5568;
    --title-color: #2d3748;
    --accent-color: #D4AF37; /* Or */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --hero-overlay: linear-gradient(135deg, rgba(250, 249, 246, 0.9), rgba(250, 249, 246, 0.7));
}

/* OVERRIDE : Mode Performance (Tech - Froid) */
body.mode-performance {
    --bg-color: #F0F4F8; /* Bleu Glace très pâle */
    --text-main: #334155;
    --title-color: #0f172a; /* Bleu Nuit Profond */
    --accent-color: #0EA5E9; /* Cyan Tech */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --hero-overlay: linear-gradient(135deg, rgba(240, 249, 255, 0.95), rgba(224, 242, 254, 0.8));
}

/* =========================================
   2. RESET & BASES
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif; /* Corps de texte lisible */
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.3s ease; /* Transition douce lors du switch */
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif; /* Titres élégants */
    color: var(--title-color);
    font-weight: 700;
}

a { text-decoration: none; }

/* =========================================
   3. NAVIGATION & LOGO
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px); /* Effet flou derrière le menu */
    position: fixed; /* Menu reste en haut */
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.03);
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    color: var(--title-color);
    text-transform: uppercase;
}
.dot { color: var(--accent-color); font-size: 1.8rem; line-height: 0; }

.btn-nav {
    border: 1px solid var(--title-color);
    color: var(--title-color);
    padding: 10px 25px;
    border-radius: 50px; /* Bouton arrondi "Pill" */
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}
.btn-nav:hover { background: var(--title-color); color: var(--white); }

/* =========================================
   4. LE SWITCH "CAPSULE" (Complexe & Beau)
   ========================================= */
.switch-container {
    display: flex;
    justify-content: center;
}

.switch-capsule {
    background: #e2e8f0;
    padding: 4px;
    border-radius: 50px;
    display: flex;
    position: relative;
    width: 280px; /* Largeur fixe pour la stabilité */
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05); /* Ombre intérieure pour la profondeur */
}

/* On cache les ronds moches des inputs */
.switch-capsule input { display: none; }

.switch-label {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    z-index: 2; /* Au-dessus du slider */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #64748b;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Style de l'icône dans le switch */
.switch-label i { font-size: 1rem; }

/* Le fond blanc qui glisse (Le Slider) */
.switch-slider {
    position: absolute;
    top: 4px; left: 4px; bottom: 4px;
    width: 50%; /* Prend la moitié de la capsule */
    background: var(--white);
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1); /* Mouvement élastique */
    z-index: 1;
}

/* LOGIQUE DU GLISSEMENT */
/* Si "Performance" est coché, on déplace le slider vers la droite */
#mode-performance:checked ~ .switch-slider {
    transform: translateX(96%); /* Ajustement fin pour ne pas dépasser */
}

/* Changement de couleur du texte actif */
input:checked + label { color: var(--title-color); }

/* =========================================
   5. HERO SECTION & PARALLAX
   ========================================= */
.hero {
    position: relative;
    height: 100vh; /* Prend tout l'écran */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 0;
    
    /* Image de fond fixe */
    background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070&auto=format&fit=crop');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* Le filtre de couleur par-dessus l'image */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--hero-overlay);
    z-index: 0;
    transition: background 0.5s ease;
}

.hero-content { position: relative; z-index: 1; max-width: 800px; padding-top: 60px; }

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.highlight { color: var(--accent-color); transition: color 0.3s; }

.cta-button {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    margin-top: 30px;
    display: inline-block;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); /* Ombre portée douce */
    transition: all 0.3s ease;
}
.cta-button:hover {
    transform: translateY(-4px); /* Le bouton monte légèrement */
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* =========================================
   6. CARTES (Glassmorphism)
   ========================================= */
.features { padding: 80px 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.card {
    padding: 40px;
    border-radius: 20px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* L'effet Verre */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px); /* Le flou magique */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* Carte spéciale avec bordure accentuée */
.accent-border { border-top: 4px solid var(--accent-color); }

.icon-box { font-size: 2rem; margin-bottom: 20px; color: var(--text-main); transition: color 0.3s; }
.icon-box.gold { color: var(--gold); }

/* =========================================
   7. CALCULATEUR (Style Tech)
   ========================================= */
.calculator-section { padding: 100px 0; background: var(--white); }

.calculator-wrapper {
    background: var(--title-color);
    color: var(--white);
    padding: 50px;
    border-radius: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Colonnes : Intro | Résultats */
    gap: 60px;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.calc-intro h2 { color: var(--white); margin-bottom: 10px; }
.calc-intro p { opacity: 0.8; margin-bottom: 30px; }

/* Custom Range Slider */
.slider-input {
    width: 100%; height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}
.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px; height: 24px;
    background: var(--accent-color);
    border: 3px solid var(--title-color);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}
.slider-input::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Résultats */
.result-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.highlight-box { border-bottom: none; margin-top: 10px; }

.gold-text {
    font-size: 2rem; font-weight: 700; color: var(--accent-color);
}
.boost-tag {
    background: rgba(255,255,255,0.1); padding: 5px 10px; border-radius: 4px; font-size: 0.75rem; color: #81e6d9;
}

/* =========================================
   8. FOOTER & FORMULAIRE
   ========================================= */
footer {
    background: var(--bg-color);
    padding-top: 80px;
    position: relative;
}

.footer-content {
    display: flex; flex-direction: column; align-items: center; gap: 40px; margin-bottom: 60px;
}

.contact-form {
    width: 100%; max-width: 500px;
    display: flex; flex-direction: column; gap: 15px;
}

.contact-form input {
    padding: 16px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background: var(--white);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}
.contact-form input:focus { border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1); }

.submit-btn {
    padding: 16px;
    background: var(--title-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}
.submit-btn:hover { opacity: 0.9; transform: translateY(-2px); }

.bottom-bar {
    text-align: center; padding: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.8rem; color: #94a3b8;
}

/* RESPONSIVE (Mobile) */
@media (max-width: 768px) {
    .navbar { padding: 15px 20px; }
    .btn-nav { display: none; } /* On cache le bouton contact sur mobile */
    .hero h1 { font-size: 2.2rem; }
    .calculator-wrapper { grid-template-columns: 1fr; padding: 30px; gap: 30px; }
    .switch-capsule { width: 240px; }
}