/* Conteneur général */
.page-container {
    font-family: "Lato", sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* ===================== NAVBAR ===================== */

/* Barre de navigation compacte */
.navbar {
    height: 75px;                       /* hauteur globale de la navbar sur desktop */
    display: flex;
    align-items: center;
    justify-content: space-between;     /* logo gauche / menu centre / logo droite */
    padding: 0 24px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
}

/* Zone gauche : logo (et éventuellement texte) */
.navbar-left {
    display: flex;
    align-items: center;
}

/* Logo gauche (PÉRINAT DEMO) */
.navbar-logo-only {
    height: 70px;       /* ajuste à 36 / 42 si besoin */
    width: auto;
}

/* Optionnel : si un jour tu remets un titre sous le logo */
.navbar-logo-title {
    font-weight: 700;
    font-size: 20px;
    color: #005c9e;
}

.navbar-logo-sub {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ff6b8b;
}

/* Menu central */
.navbar-menu {
    display: flex;
    gap: 32px;          /* espace entre les onglets */
    margin-left: 60px;  /* espace entre logo gauche et menu */
    flex: 1;
}

/* Liens du menu */
.navbar-link {
    text-decoration: none;
    color: #555;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding-bottom: 4px;
}

/* Lien actif (Carte / Définitions / etc.) */
.navbar-link-active {
    border-bottom: 3px solid #005c9e;
    padding-bottom: 6px;
    color: #005c9e;
    font-weight: 600;
}

/* Effet hover sur les liens */
.navbar-menu a:hover,
.navbar-link:hover {
    color: #005c9e;
    transition: 0.2s ease-in-out;
}

/* Zone droite : logo ARD */
.navbar-right {
    display: flex;
    align-items: center;
}

/* Logo droit (arD Accouchement Demo) */
.navbar-ars-logo {
    height: 70px;
    width: auto;
}


/* MAIN CONTENT */
.main-content {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* GAUCHE : CARTE */
.left-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 16px 24px;
    background-color: #f9fafb;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 24px;
    border: 1px solid #d0d7de;
    padding: 6px 12px;
    max-width: 480px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}

.search-icon {
    margin-right: 8px;
    font-size: 18px;
}

.search-dropdown {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
}

/* dcc.Dropdown (react-select) à l'intérieur */
.search-dropdown .Select-control {
    border: none !important;
    box-shadow: none !important;
}

/* Texte du placeholder / valeur */
.search-dropdown .Select-placeholder,
.search-dropdown .Select-value-label {
    font-size: 14px;
}

/* Le menu déroulant prend bien toute la largeur */
.search-dropdown .Select-menu-outer {
    width: 100% !important;
}

/* Bouton X de clear */
.search-clear-btn {
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    margin-left: 6px;
    padding: 0 4px;
}

.search-clear-btn:hover {
    color: #555;
}

/* enlever le gros contour bleu autour du X */
.search-clear-btn:focus {
    outline: none;
    box-shadow: none;
}

.map-container {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
}

/* DROITE : LISTE */
.right-panel {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    padding: 16px 24px 16px 16px;
    background-color: #ffffff;
    border-left: 1px solid #e0e0e0;
}

.right-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.count-text {
    font-size: 15px;
    font-weight: 600;
    color: #31a24c;
}

.right-panel-buttons {
    display: flex;
    gap: 8px;
}

/* Boutons */
.btn-secondary {
    border-radius: 20px;
    border: 1px solid #005c9e;
    background-color: #ffffff;
    padding: 4px 12px;
    font-size: 13px;
    cursor: pointer;
    color: #005c9e;
}

.btn-secondary:hover {
    background-color: #005c9e;
    color: #ffffff;
}

.btn-reset {
    border-radius: 20px;
    border: 1px solid #999;
    background-color: #ffffff;
    padding: 4px 12px;
    font-size: 13px;
    cursor: pointer;
    color: #555;
}

.btn-reset:hover {
    background-color: #f0f0f0;
}

/* Filtres actifs */
.active-filters {
    margin-bottom: 8px;
}

/* Responsive simple (tablette) */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }

    .right-panel {
        border-left: none;
        border-top: 1px solid #e0e0e0;

        /* ✅ important : sur tablette/mobile, on ne force plus 620px */
        width: 100%;
        min-width: auto;
        max-width: 100%;
    }
}

.filters-reset-btn {
    border: 1px solid #466aa5;
    background-color: #ffffff;
    color: #466aa5;
    padding: 6px 14px;
    border-radius: 2px;
    font-size: 13px;
    cursor: pointer;
}

.filters-section-title {
    font-weight: 600;
    margin: 16px 0 8px;
    text-decoration: underline;
    font-size: 14px;
}

.filters-checklist .form-check {
    margin-bottom: 4px;
}

.filters-radio .form-check {
    margin-bottom: 4px;
}

.filters-apply-btn {
    background-color: #7ab800;
    color: #ffffff;
    border: 1px solid #7ab800;
    border-radius: 24px;
    padding: 8px 40px;
    font-size: 15px;
    cursor: pointer;
}
.filters-apply-btn:hover {
    filter: brightness(0.9);
}


.map-container {
    position: relative;
    flex: 1;
    border-radius: 8px;
    overflow: hidden;

    /* hauteur par défaut (desktop / tablette) */
    height: 65vh;
}

/* Sur mobile, on réduit un peu la hauteur pour que la liste soit visible plus vite */
@media (max-width: 768px) {
    .map-container {
        height: 40vh;
        width: 100%;
    }
}


/* Légende custom en bas de la carte */

.custom-legend {
    position: absolute;
    bottom: 10px;
    left: 10px;          /* place la légende à gauche */
    transform: none;     /* enlever le centrage */
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
}


/* Chaque item de légende : petit carré coloré + texte */
.legend-item::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 3px;
    margin-right: 4px;
}

/* Couleurs alignées avec color_discrete_map */
/* Couleurs alignées avec la carte */
/*.legend-mn::before  { background-color: #E91E63; }*/
.legend-1::before   { background-color: #4DB6AC; }
.legend-2a::before  { background-color: #039BE5; }
.legend-2b::before  { background-color: #1565C0; }
.legend-3::before   { background-color: #1A237E; }





.detail-panel-body {
    padding: 16px 20px 24px 20px;
    font-size: 14px;
}

.detail-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.detail-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.detail-births-main {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-address {
    font-size: 13px;
    color: #555;
    margin-bottom: 12px;
}

.detail-button {
    border: 1px solid #466aa5;
    background-color: #ffffff;
    color: #466aa5;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 16px;
}

/* Section titre */
.detail-section-title {
    font-weight: 600;
    margin-bottom: 4px;
}

/* Barre multi-couleurs */
.detail-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.detail-bar-seg {
    height: 100%;
}

.seg-vb-spont { background-color: #4e79a7; }
.seg-vb-assist { background-color: #f28e2b; }
.seg-csec     { background-color: #59a14f; }

.detail-bar-labels {
    display: flex;
    font-size: 12px;
    margin-bottom: 12px;
}


.detail-bar-label {
    font-weight: 600;
}

/* Lignes indicateurs */
.detail-indicators {
    margin-top: 8px;
}

.detail-indicator-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.indicator-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-right: 8px;
    margin-top: 3px;
}

/* Couleurs des ronds */
.ind-vb-spont    { background-color: #4e79a7; }
.ind-vb-assist   { background-color: #f28e2b; }
.ind-csec        { background-color: #59a14f; }
.ind-epidural    { background-color: #76b7b2; }
.ind-episiotomy  { background-color: #e15759; }

.indicator-label {
    font-weight: 600;
}

.indicator-value {
    font-weight: 600;
}

.indicator-sub {
    font-size: 12px;
    color: #777;
}

/* Make detail panel same size as right-panel */
.detail-offcanvas {
    width: var(--right-panel-width, 620px) !important;
    max-width: 100% !important;
    box-shadow: -4px 0 12px rgba(0,0,0,0.15);
    z-index: 2000 !important; /* ensure on top */
}

/* Lock background scroll when detail panel is open (optional) */
.offcanvas-backdrop {
    opacity: 0.3 !important;
}

/* Adjust right panel width (same value used in offcanvas) */
.right-panel {
    width: 100%;   /* <- sur desktop */
    max-width: 620px;
}

/* Conteneur du tableau : petite bordure gauche pour rappeler une liste de cartes */
#etab-table {
    border-left: none !important;
}


/* Transition douce sur toutes les cellules */
#etab-table .dash-spreadsheet td {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

/* Effet hover : légère surbrillance et ombre subtile */
#etab-table .dash-spreadsheet tr:hover td {
    background-color: #f8fafc;
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.5);
}

/* Un peu plus d'espace vertical pour l'effet "carte" */
#etab-table .dash-spreadsheet td {
    padding-top: 8px;
    padding-bottom: 8px;
    
}

/* Bloc entier d’une ligne */
.row-block {
    display: flex;
    flex-direction: column;
    
}

/* Ville (ligne 1) */
.row-city {
    font-size: 12px;
    color: #777;
    margin-bottom: 2px;
}

/* Ligne du bas = nom et statut */
.row-bottom {
    display: flex;
    justify-content: space-between;   /* magique: left + right */
    align-items: center;
}

/* Nom établissement */
.row-name {
    font-weight: 600;
    color: #1b3556;
    font-size: 13px;
    
}

/* Statut - Type */
.row-statut {
    font-weight: 600;
    color: #555;
    font-size: 12px;
    margin-left: 12px;   /* petit espace de sécurité si besoin */
    white-space: nowrap !important;  /* 👈 empêche le saut de ligne */
}


/* 🔻 Supprimer le bord rouge / rose de la ligne active du DataTable */

#etab-table .dash-spreadsheet td.focused,
#etab-table .dash-spreadsheet td.cell--selected,
#etab-table .dash-spreadsheet td.cell--selected.focused {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Certains thèmes ajoutent une petite barre via ::after → on la désactive aussi */
#etab-table .dash-spreadsheet td.focused::after,
#etab-table .dash-spreadsheet td.cell--selected::after {
    content: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* On garde seulement les traits horizontaux entre les établissements */
#etab-table .dash-spreadsheet td {
    border-top: none !important;
    border-bottom: 1px solid #ececec !important;
}

#etab-table .dash-spreadsheet tr:hover td {
    background-color: #f8fafc;
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.5);
}

#etab-table .dash-spreadsheet td {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Curseur "main" sur toute la ligne */
#etab-table .dash-spreadsheet td {
    cursor: pointer;
}

/* Désactiver la couleur de sélection de Dash (fond rose / beige) */
#etab-table .dash-spreadsheet td.cell--selected,
#etab-table .dash-spreadsheet td.cell--selected.focused {
    background-color: inherit !important;
}

/* Style du bloc markdown du left_block */
#etab-table .dash-cell .markdown {
    display: flex;
    flex-direction: column;
}

/* Ville */
#etab-table .dash-cell .markdown strong {
    font-size: 12px;
    color: #6b7280;  /* gris doux */
    font-weight: 600;
    margin-bottom: 2px;
}

/* Nom établissement (deuxième ligne) */
#etab-table .dash-cell .markdown p {
    font-size: 13px;
    color: #1b3556;   /* bleu profond */
    font-weight: 700;
    margin: 0;
    padding: 0;
}

/* Forcer la bordure basse sur TOUTES les cellules, même sélectionnées / focus */
#etab-table .dash-spreadsheet td,
#etab-table .dash-spreadsheet td.cell--selected,
#etab-table .dash-spreadsheet td.cell--selected.focused,
#etab-table .dash-spreadsheet td.focused {
    border-top: none !important;
    border-bottom: 1px solid #ececec !important;
    border-left: none !important;
    border-right: none !important;
}


/* Effet hover "carte" sur la liste des établissements */
#etab-table .dash-spreadsheet td {
    background-color: #ffffff;
    transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.08s ease;
}

/* Hover sur la ligne complète */
#etab-table .dash-spreadsheet tr:hover td {
    background-color: #f9fafb;
    box-shadow: 0 1px 2px rgba(148, 163, 184, 0.35);
    transform: translateY(-1px);
}

/* Un peu plus d’air entre les lignes */
#etab-table .dash-spreadsheet td {
    padding-top: 10px;
    padding-bottom: 10px;
}

body {
    font-family: "Lato", sans-serif;
}

.row-city-premium,
.row-name-premium {
    margin: 0;
    padding: 0;
    line-height: 1.25;
}

/* ===================== NAVBAR MOBILE ===================== */
@media (max-width: 768px) {
    .navbar {
        /* la nav n’est plus une barre fine mais un bloc vertical */
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 16px 12px 16px;
        gap: 8px;
    }

    .navbar-left {
        margin-bottom: 4px;
    }

    .navbar-logo-only {
        height: 52px;
    }

    .navbar-right {
        display: none; /* pour cacher le logo ARD sur mobile, sinon laisse-le */
    }

    .navbar-menu {
        width: 100%;
        margin-left: 0;
        flex-direction: column;
        gap: 4px;
    }

    .navbar-link,
    .navbar-link-active {
        display: block;
        width: 100%;
        padding: 8px 0;
        font-size: 14px;
        border-bottom: none;
    }

    /* ligne pleine */
    .navbar-link-active {
        background-color: #eef4ff;
        border-radius: 4px;
        padding-left: 4px;
    }
}


/* =====================
   Légende plus petite sur mobile
   ===================== */
@media (max-width: 768px) {

    .custom-legend {
        padding: 4px 8px;
        font-size: 11px;       /* ← Texte plus petit */
        gap: 6px;              /* ← Moins d'espace */
        border-radius: 6px;
    }

    .custom-legend .legend-item::before {
        width: 10px;           /* ← Pastilles plus petites */
        height: 8px;
        margin-right: 3px;
    }

    .types-help-button {
        font-size: 11px !important;
        padding: 3px 6px !important;
        border-radius: 3px !important;
    }
}

/* --- Page générique --- */
.roadmap-page {
    padding-top: 32px;
    padding-bottom: 48px;
}

.page-title {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 0.98rem;
    color: #4b5563;
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .roadmap-page {
        padding-top: 16px;
    }
    .roadmap-timeline {
        padding-left: 14px;
    }
}
