body {
    overflow-x: hidden;
    width: 100%;
}

.elementor,
.elementor-page {
    overflow-x: hidden;
}

.telediag-directory, 
.telediag-directory * {
    box-sizing: border-box;
}

.telediag-directory {
    width: 92vw; 
    max-width: 1450px; 
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    font-family: Arial, sans-serif;
    color: #333;
}

/* --- Barre de recherche --- */
.telediag-search-bar {
    background-color: #eef2f5;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 40px;
}

#telediag-medecins-form {
    display: flex;
    flex-wrap: nowrap; 
    align-items: flex-end;
    gap: 0; 
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
    padding-left: 15px; 
}

.form-group input, .form-group select {
    padding: 10px 15px;
    border: 1px solid #ccc;
    font-size: 14px;
    background: #fff;
    outline: none;
    border-radius: 0; 
    margin: 0;
    height: 40px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.form-group:first-child input {
    border-radius: 25px 0 0 25px;
    border-right: none; 
}


.form-group:nth-child(2) select {
    border-radius: 0;
    border-right: none;
}


.form-group:nth-child(3) select {
    border-radius: 0 25px 25px 0;
}


.form-action {
    margin-left: 15px; 
}

.form-group input:focus,
.form-group select:focus {
    border-color: #008cb4;
}

.form-action {
    display: flex;
    align-items: flex-end;
}

.btn-search {
    background-color: #008cb4;
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-search:hover {
    background-color: #006b8f;
}

#telediag-btn-search {
    background-color: #008cb4 !important;
    color: #fff !important;
    border: none !important;
    padding: 0 25px !important;
    border-radius: 25px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-size: 14px !important;
    line-height: 1 !important;
    transition: background 0.3s !important;
}

#telediag-btn-search:hover {
    background-color: #006b8f !important;
}

/* --- Layout Carte / Liste --- */
.telediag-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.telediag-map-container {
    flex: 1.8;
}

/* --- Carte SVG --- */
#telediag-france-svg {
    width: 100%;
    height: auto;
    display: block;
}

#telediag-france-svg .telediag-region {
    fill: #94b8cc;
    stroke: #fff;
    stroke-width: 1.5px;
    cursor: pointer;
    transition: fill 0.15s;
}

#telediag-france-svg .telediag-region:hover,
#telediag-france-svg .telediag-region.region-hover {
    fill: #4a8aad;
}

#telediag-france-svg .telediag-region.region-selected {
    fill: #003056;
}


.telediag-list-container {
    flex: 1;
    max-height: 520px;
    overflow-y: scroll;
    padding: 12px;
    border: 1px solid #d0dce6;
    border-radius: 12px;
}

/* Scrollbar */
.telediag-list-container::-webkit-scrollbar        { width: 6px; }
.telediag-list-container::-webkit-scrollbar-track  { background: #f1f1f1; border-radius: 4px; }
.telediag-list-container::-webkit-scrollbar-thumb  { background: #003056; border-radius: 4px; }

/* --- Tooltip région sur la carte --- */
.telediag-region-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    white-space: nowrap;
}

.telediag-region-label::before { display: none !important; }

/* --- Cartes médecins --- */
.medecin-card {
    display: flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 25px; 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    margin-left: 15px; 
}

.medecin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.card-img-wrapper {
    background-color: #fff;
    width: 90px;
    min-width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* Photo medecin*/
.card-photo-wrapper {
    width: 80px;  
    height: 80px;
    flex-shrink: 0;
    margin-right: 20px;
    margin-left: -15px;
    margin-top: -15px; 
    
    position: relative;  
}

.card-photo-img,
.card-photo-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px ; 
    box-shadow: -10px -10px 0px #002d44; 
}

.card-photo-placeholder {
    background-color: #008cb4; 
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ajustement de la taille du bonhomme SVG */
.default-avatar-svg {
    width: 50%;
    height: 50%;
}

.card-content {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.card-name {
    color: #008cb4;
    font-size: 15px;
    font-weight: bold;
}

.card-specialty {
    font-size: 13px;
    color: #666;
}

.card-hospital {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

/* --- Messages (chargement, erreur, aucun résultat) --- */
.telediag-msg {
    text-align: center;
    color: #666;
    padding: 30px 10px;
    font-size: 14px;
}

/* --- Modale (<dialog>) --- */
.telediag-modal {
    border: none;
    border-radius: 14px;
    padding: 0;
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.telediag-modal::backdrop {
    background: rgba(0, 0, 0, 0.5);
}


.telediag-modal-wrap {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    position: relative;
}

.telediag-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    z-index: 1;
    transition: color 0.15s;
}

.telediag-modal-close:hover { color: #333; }

#telediag-btn-modal-close {
    position: absolute !important;
    top: 14px !important;
    right: 18px !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 26px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    color: #999 !important;
    padding: 0 !important;
    z-index: 1 !important;
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    min-height: unset !important;
    border-radius: 0 !important;
    text-transform: none !important;
    font-weight: normal !important;
    transition: color 0.15s !important;
}

#telediag-btn-modal-close:hover {
    background: none !important;
    background-color: transparent !important;
    color: #333 !important;
}

.telediag-modal-content {
    overflow-y: auto;
    padding: 30px;
    padding-top: 48px;
    padding-bottom: 50px;
}

/* Section photo + champs */
.modal-main {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.modal-photo-col { flex-shrink: 0; }

.modal-photo-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.modal-photo-empty {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #003056;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-fields-col { flex: 1; }

.modal-field {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 4px;
}

.modal-label {
    font-weight: bold;
    color: #008cb4;
}

/* Sections texte (cursus, titres, etc.) */
.modal-section {
    margin-top: 18px;
    border-top: 1px solid #eee;
    padding-top: 14px;
}

.modal-section-title {
    color: #008cb4;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 10px 0;
}

.modal-section-content {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    white-space: pre-line;
}

/* =============================================
   CARTE ÉTABLISSEMENTS
   ============================================= */

 .telediag-etab-wrapper {
    width: 100%;
}

@media (min-width: 768px) {
    .telediag-etab-wrapper {
        width: 100vw;
    }
}

#telediag-etab-map {
    width: 100%;
    height: 600px; /* Ajustable selon la maquette */
    z-index: 1;
}

/* Marqueur personnalisé (point bleu style maquette) */
.etab-marker-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #29abe2;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 2px rgba(41, 171, 226, 0.35), 0 2px 6px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.15s;
}

.etab-marker-dot:hover { transform: scale(1.4); }

/* Popup Leaflet — style maquette */
#telediag-etab-map .leaflet-popup-content-wrapper {
    border-radius: 10px 10px 100px 10px;
    padding: 18px 20px;
}

#telediag-etab-map .leaflet-popup-content {
    margin: 0;
    min-width: 200px;
}

#telediag-etab-map .leaflet-popup-tip {
    background: #fff;
    box-shadow: none;
}

#telediag-etab-map .leaflet-popup-close-button {
    color: #bbb;
    font-size: 16px;
    top: 8px;
    right: 10px;
    padding: 0;
}

.etab-popup-name {
    font-size: 17px;
    font-weight: bold;
    color: #008cb4;
    margin-bottom: 10px;
    line-height: 1.25;
}

.etab-popup-address {
    font-size: 13px;
    color: #555;
    line-height: 1.55;
    margin-bottom: 6px;
}

.etab-popup-phone {
    font-size: 13px;
    color: #555;
    margin-bottom: 2px;
}

.etab-popup-website {
    font-size: 13px;
    color: #29abe2;
    text-decoration: none;
    display: block;
    margin-top: 2px;
}

.etab-popup-website:hover { text-decoration: underline; }

/* --- Responsive Tablette (< 1280px) --- */
@media (max-width: 1279px) {
    .telediag-directory {
        width: 100%;
        max-width: 100%;
        left: auto;
        transform: none;
    }

    #telediag-medecins-form {
        flex-wrap: wrap;
        gap: 12px;
    }

    .form-group:first-child input {
        border-radius: 25px;
        border-right: 1px solid #ccc;
    }

    .form-group:nth-child(2) select {
        border-radius: 25px;
        border-right: 1px solid #ccc;
    }

    .form-group:nth-child(3) select {
        border-radius: 25px;
    }

    .form-action {
        margin-left: 0;
    }
}

/* --- Responsive Mobile (< 767px) --- */
@media (max-width: 767px) {
    .telediag-map-container {
        display: none;
    }

    .telediag-layout {
        flex-direction: column;
    }

    .telediag-list-container {
        max-height: none;
        padding-right: 0;
    }

    #telediag-medecins-form {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 12px;
    }

    .form-group {
        min-width: unset;
        width: 100%;
        flex: none;
    }

    .form-action {
        width: 100%;
    }

    #telediag-btn-search {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Annule le débordement du conteneur principal */
    .telediag-directory {
        width: 100%;
        max-width: 100%;
        left: auto;
        transform: none;
        overflow-x: hidden;
    }

    .telediag-search-bar {
        padding: 16px;
    }

    .telediag-list-container {
        padding: 10px;
    }

    .medecin-card {
        margin-left: 0;
    }

    .card-photo-wrapper {
        margin-left: 0;
        margin-top: 0;
    }

    /* Modale médecin */
    .telediag-modal {
        width: 96%;
        max-height: 92vh;
    }

    .telediag-modal-content {
        padding: 16px;
        padding-top: 44px;
        padding-bottom: 24px;
    }

    .modal-main {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .modal-photo-circle,
    .modal-photo-empty {
        width: 90px;
        height: 90px;
    }
}

/* animation js */
.network_animation {
    position: relative;
    overflow: hidden;
}

.network_animation canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}