/* =====================================================================
   Modale « Recevoir par e-mail » (partials/v2/telechargement/email-modal.php)
   Partagée par telechargement.php et le bloc Documents des pages de norme.
   ===================================================================== */
.doc-modal-overlay.doc-hidden,
.doc-modal-feedback.doc-hidden {
    display: none;
}
.doc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.doc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}
.doc-modal {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
}
.doc-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}
.doc-modal-close:hover {
    background: rgba(225, 0, 15, 0.12);
    color: var(--primary-color, #e1000f);
}
.doc-modal-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    max-height: 90vh;
}

/* Colonne gauche : formulaire */
.doc-modal-left {
    padding: 32px 30px;
    overflow-y: auto;
}
.doc-modal-title {
    font-family: "DM Sans", sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #0f172a;
    margin: 0 0 8px;
}
.doc-modal-sub {
    font-size: 14px;
    color: rgba(15, 23, 42, 0.65);
    line-height: 1.55;
    margin: 0 0 22px;
}
.doc-modal-field {
    margin-bottom: 16px;
}
.doc-modal-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
}
.doc-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.doc-modal-input:focus {
    outline: none;
    border-color: var(--accent-color, #000091);
    box-shadow: 0 0 0 3px rgba(0, 0, 145, 0.1);
}
.doc-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 12.5px;
    color: rgba(15, 23, 42, 0.7);
    line-height: 1.5;
    margin-bottom: 20px;
    cursor: pointer;
}
.doc-consent input {
    margin-top: 2px;
    flex-shrink: 0;
}
.doc-consent a {
    color: var(--accent-color, #000091);
    text-decoration: underline;
}
.doc-modal-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 10px 20px;
    border-radius: 9999px;
    border: 1.5px solid var(--primary-color, #e1000f);
    background: var(--primary-color, #e1000f);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.doc-modal-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}
.doc-modal-submit i {
    font-size: 14px;
}
.doc-modal-submit.is-loading {
    opacity: 0.6;
    cursor: not-allowed;
}
.doc-modal-feedback {
    margin: 14px 0 0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.5;
}
.doc-modal-feedback--ok {
    background: #e7f6ec;
    color: #176c3a;
}
.doc-modal-feedback--err {
    background: #fdecec;
    color: #b3261e;
}
.doc-modal-legal {
    margin: 14px 0 0;
    font-size: 11px;
    color: rgba(15, 23, 42, 0.45);
    line-height: 1.5;
}

/* Honeypot : invisible aux humains, présent pour les bots */
.doc-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Colonne droite : checklist */
.doc-modal-right {
    background: rgba(0, 0, 145, 0.035);
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    padding: 32px 22px;
    overflow-y: auto;
}
.doc-modal-right-title {
    font-weight: 700;
    font-size: 13px;
    color: var(--accent-color, #000091);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 4px;
}
.doc-modal-right-sub {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.6);
    margin: 0 0 16px;
    line-height: 1.5;
}
.doc-modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.doc-modal-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.doc-modal-check:hover {
    border-color: var(--accent-color, #000091);
}
.doc-modal-check input {
    margin-top: 3px;
    flex-shrink: 0;
}
.doc-modal-check-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.doc-modal-check-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}
.doc-modal-check-cat {
    font-size: 11px;
    color: rgba(15, 23, 42, 0.5);
    margin-top: 2px;
}

@media (max-width: 720px) {
    .doc-modal-grid {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    .doc-modal-right {
        border-left: 0;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
    }
    .doc-modal-left,
    .doc-modal-right {
        overflow-y: visible;
    }
}
