/* =========================================================
   ICI DAR BOUAZZA — CONNEXION & INSCRIPTION
   Thème premium rouge / noir / blanc
========================================================= */

.auth-page {
    --auth-primary: #f3073e;
    --auth-primary-dark: #d80436;
    --auth-primary-soft: rgba(243, 7, 62, 0.09);
    --auth-dark: #171719;
    --auth-dark-soft: #29292d;
    --auth-text: #36363a;
    --auth-muted: #75757b;
    --auth-border: #e5e5e9;
    --auth-surface: #ffffff;
    --auth-background: #f6f7f9;
    --auth-radius: 24px;
    --auth-shadow: 0 18px 55px rgba(20, 20, 30, 0.09);

    position: relative;
    min-height: 72vh;
    padding: 62px 0 82px;
    overflow: hidden;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 8% 12%, rgba(243, 7, 62, 0.09), transparent 25%),
        radial-gradient(circle at 92% 88%, rgba(25, 25, 29, 0.07), transparent 26%),
        linear-gradient(145deg, #f9f9fa 0%, var(--auth-background) 52%, #f3f3f5 100%);
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.auth-page::before {
    top: -145px;
    right: -135px;
    width: 370px;
    height: 370px;
    border: 55px solid rgba(243, 7, 62, 0.035);
}

.auth-page::after {
    bottom: -180px;
    left: -150px;
    width: 390px;
    height: 390px;
    border: 60px solid rgba(20, 20, 24, 0.025);
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
}

.auth-page > .container {
    position: relative;
    z-index: 1;
    max-width: 1160px;
}

.auth-page > .container > .row {
    align-items: stretch;
}

.auth-page > .container > .row > [class*="col-"] {
    display: flex;
}

/* =========================================================
   CARTES
========================================================= */

.auth-page .card {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(229, 229, 233, 0.95) !important;
    border-radius: var(--auth-radius) !important;
    box-shadow: var(--auth-shadow) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.auth-page .card:hover {
    transform: translateY(-4px);
    border-color: rgba(243, 7, 62, 0.17) !important;
    box-shadow: 0 24px 65px rgba(20, 20, 30, 0.13) !important;
}

.auth-page .card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-primary), #ff6689);
}

/* =========================================================
   EN-TÊTES DES CARTES
========================================================= */

.auth-page .card-header {
    position: relative;
    min-height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 25px !important;
    overflow: hidden;
    color: #fff !important;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.12), transparent 26%),
        linear-gradient(135deg, #08162a 0%, #223858 100%) !important;
    border: 0 !important;
}

.auth-page .card-header::before {
    content: "";
    position: absolute;
    top: -68px;
    right: -45px;
    width: 155px;
    height: 155px;
    border: 24px solid rgba(243, 7, 62, 0.18);
    border-radius: 50%;
}

.auth-page .card-header::after {
    content: "";
    position: absolute;
    bottom: -47px;
    left: -36px;
    width: 105px;
    height: 105px;
    background: rgba(243, 7, 62, 0.08);
    border-radius: 50%;
}

.auth-page .card-header h4 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #fff;
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -0.35px;
}

.auth-page .card-header h4::after {
    content: "";
    display: block;
    width: 38px;
    height: 3px;
    margin: 11px auto 0;
    background: var(--auth-primary);
    border-radius: 20px;
}

/* =========================================================
   CORPS ET FORMULAIRES
========================================================= */

.auth-page .card-body {
    padding: 32px 34px 36px;
}

.auth-page .mb-3 {
    margin-bottom: 19px !important;
}

.auth-page .form-label {
    margin-bottom: 8px;
    color: #303034;
    font-size: 13.5px;
    font-weight: 750;
}

.auth-page .form-control,
.auth-page .form-select {
    width: 100%;
}

.auth-page .form-control,
.auth-page .form-select {
    min-height: 54px;
    padding: 12px 15px;
    color: #27272b;
    background-color: #fbfbfc;
    border: 1px solid var(--auth-border);
    border-radius: 13px;
    box-shadow: inset 0 1px 2px rgba(20, 20, 30, 0.02);
    font-size: 15px;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-page .form-control::placeholder {
    color: #aaaab0;
}

.auth-page .form-control:hover,
.auth-page .form-select:hover {
    border-color: #d4d4d9;
}

.auth-page .form-control:focus,
.auth-page .form-select:focus {
    color: #202023;
    background-color: #fff;
    border-color: var(--auth-primary);
    outline: 0;
    box-shadow: 0 0 0 4px var(--auth-primary-soft);
}

.auth-page .form-select {
    cursor: pointer;
}

.auth-page input:-webkit-autofill,
.auth-page input:-webkit-autofill:hover,
.auth-page input:-webkit-autofill:focus {
    -webkit-text-fill-color: #27272b;
    box-shadow: 0 0 0 1000px #fff inset;
    transition: background-color 9999s ease-out;
}

/* =========================================================
   MOT DE PASSE OUBLIÉ
========================================================= */

.auth-page .text-end a {
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    color: var(--auth-primary) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.auth-page .text-end a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--auth-primary);
    transition: width 0.25s ease;
}

.auth-page .text-end a:hover {
    color: var(--auth-primary-dark) !important;
}

.auth-page .text-end a:hover::after {
    width: 100%;
}

/* =========================================================
   BOUTONS PRINCIPAUX
========================================================= */

.auth-page .btn-danger {
    position: relative;
    min-height: 54px;
    margin-top: 3px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #ff174f 0%, var(--auth-primary-dark) 100%);
    border: 0;
    border-radius: 13px;
    box-shadow: 0 10px 25px rgba(243, 7, 62, 0.24);
    font-size: 15px;
    font-weight: 850;
    letter-spacing: 0.05px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.auth-page .btn-danger::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.20), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s ease;
}

.auth-page .btn-danger:hover {
    color: #fff;
    filter: saturate(1.08);
    transform: translateY(-2px);
    box-shadow: 0 14px 31px rgba(243, 7, 62, 0.32);
}

.auth-page .btn-danger:hover::before {
    left: 140%;
}

.auth-page .btn-danger:active {
    transform: translateY(0);
}

.auth-page .btn-danger:focus-visible {
    outline: 3px solid rgba(243, 7, 62, 0.28);
    outline-offset: 3px;
    box-shadow: none;
}

/* =========================================================
   MESSAGES
========================================================= */

.auth-page .alert {
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 0;
    border-left: 4px solid transparent;
    border-radius: 11px;
    font-size: 13.5px;
    line-height: 1.55;
}

.auth-page .alert-danger {
    color: #8f1630;
    background: #fff0f3;
    border-left-color: #dc3545;
}

.auth-page .alert-warning {
    color: #765000;
    background: #fff7dc;
    border-left-color: #f0ad00;
}

.auth-page .alert-success {
    color: #12653a;
    background: #eafaf1;
    border-left-color: #20a661;
}

.auth-page .alert-info {
    color: #1b5776;
    background: #edf8fd;
    border-left-color: #35a8df;
}

#message:empty {
    display: none;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991.98px) {
    .auth-page {
        padding: 45px 0 65px;
    }

    .auth-page .card-body {
        padding: 28px 25px 31px;
    }

    .auth-page .card-header h4 {
        font-size: 23px;
    }
}

@media (max-width: 767.98px) {
    .auth-page {
        min-height: auto;
        padding: 28px 0 48px;
    }

    .auth-page > .container > .row {
        row-gap: 6px;
    }

    .auth-page .card {
        border-radius: 19px !important;
    }

    .auth-page .card:hover {
        transform: none;
    }

    .auth-page .card-header {
        min-height: 92px;
        padding: 23px 20px !important;
    }

    .auth-page .card-body {
        padding: 24px 20px 27px;
    }

    /* 16 px empêche le zoom automatique sur iPhone */
    .auth-page .form-control,
    .auth-page .form-select {
        min-height: 52px;
        font-size: 16px;
    }

    .auth-page .btn-danger {
        min-height: 52px;
    }
}

@media (max-width: 399.98px) {
    .auth-page .card-body {
        padding-right: 17px;
        padding-left: 17px;
    }

    .auth-page .card-header h4 {
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page *,
    .auth-page *::before,
    .auth-page *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
