/* ==========================================================================
   ASSCW Access Request — Popup public
   ========================================================================== */

/* Overlay */
.asscw-ar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

/* Modal */
.asscw-ar-modal {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
    width: 100%;
    max-width: 640px;
    max-height: 92vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
.asscw-ar-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #BFAC95;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.asscw-ar-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #384759;
}

.asscw-ar-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #6b6b6b;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.asscw-ar-close:hover {
    color: #384759;
    background: #ede5d8;
}

/* Sections */
.asscw-ar-section {
    padding: 16px 24px;
    border-bottom: 1px solid #ede5d8;
}

.asscw-ar-section:last-of-type {
    border-bottom: none;
}

.asscw-ar-section-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #384759;
}

/* Grille */
.asscw-ar-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.asscw-ar-col-2 {
    grid-column: 1 / -1;
}

/* Champs */
.asscw-ar-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.asscw-ar-field label {
    font-size: 13px;
    font-weight: 500;
    color: #384759;
}

.asscw-ar-field input,
.asscw-ar-field select {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    color: #384759;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    width: 100%;
}

.asscw-ar-field input:focus,
.asscw-ar-field select:focus {
    outline: none;
    border-color: #F2911B;
    box-shadow: 0 0 0 3px rgba(183, 74, 30, 0.12);
}

.asscw-ar-required {
    color: #c0392b;
    margin-left: 2px;
}

/* Ligne TVA */
.asscw-ar-vat-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.asscw-ar-field-grow {
    flex: 1;
}

.asscw-ar-vat-btn-wrap {
    flex-shrink: 0;
    padding-bottom: 0;
}

/* Feedback TVA */
.asscw-ar-vat-feedback {
    margin-top: 6px;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 4px;
}

.asscw-ar-vat-feedback.is-success {
    background: #eafaf1;
    color: #1d6a3a;
    border: 1px solid #a3d9b1;
}

.asscw-ar-vat-feedback.is-error {
    background: #fdf2f2;
    color: #922b21;
    border: 1px solid #f1aaa5;
}

/* Notice generale */
.asscw-ar-notice {
    margin: 12px 24px 0;
    padding: 10px 14px;
    border-radius: 5px;
    font-size: 14px;
}

.asscw-ar-notice.is-success {
    background: #eafaf1;
    color: #1d6a3a;
    border: 1px solid #a3d9b1;
}

.asscw-ar-notice.is-error {
    background: #fdf2f2;
    color: #922b21;
    border: 1px solid #f1aaa5;
}

/* Checkbox */
.asscw-ar-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #384759;
    cursor: pointer;
    margin-bottom: 10px;
}

.asscw-ar-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Footer modal */
.asscw-ar-modal-footer {
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #BFAC95;
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
}

/* Boutons */
.asscw-ar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.asscw-ar-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.asscw-ar-btn-primary {
    background: #F2911B;
    color: #fff;
}

.asscw-ar-btn-primary:hover:not(:disabled) {
    background: #b83210;
}

.asscw-ar-btn-secondary {
    background: #ede5d8;
    color: #384759;
    border: 1px solid #ccc;
}

.asscw-ar-btn-secondary:hover:not(:disabled) {
    background: #e4e4e4;
}

/* Bouton declencheur (shortcode) */
.asscw-ar-trigger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background: #F2911B;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

.asscw-ar-trigger-btn:hover {
    background: #b83210;
}

/* Ecran de succes */
.asscw-ar-success-screen {
    padding: 40px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.asscw-ar-success-icon {
    width: 56px;
    height: 56px;
    background: #eafaf1;
    color: #1d6a3a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 4px;
}

.asscw-ar-success-screen h3 {
    margin: 0;
    font-size: 20px;
    color: #384759;
}

.asscw-ar-success-screen p {
    margin: 0;
    font-size: 14px;
    color: #384759;
    max-width: 420px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 520px) {
    .asscw-ar-grid-2 {
        grid-template-columns: 1fr;
    }

    .asscw-ar-col-2 {
        grid-column: auto;
    }

    .asscw-ar-vat-row {
        flex-direction: column;
        align-items: stretch;
    }

    .asscw-ar-vat-btn-wrap {
        align-self: flex-start;
    }

    .asscw-ar-modal-footer {
        flex-direction: column-reverse;
    }

    .asscw-ar-btn {
        width: 100%;
    }
}
