/* ============================================================================
 * BRIDEP Core - Mobile-first Dashboard Admin (Login + Lightboxes)
 * Fichier : css/admin-index-mobile.css
 * ============================================================================
 * Surcharges mobile UNIQUEMENT (max-width: 768px).
 * Couvre : login admin (index.php), lightbox 2FA-bridep, lightbox-forgot-bridep.
 * ============================================================================ */

@media (max-width: 768px) {
    body {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ============================================================
   PAGE LOGIN ADMIN (dashboard/index.php)
============================================================ */
@media (max-width: 820px) {
    /* Le dashboard.css fait deja masquer le panel-left a 820px,
       on s'assure du comportement et on adapte le panel-right */
    .panel-left {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .login-page {
        padding: 0 !important;
        min-height: 100vh !important;
    }
    .login-container {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        min-height: 100vh !important;
    }
    .panel-right {
        padding: 28px 20px !important;
        min-height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    /* Header form */
    .form-header {
        margin-bottom: 24px !important;
    }
    .form-header-top {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 14px !important;
    }
    .brand {
        gap: 10px !important;
    }
    .brand-logo-box,
    .brand-logo-fallback {
        width: 50px !important;
        height: 50px !important;
    }
    .brand-name {
        font-size: 16px !important;
        line-height: 1.2;
    }
    .eyebrow {
        font-size: 11px !important;
    }

    /* Champs form */
    .field-wrap {
        margin-bottom: 16px !important;
    }
    .field-label {
        font-size: 12.5px !important;
        margin-bottom: 6px !important;
    }
    .field-input {
        min-height: 50px !important;
        font-size: 15px !important;
        padding: 12px 14px 12px 44px !important;
        border-radius: 12px !important;
    }
    .field-icon {
        font-size: 14px !important;
    }
    .field-toggle {
        width: 44px !important;
        height: 44px !important;
        right: 4px !important;
    }

    /* Options form (remember + forgot) */
    .field-options {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        font-size: 12.5px !important;
    }
    .check-box {
        width: 18px !important;
        height: 18px !important;
    }
    .forgot {
        font-size: 12.5px !important;
        padding: 4px 0 !important;
    }

    /* Bouton submit */
    .btn-submit {
        width: 100% !important;
        min-height: 52px !important;
        font-size: 15px !important;
        padding: 14px !important;
        border-radius: 12px !important;
    }
    .btn-text {
        font-size: 15px !important;
    }
    .btn-icon {
        font-size: 13px !important;
    }

    /* Footer */
    .form-footer {
        margin-top: 18px !important;
        padding-top: 14px !important;
    }
    .footer-note {
        font-size: 11.5px !important;
        line-height: 1.5;
    }

    /* Erreur */
    .form-error {
        font-size: 12.5px !important;
        padding: 10px 12px !important;
    }

    /* Decor : enlever ou reduire */
    .bg-decor,
    .decor-ring,
    .decor-dot {
        display: none !important;
    }
}

/* Petits écrans */
@media (max-width: 380px) {
    .panel-right {
        padding: 22px 16px !important;
    }
    .field-input {
        font-size: 14px !important;
    }
    .form-header-top .brand-name {
        font-size: 15px !important;
    }
}

/* ============================================================
   LIGHTBOX 2FA ADMIN (lightbox-2fa-bridep.php)
   Memes classes que cote repondant : lb-2fa-*, lb-otp-*
============================================================ */
@media (max-width: 768px) {
    .lb-2fa-overlay {
        padding: 12px !important;
    }
    .lb-2fa-box {
        max-width: 100% !important;
        border-radius: 18px !important;
        max-height: 96vh !important;
        overflow-y: auto;
    }
    .lb-2fa-header {
        padding: 24px 18px 18px !important;
    }
    .lb-2fa-icon-wrap {
        width: 56px !important;
        height: 56px !important;
        font-size: 22px !important;
    }
    .lb-2fa-title {
        font-size: 18px !important;
    }
    .lb-2fa-sub {
        font-size: 12.5px !important;
        line-height: 1.5;
    }
    .lb-2fa-body {
        padding: 18px !important;
    }
    .lb-2fa-label {
        font-size: 12.5px !important;
    }

    /* OTP inputs */
    .lb-otp-wrap {
        gap: 8px !important;
        justify-content: center;
        flex-wrap: nowrap !important;
    }
    .lb-otp-input {
        width: 44px !important;
        height: 54px !important;
        font-size: 22px !important;
        border-radius: 11px !important;
    }

    /* Bouton */
    .lb-2fa-btn {
        width: 100% !important;
        min-height: 50px !important;
        font-size: 15px !important;
        justify-content: center !important;
    }
    .lb-2fa-resend {
        font-size: 12.5px !important;
        padding: 10px 0 !important;
        text-align: center;
    }
    .lb-2fa-footer {
        padding: 14px 18px 18px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* Success screen */
    .lb-success-circle {
        width: 64px !important;
        height: 64px !important;
        font-size: 26px !important;
    }
    .lb-success-title {
        font-size: 17px !important;
    }
    .lb-success-desc {
        font-size: 13px !important;
    }
}

@media (max-width: 380px) {
    .lb-otp-input {
        width: 38px !important;
        height: 48px !important;
        font-size: 18px !important;
    }
    .lb-otp-wrap {
        gap: 6px !important;
    }
}

/* ============================================================
   LIGHTBOX FORGOT PASSWORD ADMIN (lightbox-forgot-bridep.php)
============================================================ */
@media (max-width: 768px) {
    .lb-forgot-overlay {
        padding: 12px !important;
    }
    .lb-forgot-box {
        max-width: 100% !important;
        border-radius: 18px !important;
        max-height: 96vh !important;
        overflow-y: auto;
    }
    .lb-forgot-close {
        top: 10px !important;
        right: 10px !important;
        width: 36px !important;
        height: 36px !important;
    }
    .lb-forgot-header {
        padding: 22px 18px 16px !important;
    }
    .lb-forgot-title,
    .lb-forgot-sub {
        text-align: center;
    }
    .lb-forgot-sub {
        font-size: 12.5px !important;
        line-height: 1.5;
    }

    .lb-forgot-body {
        padding: 18px !important;
    }
    .lb-field {
        margin-bottom: 14px !important;
    }
    .lb-field-label {
        font-size: 12.5px !important;
        margin-bottom: 5px !important;
    }
    .lb-field input {
        min-height: 48px !important;
        font-size: 14.5px !important;
        padding: 12px 14px !important;
        border-radius: 11px !important;
    }

    /* OTP step 2 */
    .lb-otp-wrap.lb-forgot-otp {
        gap: 8px !important;
    }

    /* Criteres mot de passe */
    .lb-criteria-list {
        gap: 5px !important;
    }
    .lb-criteria-item,
    .criteria-item {
        font-size: 12px !important;
        line-height: 1.4;
    }
    .criteria-dot {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0;
    }

    /* Boutons */
    .lb-btn,
    .lb-btn-back {
        width: 100% !important;
        min-height: 48px !important;
        font-size: 14.5px !important;
        justify-content: center !important;
        padding: 12px !important;
    }
    /* Footer en colonne */
    .lb-forgot-box .lb-forgot-body > div:last-child {
        flex-direction: column !important;
        gap: 8px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lb-2fa-overlay,
    .lb-forgot-overlay,
    .lb-2fa-box,
    .lb-forgot-box {
        transition: none !important;
        animation: none !important;
    }
}
