/**
 * CSS pour le bloc Carte d'intervention Levrard - AVEC LIENS AGENCES
 */

/* Variables couleurs (au cas où ce fichier est chargé indépendamment) */
:root {
    --levrard-red: #E73331;
    --levrard-dark-red: #E73331;
    --levrard-white: #ffffff;
    --levrard-gray: #f5f5f5;
    --levrard-dark-gray: #333333;
    --levrard-text: #363636;
}

/**
 * Structure principale
 */
 .levrard-carte-section {
    background-repeat: no-repeat;
    background-position: bottom center;
    background-color: white;
    border-radius: 50px;
    z-index: 1;
    position: relative;
     padding-bottom:140px;
}

.levrard-carte-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/**
 * En-tête du bloc
 */
.levrard-carte-header {
    text-align: center;
    margin-bottom: 100px;
    margin-top: 6%
}

.levrard-carte-main-title {
    font-weight: 400;
    color: var(--levrard-text);
    margin-bottom: 15px;
    line-height: 1.2;
}
.levrard-carte-main-title p strong{
    color: var(--levrard-red);
    font-family:var(--font-alternate);
}

.levrard-carte-main-title .highlight {
    color: var(--levrard-red);
}

.levrard-carte-subtitle {
    color: var(--levrard-text);
    line-height: 1.6;
    max-width: 1480px;
    margin: 0 auto;
}
.levrard-carte-subtitle strong{
    font-family:var(--font-alternate);
}

/**
 * Services avec icônes
 */
.levrard-carte-services {
    display: flex;
    gap: 50px;
    margin-bottom: 150px;
}
.levrard-carte-services .levrard-carte-service-item:nth-child(2),
.levrard-carte-services .levrard-carte-service-item:nth-child(3) {
    top: 30px;
    position: relative;
}
.levrard-carte-service-item {
    background: rgba(255,255,255,0.8);
    padding: 50px 30px;
    border-radius: 30px;
    box-shadow: 0 2px 10px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-direction: column;
    flex:1;
}
.levrard-carte-section .service-icon {
    width: max-content;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom:30px;
}
.levrard-carte-section .service-icon i {
    font-size: 24px;
    color: white;
}
.levrard-carte-section .service-content {
    flex: 1;
    text-align: center;
}
.levrard-carte-section .service-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--levrard-text);
    margin-bottom: 20px;
    line-height: 1.3;
}
.levrard-carte-section .service-description {
    font-size: 21px;
    color: var(--levrard-text);
    line-height: 1.5;
    margin: 0;
}
.levrard-carte-section .service-carte-content{font-size:18px;text-align:center;line-height:1.7}
.levrard-carte-section .service-carte-title{font-family:var(--font-alternate);font-weight:bold;margin-bottom:8px;}
.levrard-carte-section .service-carte-description{font-size:20px}
/* ---------------------------- */
@media (max-width:135em){
    .levrard-carte-services{gap:30px}
    .levrard-carte-service-item{padding:40px 20px;}
}
@media (max-width:120em){
    .levrard-carte-services{gap:25px}
    .levrard-carte-service-item{padding:30px 15px;}
    .levrard-carte-section .service-icon img{max-height:100px}
}
@media (max-width:105em){
    .levrard-carte-section .service-icon{margin-bottom:10px}
    .levrard-carte-section .service-icon img{max-height:80px}
}
@media (max-width:90em){
    .levrard-carte-section .service-icon{margin-bottom:0}
    .service-carte-content{font-size:17px}
    .service-carte-description{font-size:16px}
    .levrard-carte-section .service-icon img{max-height:70px}
}
@media (max-width:60em){
    .levrard-carte-section .service-icon img{max-height:60px}
    .levrard-carte-services {flex-wrap:wrap;margin-bottom:70px;}
    .service-carte-content{font-size:16px}
    .service-carte-description{font-size:15px}
    .levrard-carte-service-item {flex-basis:calc(50% - 25px);}
    .levrard-carte-services .levrard-carte-service-item:nth-child(2), .levrard-carte-services .levrard-carte-service-item:nth-child(3){top:0}
}
@media (max-width:40em){
    .levrard-carte-service-item {flex-basis:100%;}
    .levrard-carte-services .levrard-carte-service-item:nth-child(2), .levrard-carte-services .levrard-carte-service-item:nth-child(3){top:0}
}
/* ---------------------------- */

/**
 * Section carte
 */
.levrard-carte-map-section {
    width: 50%;
    margin-left: auto;
    border-radius: 15px;
    padding: 40px;
}

.levrard-carte-map-title {
    font-weight: 500;
    color: var(--levrard-text);
    margin-bottom: 30px;
    text-align: left;
    position: relative;
    margin-top: 15%;
}
.levrard-carte-map-title p strong {
  color: var(--levrard-text);
  font-style: italic;
}

.levrard-carte-map-title::after {
    content: '';
    display: block;
    width: 150px;
    height: 10px;
    background: var(--levrard-red);
    margin: 15px auto 0;
    border-radius: 2px;
    position: absolute;
    top: -45px;
    left: 0;
}

.levrard-carte-map-container {
    display: grid;
    gap: 40px;
    align-items: center;
}

/**
 * Zones d'intervention (badges AVEC LIENS)
 */
.levrard-carte-zones {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Badge de zone transformé en lien cliquable */
.zone-badge {
    background: var(--levrard-red);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(233, 57, 52, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Effet hover pour les liens */
.zone-badge:hover {
    transform: translateX(5px) translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 57, 52, 0.4);
    background: var(--levrard-dark-red);
    color: white;
}

/* Animation de la flèche au hover */
.zone-badge:hover .zone-arrow {
    transform: translateX(3px);
}

/* Effet de focus pour l'accessibilité */
.zone-badge:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Styles des éléments à l'intérieur */
.zone-code {
    padding: 4px 0;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 700;
    min-width: 35px;
    text-align: center;
}

.zone-separator {
    font-weight: 400;
    opacity: 0.8;
}

.zone-name {
    font-size: 16px;
    flex: 1;
}

.zone-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

/* État actif/visité */
.zone-badge:visited {
    color: white;
}

.zone-badge:active {
    transform: translateX(3px) translateY(0);
    box-shadow: 0 2px 8px rgba(233, 57, 52, 0.3);
}

/* Effet de survol différé pour une meilleure UX */
.zone-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.zone-badge:hover::before {
    left: 100%;
}

/* Style spécial pour l'agence principale */
.zone-badge[data-zone="laval"] {
    background: var(--levrard-dark-gray);
    border: 2px solid var(--levrard-red);
}

.zone-badge[data-zone="laval"]:hover {
    background: var(--levrard-red);
    border-color: var(--levrard-dark-red);
}

/**
 * Image de la carte
 */
.levrard-carte-map-image {
    position: relative;
}

.levrard-carte-map-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 10px;
}

/**
 * Preview dans l'éditeur
 */
.levrard-carte-preview {
    background: #f5f5f5;
    border: 2px dashed #ddd;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
}

.levrard-carte-preview h3 {
    margin-bottom: 10px;
    color: var(--levrard-text);
}

.levrard-carte-preview p {
    color: #666;
    margin: 0;
}

/**
 * Responsive
 */
@media screen and (max-width: 1200px) {
    .levrard-carte-container {
        padding: 0 15px;
    }

    .levrard-carte-services {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media screen and (max-width: 992px) {
    .levrard-carte-section {
        padding: 40px 0;
    }

    .levrard-carte-map-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .levrard-carte-map-section {
        padding: 30px;
        width: 100%;
        margin-left: 0;
    }

    .levrard-carte-services {
        gap: 20px;
    }

    .levrard-carte-service-item {
        padding: 20px;
    }

    /* Ajuster les zones en responsive */
    .levrard-carte-zones {
        justify-content: center;
    }
}

@media screen and (max-width: 60em) {
    .levrard-carte-section {
        padding: 30px 0;
        background-image: none !important;
    }

    .levrard-carte-header {
        margin-bottom: 30px;
    }

    .levrard-carte-subtitle {
        font-size: 16px;
    }

    .levrard-carte-services {
        gap: 15px;
    }

    .levrard-carte-service-item {
        padding: 15px;
        gap: 15px;
    }

    .levrard-carte-section .service-icon i {
        font-size: 20px;
    }

    .levrard-carte-section .service-title {
        font-size: 16px;
    }

    .levrard-carte-section .service-description {
        font-size: 13px;
    }

    .levrard-carte-map-section {
        padding: 20px;
        margin-top: 0;
    }

    .levrard-carte-map-title {
        margin-bottom: 40px;
        margin-top: 0;
    }

    .zone-badge {
        padding: 10px 15px;
        gap: 6px;
        flex-direction: column;
        text-align: center;
        min-width: 120px;
    }

    .zone-name {
        font-size: 14px;
    }

    .zone-code {
        font-size: 12px;
        min-width: 30px;
    }

    .zone-arrow {
        display: none; /* Masquer la flèche en mobile */
    }
}

@media screen and (max-width: 576px) {
    .levrard-carte-container {
        padding: 0 10px;
    }

    .levrard-carte-subtitle {
        font-size: 14px;
    }

    .levrard-carte-service-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .levrard-carte-map-section {
        padding: 15px;
    }

    .levrard-carte-zones {
        gap: 10px;
        flex-direction: column;
        align-items: center;
    }

    .zone-badge {
        padding: 12px 20px;
        justify-content: center;
        width: 100%;
        max-width: 300px;
        flex-direction: row;
        height: 60px;
    }
}

/**
 * STYLES SPÉCIFIQUES À L'ÉDITEUR GUTENBERG
 */
.block-editor-block-list__block .levrard-carte-map-section {
    width: 100%; padding-left:50%;
}

.block-editor-block-list__block .levrard-carte-section {
    background-color: #f8f9fa !important;
}

/* Bordure pour identifier le bloc dans l'éditeur */
.block-editor-block-list__block .levrard-carte-section {
    border: 2px dashed rgba(233, 57, 52, 0.3);
}

/* Forcer certains styles si Gutenberg les écrase */
.block-editor-block-list__block .levrard-carte-main-title {
    color: var(--levrard-text) !important;
}

/* Responsive pour l'éditeur */
@media (max-width: 992px) {
    .block-editor-block-list__block .levrard-carte-map-container {
        grid-template-columns: 1fr;
    }

    .block-editor-block-list__block .levrard-carte-services {
        grid-template-columns: 1fr;
    }
}
.carte-mode-map_only{
    min-height: 1000px;
}
.carte-mode-map_only .levrard-carte-map-section {
    top: 490px;
    position: relative;
}
/* ---------------------------- */
@media (max-width:60em){
    .carte-mode-map_only .levrard-carte-map-section{top:0}

    .carte-mode-map_only{
        min-height: 0;
        height:auto;
    }
}
/* ---------------------------- */
