/*========== Styles généraux =========*/
.hed-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.hed-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.hed-form-group {
    flex: 1;
}

.hed-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.hed-form-group input,
.hed-form-group select,
.hed-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.hed-select2 {
    width: 100% !important;
}

.hed-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.hed-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hed-btn-primary {
    background: #2271b1;
    color: white;
}

.hed-btn-primary:hover {
    background: #135e96;
}

.hed-btn-secondary {
    background: #f6f7f7;
    color: #2271b1;
    border: 1px solid #2271b1;
}

.hed-btn-secondary:hover {
    background: #f0f0f1;
}

/* style généraux pour mobile */
@media (max-width: 768px) {
    .hed-btn {
        width: 100%;
        text-align: center;
        padding: 10px 15px !important;
        font-size: 14px !important;
    }
    
    /* Pour les formulaires */
    .hed-form-row {
        flex-direction: column;
    }
    
    .hed-form-group {
        width: 100% !important;
        margin-bottom: 15px;
    }
}

/*============= Styles pour les résultats de recherche  ==================*/

/* Force le conteneur de résultats à garder sa structure */
#hed-results-list {
    display: grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)) !important;
    gap: 25px !important;
    min-height: 100px;
}

.hed-search-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 100px);
}

.hed-search-form {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid #eaeaea;
}

.hed-search-results {
    margin-top: 30px;
}

.hed-results-count {
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.2);
}

.hed-results-count:before {
    content: "📊";
    margin-right: 10px;
    font-size: 20px;
}

/* État de base garantie pour les cartes */
.hed-school-card {
    display: flex !important;
    flex-direction: column !important;
    background: white !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08) !important;
    border: 1px solid #eaeaea !important;
    position: relative !important;
    transform: translateZ(0) !important;
    will-change: transform !important;
    height: auto !important;
    min-height: 300px !important;
}

/* Reset des styles pour les éléments dynamiques */
.hed-school-card * {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

.hed-school-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: #2271b1;
}

.hed-school-card-header {
    position: relative;
    padding: 20px 20px 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.hed-school-card-logo {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.hed-school-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    border-radius: 8px;
    opacity: 1 !important;
    transition: opacity 0.3s ease !important;
}

.hed-school-card-logo img:not([src]) {
    opacity: 0 !important;
}

.hed-school-card-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f1, #e0e0e0);
    color: #999;
    font-size: 24px;
}

.hed-school-card-info {
    flex: 1;
    min-width: 0; /* Important pour le text-overflow */
}

.hed-school-card-title {
    margin: 0 0 8px 0;
    color: #2271b1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.hed-school-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.hed-school-card-title a:hover {
    color: #135e96;
    text-decoration: underline;
}

.hed-school-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.hed-school-card-location i {
    color: #2271b1;
    font-size: 16px;
    flex-shrink: 0;
}

.hed-school-card-country {
    background: #e7f3ff;
    color: #135e96;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 5px;
}

.hed-school-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hed-school-card-description {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hed-school-card-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
}

.hed-school-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 13px;
    word-break: break-all;
}

.hed-school-contact-item i {
    color: #2271b1;
    font-size: 16px;
    flex-shrink: 0;
    width: 20px;
}

.hed-school-card-footer {
    padding: 0 20px 20px;
    margin-top: auto;
}

.hed-school-card-actions {
    display: flex;
    gap: 10px;
}

.hed-school-card-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    gap: 8px;
}

.hed-school-card-btn-primary {
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: white;
}

.hed-school-card-btn-primary:hover {
    background: linear-gradient(135deg, #135e96, #0c4a7a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.hed-school-card-btn-secondary {
    background: #f6f7f7;
    color: #2271b1;
    border: 1px solid #d1d5db;
}

.hed-school-card-btn-secondary:hover {
    background: #e0e7ff;
    border-color: #2271b1;
}

/* État vide */
.hed-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.hed-empty-state h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 22px;
}

.hed-empty-state p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Responsive pour les résultats */
@media (max-width: 1200px) {
    #hed-results-list {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hed-search-container {
        padding: 20px 15px;
    }
    
    .hed-search-form {
        padding: 20px;
        border-radius: 12px;
    }
    
    #hed-results-list {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .hed-school-card {
        min-height: 280px !important;
        border-radius: 12px;
    }
    
    .hed-school-card-header {
        padding: 15px 15px 0;
    }
    
    .hed-school-card-logo {
        width: 70px;
        height: 70px;
    }
    
    .hed-school-card-title {
        font-size: 16px;
    }
    
    .hed-school-card-body {
        padding: 15px;
    }
    
    .hed-school-card-footer {
        padding: 0 15px 15px;
    }
    
    .hed-school-card-btn {
        padding: 14px 15px;
        font-size: 15px;
    }
    
    .hed-results-count {
        padding: 12px 20px;
        font-size: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    #hed-results-list {
        gap: 12px !important;
    }
    
    .hed-search-container {
        padding: 15px 10px;
    }
    
    .hed-search-form {
        padding: 15px;
    }
    
    .hed-school-card {
        min-height: 260px !important;
    }
    
    .hed-school-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .hed-school-card-logo {
        width: 80px;
        height: 80px;
    }
    
    .hed-school-card-info {
        width: 100%;
        text-align: center;
    }
    
    .hed-school-card-location {
        justify-content: center;
    }
    
    .hed-school-card-actions {
        flex-direction: column;
    }
    
    .hed-empty-state {
        padding: 40px 15px;
    }
    
    .hed-empty-state h3 {
        font-size: 20px;
    }
    
    .hed-empty-state p {
        font-size: 15px;
    }
}

/* Animation d'entrée */
@keyframes hedCardAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-5px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hed-school-card.hed-animated {
    animation: hedCardAppear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Délai pour l'animation en cascade */
.hed-school-card.hed-animated:nth-child(1) { animation-delay: 0.05s; }
.hed-school-card.hed-animated:nth-child(2) { animation-delay: 0.1s; }
.hed-school-card.hed-animated:nth-child(3) { animation-delay: 0.15s; }
.hed-school-card.hed-animated:nth-child(4) { animation-delay: 0.2s; }
.hed-school-card.hed-animated:nth-child(5) { animation-delay: 0.25s; }
.hed-school-card.hed-animated:nth-child(n+6) { animation-delay: 0.3s; }

/* Fallback pour les navigateurs qui ne supportent pas grid */
@supports not (display: grid) {
    #hed-results-list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 25px !important;
    }
    
    .hed-school-card {
        flex: 1 1 350px !important;
        max-width: calc(33.333% - 25px) !important;
    }
    
    @media (max-width: 1200px) {
        .hed-school-card {
            max-width: calc(50% - 25px) !important;
        }
    }
    
    @media (max-width: 768px) {
        .hed-school-card {
            max-width: 100% !important;
        }
    }
}

/* Badge pour les écoles en attente */
.hed-school-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

.hed-status-pending-badge {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Chargement */
.hed-loading-results {
    text-align: center;
    padding: 40px;
    color: #666;
}

.hed-loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* État d'erreur */
.hed-error-state {
    text-align: center;
    padding: 40px 20px;
    grid-column: 1 / -1;
    background: #f8d7da;
    border-radius: 12px;
    color: #721c24;
}

.hed-error-state h3 {
    margin-bottom: 10px;
}

/* Cacher les éléments vides du template */
.hed-school-card-contacts > div[style*="display:none"] {
    display: none !important;
}

/*========== Styles pour le modal ======*/
.hed-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    animation: fadeInModal 0.3s ease-out forwards;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.hed-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: translateY(20px);
    animation: slideUpModal 0.4s ease-out forwards;
}

@keyframes slideUpModal {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hed-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.hed-modal-header h3 {
    margin: 0;
    color: #2271b1;
    font-size: clamp(18px, 4vw, 22px);
    font-weight: 600;
}

.hed-modal-close {
    font-size: 28px;
    color: #666;
    cursor: pointer;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.hed-modal-close:hover {
    background: #f0f0f1;
    color: #333;
    transform: rotate(90deg);
}

.hed-modal-body {
    padding: 25px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* Style pour le marqueur */
.hed-school-marker-icon .hed-school-marker {
    background: #dc3232 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3) !important;
    border: 3px solid white !important;
    font-size: 18px !important;
}

/* Scrollbar personnalisée pour le modal */
.hed-modal-body::-webkit-scrollbar {
    width: 8px;
}

.hed-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.hed-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.hed-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive pour le modal */
@media (max-width: 768px) {
    .hed-modal {
        padding: 10px;
    }
    
    .hed-modal-content {
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .hed-modal-header {
        padding: 15px 20px;
    }
    
    .hed-modal-body {
        padding: 20px;
        max-height: calc(85vh - 60px);
    }
    
    .hed-modal-close {
        font-size: 24px;
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .hed-modal {
        padding: 5px;
    }
    
    .hed-modal-content {
        max-height: 80vh;
        border-radius: 10px;
    }
    
    .hed-modal-header {
        padding: 12px 15px;
    }
    
    .hed-modal-body {
        padding: 15px;
        max-height: calc(80vh - 50px);
    }
}

/* Animation de fermeture */
.hed-modal.closing {
    animation: fadeOutModal 0.3s ease-out forwards;
}

@keyframes fadeOutModal {
    from {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

.hed-modal-content.closing {
    animation: slideDownModal 0.3s ease-out forwards;
}

@keyframes slideDownModal {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(30px);
        opacity: 0;
    }
}

/* Support pour les appareils avec barre de navigation */
@supports (padding: max(0px)) {
    .hed-modal {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}


/*============== Styles pour le formulaire de soumission ====================*/
.hed-submission-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.hed-submission-header {
    text-align: center;
    margin-bottom: 40px;
}

.hed-submission-header h2 {
    color: #2271b1;
    margin-bottom: 10px;
}

.hed-submission-form {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hed-form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.hed-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.hed-form-section h3 {
    color: #2271b1;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f1;
}

.hed-form-notice {
    background: #f8f9fa;
    border-left: 4px solid #2271b1;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.hed-form-notice p {
    margin: 0;
    color: #555;
}

.hed-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.hed-form-group {
    flex: 1;
    min-width: 200px;
}

.hed-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.hed-form-group input,
.hed-form-group select,
.hed-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.hed-form-group input:focus,
.hed-form-group select:focus,
.hed-form-group textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.hed-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* formulaire soumission Responsive */
@media (max-width: 768px) {
    .hed-submission-form {
        padding: 10px;
    }
    
    .hed-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .hed-form-group {
        min-width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .hed-submission-container {
        padding: 10px;
    }
}

/*=========== Messages ==============*/
.hed-message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
    background: #f0f8ff;
    color: #2271b1;
    font-size: 14px;
    line-height: 1.5;
}

.hed-message-success {
    background: #f0f9f4;
    border-color: #28a745;
    color: #155724;
}

.hed-message-error {
    background: #fdf3f3;
    border-color: #dc3545;
    color: #721c24;
}

.hed-message-warning {
    background: #fff8e6;
    border-color: #ffc107;
    color: #856404;
}

.hed-message-info {
    background: #f0f8ff;
    border-color: #17a2b8;
    color: #0c5460;
}

/*================== Styles spécifiques pour la carte ====================*/
.hed-map-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 80vh;
}

.hed-map-header {
    text-align: center;
    margin-bottom: 20px;
}

.hed-map-header h2 {
    color: #2271b1;
    margin-bottom: 10px;
    font-size: clamp(24px, 5vw, 32px);
}

.hed-map-header p {
    color: #666;
    font-size: clamp(14px, 3vw, 16px);
}

.hed-map-filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.hed-form-group .select2-container {
    width: 100% !important;
}

.hed-map-wrapper {
    flex: 1;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-height: 500px;
    position: relative;
}

.hed-main-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* Marqueurs personnalisés */
.hed-map-marker {
    background: #2271b1;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hed-map-marker:hover {
    background: #135e96;
    transform: scale(1.1);
}

.hed-map-marker i {
    font-size: 16px;
}

.hed-map-marker-details {
    background: #2271b1;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    border: 3px solid white;
}

.hed-map-marker-details i {
    font-size: 20px;
}

/* Popup amélioré */
.hed-map-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 10px;
}

.hed-map-popup .leaflet-popup-content {
    margin: 0;
    line-height: 1.4;
}

/* Boutons filtres */
.hed-map-filters .hed-form-group:last-child {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.hed-map-filters .hed-form-group:last-child button {
    padding: 10px 20px;
    font-size: 14px;
    height: fit-content;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .hed-map-container {
        padding: 10px;
        min-height: 70vh;
    }
    
    .hed-map-filters {
        padding: 15px;
    }
    
    .hed-map-wrapper {
        min-height: 400px;
        border-radius: 8px;
    }
    
    .hed-main-map {
        min-height: 400px;
    }
    
    .hed-map-filters .hed-form-group:last-child {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hed-map-filters .hed-form-group:last-child button {
        flex: 1;
        min-width: 140px;
    }
    
}

@media (max-width: 480px) {
    .hed-map-container {
        padding: 5px;
    }
    
    .hed-map-filters {
        padding: 12px;
    }
    
    .hed-map-wrapper {
        min-height: 350px;
    }
    
    .hed-main-map {
        min-height: 350px;
    }
    
    .hed-map-header h2 {
        font-size: 20px;
    }
    
    .hed-map-header p {
        font-size: 14px;
    }
    
    .hed-map-filters .hed-form-group:last-child {
        flex-direction: column;
    }
    
    .hed-map-filters .hed-form-group:last-child button {
        width: 100%;
    }
}

/* Animation de chargement */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.hed-loading-marker {
    animation: pulse 1.5s infinite;
}

/* Légende de la carte */
.hed-map-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hed-map-legend-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #2271b1;
    color: white;
    border-radius: 50%;
    font-size: 10px;
}

@media (max-width: 768px) {
    .hed-map-legend {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .hed-map-legend-marker {
        width: 16px;
        height: 16px;
        font-size: 9px;
    }
}

/*========== SELECT2 ===============*/

/* Single select2*/
.hed-btn:focus,
.select2-container--default .select2-selection--single:focus{
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* ===== SELECT2 MULTIPLE ===== */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    min-height: 40px;
    padding: 2px 8px;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.select2-container--default .select2-selection--multiple:hover {
    border-color: #2271b1;
}

.select2-container--default .select2-selection--multiple:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
    outline: none;
}

/* Tags des éléments sélectionnés */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e7f3ff;
    border: 1px solid #b6d7ff;
    border-radius: 12px;
    color: #135e96;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 8px 4px 24px;
    margin: 4px 4px 0 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 200px;
    word-break: break-word;
}

/* Icône de suppression sur les tags */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #2271b1;
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
    background-color: #dc3232;
    text-decoration: none;
}

/* Champ de saisie dans Select2 multiple */
.select2-container--default .select2-search--inline .select2-search__field {
    margin: 0;
    padding: 6px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    color: #2c3338;
    min-height: 30px;
    line-height: 1.4;
}

.select2-container--default .select2-search--inline .select2-search__field::placeholder {
    color: #8c8f94;
    opacity: 1;
}

/* Dropdown pour Select2 multiple */
.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f0f6ff;
    color: #2271b1;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #2271b1;
    color: white;
}

/* Ajustement pour les champs HED spécifiques */
.hed-form-group .select2-container--default .select2-selection--multiple {
    border-color: #8c8f94;
    border-radius: 4px;
    min-height: 42px;
}

.hed-form-group .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e7f3ff;
    border-color: #b6d7ff;
    color: #135e96;
    font-size: 13px;
}

/* État focus pour HED */
.hed-form-group .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

/* Ajustement de la hauteur pour les champs multiples */
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 36px;
    padding: 2px 0;
}

/* Container Select2 avec tags multiples */
.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Style pour quand il y a beaucoup de tags */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .select2-container--default .select2-selection--multiple .select2-selection__choice {
        font-size: 12px;
        padding: 3px 6px 3px 20px;
        margin: 3px 3px 0 0;
        max-width: 150px;
    }
    
    .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
        width: 14px;
        height: 14px;
        font-size: 14px;
        left: 5px;
    }
    
    .hed-form-group .select2-container--default .select2-selection--multiple {
        min-height: 38px;
    }
}

/* Wrapper pour Select2 multiple */
.hed-select2-multiple-wrapper {
    position: relative;
    margin-bottom: 5px;
}

.hed-select2-multiple-wrapper .select2-container {
    margin-bottom: 0;
}

/* Indicateur visuel pour les champs multiples */
.hed-select2-multiple-wrapper:after {
    content: "✓ Multiple";
    position: absolute;
    top: -8px;
    right: 10px;
    background: #2271b1;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    z-index: 10;
    pointer-events: none;
}

/* Style du hint */
.hed-select2-hint {
    display: block;
    margin-top: 8px;
    color: #646970;
    font-size: 12px;
    line-height: 1.4;
}

.hed-select2-hint .dashicons {
    color: #2271b1;
    margin-right: 5px;
}

/* État de validation */
.hed-select2-multiple-wrapper.hed-valid .select2-selection--multiple {
    border-color: #4ab866;
    background-color: #f7fcf8;
}

.hed-select2-multiple-wrapper.hed-invalid .select2-selection--multiple {
    border-color: #d63638;
    background-color: #fcf0f1;
}

/* Animation pour l'ajout d'un tag */
@keyframes tagPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 113, 177, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 113, 177, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 113, 177, 0);
    }
}

.select2-container--default .select2-selection--multiple .select2-selection__choice.select2-new-tag {
    animation: tagPulse 0.6s ease;
}

/* Compteur de sélections */
.hed-selection-counter {
    position: absolute;
    bottom: -20px;
    right: 0;
    font-size: 11px;
    color: #646970;
    background: #f6f7f7;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #dcdcde;
}


