/* ============================================================
   Bouton Infos & Fenêtre Popup (Modale)
   ============================================================ */

.btn-info {
    background: #ffffff;
    border: 1px solid #94a3b8;
    color: #334155;
    padding: 6px 14px;
    font-size: 0.88rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-info:hover {
    background: #f1f5f9;
    border-color: #64748b;
    color: #0f172a;
}

/* Arrière-plan assombri (Overlay) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Boîte de contenu de la modale */
.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 480px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.25s ease;
    border: 1px solid #cbd5e1;
}

.modal-overlay.is-visible .modal-content {
    transform: translateY(0);
}

/* En-tête de la modale */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 1.15rem;
    margin: 0;
    color: #1e293b;
    font-weight: bold;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0;
}

.modal-close:hover {
    color: #0f172a;
}

/* Corps du texte */
.modal-body {
    padding: 20px;
    font-size: 0.92rem;
    color: #334155;
    line-height: 1.5;
}

.info-section {
    margin-bottom: 16px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    font-size: 0.98rem;
    margin: 0 0 6px 0;
    color: #0f172a;
}

.info-section p {
    margin: 0 0 6px 0;
}

.info-section a {
    color: #2563eb;
    font-weight: bold;
    text-decoration: underline;
}

.info-section a:hover {
    color: #1d4ed8;
}

/* Pied de la modale */

.btn-modal-action {
    background: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 7px 18px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-modal-action:hover {
    background: #2563eb;
}

/* ==========================================================================
   Popup Modale d'Informations
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6); /* Arrière-plan semi-transparent */
    backdrop-filter: blur(4px);          /* Léger flou d'arrière-plan */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    box-sizing: border-box;
}

.modal-overlay.is-visible {
    display: flex;
}

.modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #0f172a;
    font-family: inherit;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0;
}

.btn-close:hover {
    color: #0f172a;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 70vh;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.5;
}

.info-section {
    margin-bottom: 18px;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 600;
}

.info-section p {
    margin: 0 0 4px 0;
}

.info-section a {
    color: #0284c7;
    text-decoration: underline;
    word-break: break-all;
}

.info-section a:hover {
    color: #0369a1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.btn-primary {
    padding: 8px 18px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

.btn-primary:hover {
    background: #334155;
}