:root {
    --sy-black: #1b1b1b;
    --sy-orange: #E95C0D;
    --sy-white: #ffffff;
    --sy-line: #dddddd;
}

/* ==========================================================================
   PARTIE 1 : LA ROUE (NOUVELLE VERSION AVEC CENTRE)
   ========================================================================== */
.sybois-module-wrapper { font-family: 'Montserrat', sans-serif; margin: 60px auto; position: relative; max-width: 100%; }

@media (min-width: 769px) {
    .sybois-wheel { position: relative; width: 850px; height: 850px; margin: 0 auto; }
    .sybois-wheel::before { content: ''; position: absolute; top: 50px; left: 50px; right: 50px; bottom: 50px; border: 2px solid var(--sy-line); border-radius: 50%; z-index: 1; }
    
    /* Contenu central */
    .sybois-wheel-center {
        position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
        width: 460px; height: 460px; border-radius: 50%;
        background: var(--sy-white); border: 2px solid var(--sy-orange);
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        text-align: center; padding: 40px; box-sizing: border-box; z-index: 5;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    }
    .sybois-wheel-center h3 { color: var(--sy-orange); font-size: 20px; margin: 0 0 15px 0; display: flex; align-items: center; justify-content: center; gap: 10px; text-transform: uppercase; font-weight: 700; line-height: 1.2; }
    .sybois-wheel-center h3 i { color: var(--sy-black); font-size: 24px; }
    .sybois-wheel-center h3 img { width: 28px; height: 28px; object-fit: contain; }
    .sybois-wheel-center .sy-desc { font-size: 15px; font-weight: 600; color: var(--sy-black); margin-bottom: 15px; line-height: 1.4; }
    .sybois-wheel-center .sy-adv { font-size: 13px; line-height: 1.5; color: #444; text-align: left; width: 100%; }
    .sybois-wheel-center .sy-adv ul { margin-top: 5px; padding-left: 15px; }

    .sybois-item { position: absolute; top: 50%; left: 50%; width: 135px; height: 135px; margin-top: -60px; margin-left: -60px; z-index: 10; transform: rotate(var(--angle)) translate(375px) rotate(calc(-1 * var(--angle))); }
    .sybois-item-inner { width: 100%; height: 100%; background: var(--sy-black); color: var(--sy-white); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; transition: transform 0.3s ease, background 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.1); padding: 10px; box-sizing: border-box; }
    
    /* État actif qui maintient l'orange */
    .sybois-item-inner:hover, .sybois-item-inner.active { background: var(--sy-orange); transform: scale(1.15); }
    
    .sybois-item-inner i { font-size: 26px; margin-bottom: 8px; }
    .sybois-item-inner img.sybois-dynamic-img { width: 50px; height: 50px; object-fit: contain;margin-bottom:5px}
    .sybois-item-inner span { font-size: 10px; font-weight: 600; line-height: 1.2; }
    .sybois-item-content-mobile { display: none !important; }
}

@media (max-width: 768px) {
    .sybois-wheel { display: flex; flex-direction: column; gap: 15px; padding: 0 15px; }
    .sybois-wheel-center { display: none !important; } /* Caché sur mobile */
    .sybois-item { transform: none !important; position: relative; top: auto; left: auto; margin: 0; width: 100%; height: auto; }
    .sybois-item-inner { background: var(--sy-black); color: var(--sy-white); padding: 20px; border-radius: 8px; display: flex; align-items: center; gap: 20px; cursor: pointer; transition: background 0.3s ease; }
    .sybois-item-inner:hover, .sybois-item-inner.active { background: var(--sy-orange); }
    .sybois-item-inner i { font-size: 24px; }
    .sybois-item-inner img.sybois-dynamic-img { width: 28px; height: 28px; }
    .sybois-item-inner span { font-size: 14px; font-weight: bold; }
    
    /* Accordéon Mobile */
    .sybois-item-content-mobile { display: none; padding: 20px; background: #f9f9f9; border-left: 4px solid var(--sy-orange); border-radius: 0 0 8px 8px; margin-top: -5px; font-size: 14px; color: var(--sy-black); animation: fadeIn 0.3s ease; }
    .sybois-item-inner.active + .sybois-item-content-mobile { display: block; }
    .sy-desc-mobile { font-weight: bold; margin-bottom: 10px; }
    .sy-adv-mobile { font-size: 13px; color: #444; }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


   /* ==========================================================================
   PARTIE 2 : GALERIE PORTFOLIO (MISE À JOUR)
   ========================================================================== */
.sybois-portfolio-wrapper { font-family: 'Montserrat', sans-serif; display: flex; flex-wrap: nowrap; gap: 30px; margin: 0 0 40px 0; width: 100%; align-items: flex-start; }
.sybois-filters-sidebar { flex: 0 0 200px; display: flex; flex-direction: column; gap: 20px; }
.sybois-filter-btn { background: none; border: none; cursor: pointer; padding: 0; margin: 0; opacity: 0.6; transition: opacity 0.3s ease, transform 0.3s ease; text-align: center; }
.sybois-filter-btn.active, .sybois-filter-btn:hover { opacity: 1; transform: scale(1.05); }
.sybois-filter-btn span { font-size: 14px; font-weight: bold; color: #1b1b1b; text-transform: uppercase; }

.sybois-filter-icons { display: flex; flex-direction: column; gap: 20px; }
.sybois-filter-btn img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

.sybois-masonry-grid {
    flex: 1;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 8px;
    gap: 20px;
    width: 100%;
    align-items: start;
}

.sybois-grid-item { 
    display: block !important; 
    width: 100% !important; 
    margin: 0 !important; 
    break-inside: auto; 
    position: relative; 
    overflow: hidden; 
    border-radius: 4px; 
    transition: transform 0.3s ease;
}
.sybois-grid-item:hover { transform: translateY(-5px); }
.sybois-grid-item.hidden { display: none !important; }
.sybois-grid-item img { width: 100%; height: auto; display: block; object-fit: cover; }

/* Formats Portrait et Paysage uniquement */
.shape-vertical img { aspect-ratio: 3 / 4; }
.shape-horizontal img { aspect-ratio: 4 / 3; }

.sybois-portfolio-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(233, 92, 13, 0.85); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; padding: 20px; box-sizing: border-box; }
.sybois-grid-item:hover .sybois-portfolio-overlay { opacity: 1; }
.sybois-portfolio-overlay h3 { color: #ffffff; font-size: 18px; font-weight: bold; text-align: center; margin: 0; text-transform: uppercase; }

/* Responsive Grid masonry horizontal */
@media (max-width: 992px) {
    .sybois-masonry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Tablette portrait et mobile : les filtres passent en barre horizontale
   au-dessus de la grille. Sans ça, la sidebar de 200px reste à gauche et
   ne laisse qu'une bande étroite aux réalisations.
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .sybois-portfolio-wrapper {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 20px;
    }

    .sybois-filters-sidebar {
        flex: 1 1 auto;
        width: 100%;
        flex-direction: column;
        gap: 14px;
    }

    /* Bouton « Toutes nos réalisations » sur toute la largeur */
    .sybois-filter-all {
        width: 100%;
        padding: 12px 10px;
        border: 1px solid rgba(27, 27, 27, 0.15);
        border-radius: 4px;
        background: #ffffff;
    }
    .sybois-filter-all.active {
        border-color: var(--sy-orange);
        background: rgba(233, 92, 13, 0.06);
        transform: none;
    }
    .sybois-filter-all span { font-size: 13px; }

    /* Vignettes de catégories : rangée horizontale qui passe à la ligne */
    .sybois-filter-icons {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
    }
    .sybois-filter-icons .sybois-filter-btn {
        flex: 0 0 auto;
        width: 72px;
    }
    .sybois-filter-icons .sybois-filter-btn img { max-width: 72px; }
    .sybois-filter-icons .sybois-filter-btn span { font-size: 12px; }

    /* Deux colonnes maintenues jusqu'au plus petit écran */
    .sybois-masonry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    /* Sans survol possible au doigt, le titre resterait invisible :
       on l'affiche en bandeau bas permanent plutôt qu'en calque plein. */
    .sybois-portfolio-overlay {
        opacity: 1;
        top: auto;
        bottom: 0;
        height: auto;
        background: rgba(27, 27, 27, 0.72);
        padding: 8px 10px;
        align-items: flex-end;
    }
    .sybois-grid-item:hover { transform: none; }
    .sybois-portfolio-overlay h3 { font-size: 12px; line-height: 1.25; }
}

@media (max-width: 380px) {
    .sybois-filter-icons .sybois-filter-btn { width: 60px; }
    .sybois-filter-icons .sybois-filter-btn img { max-width: 60px; }
    .sybois-masonry-grid { gap: 10px; }
    .sybois-portfolio-overlay h3 { font-size: 11px; }
}

/* ==========================================================================
   PARTIE 3 : FORMULAIRE DE CONTACT
   ========================================================================== */
.sybois-contact-wrapper { font-family: 'Montserrat', sans-serif; max-width: 1200px; margin: 40px auto; }

/* 1. Messages de retour (Succès / Erreur) */
.sybois-success-msg { background: #d4edda; color: #155724; padding: 20px; border-radius: 5px; text-align: center; margin-bottom: 20px; font-weight: bold; border-left: 5px solid #28a745; }
.sybois-error-msg { background: #f8d7da; color: #721c24; padding: 15px; border-radius: 5px; margin-bottom: 20px; font-weight: bold; border-left: 5px solid #dc3545; }

/* 2. Grille d'introduction en 2 colonnes */
.sybois-contact-intro-grid { display: flex; gap: 60px; margin-bottom: 40px; align-items: stretch; }
.sybois-intro-col { flex: 1; display: flex; flex-direction: column; text-align: left; }
.sybois-intro-col h2 { color: var(--sy-black); font-size: 24px; font-weight: 800; margin: 0 0 15px 0; min-height: 60px; line-height: 1.3; }
.sybois-intro-col p { font-size: 15px; line-height: 1.6; color: #444; margin-bottom: 30px; flex-grow: 1; }

/* 3. Style des cartes (images cliquables) */
.sybois-type-card { cursor: pointer; opacity: 0.6; transition: all 0.3s ease; width: 100%; max-width: 380px; margin: 0 auto; }
.sybois-type-card:hover, .sybois-type-card.active { opacity: 1; transform: scale(1.02); }
.sybois-type-card img { width: 100%; height: auto; border-radius: 8px; border: 2px solid transparent; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: border-color 0.3s ease; display: block; }
.sybois-type-card.active img { border-color: var(--sy-orange); }

/* On masque les textes "PROFESSIONNEL / PARTICULIER" sous les images */
.sybois-type-card span { display: none; }

/* Bouton "Changer de profil" (Mobile) */
#sybois-change-profile button:hover { color: #1b1b1b !important; }

/* 4. Conteneur du formulaire (masqué par défaut) */
.sybois-contact-form { background: #f9f9f9; padding: 40px; border-radius: 8px; border-top: 4px solid var(--sy-orange); display: none; animation: fadeInDown 0.4s ease; }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* 5. Champs du formulaire */
.sybois-form-group { margin-bottom: 20px; }
.sybois-form-group label { display: block; margin-bottom: 8px; font-weight: bold; color: var(--sy-black); font-size: 14px; }
.sybois-form-group input[type="text"], .sybois-form-group input[type="email"], .sybois-form-group input[type="tel"], .sybois-form-group textarea { width: 100%; padding: 12px; border: 1px solid #dddddd; border-radius: 4px; font-family: 'Montserrat', sans-serif; font-size: 14px; box-sizing: border-box; transition: border-color 0.3s ease; }
.sybois-form-group input:focus, .sybois-form-group textarea:focus { outline: none; border-color: var(--sy-orange); }

/* Ligne avec 2 champs côte à côte (ex: Téléphone / Code Postal) */
.sybois-form-row { display: flex; gap: 20px; }
.sybois-form-row .sybois-form-group { flex: 1; }

/* Bloc « Je souhaite » (particuliers : projet ou dossier SAV) */
.sybois-request-block { margin: 0 0 28px; padding: 0 0 22px; border-bottom: 1px solid #e4e4e4; text-align: center; }
.sybois-request-title { margin: 0 0 14px; font-size: 15px; font-weight: bold; color: var(--sy-orange); text-transform: uppercase; letter-spacing: 0.02em; }
.sybois-request-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.sybois-request-option { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--sy-black); font-weight: normal; margin: 0; }
.sybois-request-option input { margin: 0; cursor: pointer; accent-color: var(--sy-orange); flex: 0 0 auto; }
.sybois-request-option:has(input:checked) span { font-weight: bold; color: var(--sy-orange); }

/* Checkbox RGPD */
.sybois-checkbox-group label { display: flex; align-items: flex-start; gap: 10px; font-weight: normal; cursor: pointer; font-size: 13px; line-height: 1.4; color: var(--sy-black); }
.sybois-checkbox-group input { margin-top: 3px; cursor: pointer; flex: 0 0 auto; }
/* Mention de consentement : un seul bloc de texte, la case reste alignée en haut. */
.sybois-checkbox-group .sybois-consent-text { flex: 1 1 auto; min-width: 0; }
.sybois-checkbox-group .sybois-consent-text a { color: var(--sy-orange); text-decoration: underline; }
.sybois-checkbox-group .sybois-consent-text a:hover { text-decoration: none; }
.sybois-checkbox-group .sybois-required { color: var(--sy-orange); font-weight: bold; }

/* Bouton Envoyer */
.sybois-contact-submit-btn { background: var(--sy-orange); color: var(--sy-white); border: none; padding: 15px 30px; font-size: 16px; font-weight: bold; border-radius: 4px; cursor: pointer; width: 100%; transition: background 0.3s ease; font-family: 'Montserrat', sans-serif; margin-top: 10px; text-transform: uppercase; }
.sybois-contact-submit-btn:hover { background: var(--sy-black); }


/* ==========================================================================
   RESPONSIVE MOBILE UNIQUEMENT POUR LE FORMULAIRE
   ========================================================================== */
@media (max-width: 768px) {
    /* La grille d'introduction passe sur une seule colonne */
    .sybois-contact-intro-grid { flex-direction: column; gap: 30px; }
    .sybois-intro-col { width: 100%; }
    .sybois-intro-col h2 { font-size: 20px; text-align: center; min-height: auto; }
    .sybois-intro-col p { text-align: center; font-size: 14px; margin-bottom: 20px; }
    
    /* Les champs côte à côte passent les uns sous les autres */
    .sybois-form-row { flex-direction: column; gap: 0; }
    
    /* On réduit un peu les marges du formulaire sur petit écran */
    .sybois-contact-form { padding: 25px; }

    /* Les deux choix « Je souhaite » l'un sous l'autre, alignés à gauche :
       plus facile à viser au doigt qu'une rangée serrée. */
    .sybois-request-options { flex-direction: column; align-items: flex-start; gap: 12px; }
    .sybois-request-title { text-align: left; }
    .sybois-request-block { text-align: left; }
}

/* ============================================================================
   FRISE CHRONOLOGIQUE SYBOIS - VERSION VERTICALE CORRIGÉE
   ========================================================================== */

.sybois-timeline-wrapper {
    --sy-timeline-muted: #dbe6ea;
    --sy-timeline-axis-top: 0px;
    --sy-timeline-axis-height: 100%;
    --sy-timeline-main-height: 100%;
    --sy-timeline-tail-height: 170px;
    --sy-timeline-dash-size: 10px;
    --sy-timeline-dash-gap: 12px;
    position: relative;
    width: 100%;
    max-width: 1220px;
    margin: 50px auto;
    padding: 30px 20px;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

/* Conteneur vertical */
.sybois-timeline-items {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 90px;
    z-index: 2;
}

/* Ligne verticale */
.sybois-timeline-axis {
    position: absolute;
    top: var(--sy-timeline-axis-top);
    left: 50%;
    width: 4px;
    height: var(--sy-timeline-axis-height);
    background:
        linear-gradient(var(--sy-timeline-muted), var(--sy-timeline-muted)) top center / 100% var(--sy-timeline-main-height) no-repeat,
        repeating-linear-gradient(
            to bottom,
            var(--sy-timeline-muted) 0 var(--sy-timeline-dash-size),
            transparent var(--sy-timeline-dash-size) calc(var(--sy-timeline-dash-size) + var(--sy-timeline-dash-gap))
        ) top var(--sy-timeline-main-height) center / 100% var(--sy-timeline-tail-height) no-repeat;
    border-radius: 999px;
    transform: translateX(-50%);
    overflow: hidden;
    z-index: 1;
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0,
        #000 calc(100% - (var(--sy-timeline-tail-height) * 0.55)),
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0,
        #000 calc(100% - (var(--sy-timeline-tail-height) * 0.55)),
        transparent 100%
    );
}

/* Progression orange */
.sybois-timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background:
        linear-gradient(var(--sy-orange), var(--sy-orange)) top center / 100% var(--sy-timeline-main-height) no-repeat,
        repeating-linear-gradient(
            to bottom,
            var(--sy-orange) 0 var(--sy-timeline-dash-size),
            transparent var(--sy-timeline-dash-size) calc(var(--sy-timeline-dash-size) + var(--sy-timeline-dash-gap))
        ) top var(--sy-timeline-main-height) center / 100% var(--sy-timeline-tail-height) no-repeat;
    border-radius: 999px;
    transition: height 0.12s linear;
}

/* Chaque ligne de la frise */
.sybois-timeline-item {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(260px, 1fr) 88px minmax(260px, 1fr) !important;
    grid-template-areas: "left dot right" !important;
    align-items: center !important;
    min-height: 170px;
}

/* Point parfaitement centré sur la ligne de sa carte */
.sybois-timeline-dot {
    grid-area: dot !important;
    justify-self: center !important;
    align-self: center !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;

    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--sy-timeline-muted);
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.04);
    z-index: 4;
    transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.sybois-timeline-item.is-passed .sybois-timeline-dot,
.sybois-timeline-item.is-active .sybois-timeline-dot {
    background: var(--sy-orange);
}

.sybois-timeline-item.is-active .sybois-timeline-dot {
    transform: scale(1.12) !important;
    box-shadow: 0 0 0 8px rgba(233,92,13,.12);
}

/* Cartes */
.sybois-timeline-content {
    width: 100%;
    max-width: 520px;
    min-height: 150px;
    background: #fff;
    border: 1px solid #dfe5e8;
    border-radius: 12px;
    box-sizing: border-box;
    padding: 34px 32px;
    box-shadow: 0 12px 34px rgba(0,0,0,.04);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

/* Alternance gauche / droite */
.sybois-timeline-item.left .sybois-timeline-content {
    grid-area: left !important;
    justify-self: end !important;
}

.sybois-timeline-item.right .sybois-timeline-content {
    grid-area: right !important;
    justify-self: start !important;
}

.sybois-timeline-item.is-active .sybois-timeline-content {
    border-color: rgba(233,92,13,.55);
    box-shadow: 0 18px 42px rgba(233,92,13,.10);
    transform: translateY(-2px);
}

/* Textes */
.sybois-timeline-content .sy-year {
    display: inline-block;
    color: var(--sy-orange);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    margin: 0 14px 0 0;
    vertical-align: baseline;
}

.sybois-timeline-content .sy-title {
    color: #071421;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.35;
    text-transform: none;
    margin: 0;
}

.sybois-timeline-content .sy-text {
    font-size: 14px;
    color: #18324a;
    line-height: 1.55;
    margin: 18px 0 0 0;
}

/* Flèches supprimées */
.sybois-timeline-arrow {
    display: none !important;
}

/* Tablette */
@media (max-width: 992px) {
    .sybois-timeline-wrapper {
        max-width: 860px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .sybois-timeline-item {
        grid-template-columns: minmax(210px, 1fr) 70px minmax(210px, 1fr) !important;
    }

    .sybois-timeline-content {
        padding: 28px 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sybois-timeline-wrapper {
        --sy-timeline-tail-height: 125px;
        margin: 35px auto;
        padding: 35px 16px;
        overflow: hidden;
    }

    /* Important : tu avais raison, 38px place la ligne sous les points */
    .sybois-timeline-axis {
        left: 38px !important;
        transform: translateX(-50%) !important;
    }

    .sybois-timeline-items {
        gap: 60px;
    }

    .sybois-timeline-item {
        display: grid !important;
        grid-template-columns: 44px minmax(0, 1fr) !important;
        grid-template-areas: "dot content" !important;
        align-items: center !important;
        min-height: auto !important;
        padding-left: 0 !important;
    }

    .sybois-timeline-dot {
        grid-area: dot !important;
        justify-self: center !important;
        align-self: center !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
    }

    .sybois-timeline-item.is-active .sybois-timeline-dot {
        transform: scale(1.08) !important;
    }

    .sybois-timeline-content {
        grid-area: content !important;
        justify-self: stretch !important;
        width: 100%;
        max-width: none;
        min-height: auto;
        padding: 22px 20px;
        border-radius: 9px;
    }

    .sybois-timeline-content .sy-year {
        font-size: 20px;
        margin-right: 10px;
    }

    .sybois-timeline-content .sy-title {
        font-size: 18px;
    }

    .sybois-timeline-content .sy-text {
        font-size: 13px;
        margin-top: 14px;
    }
}


/* ==========================================================================
   CARTE INTERACTIVE SYBOIS
   ========================================================================== */
.sybois-map-wrapper {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    font-family: 'Montserrat', sans-serif;
}

.sybois-map-bg {
    width: 100%;
    height: auto;
    display: block;
}

.sybois-map-pin {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -100%); 
    cursor: pointer;
    z-index: 10;
}

.sybois-map-pin-dot {
    width: 100%;
    height: 100%;
    background: var(--sy-orange);
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.sybois-map-pin:hover .sybois-map-pin-dot,
.sybois-map-pin.active .sybois-map-pin-dot {
    transform: scale(1.2);
}

.sybois-map-pin-icon {
    color: var(--sy-orange);
    font-size: 36px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
    transform-origin: bottom center;
}

@media (max-width: 768px) {
    .sybois-map-pin-icon {
    font-size: 26px !important;
    }
}


.sybois-map-pin:hover,
.sybois-map-pin.active {
    z-index: 50;
}

/* La Popup (Bulle info) */
.sybois-map-popup {
    position: absolute;
    bottom: 110%; 
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    
    /* On sécurise les largeurs pour laisser la place à l'image ET au texte */
    width: max-content;
    min-width: 300px;
    max-width: 480px; 
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 20;
    border: 1px solid var(--sy-orange);
    
    display: flex;
    align-items: center; /* Aligne l'image et le texte bien au centre verticalement */
    gap: 15px;
    text-align: left;
}

.sybois-map-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: var(--sy-orange) transparent transparent transparent;
}

.sybois-map-pin:hover .sybois-map-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* NOUVEAU : Style de la miniature */
.sy-popup-img {
    flex: 0 0 auto;
    width: 200px !important;
    height: 150px !important;
    overflow: hidden;
}

/* Image forcée au format 200x150px */
.sy-popup-img img {
    width: 200px !important;
    height: 150px !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important; /* Remplit le cadre sans déformer */
    display: block;
}

/* Structure texte */
.sy-popup-content {
    flex: 1;
}

.sy-popup-title {
    color: var(--sy-orange);
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    text-align: left;
}

.sy-popup-text {
    font-size: 13px;
    color: var(--sy-black);
    line-height: 1.4;
    text-align: left;
}

/* ==========================================================================
   RESPONSIVE MOBILE : CARTE INTERACTIVE (CENTRE DE L'ÉCRAN - PREMIUM)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Libération de la popup */
    .sybois-map-pin {
        transform: none !important;
        margin-left: -13px !important;
        margin-top: -26px !important;
    }

    /* 2. La popup en plein MILIEU avec un design "Carte Premium" */
    .sybois-map-popup {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) scale(0.9) !important;
        
        /* On réduit la largeur pour éviter le blanc vide autour de l'image */
        width: max-content !important;
        min-width: 220px !important; /* S'adapte mieux à l'image de 167px */
        max-width: 85vw !important;
        
        flex-direction: column !important;
        align-items: center !important; /* On centre TOUT horizontalement */
        z-index: 999999 !important;
        box-shadow: 0 10px 50px rgba(0,0,0,0.5) !important;
        
        padding: 20px !important; /* Padding parfaitement homogène (Haut/Bas/Gauche/Droite) */
        box-sizing: border-box !important;
        opacity: 0;
        visibility: hidden;
    }

    .sybois-map-popup::after {
        display: none !important;
    }

    .sybois-map-pin:hover .sybois-map-popup,
    .sybois-map-pin.active .sybois-map-popup {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translate(-50%, -50%) scale(1) !important;
    }

    /* 3. Image 167x125px avec espace réduit en dessous */
    .sy-popup-img {
        width: 167px !important;
        height: 125px !important;
        margin-bottom: 12px !important; /* Espace réduit entre l'image et le titre */
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        overflow: hidden;
    }

    .sy-popup-img img {
        width: 167px !important;
        height: 125px !important;
        max-width: none !important;
        max-height: none !important;
        object-fit: cover !important;
        border-radius: 4px;
        display: block;
    }

    /* 4. On centre les textes pour une symétrie parfaite avec l'image */
    .sy-popup-title {
        text-align: center !important;
        margin-bottom: 6px !important;
        width: 100% !important;
    }

    .sy-popup-text {
        text-align: center !important;
        width: 100% !important;
    }
}
