/**
 * Modale « Exemple des documents à fournir » (#exemple_document) — #273
 *
 * Utilisée par template-adherez.php, template-adherez-bienfaiteurs.php et
 * template-profilinformations.php. Tout est scopé sous .modal-mda pour ne
 * jamais déborder sur les autres modales du site.
 *
 * Palette et formes reprises du thème : accent #21a8f2, angles droits,
 * Raleway 800, bordures 1px noires comme .bordered_button.
 */

.modal-mda .modal-dialog {
    max-width: 1000px;
    margin: 1.75rem auto;
}

.modal-mda .modal-content {
    border: 1px solid #000;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    max-height: calc(100vh - 3.5rem); /* en-tête et pied toujours visibles */
}

/* ---- En-tête ---- */

.modal-mda .modal-header {
    display: block;
    position: relative;
    flex: none;
    padding: 26px 72px 22px 32px;
    border: 0;
    border-bottom: 3px solid #21a8f2;
}

.modal-mda .modal-header .eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #21a8f2;
    margin-bottom: 8px;
}

.modal-mda .modal-title {
    font-family: "Raleway", sans-serif;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.015em;
    color: #111;
    margin: 0;
}

.modal-mda .modal-header .sub {
    margin: 10px 0 0;
    font-size: 15px;
    line-height: 1.5;
    color: #5f5f5f;
    max-width: 68ch;
}

/* ---- Croix de fermeture ---- */

.modal-mda .modal-close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 1px solid #ddd;
    background: #fff;
    color: #111;
    opacity: 1;
    cursor: pointer;
    -webkit-transition: background .18s ease-in-out, border-color .18s ease-in-out, color .18s ease-in-out;
    transition: background .18s ease-in-out, border-color .18s ease-in-out, color .18s ease-in-out;
}

.modal-mda .modal-close svg {
    width: 15px;
    height: 15px;
    display: block;
}

.modal-mda .modal-close:hover,
.modal-mda .modal-close:focus {
    background: #111;
    border-color: #111;
    color: #fff;
    opacity: 1;
    outline: none;
}

.modal-mda .modal-close:focus-visible {
    box-shadow: 0 0 0 3px rgba(33, 168, 242, .45);
}

/* ---- Corps : planche des documents acceptés ---- */

.modal-mda .modal-body {
    padding: 26px 32px 30px;
    background: #fff;
    overflow-y: auto; /* seul le contenu défile */
}

.modal-mda .doc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.modal-mda .doc-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    background: #fff;
    text-decoration: none;
    -webkit-transition: border-color .18s ease-in-out, transform .18s ease-in-out, box-shadow .18s ease-in-out;
    transition: border-color .18s ease-in-out, transform .18s ease-in-out, box-shadow .18s ease-in-out;
}

.modal-mda .doc-card:hover,
.modal-mda .doc-card:focus-visible {
    border-color: #21a8f2;
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .10);
    text-decoration: none;
    outline: none;
}

/* On cadre le haut du document : en-tête de l'organisme et intitulé,
   c'est ce qui permet de reconnaître sa propre pièce d'un coup d'œil. */
.modal-mda .doc-thumb {
    position: relative;
    display: block;
    background: #f4f4f4;
    height: 186px;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.modal-mda .doc-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    padding: 0;
}

.modal-mda .doc-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 7px 11px;
    opacity: 0;
    -webkit-transform: translateY(4px);
    transform: translateY(4px);
    -webkit-transition: opacity .18s ease-in-out, transform .18s ease-in-out;
    transition: opacity .18s ease-in-out, transform .18s ease-in-out;
    pointer-events: none;
}

.modal-mda .doc-card:hover .doc-zoom,
.modal-mda .doc-card:focus-visible .doc-zoom {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

/* Bandeau nommant la pièce */
.modal-mda .doc-label {
    background: #111;
    color: #fff;
    padding: 13px 16px;
    margin-top: auto;
}

.modal-mda .doc-label .issuer {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #21a8f2;
    margin-bottom: 3px;
}

.modal-mda .doc-label .name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

/* ---- Pied ---- */

.modal-mda .modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 32px 20px;
    border: 0;
    border-top: 1px solid #e6e6e6;
    background: #fafafa;
    flex: none;
}

.modal-mda .modal-footer .note {
    font-size: 13px;
    color: #6b6b6b;
    margin: 0;
    text-align: left;
}

.modal-mda .btn-close-modal {
    font-family: "Raleway", sans-serif;
    font-weight: 800;
    font-size: 15px;
    line-height: 16px;
    padding: 15px 26px;
    border: 1px solid #000;
    border-radius: 0;
    background: #fff;
    color: #000;
    cursor: pointer;
    flex: none;
    -webkit-transition: all .2s ease-in-out;
    transition: all .2s ease-in-out;
}

.modal-mda .btn-close-modal:hover {
    background: #000;
    color: #fff;
}

.modal-mda .btn-close-modal:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 168, 242, .45);
}

/* ---- Mobile ---- */

@media (max-width: 767.98px) {
    .modal-mda .modal-dialog {
        margin: 0;
        max-width: none;
        min-height: 100vh;
    }

    .modal-mda .modal-content {
        min-height: 100vh;
        max-height: 100vh;
        border: 0;
    }

    .modal-mda .modal-header {
        padding: 20px 62px 18px 20px;
    }

    .modal-mda .modal-title {
        font-size: 21px;
    }

    .modal-mda .modal-body {
        padding: 20px 20px 24px;
    }

    .modal-mda .doc-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-mda .doc-thumb {
        height: 160px;
    }

    .modal-mda .modal-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px 18px;
    }

    .modal-mda .btn-close-modal {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal-mda .doc-card,
    .modal-mda .doc-zoom,
    .modal-mda .modal-close,
    .modal-mda .btn-close-modal {
        -webkit-transition: none;
        transition: none;
    }

    .modal-mda .doc-card:hover {
        -webkit-transform: none;
        transform: none;
    }
}