@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    /* Nouvelle Palette basée sur le logo */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    
    /* Couleurs du Logo */
    --logo-dark-blue: #0B4262;  /* Pour les gros titres et le footer */
    --logo-bright-blue: #0078B9; /* Pour les liens, icônes et sous-titres */
    --primary-green: #37A134;    /* Pour les boutons (Accent) */
    --green-hover: #2b8028;      /* Vert foncé pour le survol */
    
    /* Variables globales */
    --transition: all 0.3s ease;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* =========================================
   RESET & BASE
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Application du bleu foncé du logo à tous les titres */
h1, h2, h3, h4 {
    color: var(--logo-dark-blue);
}

/* =========================================
   HEADER & NAVIGATION
========================================= */
header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 115 px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--logo-dark-blue);
    letter-spacing: -0.5px;
}

.logo img {
    height: 90px; /* Logo agrandi dans le header */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.nav-links a:hover {
    color: var(--logo-bright-blue);
}

/* =========================================
   BOUTONS
========================================= */
.btn {
    display: inline-block;
    padding: 14px 28px;
    background-color: var(--primary-green);
    color: var(--bg-white);
    border-radius: var(--radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--green-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-nav {
    padding: 10px 24px;
}
.btn-nav:hover {
    color: var(--bg-white) !important;
}

/* =========================================
   NOUVELLE PAGE D'ACCUEIL (AVEC FOND DE COULEUR)
========================================= */
.hero-home {
    background-color: #f1f5f9; 
    text-align: center;
    padding: 30px 0 60px 0; /* Plus rapproché du header */
    border-bottom: 1px solid #e2e8f0;
}

.hero-logo-big {
    max-width: 500px; /* Grand logo central */
    width: 95%;
    height: auto;
    margin: 0 auto 15px auto; /* Rapproché du titre */
    display: block;
}

.hero-home h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--logo-dark-blue);
}

.hero-home p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 40px;
}

/* =========================================
   SECTION HERO (Autres pages)
========================================= */
.hero {
    position: relative;
    background-color: var(--logo-dark-blue);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--bg-white);
    min-height: 500px;
    display: flex;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 66, 98, 0.7); /* Bleu foncé en transparence */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    padding-top: 60px;
    padding-bottom: 60px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--bg-white);
}

.hero p {
    font-size: 1.25rem;
    color: #e2e8f0;
    max-width: 800px;
    margin: 0 auto 40px;
}

.hero-services { background-image: url('images/bg-services.jpg'); }
.hero-charte { background-image: url('images/bg-charte.jpg'); }
.hero-jobs { background-image: url('images/bg-jobs.jpg'); }
.hero-contact { background-image: url('images/bg-contact.jpg'); }

/* =========================================
   GRILLES & CARTES
========================================= */
.section-padding {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* Nouvelle grille 2x2 pour les services */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 50px; 
    max-width: 1000px; 
    margin: 0 auto; 
}

.card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #f1f5f9;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: #e2e8f0;
}

.card h3 {
    font-size: 1.25rem;
    color: var(--logo-bright-blue);
    margin-bottom: 16px;
}

/* =========================================
   CARTES DE SERVICES CLIQUABLES
========================================= */
.service-card {
    cursor: pointer;
    position: relative;
}

.service-card img {
    height: 260px !important; /* Images allongées */
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    font-weight: 600;
    color: var(--logo-bright-blue);
    font-size: 0.9rem;
}

/* =========================================
   FENÊTRES VOLANTES (MODALS)
========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 66, 98, 0.8);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideDown 0.3s ease-out;
}

.modal-content h2 {
    color: var(--logo-bright-blue);
    margin-bottom: 20px;
}

.modal-content p {
    margin-bottom: 15px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: #ef4444;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* =========================================
   SLIDER AVANT / APRÈS
========================================= */
.ba-slider {
    position: relative;
    width: 100%;
    height: 250px;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 25px 0;
    box-shadow: var(--shadow);
    background-color: #e2e8f0;
}

.ba-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none; 
}

.img-overlay {
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

/* La barre de contrôle invisible */
.slider-input {
    position: absolute;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 100%;
    background: transparent !important; /* On force la transparence absolue */
    outline: none;
    margin: 0;
    top: 0;
    left: 0;
    cursor: ew-resize;
    z-index: 10; /* S'assure qu'il reste bien au-dessus */
}

/* Retire les bordures et fonds automatiques quand on clique (Chrome/Edge/Safari) */
.slider-input::-webkit-slider-runnable-track {
    background: transparent;
    border: none;
}

/* Retire les bordures et fonds automatiques quand on clique (Firefox) */
.slider-input::-moz-range-track {
    background: transparent;
    border: none;
}

/* Empêche le contour bleu de sélection */
.slider-input:focus {
    outline: none;
}

/* Le trait blanc (le "pouce" du slider) sur Chrome/Safari */
.slider-input::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 4px;
    height: 250px; 
    background: var(--bg-white);
    cursor: ew-resize;
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
}

/* Le trait blanc sur Firefox */
.slider-input::-moz-range-thumb {
    width: 4px;
    height: 250px;
    background: var(--bg-white);
    cursor: ew-resize;
    border: none;
    box-shadow: 0 0 8px rgba(0,0,0,0.4);
}
/* =========================================
   FORMULAIRES & LISTES
========================================= */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-light);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--logo-bright-blue);
    box-shadow: 0 0 0 3px rgba(0, 120, 185, 0.1);
    background-color: var(--bg-white);
}

.charte-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.charte-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-green);
    font-weight: bold;
    font-size: 1.2rem;
}

/* =========================================
   FOOTER
========================================= */
footer {
    background-color: var(--logo-dark-blue);
    color: var(--bg-light);
    padding: 80px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--bg-white);
    font-size: 1.2rem;
    margin-bottom: 24px;
}

/* Correction des paragraphes et liens pour aligner téléphone et email */
.footer-col p {
    color: #cbd5e1;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-col > a {
    color: #cbd5e1;
    margin-bottom: 12px;
    display: block;
    font-size: 0.95rem;
}

.footer-col p a {
    display: inline; /* Garde le numéro avec l'émoji */
    color: inherit;
    margin-bottom: 0;
}

.footer-col a:hover {
    color: var(--primary-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
    font-size: 0.85rem;
}

/* =========================================
   ANIMATIONS
========================================= */
.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   MENU BURGER & RESPONSIVE
========================================= */
.burger-menu {
    display: none;
    cursor: pointer;
    z-index: 101;
}

.burger-menu div {
    width: 25px;
    height: 3px;
    background-color: var(--logo-dark-blue);
    margin: 5px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .burger-menu {
        display: block;
    }
    
    .nav-links { 
        position: fixed;
        right: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: right 0.4s ease;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .nav-links a {
        font-size: 1.1rem;
        display: block;
        padding: 10px;
    }
    
    .nav-links.nav-active {
        right: 0;
    }
    
    .burger-menu.toggle .bar1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .burger-menu.toggle .bar2 { opacity: 0; }
    .burger-menu.toggle .bar3 { transform: rotate(45deg) translate(-5px, -6px); }
    
    .hero { min-height: 400px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }
    .hero-home h1 { font-size: 2.2rem; }
    .section-padding { padding: 60px 0; }
    .logo span { font-size: 1.1rem; }
    
    /* Repasse à 1 colonne sur mobile */
    .grid-2 {
        grid-template-columns: 1fr; 
    }
}