/* =========================================
   TYPOGRAPHIE LOCALE (PRIVACY-FIRST) - Ticket #04 Résolu
   ========================================= */

@font-face {
    font-family: 'Futura PT';
    src: url('../assets/fonts/FuturaPT-Book.woff2') format('woff2'),
         url('../assets/fonts/FuturaPT-Book.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: fallback; /* Optimisation Perf/CLS */
}

@font-face {
    font-family: 'Futura PT';
    src: url('../assets/fonts/FuturaPT-Medium.woff2') format('woff2'),
         url('../assets/fonts/FuturaPT-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: fallback;
}

@font-face {
    font-family: 'Futura PT';
    src: url('../assets/fonts/FuturaPT-Demi.woff2') format('woff2'),
         url('../assets/fonts/FuturaPT-Demi.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: fallback;
}

@font-face {
    font-family: 'Futura PT';
    src: url('../assets/fonts/FuturaPT-Bold.woff2') format('woff2'),
         url('../assets/fonts/FuturaPT-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: fallback;
}

@font-face {
    font-family: 'Futura PT';
    src: url('../assets/fonts/FuturaPT-Heavy.woff2') format('woff2'),
         url('../assets/fonts/FuturaPT-Heavy.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: fallback;
}

:root {
    --color-primary: #e63323;
    --color-accent: #ee751e;
    --color-teal: #19b2a0;
    --color-bg-light: #f4f5f7;
    /* Point QA #08 Résolu : Couleur de texte principale mise à jour */
    --color-text-main: #1D1D1D; 
    --color-text-muted: #666666;
    --color-border: #dddddd;
    
    /* Font Stack simplifiée et sécurisée */
    --font-main: 'Futura PT', 'Jost', sans-serif;
    
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --radius-round: 50px;
    --header-slant: 6vw;
}

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

body {
    font-family: var(--font-main);
    color: var(--color-text-main);
    background-color: #ffffff;
    line-height: 1.5;
    /* Optimisation du rendu des polices (Antialiasing) */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Defensive CSS : Sécurisation globale des images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   UI KIT : BOUTONS & BADGES
   ========================================= */
.btn {
    display: inline-block;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-round);
    padding: 12px 36px;
    cursor: pointer;
    /* Optimisation GPU : On cible les propriétés exactes au lieu de "all" */
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--primary:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 51, 35, 0.2);
}

.badge {
    display: inline-block;
    background-color: var(--color-accent) !important;
    background-image: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 4px;
    margin-bottom: var(--space-xs);
}

/* =========================================
   HEADER & HERO
   ========================================= */
.header {
    width: 100%;
}

.header__top-bar {
    background-color: transparent;
    padding: var(--space-md) 20px;
    display: flex;
    justify-content: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Point QA #01 Résolu : Logo agrandi visuellement pour matcher la maquette (Desktop) */
.header__logo {
    width: 340px; 
    height: auto;
}

/* Intégration du fond rouge SVG */
.header__banner {
    background-color: var(--color-primary);
    /* Mise à jour : Injection du SVG OK */
    background-image: url('../assets/img/CAPEB_LP_D_HEADER_DESKTOP_OK.svg'); 
    background-size: cover;
    background-position: center left; 
    background-repeat: no-repeat;
    width: 100%;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
    margin-top: calc(-1 * var(--header-slant));
    padding: calc(var(--space-lg) + var(--header-slant)) 20px var(--space-lg) 20px;
    clip-path: polygon(0 var(--header-slant), 100% 0, 100% 100%, 0 100%);
}

.header__banner-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end; /* Plaque la box CSS à droite */
    max-width: 1100px;
    width: 100%;
    gap: 40px;
}

.header__content-box {
    position: relative;
    background: linear-gradient(90deg, #f9c432 0%, #ee751e 74%, #e63323 100%);
    padding: 40px 60px;
    max-width: 620px;
    transform: rotate(-5deg); /* Rotation douce Desktop */
    box-shadow: -5px 10px 20px rgba(0,0,0,0.15);
    margin-bottom: 30px;
}

/* Annule tout héritage de déformation sur le texte */
.header__content-box > * {
    transform: none;
    display: block;
}

/* Typographie Header mise à jour */
.header__title {
    font-size: 2.8rem; 
    font-weight: 800; /* Futura PT Heavy */
    line-height: 1.2; 
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    color: #ffffff;
}

.header__title .text-red {
    color: var(--color-primary); 
}

/* Bouton du Header mis à jour */
.btn--header {
    display: inline-block;
    background-color: transparent;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    padding: 2px 0;
    border-radius: 0;
    text-decoration: none; 
    border-bottom: 4px solid #ffffff; 
    text-transform: uppercase;
    transition: transform 0.2s ease, opacity 0.2s ease; /* Optimisation GPU */
    margin-top: 10px;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
}

.btn--header:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

/* =========================================
   TOP FEATURES (Bandeau 6 cartes)
   ========================================= */
.top-features {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
    margin-bottom: var(--space-lg);
}

/* Point QA #07 Résolu : max-width passé à 100% */
.top-features__track {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    max-width: 100%; 
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    padding: 0 12px;
    position: relative;
}

.feature-card:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 5%;
    height: 90%;
    width: 1px;
    background-color: #e0e0e0;
}

.feature-card__icon-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin-bottom: 12px;
}

.feature-card__text {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: none;
    color: var(--color-text-main);
    line-height: 1.3;
}

.feature-card__text sup {
    font-size: 0.65em;
}

.slider-dots {
    display: none;
}

/* =========================================
   CONTENEUR PRINCIPAL & BLOCS
   ========================================= */
.main-content {
    max-width: 780px; 
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.block__title {
    color: var(--color-primary);
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    max-width: 700px;
    margin-bottom: 8px;
}

.block__subtitle {
    color: var(--color-text-main); 
    font-size: 1.15rem; 
    font-weight: 600; 
    margin-bottom: var(--space-md);
}

.block__header-left {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-bottom: var(--space-md);
}

.block__title--left {
    text-align: left;
    max-width: 100%;
    margin-top: var(--space-xs);
}

.block__subtitle--left {
    text-align: left;
    margin-bottom: var(--space-xs);
}

/* =========================================
   BLOC 1 : FORMULAIRE
   ========================================= */
.block--form {
    position: relative;
    align-items: flex-start;
    text-align: left;
}

.block--form__deco-shape {
    position: absolute;
    left: -120px;
    top: 10px;
    width: 90px;
    height: 180px;
    background-image: url('../assets/img/CAPEB_ICON_RVB_ILLUSTRATION_TITRE.svg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.form__required-note {
    font-size: 0.8rem;
    color: #a0a0a0;
    font-style: italic;
    margin-bottom: var(--space-md);
}

.form {
    width: 100%;
    position: relative;
    z-index: 1;
}

.form__row {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.form__group {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 8px; /* CORRECTIF : Assure un espace minimum sous chaque champ */
}

.form__group--small { flex: 0.25; }
.form__group--large-phone { flex: 0.75; }

.form__label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    margin-bottom: 8px; /* CORRECTIF : Aération sous le label pour décoller de l'input */
    line-height: 1.4;
    display: block;
}

.form__group--error .form__label,
.form__input:invalid:not(:placeholder-shown) + .form__label {
    color: var(--color-primary);
}

.form__group--error .form__input {
    border-color: var(--color-primary);
}

.form__input, .form__select {
    font-family: var(--font-main);
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.95rem;
    color: var(--color-text-main);
    background-color: #ffffff;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Optimisation de l'Accessibilité (A11y) sur le Focus */
.form__input:focus, .form__select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(230, 51, 35, 0.15); /* Halot rouge subtil */
}

.form__input:valid:not(:placeholder-shown) {
    background-image: url('../assets/img/CAPEB_ICON_RVB_CHECK_ON.svg');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

.form__select-wrapper {
    position: relative;
    width: 100%;
}

.form__select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
    cursor: pointer;
}

.form__select-wrapper::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-image: url('../assets/img/CAPEB_ICON_RVB_CHEVRON.svg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

.form__checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox__checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Focus State pour l'accessibilité au clavier sur les cases à cocher */
.custom-checkbox input:focus-visible ~ .custom-checkbox__checkmark {
    box-shadow: 0 0 0 3px rgba(230, 51, 35, 0.2);
    border-color: var(--color-primary);
}

.custom-checkbox input:checked ~ .custom-checkbox__checkmark {
    /* Accessibilité : Assombrissement pour respecter le contraste WCAG */
    background-color: var(--color-text-muted); 
    border-color: var(--color-text-muted);
}

.custom-checkbox input:checked ~ .custom-checkbox__checkmark::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form__action {
    text-align: center;
    margin-top: 20px;
}

/* =========================================
   BLOC 2 : CARTE & SEARCH WIDGET
   ========================================= */
.block--map {
    position: relative;
    align-items: flex-start;
    text-align: left;
}

.block--map__deco-shape {
    position: absolute;
    left: -120px;
    top: 10px;
    width: 90px;
    height: 180px;
    background-image: url('../assets/img/CAPEB_ICON_RVB_ILLUSTRATION_TITRE.svg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.map-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 110%;
    margin-left: -5%;
    margin-bottom: var(--space-md);
    position: relative;
}

.search-widget {
    background-color: var(--color-teal);
    border-radius: 50%;
    width: 290px;
    height: 290px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    padding: var(--space-sm);
    margin-right: -10px;
    position: relative;
    z-index: 2;
}

.search-widget__label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.search-widget__field {
    display: flex;
    align-items: stretch;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-widget__field input {
    font-family: var(--font-main);
    border: 1px solid var(--color-border);
    padding: 12px 14px; 
    width: 105px; 
    font-size: 0.95rem; 
    text-align: center;
    background-color: #ffffff;
    color: var(--color-text-main);
    outline: none;
    border-right: none;
}

.search-widget__btn {
    background-color: #32BBAB;
    color: #ffffff;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0 16px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-widget__btn:hover { background-color: #289a8c; }
.search-widget__btn:active { transform: scale(0.95); }

.map-container {
    width: 100%;
    max-width: 620px;
    position: relative;
    z-index: 1;
    padding-left: 20px;
}

.map-container svg path {
    fill: #b3b3b3;
    stroke: #ffffff;
    stroke-width: 1px;
    transition: fill 0.3s ease;
    cursor: pointer;
}
.map-container svg path:hover,
.map-container svg path.is-active {
    fill: var(--color-primary);
}

.agency-popup {
    background-color: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-radius: 4px;
    padding: 40px 30px;
    width: 100%;
    max-width: 580px; 
    margin: 0 auto 40px auto;
    position: relative;
    text-align: center;
}

.agency-popup__close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #a0a0a0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.agency-popup__close:hover { color: var(--color-primary); }

.agency-popup__logo {
    max-width: 230px; 
    height: auto;
    margin: 0 auto 20px auto;
    display: block;
}

.agency-popup__address {
    font-size: 0.95rem; 
    color: #8c8c8c;
    line-height: 1.4;
    margin-bottom: 12px; 
    text-transform: uppercase;
}

.agency-popup__contact-group {
    display: flex;
    flex-direction: column;
    gap: 8px; 
    margin-bottom: 20px;
}

.agency-popup__contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.05rem; 
    font-weight: 800;
}

.agency-popup__icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.agency-popup__text-red {
    color: var(--color-primary);
    text-decoration: none;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
}

.agency-popup__text-red:hover {
    opacity: 0.7;
}

.agency-popup__filet {
    width: 75%;
    height: auto;
    margin: 0 auto 16px auto;
    display: block;
}

.agency-popup__url {
    color: var(--color-text-main);
    text-decoration: none;
    font-size: 0.95rem; 
    font-weight: 800;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.agency-popup__url:hover {
    color: var(--color-primary);
}

/* =========================================
   BLOC 3 : RÉASSURANCE
   ========================================= */
.block--reassurance {
    position: relative;
    align-items: flex-start;
    text-align: left;
    margin-bottom: var(--space-lg);
}

.block--reassurance__deco-shape {
    position: absolute;
    left: -120px;
    top: 10px;
    width: 90px;
    height: 180px;
    background-image: url('../assets/img/CAPEB_ICON_RVB_ILLUSTRATION_TITRE.svg');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.advantages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-bottom: var(--space-lg);
    position: relative;
    z-index: 1;
}

.advantage-item {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-md);
    text-align: left;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.advantage-item__icon {
    width: 100px;
    height: 100px;
    margin-right: 30px;
    flex-shrink: 0;
    object-fit: contain;
}

.advantage-item__title {
    font-size: 1.35rem; 
    font-weight: 600; 
    margin-bottom: 8px;
    color: var(--color-text-main);
}

.advantage-item__title span {
    color: var(--color-primary); 
}

.advantage-item__text {
    font-size: 1.15rem; 
    font-weight: 400; 
    color: var(--color-text-main);
    line-height: 1.4;
}

.reassurance__action {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: var(--space-lg);
}

.footer__banner-red {
    background-color: var(--color-primary);
    color: #ffffff;
    clip-path: polygon(0 0, 100% 50%, 100% 100%, 0 100%);
    padding: 170px 20px 35px 20px;
}

.footer__banner-red-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.footer__logo {
    width: 200px;
    height: auto;
    flex-shrink: 0;
    display: block;
}

.footer__text-group {
    text-align: left;
}

.footer__title {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 4px;
    line-height: 1.1;
}

.footer__subtitle {
    font-size: 1.1rem;
    line-height: 1.4;
}

.footer__link-discrete {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    transition: opacity 0.2s ease;
}

.footer__link-discrete:hover {
    opacity: 0.8;
}

.footer__banner-gray {
    background-color: #e5e5e5;
    padding: 30px 20px;
    text-align: center;
}

.footer__social-title {
    font-size: 1.05rem;
    color: var(--color-text-main);
    margin-bottom: 20px;
}

.footer__social-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-icon {
    display: inline-block;
    width: 45px;
    height: 45px;
    transition: transform 0.2s ease;
    background: transparent;
}

.social-icon:hover {
    transform: scale(1.1);
}

.footer__banner-white {
    background-color: #ffffff;
    padding: 25px 20px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

.footer__banner-white a {
    color: var(--color-text-main);
    text-decoration: underline;
    font-weight: 600;
}

/* =========================================
   ANIMATIONS & UTILITAIRES (PAGE MERCI)
   ========================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#section-merci {
    animation: fadeIn 0.4s ease-out forwards;
}

/* =========================================
   AJUSTEMENTS RESPONSIVE (Mobile / Tablette)
   ========================================= */

@media (max-width: 992px) {
    .header__banner {
        /* Mise à jour : Injection du SVG OK */
        background-image: url('../assets/img/CAPEB_LP_D_HEADER_TABLE_OK.svg');
        min-height: 500px;
    }
    .header__content-box {
        max-width: 480px;
        padding: 30px 40px;
    }
    .header__title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    /* 1. TABLETTE : On garde le macaron à gauche et la box à droite */
    .header__banner-inner {
        flex-direction: row; 
        text-align: left;
        justify-content: flex-end; 
    }

    .header__logo {
        width: 250px;
        height: auto;
    }

    .header__content-box {
        max-width: 380px; /* Box réduite pour la tablette */
        padding: 25px 30px;
        transform: rotate(-5deg); /* Garde la rotation */
        box-shadow: -5px 10px 20px rgba(0,0,0,0.15); /* Garde l'ombre */
    }

    .header__title {
        font-size: 1.8rem;
    }

    .btn--header {
        font-size: 1.1rem;
    }

    /* 2. LE RESTE DU SITE EN MOBILE */
    .main-content { gap: 40px; }
    .block__title { font-size: 1.4rem; }
    .block__subtitle { font-size: 0.95rem; }

    .form__action .btn,
    .reassurance__action .btn {
        width: 100%;
        padding: 14px 20px;
    }

    .top-features__track {
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: var(--space-sm);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .top-features__track::-webkit-scrollbar { display: none; }
    
    .feature-card {
        flex: 0 0 100%;
        scroll-snap-align: center;
        padding: 0 16px;
    }
    .feature-card:not(:last-child)::after { display: none; }
    .feature-card__icon-img {
        width: 70px;
        height: 70px;
        margin-bottom: 12px;
    }

    .slider-dots {
        display: flex;
        justify-content: center;
        align-self: center;
        width: 100%;
        gap: 8px;
        margin-top: 16px;
        margin-bottom: 12px;
    }
    .slider-dots .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 1px solid #ee751e;
        background-color: transparent;
        transition: background-color 0.3s ease, border-color 0.3s ease;
    }
    .slider-dots .dot.is-active { background-color: #ee751e; }

    .advantages-list {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: var(--space-sm);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        margin-bottom: var(--space-sm);
    }
    .advantages-list::-webkit-scrollbar { display: none; }

    .advantage-item {
        flex: 0 0 85%;
        scroll-snap-align: center;
        flex-direction: column;
        text-align: center;
        justify-content: flex-start;
        height: auto;
    }
    .advantage-item__icon {
        margin-right: 0;
        margin-bottom: 12px;
        width: 95px; 
        height: 95px;
    }
    .advantage-item__title { font-size: 1.15rem; }
    .advantage-item__text { font-size: 1rem; }
    .reassurance__action { width: 100%; text-align: center; margin-top: var(--space-md); }

    .block--form__deco-shape,
    .block--map__deco-shape,
    .block--reassurance__deco-shape { display: none; }

    /* CORRECTIF MOBILE : Espacement des champs du formulaire */
    .form__row { 
        flex-direction: column; 
        gap: 16px; /* Ajout d'un gap pour espacer les champs superposés */
        margin-bottom: 16px; /* Espacement entre les rangées */
    }
    .form__group--small,
    .form__group--large-phone { flex: 1; }
    
    .map-layout { 
        position: relative;
        display: block;
        width: 100vw;
        margin-left: calc(-50vw + 50%); 
        height: 380px; 
        overflow: hidden; 
        padding: 0;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    .search-widget { 
        position: absolute;
        top: 50%;
        left: -40px; 
        transform: translateY(-50%);
        border-radius: 50%; 
        width: 320px; 
        height: 320px; 
        padding: var(--space-md); 
        margin: 0;
        z-index: 2; 
        box-shadow: none;
    }
    .map-container {
        display: block !important; 
        position: absolute;
        top: 50%;
        right: -80px; 
        transform: translateY(-50%);
        width: 400px; 
        z-index: 1; 
        pointer-events: none; 
        padding: 0;
    }

    .footer__banner-red {
        clip-path: polygon(0 0, 100% 5%, 100% 100%, 0 100%);
        padding-top: 45px;
    }
    .footer__banner-red-inner { flex-direction: column; text-align: center; gap: 20px; }
    .footer__text-group { text-align: center; }
}

@media (max-width: 576px) {
    .header__logo {
        width: 210px;
        height: auto;
    }

    .header__banner {
        /* Mise à jour : Injection du SVG OK */
        background-image: url('../assets/img/CAPEB_LP_D_HEADER_MOBILE_OK.svg');
        background-position: top center; 
        min-height: 600px;
        /* Sur mobile, on retire les padding latéraux/bas pour toucher les bords de l'écran */
        padding: calc(var(--space-lg) + var(--header-slant)) 0 0 0;
        align-items: flex-end; /* La box accroche se colle en bas de la zone */
    }

    .header__banner-inner {
        flex-direction: column; 
        justify-content: flex-end;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .header__content-box {
        margin-top: 0;
        margin-bottom: 0;
        /* Padding important en haut (30px + 8vw) pour compenser la découpe oblique */
        padding: calc(30px + 8vw) 25px 40px 25px;
        max-width: 100%;
        width: 100%;
        /* Sur mobile, ce n'est plus une boîte tournante mais un bandeau rectangulaire */
        transform: none; 
        box-shadow: none; 
        /* Création du biseau supérieur droit via un mask sans tourner le texte */
        clip-path: polygon(0 8vw, 100% 0, 100% 100%, 0 100%);
    }

    .header__title {
        font-size: 1.8rem;
    }

    .text-highlight,
    .text-red {
        font-size: 1.8rem;
    }

    .btn--header {
        font-size: 1.1rem;
        padding: 5px 0;
        border-bottom: 2px solid #ffffff;
    }
}

/* ==========================================
   INTERACTIVITÉ CARTE SVG REGIS (OPTION B)
   ========================================== */
.map-container svg {
    width: 100%;
    height: auto;
    max-height: 550px;
}

.map-container svg path[data-numerodepartement] {
    fill: #b3b3b3 !important;
    stroke: #ffffff !important;
    stroke-width: 1px;
    transition: fill 0.3s ease;
}

.map-container svg path[data-numerodepartement]:hover {
    fill: var(--color-primary) !important;
}

.map-container svg path[data-numerodepartement].is-active {
    fill: var(--color-primary) !important;
}