/* ==========================================================================
   1. RÉINITIALISATION, VARIABLES & POLICES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue-main: #0a2540;       /* Bleu marine profond */
    --blue-light: #1e3d59;      /* Nuance intermédiaire */
    --blue-bright: #3498db;     /* Bleu vif */
    --blue-dark: #051424;       /* Bleu très sombre */
    --text-white: #ffffff;      /* Blanc pur */
    --text-light: #e0e6ed;      /* Blanc lumineux adouci */
    --glow-color: rgba(52, 152, 219, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--blue-main);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center { text-align: center; }
a { text-decoration: none; color: inherit; }

/* ANIMATION D'APPARITION AU DÉFILEMENT (Scroll Reveal) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   2. HEADER & NAVIGATION (Menu Flottant Flouté)
   ========================================================================== */
.main-header {
    background-color: rgba(10, 37, 64, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    position: relative;
}

.logo h1 {
    font-size: 24px;
    color: var(--text-white);
    letter-spacing: 1px;
    position: relative;
}

.logo span {
    color: var(--blue-bright);
    text-shadow: 0 0 15px var(--glow-color);
}

.menu-checkbox { display: none; }

.main-nav ul { display: flex; list-style: none; }
.main-nav ul li { margin-left: 25px; }
.main-nav ul li a {
    font-weight: 600;
    color: var(--text-light);
    position: relative;
    padding: 8px 0;
    transition: color 0.3s;
}

/* Effet de ligne soulignée animée moderne */
.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--blue-bright);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.main-nav ul li a:hover::after, .main-nav ul li a.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.main-nav ul li a:hover, .main-nav ul li a.active { color: var(--text-white); }

/* Hamburger */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 110;
}

.hamburger-line {
    height: 2px;
    background-color: var(--text-white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.hamburger-line:nth-child(1) { width: 100%; }
.hamburger-line:nth-child(2) { width: 75%; }
.hamburger-line:nth-child(3) { width: 50%; }
.hamburger-btn:hover .hamburger-line { width: 100%; }

/* ==========================================================================
   3. SECTION HERO (Design Immersif avec vagues et particules de fond)
   ========================================================================== */
.hero-section {
    background: radial-gradient(circle at 30% 30%, rgba(52, 152, 219, 0.25) 0%, transparent 50%),
                linear-gradient(rgba(10, 37, 64, 0.6), rgba(10, 37, 64, 0.9)), 
                url('https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1920&q=80'); /* Image de circuit électronique de haute qualité */
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    height: 75vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-white);
    position: relative;
}

/* Ajout d'un filigrane subtil évoquant Dunkerque ou les lignes maritimes */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(30deg, rgba(52, 152, 219, 0.05) 25%, transparent 25%),
                linear-gradient(150deg, rgba(52, 152, 219, 0.05) 25%, transparent 25%);
    background-size: 60px 60px;
    opacity: 0.3;
    pointer-events: none;
}

/* Bouton à effet de brillance (Shine) */
.btn-primary {
    background: linear-gradient(135deg, var(--blue-bright) 0%, #2980b9 100%);
    color: var(--text-white);
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.4);
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 30%;
    height: 200%;
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(25deg);
    transition: none;
}

.btn-primary:hover::after {
    left: 140%;
    transition: left 0.8s ease-in-out;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.6);
}

/* ==========================================================================
   4. SECTIONS & GRILLES
   ========================================================================== */
.services-section, .tarifs-section {
    padding: 100px 0;
    position: relative;
}

/* Halo lumineux d'arrière-plan pour un effet de profondeur moderne */
.services-section::before {
    content: '';
    position: absolute;
    top: 20%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.08) 0%, transparent 70%);
    z-index: -1;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--text-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

/* ==========================================================================
   5. EFFETS SOUFFLANTS : Les Cartes 3D Glassmorphism
   ========================================================================== */
.modern-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 45px 35px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), 
                border-color 0.3s ease, 
                box-shadow 0.3s ease;
    transform-style: preserve-3d; /* Nécessaire pour l'effet d'inclinaison 3D */
}

.modern-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(52, 152, 219, 0.4);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(52, 152, 219, 0.1);
}

.card-icon {
    font-size: 32px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(52, 152, 219, 0.05) 100%);
    width: 65px; height: 65px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px;
    color: var(--blue-bright);
    transition: transform 0.3s ease;
}

.modern-card:hover .card-icon {
    transform: translateZ(20px); /* L'icône ressort en 3D au survol */
}

.modern-card h3 {
    margin-bottom: 15px;
    color: var(--text-white);
    font-size: 23px;
}

.modern-card p {
    color: #a0aec0;
    font-size: 15px;
    line-height: 1.7;
}

/* Tarifs Vedettes */
.price-card.featured {
    border-color: rgba(52, 152, 219, 0.6);
    background: rgba(30, 61, 89, 0.35);
    position: relative;
}

.price-card.featured::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, var(--blue-bright), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.price-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.price-badge {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.08);
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 12px;
}

.price-badge.popular {
    background: var(--blue-bright);
    color: var(--text-white);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.price-header .price {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-white);
}

.price-features { list-style: none; }
.price-features li {
    margin-bottom: 12px;
    padding-left: 26px;
    position: relative;
    font-size: 15px;
    color: #cbd5e0;
}
.price-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--blue-bright);
    font-weight: bold;
}

/* ==========================================================================
   6. PAGE CONTACT & SELECTION INTERACTIVE D'AGENDA
   ========================================================================== */
.contact-page-section { padding: 80px 0 120px 0; }
.modern-contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 50px; }

.info-inline-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 28px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}
.info-inline-card:hover {
    border-color: rgba(52, 152, 219, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.modern-form-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 50px;
    border-radius: 24px;
}

.form-modern-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.input-animated-group { position: relative; margin-bottom: 32px; }

.input-animated-group input, 
.input-animated-group textarea, 
.input-animated-group select {
    width: 100%;
    padding: 18px;
    background: rgba(5, 20, 36, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--text-white);
    font-size: 15px;
    transition: all 0.3s ease;
}

.input-animated-group label {
    position: absolute; left: 18px; top: 18px;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Flottement de label ultra-fluide */
.input-animated-group input:focus ~ label, 
.input-animated-group input:not(:placeholder-shown) ~ label,
.input-animated-group textarea:focus ~ label, 
.input-animated-group textarea:not(:placeholder-shown) ~ label,
.input-animated-group select:focus ~ .select-label, 
.input-animated-group select:valid ~ .select-label {
    top: -12px; left: 14px; font-size: 12px;
    color: var(--blue-bright);
    background-color: #0a2540;
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.input-animated-group input:focus, 
.input-animated-group textarea:focus, 
.input-animated-group select:focus {
    border-color: var(--blue-bright);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
    background: rgba(5, 20, 36, 0.7);
}

.input-animated-group input[type="date"] { color-scheme: dark; }
.input-animated-group label.fixed-label {
    top: -12px !important; left: 14px !important; font-size: 12px !important;
    color: var(--blue-bright) !important; background-color: #0a2540 !important;
    padding: 2px 10px !important; border-radius: 6px !important; font-weight: 600 !important;
}

#heure_rdv:disabled { opacity: 0.3; }

.btn-modern-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--blue-bright) 0%, #2980b9 100%);
    color: var(--text-white);
    padding: 18px 30px;
    border: none; border-radius: 12px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
    transition: all 0.3s;
}

.btn-modern-submit:hover {
    box-shadow: 0 12px 28px rgba(52, 152, 219, 0.5);
    transform: translateY(-2px);
}
.arrow-icon { transition: transform 0.3s ease; }
.btn-modern-submit:hover .arrow-icon { transform: translateX(5px); }

/* Alerts */
.alert { padding: 18px; border-radius: 12px; margin-bottom: 30px; }

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--blue-dark);
    color: rgba(255, 255, 255, 0.4);
    text-align: center; padding: 35px 0; font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   8. RESPONSIVE (Mobiles & Tablettes)
   ========================================================================== */
@media (max-width: 992px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .modern-contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hamburger-btn { display: flex; }
    .main-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: rgba(10, 37, 64, 0.98);
        backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        max-height: 0; overflow: hidden;
        transition: max-height 0.4s ease-in-out;
    }
    .main-nav ul { flex-direction: column; padding: 20px 0; }
    .main-nav ul li { margin: 15px 0; text-align: center; }
    .menu-checkbox:checked ~ .main-nav { max-height: 330px; }

    .menu-checkbox:checked ~ .hamburger-btn .hamburger-line:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-checkbox:checked ~ .hamburger-btn .hamburger-line:nth-child(2) { opacity: 0; }
    .menu-checkbox:checked ~ .hamburger-btn .hamburger-line:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .hero-content h2 { font-size: 32px; }
    .services-grid { grid-template-columns: 1fr; }
    .form-modern-row { grid-template-columns: 1fr; gap: 0; }
    .modern-form-card { padding: 30px 20px; }
}