/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --c-white: #FFFFFF;
    --c-black: #000000;
    --c-orange: #ff6210;
    --c-grey: #2B2E37;
    --c-grey-light: #f4f5f7;
    --f-title: 'Staatliches', sans-serif;
    --f-text: 'Montserrat', sans-serif;
    --transition-fast: all 0.2s ease;
    --transition-medium: all 0.4s ease;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
    font-family: var(--f-text);
    color: var(--c-grey);
    background-color: var(--c-white);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 1rem;
}

h1, h2, h3, h4 { font-family: var(--f-title); font-weight: normal; letter-spacing: 1px; }

/* ==========================================================================
   2. STRUCTURE & BOUTONS
   ========================================================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--c-grey-light); }

.btn-cta {
    display: inline-block; background-color: var(--c-orange); color: var(--c-white);
    padding: 15px 35px; font-family: var(--f-title); font-size: 1.5rem; text-decoration: none;
    border-radius: 4px; transition: var(--transition-fast); box-shadow: 0 4px 15px rgba(255, 98, 16, 0.3);
}
.btn-cta:hover { background-color: #e55500; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255, 98, 16, 0.4); }

.btn-outline {
    display: inline-block; border: 2px solid var(--c-orange); color: var(--c-orange);
    text-decoration: none; padding: 8px 20px; font-weight: 600; border-radius: 4px;
    transition: var(--transition-fast); text-transform: uppercase; font-size: 0.9rem; margin-top: 15px;
}
.btn-outline:hover { background-color: var(--c-orange); color: var(--c-white); }

h2.with-accent {
    text-align: center; font-size: 2.8rem; color: var(--c-grey); margin: 0 auto 60px auto;
    position: relative; text-transform: uppercase; width: 100%; display: block;
}
h2.with-accent::after {
    content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%);
    width: 60px; height: 4px; background-color: var(--c-orange);
}

/* ==========================================================================
   3. HEADER & MENU
   ========================================================================== */
.top-banner { background-color: var(--c-orange); color: var(--c-white); text-align: center; padding: 10px 15px; font-weight: 700; font-size: 0.9rem;}

.main-header { position: sticky; top: 0; width: 100%; z-index: 1000; transition: var(--transition-medium); }
.main-header:not(.scrolled) { background-color: rgba(255, 255, 255, 0.95); padding: 15px 0; }
.main-header.scrolled { background-color: var(--c-white); padding: 8px 0; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo img { max-height: 50px; transition: var(--transition-medium); }
.main-header.scrolled .logo img { max-height: 40px; }

.main-nav ul { list-style: none; display: flex; gap: 30px; }
.main-nav a { text-decoration: none; color: var(--c-grey); font-weight: 600; text-transform: uppercase; transition: var(--transition-fast); position: relative; }
.main-nav a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--c-orange); transition: width 0.3s ease; }
.main-nav a:hover { color: var(--c-orange); }
.main-nav a:hover::after { width: 100%; }

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero { height: 85vh; min-height: 500px; position: relative; overflow: hidden; }
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 110%;
    /* MISE À JOUR ICI : Nouveau nom optimisé .webp */
    background-image: url('../img/expert-informatique-tarn-microphil.webp'); 
    background-size: cover; background-position: center; background-attachment: fixed; z-index: 1;
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(43, 46, 55, 0.75); z-index: 2; }
.hero .container { height: 100%; display: flex; justify-content: center; align-items: center; position: relative; z-index: 3; }
.hero-content { text-align: center; max-width: 800px; }
.hero-content h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 30px; color: var(--c-white); text-shadow: 2px 4px 10px rgba(0,0,0,0.4); }

/* ==========================================================================
   5. SERVICES
   ========================================================================== */
.services-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; }
.service-card {
    flex: 1 1 300px; max-width: 350px; background: var(--c-white); border-radius: 8px;
    overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.service-card img { width: 100%; height: 220px; object-fit: cover; }
.service-content { padding: 25px; text-align: center; }
.service-content h3 { font-size: 1.8rem; margin-bottom: 15px; color: var(--c-grey); }

/* ==========================================================================
   6. ATELIER (Design Épuré 1 Photo)
   ========================================================================== */
.atelier-grid {
    display: flex;
    align-items: center;
    gap: 50px;
    background-color: var(--c-white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    border-top: 5px solid var(--c-orange);
}

.atelier-texte {
    flex: 1; /* Prend la moitié de l'espace */
}

.atelier-texte h3 {
    font-size: 1.8rem;
    color: var(--c-grey);
    margin-bottom: 30px;
    font-weight: 700;
}

/* Le style des informations de contact */
.atelier-details { list-style: none; margin-bottom: 30px; }
.atelier-details li { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 25px; }
.atelier-details .icon {
    font-size: 1.5rem; background: var(--c-grey-light); width: 50px; height: 50px; min-width: 50px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.atelier-details .icon svg { width: 24px; height: 24px; }
.atelier-details strong { display: block; color: var(--c-grey); font-size: 1.1rem; margin-bottom: 5px; }
.atelier-details p { color: #555; font-size: 0.95rem; line-height: 1.5; }

/* L'image sur le côté droit */
.atelier-image-unique {
    flex: 1; /* Prend l'autre moitié de l'espace */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    height: 450px; /* Fixe une belle hauteur */
}

.atelier-image-unique img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadre l'image pour qu'elle remplisse parfaitement la zone */
    display: block;
    transition: transform 0.5s ease;
}

.atelier-image-unique:hover img {
    transform: scale(1.05); /* Petit effet de zoom stylé au survol de la souris */
}

/* Adaptation pour les téléphones portables */
@media (max-width: 992px) {
    .atelier-grid { 
        flex-direction: column-reverse; /* Met l'image au-dessus du texte sur mobile */
        padding: 30px 20px; 
        gap: 30px; 
    }
    .atelier-image-unique { 
        width: 100%; 
        height: 300px; 
    }
}
/* ==========================================================================
   7. PROMESSES (Alignement Parfait)
   ========================================================================== */
.promesses-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; counter-reset: promesse-counter; align-items: stretch; }
.promesse-card {
    background-color: var(--c-white); padding: 40px 30px; border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06); position: relative; overflow: hidden;
    z-index: 1; transition: var(--transition-medium); border: 1px solid rgba(0,0,0,0.03);
    text-align: left; display: flex; flex-direction: column; justify-content: flex-start;
}
.promesse-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(255, 98, 16, 0.15); }

.promesse-card::before {
    content: "0" counter(promesse-counter); counter-increment: promesse-counter;
    position: absolute; top: 15px; right: 20px; font-size: 10rem; font-family: var(--f-title);
    color: rgba(255, 98, 16, 0.15); z-index: 0; transition: var(--transition-medium); line-height: 0.75;
}
.promesse-card:hover::before { color: rgba(255, 98, 16, 0.3); transform: scale(1.05); }

.promesse-card h3, .promesse-card p { position: relative; z-index: 2; }
.promesse-card h3 {
    font-size: 1.9rem; font-weight: 700; line-height: 1.1; margin-bottom: 20px; color: var(--c-orange);
    text-transform: uppercase; text-align: left; min-height: 4.5rem; display: flex; align-items: flex-start;
}
.promesse-card p { line-height: 1.4; color: var(--c-grey); flex-grow: 1; }

/* ==========================================================================
   8. AVIS & GOOGLE
   ========================================================================== */
.badge-google-centered {
    background-color: var(--c-orange); color: var(--c-white); padding: 40px; border-radius: 12px;
    text-align: center; box-shadow: 0 10px 25px rgba(255, 98, 16, 0.3); max-width: 500px; margin: 0 auto 60px auto;
}
.badge-google-centered .google-logo-img { max-width: 130px; height: auto; margin: 0 auto 15px auto; display: block; }
.badge-google-centered .stars { font-size: 1.5rem; margin-bottom: 5px; letter-spacing: 2px; }
.badge-google-centered .note { font-size: 5rem; font-family: var(--f-title); line-height: 1; margin-bottom: 15px; }
.badge-google-centered p { font-size: 1.05rem; line-height: 1.5; }

/* ==========================================================================
   9. CONTACT & FOOTER
   ========================================================================== */
.contact-section { background-color: var(--c-white); }
.contact-grid { display: flex; gap: 40px; align-items: stretch; }
.contact-info-card {
    flex: 1; background-color: var(--c-grey-light); padding: 40px; border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-left: 5px solid var(--c-orange);
}
.contact-info-card h3 { font-size: 1.8rem; color: var(--c-grey); margin-bottom: 15px; }
.contact-info-card p { margin-bottom: 30px; color: #555; }
.contact-list { list-style: none; }
.contact-list li { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 25px; font-size: 1.05rem; }
.contact-list .icon {
    background-color: var(--c-white); width: 45px; height: 45px; display: flex; justify-content: center;
    align-items: center; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.phone-link { color: var(--c-orange); font-weight: bold; font-size: 1.3rem; text-decoration: none; }
.contact-list a { color: var(--c-grey); text-decoration: none; transition: var(--transition-fast); }
.contact-list a:hover { color: var(--c-orange); }
.contact-map { flex: 1; min-height: 400px; }

.bandeau-anciennete { background-color: var(--c-orange); color: var(--c-white); text-align: center; padding: 20px; font-family: var(--f-title); font-size: 2rem; letter-spacing: 2px; }
.main-footer { background-color: var(--c-grey); color: #d1d5db; padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-logo { max-width: 180px; margin-bottom: 20px; } /* Sans fond blanc */
.footer-col h4 { color: var(--c-white); font-size: 1.5rem; margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 2px; background-color: var(--c-orange); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: inherit; text-decoration: none; transition: var(--transition-fast); }
.footer-col a:hover { color: var(--c-orange); }
.footer-bottom { background-color: #1f2128; text-align: center; padding: 20px; font-size: 0.9rem; }
.footer-bottom a { color: var(--c-orange); font-weight: bold; }

/* ==========================================================================
   10. BARRE DE PROGRESSION
   ========================================================================== */
.scroll-progress-bar {
    position: fixed; top: 0; left: 0; height: 4px; background: var(--c-orange);
    z-index: 9999; width: 0%; transition: width 0.1s ease-out;
}
/* ==========================================================================
   10. DESIGN DES PAGES SERVICES (Template)
   ========================================================================== */

/* 1. En-tête de la page (Hero) */
.page-hero {
    height: 45vh;
    min-height: 350px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.page-hero .hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(43, 46, 55, 0.8); /* Un fond un peu plus sombre pour bien lire */
    z-index: 2;
}

.page-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--c-white);
}

.page-hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.page-hero-content p {
    font-size: 1.2rem;
    font-weight: 600;
}

/* 2. Introduction (Image + Texte) */
.intro-grid {
    display: flex;
    align-items: center;
    gap: 50px;
}

.intro-text { flex: 1; }
.intro-text h2.text-left::after { left: 0; transform: none; } /* Aligne le trait orange à gauche */
.intro-text p { margin-bottom: 20px; font-size: 1.05rem; }

.intro-image { flex: 1; }
.intro-image img { 
    width: 100%; 
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    object-fit: cover;
}

/* 3. Processus (Les 4 étapes) */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.process-step {
    background: var(--c-white);
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-bottom: 4px solid var(--c-orange);
    transition: transform 0.3s ease;
}

.process-step:hover { transform: translateY(-10px); }

.step-number {
    width: 60px; height: 60px;
    background-color: var(--c-orange);
    color: var(--c-white);
    font-size: 1.8rem; font-family: var(--f-title);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    box-shadow: 0 5px 15px rgba(255, 98, 16, 0.3);
}

.process-step h4 { font-size: 1.3rem; margin-bottom: 10px; color: var(--c-grey); font-weight: 700; }
.process-step p { font-size: 0.95rem; color: #666; }

/* 4. Appel à l'action final (CTA) */
.service-cta {
    background-color: var(--c-grey);
    color: var(--c-white);
}

.service-cta h2 { color: var(--c-white); font-family: var(--f-title); font-size: 2.5rem; margin-bottom: 15px; }
.service-cta p { margin-bottom: 30px; font-size: 1.1rem; }

/* ==========================================================================
   11. RESPONSIVE (Tablettes & Mobiles)
   ========================================================================== */

/* --- TABLETTES (Moins de 992px) --- */
@media (max-width: 992px) {
    /* Atelier */
    .atelier-grid { 
        flex-direction: column-reverse; 
        padding: 30px 20px; 
        gap: 30px; 
    }
    .atelier-image-unique { 
        width: 100%; 
        height: 350px; 
    }
    
    /* Pages Services (Template) */
    .intro-grid { 
        flex-direction: column; 
    }
    
    /* Contact */
    .contact-grid { 
        flex-direction: column; 
    }
    .contact-map {
        min-height: 300px;
    }
}

/* --- LE BOUTON BURGER (Caché sur PC) --- */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001; /* Toujours au-dessus */
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--c-orange);
    border-radius: 3px;
    transition: var(--transition-medium);
}

/* --- MOBILES (Moins de 768px) --- */
@media (max-width: 768px) {
    /* Espacements généraux réduits */
    .section-padding { padding: 50px 0; }
    h2.with-accent { font-size: 2.2rem; margin-bottom: 40px; }
    
    /* Typographie Hero */
    .hero-content h1 { font-size: 2.2rem; }
    .page-hero-content h1 { font-size: 2.2rem; }
    
    /* Promesses & Services */
    .promesse-card { padding: 30px 20px; }
    .promesse-card::before { font-size: 7rem; right: 10px; top: 10px; }

    /* Avis Google */
    .badge-google-centered { padding: 25px 15px; }
    .badge-google-centered .note { font-size: 4rem; }

    /* =======================================
       CORRECTION BACKGROUND IMAGE
       ======================================= */
    .hero-bg, .page-hero-bg {
        background-attachment: scroll; /* Annule le "fixed" qui bug sur mobile */
        height: 100%;
    }
    
    /* =======================================
       MENU BURGER (RÉPARÉ ET À DROITE)
       ======================================= */
    .main-nav {
        width: 0; /* Empêche la zone de menu invisible de repousser le bouton */
    }

    .hamburger {
        display: flex;
        margin-left: auto; /* Magie : pousse le bouton tout à droite ! */
    }

    .main-nav ul {
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background-color: var(--c-white);
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        
        /* Animation de fermeture par défaut */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: var(--transition-medium);
    }

    /* Quand le menu est ouvert (la classe sera ajoutée via JS) */
    .main-nav ul.active {
        max-height: 300px; 
        opacity: 1;
        padding: 20px 0;
        border-top: 2px solid var(--c-orange); /* Petit trait esthétique */
    }

    .main-nav ul li {
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }

    .main-nav ul a {
        display: block;
        padding: 10px;
        font-size: 1.2rem;
    }

    /* Animation du bouton burger quand il est ouvert (transforme en X) */
    .hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}