/* Styles pour la carte GetWemap style */
.formations-map-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    height: 700px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.formations-map-sidebar {
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-container {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.results-count {
    padding: 15px 20px;
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #e0e0e0;
}

.formations-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.formation-card {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.formation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.formation-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.formation-icon.icon-presentiel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.formation-icon.icon-distanciel {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.formation-icon.icon-hybride {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.formation-content {
    flex: 1;
    min-width: 0;
}

.formation-content h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.formation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
}

.formation-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.formation-type-badge.presentiel {
    background: #e8eaf6;
    color: #5e35b1;
}

.formation-type-badge.distanciel {
    background: #fce4ec;
    color: #c2185b;
}

.formation-type-badge.hybride {
    background: #e0f7fa;
    color: #0097a7;
}

.voir-details {
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.voir-details:hover {
    text-decoration: underline;
}

.formations-map-view {
    position: relative;
    background: #f0f0f0;
}

#map-canvas {
    width: 100%;
    height: 100%;
}

/* Marqueurs personnalisés */
.custom-marker {
    background: transparent;
    border: none;
}

.marker-container {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 3px solid #fff;
}

.marker-container.presentiel .marker-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.marker-container.distanciel .marker-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.marker-container.hybride .marker-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.marker-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3232;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Popup */
.formations-popup {
    padding: 5px;
}

.popup-formation {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.popup-formation:last-child {
    border-bottom: none;
}

.popup-formation h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 15px;
}

.popup-formation p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.popup-link {
    display: inline-block;
    margin-top: 10px;
    color: #3498db;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.popup-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .formations-map-container {
        grid-template-columns: 1fr;
        grid-template-rows: 400px 400px;
    }
    
    .formations-map-sidebar {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}

/* Styles liste formations */
.formations-liste {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

.formation-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.formation-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.formation-item h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.5em;
}

.formation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.formation-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95em;
    color: #555;
}

.formation-meta .icon {
    flex-shrink: 0;
}

.formation-resume {
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.formation-lien {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #3498db;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.formation-lien:hover {
    background: #2980b9;
    color: #fff;
}

.formation-lien .icon {
    transition: transform 0.2s;
}

.formation-lien:hover .icon {
    transform: translateX(3px);
}

/* Styles pour la page single formation */
.formation-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.formation-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 30px;
}

.formation-infos-principales {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-box {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.info-box .icon {
    flex-shrink: 0;
    color: #3498db;
}

.info-box strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 5px;
}

.info-box p {
    margin: 0;
    color: #555;
    font-size: 1.1em;
}

.info-box small {
    color: #777;
    font-size: 0.85em;
}

.prix-box {
    border-left-color: #27ae60;
}

.prix-box .icon {
    color: #27ae60;
}

.prix-box strong {
    color: #27ae60;
}

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

.formation-section:last-of-type {
    border-bottom: none;
}

.formation-section h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.section-content {
    line-height: 1.8;
    color: #555;
}

.section-content ul {
    list-style: none;
    padding-left: 0;
}

.section-content ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.section-content ul li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

.infos-pratiques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-pratique {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-pratique .icon {
    flex-shrink: 0;
    color: #3498db;
}

.info-pratique strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 8px;
}

.info-pratique p {
    margin: 0;
    color: #555;
}

.formation-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #dc3232;
    color: #fff;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: background 0.2s;
}

.btn-pdf:hover {
    background: #c22828;
    color: #fff;
}

.btn-pdf svg {
    flex-shrink: 0;
}

.btn-inscription {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: background 0.2s;
}

.btn-inscription:hover {
    background: #229954;
    color: #fff;
}

.btn-retour {
    display: inline-block;
    background: #95a5a6;
    color: #fff;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-retour:hover {
    background: #7f8c8d;
    color: #fff;
}

/* Modal d'inscription */
.modal-inscription {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: relative;
    animation: slideDown 0.3s;
}

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

.modal-close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #000;
}

.modal-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.formulaire-inscription .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.formulaire-inscription .form-field {
    margin-bottom: 20px;
}

.formulaire-inscription label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.formulaire-inscription input[type="text"],
.formulaire-inscription input[type="email"],
.formulaire-inscription input[type="tel"],
.formulaire-inscription textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.2s;
}

.formulaire-inscription input:focus,
.formulaire-inscription textarea:focus {
    outline: none;
    border-color: #3498db;
}

.formulaire-inscription .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.inscription-success-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.success-content {
    background: #fff;
    padding: 50px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.success-content svg {
    margin-bottom: 20px;
}

.success-content h2 {
    color: #27ae60;
    margin-bottom: 15px;
}

.success-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Styles pour la carte */
.carte-formations-container {
    margin: 30px 0;
}

#carte-formations {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.carte-legende {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.carte-legende h4 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #2c3e50;
}

.legende-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: #555;
}

.marker-icon {
    flex-shrink: 0;
}

.leaflet-popup-content h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.leaflet-popup-content p {
    margin: 5px 0;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaflet-popup-content .icon {
    flex-shrink: 0;
}

.leaflet-popup-content a {
    display: inline-block;
    margin-top: 10px;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.leaflet-popup-content a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .formation-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .formation-item {
        padding: 20px;
    }
    
    #carte-formations {
        height: 400px !important;
    }
}