/* ═══════════════════════════════════════════════
   PAGES D'AUTHENTIFICATION - STYLES COMMUNS
═══════════════════════════════════════════════ */

.login-page-wrapper {
    position: relative;
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px;
    background: url('../images/diversite.png') center / cover no-repeat;
    overflow: hidden;
}



.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;

    /* Effet verre */
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 26px;

    padding: 52px 48px;

    /* Ombre plus élégante et profonde */
    box-shadow:
        0 20px 60px rgba(60, 20, 20, 0.18),
        0 8px 24px rgba(152, 15, 30, 0.10),
        0 0 0 1px rgba(152, 15, 30, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    overflow: hidden;
}

/* Petite lumière décorative dans le coin */
.login-container::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 240px;
    height: 240px;

    background: radial-gradient(
        circle,
        rgba(152, 15, 30, 0.10) 0%,
        rgba(152, 15, 30, 0.03) 45%,
        transparent 70%
    );

    pointer-events: none;
}

/* Petit reflet en haut */
.login-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    width: 84%;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.95),
        transparent
    );

    pointer-events: none;
}

/* Pour la page register qui a plus de champs */
.login-container.register-container {
    max-width: 600px;
}

.login-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 36px;
}

.login-header .login-logo {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 22px;
    object-fit: contain;

    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.login-header .form-title {
    font-size: 29px;
    font-weight: 750;
    color: #980F1E;
    margin: 0 0 10px;

    letter-spacing: -0.4px;
}

.login-header .form-sub {
    max-width: 400px;
    margin: 0 auto;

    font-size: 14px;
    color: #666;
    line-height: 1.6;
}
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #4b4b4b;
    margin-bottom: 8px;

    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.form-input {
    width: 100%;
    box-sizing: border-box;

    padding: 10px 17px;

    font-size: 14px;
    color: #333;

    border: 1.5px solid rgba(120, 120, 120, 0.20);
    border-radius: 13px;

    background: rgba(248, 249, 250, 0.82);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease,
        transform 0.2s ease;
}

.form-input:hover {
    border-color: rgba(152, 15, 30, 0.30);
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus {
    outline: none;

    border-color: #980F1E;
    background: #fff;

    box-shadow:
        0 0 0 3px rgba(152, 15, 30, 0.09),
        0 5px 15px rgba(152, 15, 30, 0.08);

    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #aaa;
}

.form-hint {
    font-size: 11.5px;
    color: #888;
    margin: 7px 2px 0;
}
.btn-gold.btn-full {
    width: 100%;
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 10px 22px;

    border: none;
    border-radius: 13px;

    background: linear-gradient(
        135deg,
        #4c2b2b 0%,
        #980F1E 55%,
        #a81225 100%
    );

    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;

    cursor: pointer;

    box-shadow:
        0 7px 18px rgba(152, 15, 30, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.btn-gold.btn-full:hover {
    background: linear-gradient(
        135deg,
        #5a3030 0%,
        #a81225 55%,
        #bd162b 100%
    );

    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(152, 15, 30, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.btn-gold.btn-full:active {
    transform: translateY(0);
    box-shadow:
        0 4px 10px rgba(152, 15, 30, 0.20);
}
.sso-btn {
    width: 100%;
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    padding: 10px 20px;

    background: rgba(255, 255, 255, 0.75);

    border: 1.5px solid rgba(152, 15, 30, 0.28);
    border-radius: 13px;

    color: #980F1E;

    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15px;

    cursor: pointer;

    box-shadow:
        0 4px 12px rgba(80, 20, 20, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.sso-btn span:first-child {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: rgba(152, 15, 30, 0.08);

    font-size: 17px;
}

.sso-btn:hover {
    background: #fff;

    border-color: #980F1E;
    color: #980F1E;

    transform: translateY(-2px);

    box-shadow:
        0 8px 20px rgba(152, 15, 30, 0.12);
}

.sso-btn:active {
    transform: translateY(0);
}
.form-input.is-invalid {
    border-color: #dc3545;
}

.form-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
}


.remember-row {
    margin-bottom: 25px;
    font-size: 13px;
}

.remember-label {
    color: #666;
}

.remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;

    accent-color: #980F1E;

    cursor: pointer;
}

.forgot-link {
    color: #980F1E;
    font-weight: 600;

    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #c0162b;
    text-decoration: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 14px;

    margin: 27px 0;

    color: #999;
}

.divider::before,
.divider::after {
    content: '';
    position: static;

    flex: 1;
    width: auto;

    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        #ddd
    );
}

.divider::after {
    background: linear-gradient(
        90deg,
        #ddd,
        transparent
    );
}

.divider span {
    background: transparent;
    padding: 0;

    color: #999;
    font-size: 12px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-footer {
    text-align: center;
    font-size: 13px;
    color: #777;
     margin: 15px 0 0 0;
    line-height: 1.5;
}

.form-footer a {
    color: #980F1E;
    text-decoration: none;
    font-weight: 700;

    transition: color 0.2s ease;
}

.form-footer a:hover {
    color: #c0162b;
    text-decoration: underline;
}

/* Alerts */
.alert-error,
.alert-success {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

.alert-list {
    margin: 0;
    padding-left: 20px;
}

/* Input wrapper pour password toggle */
.input-wrap {
    position: relative;
}

.input-wrap .form-input {
    padding-right: 48px;
}

.pass-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 8px;
    color: #999;
}

.pass-toggle:hover {
    color: #666;
}

/* Responsive */
@media (max-width: 640px) {
    .login-page-wrapper {
        padding: 40px 16px;
        min-height: calc(100vh - 120px);
    }
    
    .login-container {
        padding: 40px 28px;
        max-width: 100%;
    }
    
    .login-container.register-container {
        max-width: 100%;
    }
    
    .login-header .form-title {
        font-size: 24px;
    }
    
    .remember-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ═══════════════════════════════════════════════
   SUPPORT RTL (ARABE)
   Nécessite dir="rtl" sur le <html> (ou un ancêtre) :
   <html lang="{{ app()->getLocale() }}"
         dir="{{ app()->getLocale() === 'ar' ? 'rtl' : 'ltr' }}">
   Les mises en page flex (.btn-gold, .sso-btn, .alert-error,
   .alert-success...) se retournent déjà automatiquement grâce
   à dir="rtl" : seuls les éléments positionnés en absolu et les
   icônes directionnelles ont besoin d'un correctif explicite.
═══════════════════════════════════════════════ */
.terms-group {
    margin-bottom: 22px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    cursor: pointer;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;

    accent-color: #980F1E;
    cursor: pointer;
}

.checkbox-label span a {
    color: #980F1E;
    font-weight: 600;
    text-decoration: none;
}

.checkbox-label span a:hover {
    color: #c0162b;
    text-decoration: underline;
}
/* Lumière décorative du coin : passe à gauche en RTL */
[dir="rtl"] .login-container::before {
    right: auto;
    left: -100px;
}

/* Bouton "afficher/masquer le mot de passe" : passe à gauche du champ */
[dir="rtl"] .pass-toggle {
    right: auto;
    left: 12px;
}

[dir="rtl"] .input-wrap .form-input {
    padding-right: 17px;
    padding-left: 48px;
}

/* Puces de la liste d'erreurs : indentation à droite en RTL */
[dir="rtl"] .alert-list {
    padding-left: 0;
    padding-right: 20px;
}

/* Icônes directionnelles (flèches) : effet miroir en RTL
   ex. la flèche "→" du bouton de connexion doit pointer vers la gauche */
[dir="rtl"] .btn-gold.btn-full i.fa-arrow-right,
[dir="rtl"] .btn-gold.btn-full i.fa-arrow-left,
[dir="rtl"] .icon-flip {
    transform: scaleX(-1);
}
