/**
 * ═══════════════════════════════════════════════════════════════════
 * 📱 RESPONSIVE STYLES POUR PAGE LOGIN - TransOB TMS
 * ═══════════════════════════════════════════════════════════════════
 */


/* ═══════════════════════════════════════════════════════════════════
   📱 MOBILE FIRST (< 640px)
   ═══════════════════════════════════════════════════════════════════ */


/* Container principal */

#login-form-container {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
}


/* Header */

#form-header h2 {
    font-size: 1.5rem;
    /* 24px */
    line-height: 2rem;
    margin-bottom: 0.5rem;
}

#form-header p {
    font-size: 0.875rem;
    /* 14px */
    line-height: 1.25rem;
}


/* Alerts */

#alerts-container>div {
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    /* 12px */
}


/* Formulaire */

#login-form {
    padding: 1rem;
    border-radius: 1rem;
    gap: 1rem;
}


/* Labels */

#login-form label {
    font-size: 0.75rem;
    /* 12px */
    margin-bottom: 0.5rem;
}


/* Inputs */

#login-form input[type="text"],
#login-form input[type="password"] {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    /* 14px */
    border-radius: 0.75rem;
}

#login-form input[type="password"] {
    padding-right: 2.5rem;
    /* Pour l'icône œil */
}


/* Toggle password button */

#password-field button {
    padding-right: 0.75rem;
}

#password-field button svg {
    width: 1rem;
    height: 1rem;
}


/* Remember me section */

#remember-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

#remember-section label {
    font-size: 0.75rem;
    /* 12px */
}

#remember-section a {
    font-size: 0.75rem;
    /* 12px */
}


/* Submit button */

#submit-button button {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    /* 14px */
    border-radius: 0.75rem;
}

#submit-button button .spinner-ring {
    width: 16px;
    height: 16px;
    border-width: 2px;
}


/* Texte loading mobile */

#submit-button button span:last-child span:first-child {
    display: none;
    /* Cache "Connexion en cours..." */
}

#submit-button button span:last-child span:last-child {
    display: inline;
    /* Affiche "Connexion..." */
}


/* Interfaces alternatives */

#other-interfaces {
    margin-top: 1.5rem;
}

#other-interfaces .relative.mb-6 {
    margin-bottom: 1rem;
}

#other-interfaces .relative.flex span {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    /* 12px */
}

#other-interfaces a {
    padding: 0.75rem 0.75rem;
    font-size: 0.75rem;
    /* 12px */
    border-radius: 0.75rem;
}


/* Texte des liens - version courte sur mobile */

.link-chef-parc .sm\:hidden,
.link-maintenance .sm\:hidden {
    display: inline;
}

.link-chef-parc .sm\:inline,
.link-maintenance .sm\:inline {
    display: none;
}


/* Footer */

#footer {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    /* 12px */
}


/* Logo static (mobile) */

#static-logo {
    top: 1rem;
    left: 1rem;
}

#static-logo img {
    width: 120px !important;
}


/* ═══════════════════════════════════════════════════════════════════
   📱 SMALL (≥ 640px) - TABLETTE PORTRAIT
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 640px) {
    /* Container */
    #login-form-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    /* Header */
    #form-header {
        margin-bottom: 2rem;
    }
    #form-header h2 {
        font-size: 1.875rem;
        /* 30px */
        line-height: 2.25rem;
    }
    #form-header p {
        font-size: 1rem;
        /* 16px */
        line-height: 1.5rem;
    }
    /* Alerts */
    #alerts-container>div {
        padding: 1rem;
        margin-bottom: 1.5rem;
        font-size: 0.875rem;
        /* 14px */
    }
    /* Formulaire */
    #login-form {
        padding: 1.5rem;
        border-radius: 1.5rem;
        gap: 1.25rem;
    }
    /* Labels */
    #login-form label {
        font-size: 0.875rem;
        /* 14px */
    }
    /* Inputs */
    #login-form input[type="text"],
    #login-form input[type="password"] {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        /* 16px */
        border-radius: 0.875rem;
    }
    #login-form input[type="password"] {
        padding-right: 3rem;
    }
    /* Toggle password button */
    #password-field button {
        padding-right: 1rem;
    }
    #password-field button svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    /* Remember me section */
    #remember-section {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0;
    }
    #remember-section label,
    #remember-section a {
        font-size: 0.875rem;
        /* 14px */
    }
    /* Submit button */
    #submit-button button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        /* 16px */
        border-radius: 0.875rem;
    }
    #submit-button button .spinner-ring {
        width: 20px;
        height: 20px;
        border-width: 3px;
    }
    /* Texte loading tablette */
    #submit-button button span:last-child span:first-child {
        display: inline;
        /* Affiche "Connexion en cours..." */
    }
    #submit-button button span:last-child span:last-child {
        display: none;
        /* Cache "Connexion..." */
    }
    /* Interfaces alternatives */
    #other-interfaces {
        margin-top: 2rem;
    }
    #other-interfaces .relative.mb-6 {
        margin-bottom: 1.5rem;
    }
    #other-interfaces .relative.flex span {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        /* 14px */
    }
    #other-interfaces a {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        /* 14px */
        border-radius: 0.875rem;
        gap: 0.75rem;
    }
    /* Texte des liens - version complète sur tablette */
    .link-chef-parc .sm\:hidden,
    .link-maintenance .sm\:hidden {
        display: none;
    }
    .link-chef-parc .sm\:inline,
    .link-maintenance .sm\:inline {
        display: inline;
    }
    /* Footer */
    #footer {
        margin-top: 2rem;
        font-size: 0.875rem;
        /* 14px */
    }
    /* Logo static */
    #static-logo {
        top: 1.5rem;
        left: 1.5rem;
    }
    #static-logo img {
        width: 180px !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   💻 LARGE (≥ 1024px) - DESKTOP
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {
    /* Container */
    #login-form-container {
        padding-left: 0;
        padding-right: 0;
        max-width: 28rem;
        /* 448px */
    }
    /* Header */
    #form-header {
        margin-bottom: 2.5rem;
    }
    #form-header h2 {
        font-size: 2.25rem;
        /* 36px */
        line-height: 2.5rem;
    }
    #form-header p {
        font-size: 1.125rem;
        /* 18px */
        line-height: 1.75rem;
    }
    /* Alerts */
    #alerts-container>div {
        margin-bottom: 1.5rem;
    }
    /* Formulaire */
    #login-form {
        padding: 2rem;
        border-radius: 1rem;
        gap: 1.5rem;
    }
    /* Inputs */
    #login-form input[type="text"],
    #login-form input[type="password"] {
        padding: 0.875rem 1rem;
        border-radius: 0.75rem;
    }
    /* Submit button */
    #submit-button button {
        padding: 1rem 1.5rem;
        border-radius: 0.75rem;
    }
    /* Interfaces alternatives */
    #other-interfaces {
        margin-top: 2.5rem;
    }
    #other-interfaces a {
        padding: 0.875rem 1rem;
        border-radius: 0.75rem;
    }
    /* Logo static */
    #static-logo {
        top: 2rem;
        left: 2rem;
    }
    #static-logo img {
        width: 240px !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   🖥️ EXTRA LARGE (≥ 1280px)
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 1280px) {
    #login-form-container {
        max-width: 32rem;
        /* 512px */
    }
    #login-form {
        padding: 2.5rem;
    }
    #static-logo img {
        width: 280px !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   📱 ORIENTATION LANDSCAPE (MOBILE)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-height: 600px) and (orientation: landscape) {
    #form-header {
        margin-bottom: 1rem !important;
    }
    #form-header h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.25rem !important;
    }
    #form-header p {
        font-size: 0.75rem !important;
    }
    #login-form {
        padding: 1rem !important;
        gap: 0.75rem !important;
    }
    #login-form input[type="text"],
    #login-form input[type="password"] {
        padding: 0.5rem 0.75rem !important;
    }
    #submit-button button {
        padding: 0.625rem 1rem !important;
    }
    #other-interfaces {
        margin-top: 1rem !important;
    }
    #other-interfaces a {
        padding: 0.5rem 0.75rem !important;
    }
    #footer {
        margin-top: 1rem !important;
    }
    #static-logo {
        top: 0.5rem !important;
        left: 0.5rem !important;
    }
    #static-logo img {
        width: 80px !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   ♿ ACCESSIBILITY - TOUCH TARGETS
   ═══════════════════════════════════════════════════════════════════ */

@media (pointer: coarse) {
    /* Augmenter la zone de touch sur mobile */
    #remember_me {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
    #password-field button {
        padding: 1rem !important;
    }
    #other-interfaces a {
        min-height: 48px;
        /* iOS touch target */
    }
    #submit-button button {
        min-height: 48px;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   🌙 DARK MODE (SI NÉCESSAIRE)
   ═══════════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: dark) {
    /* Pas d'implémentation dark mode pour le moment */
    /* Peut être ajouté plus tard si nécessaire */
}


/* ═══════════════════════════════════════════════════════════════════
   ⚡ PERFORMANCE - REDUCE MOTION
   ═══════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    #login-form,
    #login-form * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}