/* ==========================================================================
   1. VARIABLES & BASE
   ========================================================================== */
:root {
    --primary: #2c3e50;    /* Bleu Stan */
    --accent: #e67e22;     /* Orange Stan */
    --accent-hover: #d35400;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --shadow: 0 10px 25px rgba(44, 62, 80, 0.08);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text-main);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img { max-width: 100%; height: auto; }
a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary);
}

nav {
    display: flex;
    gap: 18px;
    align-items: center;
}

/* Boutons Espace client / Espace pro */
.header-espaces {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}
.btn-espace-client, .btn-espace-pro {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
    white-space: nowrap;
}
.btn-espace-client {
    background: #1e293b;
    color: white;
}
.btn-espace-pro {
    background: #e67e22;
    color: white;
}

nav a {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.88rem;
}

nav a:hover {
    color: var(--accent);
}

/* --- Menu Déroulant (Dropdown) --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 220px;
    box-shadow: var(--shadow);
    z-index: 1000;
    border-radius: 8px;
    padding: 10px 0;
    top: 100%;
    border: 1px solid #f1f5f9;
}

.dropdown-content a {
    color: var(--primary) !important;
    padding: 12px 20px;
    display: block;
    font-weight: 500;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    color: var(--accent) !important;
    padding-left: 20px; /* Pas de décalage */
    border-left: 3px solid var(--accent);
}

/* Affiche le menu au survol sur PC */
.dropdown:hover .dropdown-content {
    display: block;
}

.btn-nav-contact {
    background: var(--primary);
    color: white !important;
    padding: 10px 22px;
    border-radius: 50px;
}

.btn-nav-contact:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* ==========================================================================
   3. HERO SECTIONS
   ========================================================================== */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.hero h1 span { color: var(--accent); }

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 16px 32px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    display: inline-block;
    cursor: pointer;
    border: none;
}

.btn-pro { background: var(--primary); color: white; }
.btn-pro:hover { background: #1a252f; transform: translateY(-3px); }

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

/* ==========================================================================
   4. SERVICES & GRILLES
   ========================================================================== */
.services-grid-section { padding: 80px 0; background: var(--white); }
.intro-text { text-align: center; margin-bottom: 60px; }
.intro-text h2 { font-size: 2.2rem; color: var(--primary); margin-bottom: 15px; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
    transition: 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.feature-card .icon { font-size: 2.5rem; margin-bottom: 20px; display: block; }

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
footer { background: var(--primary); color: white; padding: 60px 0 30px; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 40px; }
.footer-section h4 { margin-bottom: 20px; color: var(--accent); }
.social-links a { color: white; font-size: 1.5rem; margin-right: 20px; }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; color: #cbd5e1; }

/* ==========================================================================
   6. RESPONSIVE (MOBILE & TABLETTE)
   ========================================================================== */
@media (max-width: 768px) {
    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    /* Cacher le texte des boutons espace sur mobile, garder icône */
    .btn-label {
        display: none;
    }

    .menu-toggle {
        display: block !important;
    }

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        gap: 0;
        z-index: 9999;
    }

    nav.active {
        display: flex !important; 
    }

    nav a, .dropdown {
        width: 100%;
        text-align: center;
    }

    nav a {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
        display: block;
        width: 100%;
    }

    /* Boutons Espace sur mobile */
    .header-espaces {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 10px 20px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 9998;
    }
    .btn-espace-client, .btn-espace-pro {
        width: 100%;
        justify-content: center;
        padding: 12px !important;
        border-radius: 10px;
        font-size: 0.95rem;
        box-sizing: border-box;
    }

    /* Ajustement Dropdown sur Mobile */
    .dropdown-content {
        position: static;
        display: block; /* Toujours visible dans le menu mobile */
        box-shadow: none;
        border: none;
        background: #f8fafc;
        padding: 0;
    }

    .dropdown-content a {
        padding: 12px 0;
        font-size: 0.9rem;
        background: transparent;
    }

    .btn-nav-contact {
        border-radius: var(--radius);
        margin-top: 10px;
    }

    .hero h1 { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; gap: 15px; align-items: center; }
    .btn { width: 100%; max-width: 300px; }

    /* Boutons espace client/pro sur mobile */
    nav a[href*="espace-client"],
    nav a[href*="pro/login"] {
        width: 100%;
        text-align: center;
        justify-content: center;
        margin-top: 6px;
        border-radius: 10px !important;
        padding: 12px !important;
        font-size: 0.95rem !important;
    }
}