/**
 * FICHIER : refcor-annuaire-map.css
 * RÔLE : Mise en page et styles de l'interface annuaire REFCOR (carte et résultats).
 * DÉPENDANCES : Thème Hello Elementor
 */

/* ---------------------------------------------------------
   1. MISE EN PAGE GLOBALE (FLEXBOX)
--------------------------------------------------------- */
.refcor-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 40px 0;
    align-items: flex-start;
}

.refcor-map-col {
    flex: 1 1 40%;
    min-width: 300px;
}

.refcor-results-col {
    flex: 1 1 55%;
    min-width: 300px;
}

/* ---------------------------------------------------------
   2. STYLES DE LA CARTE SVG
--------------------------------------------------------- */
#refcor-svg-map {
    width: 100%;
    height: auto;
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.1));
}

#refcor-svg-map path {
    fill: #e6e6e6; 
    stroke: #ffffff;
    stroke-width: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#refcor-svg-map path:hover {
    fill: #d0d0d0; 
    transform: translateY(-2px);
}

#refcor-svg-map path.is-active {
    fill: #0C3F88; 
    stroke: #ffffff;
    stroke-width: 2px;
}

/* ---------------------------------------------------------
   3. CONTENEUR DES RÉSULTATS ET ÉTATS
--------------------------------------------------------- */
#refcor-results {
    background: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    min-height: 400px;
    max-height: 650px; /* Hauteur maximale avec défilement */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #0C3F88 #f1f1f1;
}

/* Barre de défilement pour Chrome/Safari */
#refcor-results::-webkit-scrollbar {
    width: 6px;
}

#refcor-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#refcor-results::-webkit-scrollbar-thumb {
    background: #0C3F88;
    border-radius: 10px;
}

.refcor-instruction,
.refcor-loading,
.refcor-no-results,
.refcor-error {
    text-align: center;
    font-size: 1.1em;
    color: #555;
    padding: 40px 20px;
}

.refcor-loading {
    color: #3498db;
    font-weight: bold;
}

/* ---------------------------------------------------------
   4. STYLES DES ACCORDÉONS (RÉSULTATS)
--------------------------------------------------------- */
.refcor-results-header h2 {
    font-size: 1.1em;
    color: #0C3F88;
    margin-bottom: 25px;
    font-weight: bold;
}

.refcor-results-section {
    margin-bottom: 30px;
}

.refcor-results-section h3 {
    font-size: 1.3em;
    color: #0C3F88;
    margin-bottom: 15px;
    font-weight: 600;
}

.refcor-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.refcor-accordion {
    background-color: #eee6f2;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 10px;
}

/* Suppression du marqueur par défaut (triangle) */
.refcor-accordion > summary {
    list-style: none;
}
.refcor-accordion > summary::-webkit-details-marker {
    display: none;
}

.refcor-accordion-header {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    user-select: none;
    font-size: 1em;
}

.refcor-header-info {
    padding-right: 30px; 
}

.refcor-name-part {
    color: #6DA7E3; 
}

.refcor-city-part {
    color: #6DA7E3;
}

/* Icônes personnalisées + et - */
.refcor-accordion-header::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
    font-weight: bold;
    color: #6DA7E3;
}

.refcor-accordion[open] > .refcor-accordion-header::after {
    content: '−'; 
    font-size: 1.5em;
}

.refcor-accordion-content {
    padding: 0 20px 20px 20px;
    color: #6DA7E3;
}

.refcor-detail-line {
    margin: 0 0 5px 0;
    font-size: 0.95em;
    line-height: 1.4;
}

.refcor-detail-line:last-child {
    margin-bottom: 0;
}

.refcor-detail-line a {
    color: #6DA7E3;
    text-decoration: none;
}

.refcor-detail-line a:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------
   5. RESPONSIVE
--------------------------------------------------------- */
@media (max-width: 774px) {
    .refcor-container {
        flex-direction: column;
    }
    
    .refcor-map-col,
    .refcor-results-col {
        flex: 1 1 100%;
        width: 100%;
    }

    #refcor-results {
        min-height: auto;
        max-height: none !important;
        overflow-y: visible !important;
    }
}
