/* =============================================================================
   PAGE PUBLIQUE « DEMANDER UN DOCUMENT » (templates/page-demander-document.php)
   Tokens du thème public (--color-primary, etc.) — cf. assets/css/app.css.
   ========================================================================== */

.ongc-doc-request-hero {
    max-width: 720px;
    margin: 0 auto 2rem;
    text-align: center;
}

.ongc-doc-request-hero h1 {
    color: var(--color-primary-dark);
    margin-bottom: 0.6rem;
}

.ongc-doc-request-hero p {
    color: #3C5445;
    line-height: 1.7;
}

.ongc-doc-request-topbar {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.ongc-doc-request-search-wrap {
    width: 100%;
    max-width: 420px;
}

#ongc-doc-request-search {
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid rgba(26, 153, 69, 0.2);
    border-radius: 999px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s ease;
}

#ongc-doc-request-search:focus {
    border-color: var(--color-primary);
}

.ongc-doc-request-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.ongc-doc-request-sidebar {
    width: 230px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
}

.ongc-doc-request-cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ongc-doc-request-cats button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    text-align: left;
    background: var(--color-bg-card);
    border: 1.5px solid rgba(26, 153, 69, 0.14);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-family: inherit;
    color: #3C5445;
    cursor: pointer;
    transition: all 0.18s ease;
}

.ongc-doc-request-cats button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}

.ongc-doc-request-cats button.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.ongc-doc-request-cats button span {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 0.72rem;
}

.ongc-doc-request-cats button.active span {
    background: rgba(255, 255, 255, 0.28);
}

.ongc-doc-request-main {
    flex: 1;
    min-width: 0;
}

.ongc-doc-request-empty,
.ongc-doc-request-loading {
    text-align: center;
    color: #3C5445;
    padding: 3rem 1rem;
}

.ongc-doc-request-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.ongc-doc-request-card {
    background: var(--color-bg-card);
    border: 1px solid rgba(26, 153, 69, 0.14);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ongc-doc-request-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.ongc-doc-request-card__pill {
    align-self: flex-start;
    background: rgba(26, 153, 69, 0.1);
    color: var(--color-primary-dark);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.ongc-doc-request-card h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #060F08;
}

.ongc-doc-request-card p {
    margin: 0;
    font-size: 0.85rem;
    color: #3C5445;
    flex: 1;
    line-height: 1.55;
}

.ongc-doc-request-card__btn {
    margin-top: 6px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 11px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s ease;
    min-height: 44px;
}

.ongc-doc-request-card__btn:hover {
    background: var(--color-primary-dark);
}

/* ── Modale de demande ────────────────────────────────────────────────────── */

.ongc-doc-request-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ongc-doc-request-modal[hidden] {
    display: none;
}

.ongc-doc-request-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 15, 8, 0.55);
}

.ongc-doc-request-modal__panel {
    position: relative;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 460px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.ongc-doc-request-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #3C5445;
    min-width: 44px;
    min-height: 44px;
}

.ongc-doc-request-modal__panel h2 {
    margin: 0 0 0.5rem;
    color: var(--color-primary-dark);
    font-size: 1.2rem;
    padding-right: 2rem;
}

.ongc-doc-request-modal__desc {
    font-size: 0.85rem;
    color: #3C5445;
    margin: 0 0 1.2rem;
}

/* ── Confirmation après envoi (plus d'aperçu du document à ce stade) ─────── */

.ongc-doc-request-success {
    text-align: center;
    padding: 8px 0 4px;
}

.ongc-doc-request-success__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(26, 153, 69, 0.12);
    color: var(--color-primary-dark);
    margin-bottom: 14px;
}

.ongc-doc-request-success h3 {
    margin: 0 0 8px;
    color: var(--color-primary-dark);
    font-size: 1.2rem;
}

.ongc-doc-request-success__ref {
    font-size: 0.9rem;
    color: #060F08;
    margin: 0 0 10px;
}

.ongc-doc-request-success p {
    font-size: 0.88rem;
    color: #3C5445;
    line-height: 1.6;
    margin: 0 0 20px;
}

.ongc-doc-request-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ongc-doc-request-field {
    margin-bottom: 1rem;
}

.ongc-doc-request-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #3C5445;
    margin-bottom: 5px;
}

.ongc-doc-request-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #E3EFE8;
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    min-height: 44px;
    box-sizing: border-box;
}

.ongc-doc-request-field input:focus {
    border-color: var(--color-primary);
}

.ongc-doc-request-hint {
    font-size: 0.75rem;
    color: #6b8578;
    margin: 4px 0 0;
}

.ongc-doc-request-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: #3C5445;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    cursor: pointer;
}

.ongc-doc-request-consent input {
    margin-top: 3px;
    flex-shrink: 0;
    width: auto;
}

.ongc-doc-request-consent a {
    color: var(--color-primary-dark);
    font-weight: 600;
}

.ongc-doc-request-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #c0392b;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    margin-bottom: 1rem;
}

.ongc-doc-request-submit {
    width: 100%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 14px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    min-height: 48px;
    transition: background 0.18s ease;
}

.ongc-doc-request-submit:hover:not(:disabled) {
    background: var(--color-primary-dark);
}

.ongc-doc-request-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 782px) {
    .ongc-doc-request-layout {
        flex-direction: column;
    }
    .ongc-doc-request-sidebar {
        width: 100%;
        position: static;
    }
    .ongc-doc-request-cats {
        flex-direction: row;
        flex-wrap: wrap;
    }
}
