/* Styles pour la carte et les formations - Frontend */

body {
    margin: 0;
    padding: 0;
}

.map-container {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1d1d1f;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    border: 2px solid #0066ff;
    border-radius: 25px;
}

.map-column {
    flex: 1;
    min-width: 350px;
}

.info-column {
    flex: 1;
    min-width: 350px;
}

.info-column h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

#map {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.filters {
    margin-bottom: 24px;
    padding: 24px;
    background-color: #fbfbfb;
    border-radius: 16px;
    border: 1px solid #e8e8ed;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 16px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d1d1f;
    font-size: 15px;
}

select, input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background-color: #ffffff;
    color: #1d1d1f;
    font-size: 16px;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select:focus, input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

button {
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.2s ease;
    letter-spacing: -0.2px;
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

.formation-list {
    max-height: 820px;
    overflow-y: auto;
    padding-right: 10px;
}

.formation-list::-webkit-scrollbar {
    width: 6px;
}

.formation-list::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.formation-list::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 3px;
}

.formation-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.formation-card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    position: relative;
}

.formation-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #3498db;
    border-radius: 2px 0 0 2px;
}

.formation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #e8e8ed;
}

.formation-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.formation-card p {
    margin: 8px 0;
    color: #86868b;
    font-size: 15px;
    line-height: 1.4;
}

.formation-card .dates {
    color: #1d1d1f;
    font-weight: 500;
    font-size: 15px;
}

.formation-card .city {
    color: #3498db;
    font-weight: 500;
}

.formation-card .btn-inscription {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    letter-spacing: -0.2px;
}

.formation-card .btn-inscription:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    text-decoration: none;
}

.formation-card .btn-inscription:active {
    transform: translateY(0);
}

/* Styles pour les popups Leaflet */
.custom-popup .leaflet-popup-content-wrapper {
    background: #ffffff;
    color: #1d1d1f;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #f0f0f0;
}

.custom-popup .leaflet-popup-content {
    margin: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.custom-popup h3 {
    color: #1d1d1f;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
}

.custom-popup p {
    color: #86868b;
    font-size: 14px;
    margin-bottom: 8px;
}

.custom-popup a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.custom-popup a:hover {
    color: #2980b9;
}

.leaflet-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Spinner de chargement */
.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #f0f0f0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.loading-spinner p {
    color: #86868b;
    font-size: 15px;
    margin-top: 12px;
    font-weight: 500;
}

.spinner {
    border: 3px solid #f0f0f0;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Styles pour différencier les types de formation */
.formation-card.sst::before {
    background-color: #3498db;
}

.formation-card.mac-sst::before {
    background-color: #3498db;
}

.formation-card.pscf::before {
    background-color: #3498db;
}

.formation-card.ssiap::before {
    background-color: #3498db;
}

.formation-card.pssm::before {
    background-color: #3498db;
}
