/* ========================================
   SINGLE ORGANISME - TEMPLATE
   Mobile First puis Desktop
======================================== */

/* Container principal */
.single-organisme {
    background: #fff;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* ========================================
   HEADER
======================================== */
.single-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.single-header .single-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
}

.btn-back,
.btn-share {
    background: none;
    border: 1px solid #333;
    padding: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: inline-flex;
    justify-content: center;
    width: auto;
    width: 50px;
    border-radius: 50%;
    height: 50px;
}

.btn-back:hover,
.btn-share:hover {
    background: #f5f5f5;
}

.btn-back svg,
.btn-share svg {
    stroke: currentColor;
}

/* ========================================
   MAP BANNER
======================================== */
.map-banner {
    width: 100%;
    height: 300px;
    background: #e0e0e0;
    position: relative;
}

.map-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.map-placeholder svg {
    stroke: #ccc;
    margin-bottom: 12px;
}

.map-placeholder p {
    margin: 0;
    font-size: 14px;
}

/* Style Leaflet Map */
#organisme-map {
    z-index: 1;
}

.leaflet-container {
    height: 100%;
    width: 100%;
}

/* ========================================
   CONTAINER CONTENU
======================================== */
.single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    margin-top: -40px;
    /* Overlap avec la carte */
}

/* ========================================
   INFO CARD
======================================== */
.info-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.org-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #C7B7E2 0%, #764ba2 100%);
}

.org-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    border: 2px solid #e8ecf8;
}

.org-info {
    flex: 1;
    text-align: center;
}

.org-label {
    display: block;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.org-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
}

.org-specialite {
    font-size: 16px;
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* ========================================
   SCORES SECTION
======================================== */
.scores-section {
    background: white;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 24px;
}

.score-item {
    text-align: center;
    flex: 1;
}

.score-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #C7B7E2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: white;
}

.score-value {
    font-size: 20px;
    font-weight: 700;
    color: #C7B7E2;
}

/* ========================================
   DESCRIPTION
======================================== */
.description-section {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px 0;
}

.description-text {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}

.description-text p {
    margin-bottom: 12px;
}

/* ========================================
   SERVICES
======================================== */
.services-section {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
}

.services-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.service-pill {
    background: linear-gradient(135deg, #C7B7E2 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* ========================================
   INFO ICONS
======================================== */
.info-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.info-icon-item {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(199, 183, 226, 0.2), rgba(118, 75, 162, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.icon-circle svg {
    stroke: #764ba2;
}

.icon-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
}

.icon-value {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* ========================================
   BOUTON CONTACT
======================================== */


.btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background: linear-gradient(135deg, #C7B7E2 0%, #764ba2 100%);
    color: white;
    padding: 18px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
    color: white;
}

.btn-contact:active {
    transform: translateY(0);
}

.btn-contact svg {
    stroke: currentColor;
}

/* ========================================
   RESPONSIVE DESKTOP
======================================== */

@media (min-width: 768px) {

    /* Header desktop */
    .single-header {
        padding: 20px 40px;
    }

    .single-header .single-title {
        font-size: 24px;
    }

    /* Map plus haute sur desktop */
    .map-banner {
        height: 400px;
    }

    /* Container plus large */
    .single-container {
        padding: 0 40px;
        margin-top: -60px;
    }

    /* Info card en row sur desktop */
    .info-card {
        padding: 32px;
    }

    .org-logo {
        width: 100px;
        height: 100px;
    }

    .org-name {
        font-size: 24px;
    }

    .org-specialite {
        font-size: 18px;
    }

    /* Scores côte à côte */
    .scores-section {
        padding: 32px;
    }

    .score-circle {
        width: 100px;
        height: 100px;
        border-width: 5px;
    }

    .score-value {
        font-size: 24px;
    }

    /* Sections avec plus de padding */
    .description-section,
    .services-section {
        padding: 32px;
    }

    .section-title {
        font-size: 20px;
    }

    .description-text {
        font-size: 16px;
    }

    /* Info icons en 3 colonnes */
    .info-icons {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .icon-circle {
        width: 80px;
        height: 80px;
    }



    .btn-contact {
        padding: 20px 32px;
    }

    .single-organisme .org-name {
        font-weight: 700;
        font-size: 1.1rem;
    }
}

@media (min-width: 1024px) {

    /* Layout 2 colonnes sur grand écran */
    .single-container {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 32px;
        align-items: start;
    }

    .info-card {
        grid-column: 1 / -1;
    }

    .scores-section,
    .description-section,
    .services-section,
    .info-icons {
        grid-column: 1;
    }

    /* Sidebar fictive si besoin */

}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-card,
.scores-section,
.description-section,
.services-section,
.info-icons {
    animation: fadeInUp 0.5s ease;
}

.info-card {
    animation-delay: 0.1s;
}

.scores-section {
    animation-delay: 0.2s;
}

.description-section {
    animation-delay: 0.3s;
}

.services-section {
    animation-delay: 0.4s;
}

.info-icons {
    animation-delay: 0.5s;
}

/* --- Hauteurs et superpositions propres --- */
.single-organisme .map-banner {
    height: 260px;
    /* mobile */
    position: relative;
    background: #fff;
}

@media (min-width: 768px) {
    .single-organisme .map-banner {
        height: 340px;
    }
}

@media (min-width: 1024px) {
    .single-organisme .map-banner {
        height: 420px;
    }
}

/* Carte Leaflet doit remplir la bannière */
#organisme-map {
    width: 100%;
    height: 100%;
}

/* Carte d’identité flottante : au-dessus de la carte */
.single-organisme .info-card {
    position: relative;
    z-index: 99999;
    background: #fff;
    padding: 16px;
}

/* Conteneur principal : ajoute l’espace nécessaire sous la carte d’identité */
.single-organisme .single-container {
    padding: 16px;
    display: block;
}

@media (min-width: 768px) {}

@media (min-width: 1024px) {
    .single-organisme .single-container {
        /* grille 2 colonnes : contenu + aside CTA */
        display: block;
    }
}

/* Sections : cards + espaces réguliers */
.single-organisme .scores-section,
.single-organisme .description-section,
.single-organisme .services-section,
.single-organisme .info-icons {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {

    .single-organisme .scores-section,
    .single-organisme .description-section,
    .single-organisme .services-section,
    .single-organisme .info-icons {
        padding: 22px;
        margin-bottom: 24px;
    }
}

/* Scores : 2 colonnes flex avec gap */
.single-organisme .scores-section {
    display: flex;
    gap: 24px;
    justify-content: space-between;
}

.single-organisme .scores-section .score-item {
    flex: 1 1 0;
    display: grid;
    gap: 10px;
    text-align: center;
}

/* Services pills : wrap + gap */
.single-organisme .services-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Infos icônes : grille responsive avec gap */
.single-organisme .info-icons {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
}

/* CTA : mobile en bas, desktop sticky à droite */
.single-organisme .contact-section {
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    display: flex;
    width: 100%;
    justify-content: center;
}

.single-organisme .btn-contact {
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 999px;
    padding: 10px 15px;
    font-size: 14px;
    max-width: 150px;
    margin: 0 20px;
}



/* Header sticky compact, pour éviter les recouvrements */
.single-organisme .single-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 999px;

}

/* Divers UI */
.single-organisme .section-title {
    margin: 0 0 10px;
}

.single-organisme .org-name {
    font-weight: 700;
    font-size: 1.8rem;
}

.single-organisme .org-specialite {
    color: #666;
    font-size: .95rem;
}


@media only screen and (max-width: 768px) {
    .single-organisme .org-name {
        font-weight: 700;
        font-size: 1.1rem;
    }

    .single-organisme .info-icons {

        grid-template-columns: repeat(1, minmax(220px, 1fr));
        gap: 20px;
    }
}