/* Style du bouton "Explications" */
.btn-explication {
    background-color: #1E90FF;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    margin-bottom: 18px;
    font-size: 1.95rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-explication:hover {
    background-color: #2c3e50;
}

/* L'arrière-plan de la modale (caché par défaut) */
.modal-overlay {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.6); /* Fond sombre transparent */
    backdrop-filter: blur(4px); /* Léger flou arrière-plan pour le côté premium */
}

/* La boîte de dialogue (Contenu) */
.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 5% du haut sur desktop */
    padding: 24px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px; /* Largeur max idéale pour ton image carrée */
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
}

/* Bouton Fermer (X) */
.modal-close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 4px;
    color: #2c3e50;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* Container de l'image pour le contrôle du ratio */
.modal-image-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Image responsive */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Animation d'ouverture */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ajustements pour les petits écrans (Mobiles) */
@media (max-width: 576px) {
    .modal-content {
        margin: 15% auto;
        padding: 16px;
        width: 95%;
    }
    
    .modal-content h3 {
        font-size: 1.1rem;
    }
}



/* Container du bouton en bas */
.modal-footer {
/*     margin-top: 20px; */
/*     padding-top: 15px; */
    border-top: 1px solid #eee; /* Petite ligne de séparation discrète */
    display: flex;
/*     justify-content: flex-end; Aligne le bouton à droite */
    justify-content: center;
}

/* Style du bouton Fermer */
.btn-fermer {
    background-color: #e74c3c; /* Rouge soft, ou utilise la couleur secondaire de ton SaaS */
    color: white;
    border: none;
    padding: 8px 20px;
    font-size: 1.95rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-fermer:hover {
    background-color: #c0392b;
}

/* Ajustement mobile pour le bouton */
@media (max-width: 576px) {

    .btn-fermer {
        width: 100%; /* Le bouton prend toute la largeur sur mobile */
        padding: 12px; /* Plus grand pour le pouce */
    }
}