/* EPSYTERA STRUCTURES v2.1 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

:root{--es-primary:#0E2D94;--es-primary-dark:#002149;--es-text:#404040;--es-background:#F9F9F9;--es-accent:#C6D2FF}

/* Screen reader only */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Focus styles for accessibility */
.recherche-etablissements-shortcode *:focus{outline:3px solid var(--es-primary);outline-offset:2px}
.recherche-etablissements-shortcode *:focus:not(:focus-visible){outline:none}
.recherche-etablissements-shortcode *:focus-visible{outline:3px solid var(--es-primary);outline-offset:2px}

.recherche-etablissements-shortcode{font-family:'Inter',sans-serif;width:100%;max-width:100%}

/* FILTERS */
.recherche-etablissements-shortcode .formulaire-section{background:var(--es-background);padding:30px 20px;margin-bottom:20px;border-radius:12px}
.recherche-etablissements-shortcode .filter-label-main{color:var(--es-text);font-size:24px;font-weight:700;margin-bottom:16px}
.recherche-etablissements-shortcode .recherche-form-horizontal{display:flex;align-items:center;gap:15px;flex-wrap:wrap}
.recherche-etablissements-shortcode .filter-group{flex:1;min-width:150px}
.recherche-etablissements-shortcode .filter-group:first-child{flex:0 0 auto}

/* Profile switch */
.recherche-etablissements-shortcode .profils-selection{display:flex;align-items:center;border:1px solid var(--es-primary-dark);border-radius:45px;padding:4px;gap:4px;position:relative;background:transparent}
.recherche-etablissements-shortcode .profils-selection::before{content:'';position:absolute;top:4px;height:calc(100% - 8px);background:var(--es-primary-dark);border-radius:45px;transition:all .4s cubic-bezier(.4,0,.2,1);z-index:0}
.recherche-etablissements-shortcode .profils-selection[data-active="adulte"]::before{width:var(--adulte-width,120px);left:4px}
.recherche-etablissements-shortcode .profils-selection[data-active="enfant-et-ados"]::before{width:var(--enfant-width,180px);left:var(--enfant-left,128px)}
.recherche-etablissements-shortcode .profil-btn{padding:12px 24px;border-radius:45px;border:none;background:transparent!important;color:var(--es-primary-dark);font-size:16px;font-weight:700;cursor:pointer;transition:color .3s;white-space:nowrap;position:relative;z-index:1}
.recherche-etablissements-shortcode .profil-btn.active{color:var(--es-background)!important}

/* Selects & inputs - Chevron uses CSS variable for color */
.recherche-etablissements-shortcode .form-select,
.recherche-etablissements-shortcode .form-control{
    border:1px solid var(--es-primary-dark);
    border-radius:30px;
    padding:12px 16px;
    font-size:16px;
    font-weight:500;
    color:var(--es-primary-dark);
    background:#fff;
    width:100%;
    cursor:pointer;
    appearance:none;
    background-repeat:no-repeat;
    background-position:right 16px center;
    padding-right:40px;
}
/* Le chevron sera défini dynamiquement via inline CSS avec la couleur de l'établissement */
.recherche-etablissements-shortcode .form-select{
    background-image:var(--chevron-svg, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M2 0h8c1 0 2 1 2 2L6 8 0 2c0-1 1-2 2-2z' fill='%23002149'/%3E%3C/svg%3E"));
}
.recherche-etablissements-shortcode .form-select:disabled,
.recherche-etablissements-shortcode .form-control:disabled{opacity:.4;cursor:not-allowed;background-color:#f5f5f5}
.recherche-etablissements-shortcode .form-control{background-image:none;padding-right:16px}

/* Layout */
.recherche-etablissements-shortcode .layout-container{display:flex;gap:20px;align-items:stretch;min-height:800px}
.recherche-etablissements-shortcode .liste-section{flex:0 0 50%;max-width:50%;background:var(--es-background);padding:20px;border-radius:12px;overflow-y:auto;max-height:1200px}
.recherche-etablissements-shortcode .carte-section{flex:0 0 50%;max-width:50%}
.recherche-etablissements-shortcode .map-container{width:100%!important;height:100%!important;min-height:1200px;border-radius:12px;z-index:1}

/* Results */
.recherche-etablissements-shortcode .results-header{margin-bottom:20px;padding-bottom:10px;border-bottom:1px solid rgba(0,0,0,.1)}
.recherche-etablissements-shortcode .results-count{color:#838383;font-size:18px;font-weight:700;margin:0}
.recherche-etablissements-shortcode .results-list{display:flex;flex-direction:column;gap:36px}

/* SKELETON LOADING */
.recherche-etablissements-shortcode .skeleton-wrapper{display:flex;flex-direction:column;gap:36px}
.recherche-etablissements-shortcode .skeleton-card{display:flex;background:#fff;border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,.08);overflow:hidden;min-height:300px}
.recherche-etablissements-shortcode .skeleton-image{width:222px;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:shimmer 1.5s infinite}
.recherche-etablissements-shortcode .skeleton-content{flex:1;padding:30px;display:flex;flex-direction:column;gap:15px}
.recherche-etablissements-shortcode .skeleton-title{height:28px;width:70%;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:4px}
.recherche-etablissements-shortcode .skeleton-line{height:18px;width:90%;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:4px}
.recherche-etablissements-shortcode .skeleton-line.short{width:50%}
.recherche-etablissements-shortcode .skeleton-button{height:50px;width:285px;background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:60px;margin-top:auto}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* Structure card */
.recherche-etablissements-shortcode .structure-card{width:100%;max-width:870px;min-height:380px;background:#ffffff;border-radius:12px;box-shadow:0 4px 27px rgba(146,146,146,.25);display:flex;position:relative;transition:all .3s;cursor:pointer}
.recherche-etablissements-shortcode .structure-card:hover{box-shadow:0 8px 32px rgba(0,0,0,.18)}
.recherche-etablissements-shortcode .structure-card.highlighted{box-shadow:0 0 0 3px var(--es-primary-dark)}
.recherche-etablissements-shortcode .structure-image{width:222px;min-height:380px;flex-shrink:0;position:relative;overflow:hidden;background:#f0f0f0}
.recherche-etablissements-shortcode .structure-image img{width:100%;height:100%;object-fit:cover;border-top-left-radius:12px;border-bottom-left-radius:12px;border-top-right-radius:0;border-bottom-right-radius:0;transition:opacity .3s}
.recherche-etablissements-shortcode .structure-image img.lazy{opacity:0}
.recherche-etablissements-shortcode .structure-image img.loaded{opacity:1}
.recherche-etablissements-shortcode .structure-content{flex:1;padding:30px;display:flex;flex-direction:column;gap:14px}
.recherche-etablissements-shortcode .structure-title{color:var(--es-primary-dark);font-size:23px;font-weight:700;margin:0 0 10px;line-height:1.25}
.recherche-etablissements-shortcode .structure-title-divider{width:100%;height:1px;background:var(--es-primary-dark);opacity:.14;margin-bottom:10px}
.recherche-etablissements-shortcode .structure-info-section{display:flex;flex-direction:column;gap:6px}
.recherche-etablissements-shortcode .contact-section{display:flex;flex-direction:row;align-items:center;gap:8px;flex-wrap:wrap}
.recherche-etablissements-shortcode .info-label{color:var(--es-text);font-size:16px;font-weight:700;display:flex;align-items:center;gap:8px}
.recherche-etablissements-shortcode .contact-label{color:var(--es-text);font-size:16px;font-weight:700;display:flex;align-items:center;gap:8px;margin:0}
/* Les icônes sont définies via inline CSS pour adopter les couleurs de l'établissement */
.recherche-etablissements-shortcode .info-label::before{content:'';display:inline-block;width:11px;height:22px;flex-shrink:0;background-image:var(--icon-location);background-repeat:no-repeat;background-size:contain}
.recherche-etablissements-shortcode .contact-label::before{content:'';display:inline-block;width:19px;height:19px;flex-shrink:0;background-image:var(--icon-phone);background-repeat:no-repeat;background-size:contain}
.recherche-etablissements-shortcode .info-address,.recherche-etablissements-shortcode .contact-phone{color:var(--es-primary-dark);font-size:18px;font-weight:700}
.recherche-etablissements-shortcode .contact-phone{text-decoration:none}
.recherche-etablissements-shortcode .maps-link{color:var(--es-text);font-size:16px;font-weight:700;text-decoration:underline;display:inline-flex;align-items:center;gap:8px}
.recherche-etablissements-shortcode .consult-btn{width:285px!important;min-width:285px!important;max-width:285px!important;height:50px;padding:12px 24px;background:var(--es-primary-dark);border-radius:60px;color:var(--es-background);font-size:16px;font-weight:700;border:1px solid var(--es-primary-dark);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:12px;text-decoration:none;margin-top:12px;transition:all .3s;white-space:nowrap}
.recherche-etablissements-shortcode .consult-btn:hover{background:transparent;color:var(--es-primary-dark)}
.recherche-etablissements-shortcode .consult-btn::after{content:'→';font-size:18px}

/* Loader */
.recherche-etablissements-shortcode .map-loader{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(249,249,249,.9);display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:1000;border-radius:12px}
.recherche-etablissements-shortcode .map-loader .spinner{width:50px;height:50px;border:4px solid rgba(0,0,0,.1);border-top:4px solid var(--es-primary);border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.recherche-etablissements-shortcode .map-loader p{margin-top:20px;color:var(--es-primary);font-size:16px;font-weight:700}

/* Popups */
.recherche-etablissements-shortcode .popup-title{color:var(--es-primary);font-size:18px;font-weight:700;margin:0 0 10px}
.recherche-etablissements-shortcode .popup-address{color:var(--es-text);font-size:14px;margin:5px 0}
.recherche-etablissements-shortcode .popup-phone{color:var(--es-primary);font-size:16px;font-weight:700;margin:5px 0}
.recherche-etablissements-shortcode .popup-link{color:var(--es-primary);font-size:14px;font-weight:700;text-decoration:underline}

/* Mobile swiper wrapper */
.recherche-etablissements-shortcode .mobile-swiper-wrapper{display:none;position:relative}
.recherche-etablissements-shortcode .mobile-swiper{overflow:hidden;padding:10px 0}
.recherche-etablissements-shortcode .swiper-slide{width:85%;max-width:350px}

/* Mobile card styles */
.recherche-etablissements-shortcode .mobile-swiper .structure-card{
    flex-direction:column;
    min-height:auto;
    margin:0 auto;
    overflow:visible;
}
.recherche-etablissements-shortcode .mobile-swiper .structure-image{
    width:100%;
    height:220px;
    min-height:220px;
    flex-shrink:0;
}
.recherche-etablissements-shortcode .mobile-swiper .structure-image img{
    border-radius:12px 12px 0 0;
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
}
.recherche-etablissements-shortcode .mobile-swiper .structure-content{
    padding:20px;
    align-items:flex-start;
    text-align:left;
}
/* Mobile: titres et textes plus petits */
.recherche-etablissements-shortcode .mobile-swiper .structure-title{
    font-size:16px;
}
.recherche-etablissements-shortcode .mobile-swiper .info-address,
.recherche-etablissements-shortcode .mobile-swiper .contact-phone{
    font-size:16px;
}
/* Mobile: navigation arrows sans padding pour éviter compression */
.recherche-etablissements-shortcode .swiper-nav{
    padding:0;
    min-width:50px;
    min-height:50px;
    flex-shrink:0;
}
.recherche-etablissements-shortcode .mobile-swiper .consult-btn{
    width:100%!important;
    min-width:auto!important;
    max-width:100%!important;
}

/* Navigation arrows - positioned above cards */
.recherche-etablissements-shortcode .swiper-navigation{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:20px;
    margin-bottom:20px;
    padding:10px 0;
}
.recherche-etablissements-shortcode .swiper-nav{
    width:50px;
    height:50px;
    background:var(--es-primary-dark);
    border:none;
    border-radius:50%;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:all .3s;
    box-shadow:0 2px 10px rgba(0,0,0,.2);
}
.recherche-etablissements-shortcode .swiper-nav:hover{background:var(--es-primary);transform:scale(1.1)}
.recherche-etablissements-shortcode .swiper-nav:disabled{opacity:.3;cursor:not-allowed}
.recherche-etablissements-shortcode .swiper-nav:disabled:hover{transform:none;background:var(--es-primary-dark)}
.recherche-etablissements-shortcode .swiper-nav svg{width:22px;height:11px}
.recherche-etablissements-shortcode .swiper-nav-prev svg{transform:rotate(180deg)}

/* Desktop/Tablet: tailles réduites */
@media(max-width:1515px){
    .recherche-etablissements-shortcode .structure-title{font-size:18px}
    .recherche-etablissements-shortcode .info-label,
    .recherche-etablissements-shortcode .contact-label,
    .recherche-etablissements-shortcode .info-address,
    .recherche-etablissements-shortcode .contact-phone,
    .recherche-etablissements-shortcode .maps-link{font-size:16px}
    .recherche-etablissements-shortcode .consult-btn{font-size:14px}
    .recherche-etablissements-shortcode .consult-btn::after{font-size:16px}
}

/* RESPONSIVE */
@media(max-width:1024px){
    .recherche-etablissements-shortcode .layout-container{flex-direction:column}
    .recherche-etablissements-shortcode .liste-section,.recherche-etablissements-shortcode .carte-section{flex:0 0 100%;max-width:100%}
    .recherche-etablissements-shortcode .map-container{min-height:500px}
}
@media(max-width:768px){
    .recherche-etablissements-shortcode .recherche-form-horizontal{flex-direction:column;align-items:stretch}
    .recherche-etablissements-shortcode .filter-group{width:100%;min-width:auto}
    .recherche-etablissements-shortcode .results-list{display:none}
    .recherche-etablissements-shortcode .mobile-swiper-wrapper{display:block}
    .recherche-etablissements-shortcode .skeleton-card{flex-direction:column}
    .recherche-etablissements-shortcode .skeleton-image{width:100%;height:150px}
    /* Fix mobile: containers sans fond ni padding */
    .recherche-etablissements-shortcode .formulaire-section{background:transparent;padding:0;margin-bottom:15px}
    .recherche-etablissements-shortcode .liste-section{background:transparent;padding:0}
    /* Fix mobile: hauteur uniforme pour switch et selects */
    .recherche-etablissements-shortcode .profils-selection{min-height:52px;box-sizing:border-box}
    .recherche-etablissements-shortcode .profil-btn{padding:10px 20px;font-size:15px}
    .recherche-etablissements-shortcode .form-select,
    .recherche-etablissements-shortcode .form-control{min-height:52px;box-sizing:border-box;padding:14px 16px;padding-right:40px;text-align:left}
    /* Fix mobile: alignement texte à gauche dans les selects */
    .recherche-etablissements-shortcode .form-select option{text-align:left}
}

/* Leaflet overrides */
.recherche-etablissements-shortcode .leaflet-container{font-family:'Inter',sans-serif}
.recherche-etablissements-shortcode .leaflet-control-zoom a{border-color:var(--es-primary)!important;color:var(--es-primary)!important}
.recherche-etablissements-shortcode .leaflet-control-zoom a:hover{background:var(--es-primary)!important;color:#fff!important}
.recherche-etablissements-shortcode .leaflet-popup-content{font-family:'Inter',sans-serif;margin:0;padding:0}
.recherche-etablissements-shortcode .leaflet-popup-content-wrapper{padding:16px;border-radius:12px;box-shadow:0 4px 29px rgba(48,48,48,.25)}

