/* Pages de connexion, inscription et mot de passe (layout « guest »). */

:root {
    --orange-ink: #c24e0c;
}

.auth-body {
    min-height: 100vh;
    margin: 0;
    background: #fff;
    color: #4a515b;
}

.auth {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Panneau de marque */

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.5rem;
    overflow: hidden;
    background: linear-gradient(150deg, #e15c12 0%, #c24e0c 100%);
    color: #fff;
}

.auth-brand::after {
    content: '';
    position: absolute;
    right: -6rem;
    bottom: -6rem;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.auth-brand-logo img {
    display: block;
    height: 2.75rem;
}

.auth-brand-body,
.auth-brand-foot {
    display: none;
}

.auth-brand-words span {
    display: block;
}

@media (min-width: 992px) {
    .auth {
        flex-direction: row;
    }

    .auth-brand {
        position: sticky;
        top: 0;
        flex: 0 0 42%;
        max-width: 36rem;
        height: 100vh;
        padding: 2.5rem 3rem;
    }

    .auth-brand-logo img {
        height: 3.5rem;
    }

    .auth-brand-body {
        display: block;
        margin: auto 0;
    }

    .auth-brand-words {
        margin-bottom: 1.5rem;
        font-size: clamp(2.5rem, 4vw, 3.75rem);
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: -.02em;
    }

    .auth-brand-text {
        max-width: 24rem;
        margin: 0;
        color: rgba(255, 255, 255, .85);
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .auth-brand-foot {
        display: block;
        margin: 0;
        color: rgba(255, 255, 255, .7);
        font-size: .85rem;
    }
}

/* Panneau du formulaire */

.auth-main {
    display: flex;
    flex: 1;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem 1.25rem 3rem;
}

@media (min-width: 992px) {
    .auth-main {
        align-items: center;
        padding: 3rem 2rem;
    }
}

.auth-panel {
    width: 100%;
    max-width: 26rem;
}

.auth-panel-wide {
    max-width: 44rem;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.5rem;
    padding: .25rem 0;
    color: #4a515b;
    font-weight: 600;
}

.auth-back:hover {
    color: var(--orange-ink);
    text-decoration: none;
}

.auth-title {
    margin-bottom: .5rem;
    color: #212832;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.01em;
}

.auth-lead {
    margin-bottom: 1.75rem;
    color: #5b6470;
    line-height: 1.6;
}

.auth-alert {
    display: flex;
    gap: .625rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: .875rem 1rem;
    border-radius: .875rem;
    font-weight: 600;
    line-height: 1.5;
}

.auth-alert i {
    margin-top: .2rem;
}

.auth-alert-success {
    background: #e7f6ee;
    color: #0b6b43;
}

.auth-alert-error {
    background: #fdecec;
    color: #b42318;
}

/* Champs */

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field label,
.auth-label {
    display: block;
    margin-bottom: .375rem;
    color: #212832;
    font-size: .95rem;
    font-weight: 600;
}

.auth-input {
    display: flex;
    align-items: center;
    gap: .625rem;
    min-height: 3.25rem;
    padding: 0 1rem;
    border: 1px solid #d4dae3;
    border-radius: .875rem;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.auth-input:focus-within {
    border-color: var(--orange-ink);
    box-shadow: 0 0 0 .2rem rgba(225, 92, 18, .18);
}

.auth-input.is-invalid {
    border-color: #d92d20;
}

.auth-input > i {
    color: #8a929c;
}

.auth-input input,
.auth-input select {
    flex: 1;
    min-width: 0;
    height: 3.25rem;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #212832;
    font-size: 1rem;
}

.auth-input select {
    cursor: pointer;
}

.auth-eye {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-right: -.5rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5b6470;
}

.auth-eye:hover {
    background: #f2f6fc;
}

.auth-error {
    margin: .375rem 0 0;
    color: #b42318;
    font-size: .875rem;
    font-weight: 600;
}

.auth-hint {
    margin: .375rem 0 0;
    color: #5b6470;
    font-size: .875rem;
}

.auth-hint:empty {
    display: none;
}

.auth-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.auth a {
    color: var(--orange-ink);
    font-weight: 600;
}

.auth .custom-control-label {
    color: #4a515b;
    font-weight: 400;
}

.auth .custom-control-input:checked ~ .custom-control-label::before {
    border-color: var(--orange-ink);
    background-color: var(--orange-ink);
}

.auth-submit {
    display: inline-flex;
    gap: .625rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.25rem;
    padding: .75rem 1.5rem;
    border: 0;
    border-radius: 999px;
    background: var(--orange-ink);
    color: #fff !important;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color .15s;
}

.auth-submit:hover {
    background: #a8420a;
    text-decoration: none;
}

.auth-submit i {
    transition: transform .15s;
}

.auth-submit:hover i {
    transform: translateX(3px);
}

.auth-switch {
    margin: 1.75rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e3e8ef;
    text-align: center;
}

/* Inscription */

.auth-section {
    margin: 0 0 1.5rem;
    padding: 0;
    border: 0;
}

.auth-section legend {
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #e3e8ef;
    color: #8a929c;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-grid {
    display: grid;
    gap: 0 1rem;
}

@media (min-width: 768px) {
    .auth-grid {
        grid-template-columns: 7rem 1fr 1fr;
    }

    .auth-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.auth-date {
    display: grid;
    grid-template-columns: 5rem 1fr 6.5rem;
    gap: .5rem;
}

.auth-done {
    text-align: center;
}

.auth-done-icon {
    display: inline-grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.25rem;
    border-radius: 50%;
    background: #fdf0e8;
    color: var(--orange-ink);
    font-size: 1.5rem;
}

/* Focus clavier */

.auth a:focus:not(:focus-visible),
.auth button:focus:not(:focus-visible) {
    outline: 0;
}

.auth a:focus-visible,
.auth button:focus-visible {
    outline: 2px solid var(--orange-ink);
    outline-offset: 2px;
}

.auth-brand a:focus-visible {
    outline-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .auth-submit i {
        transition: none;
        transform: none !important;
    }
}

/* Crédit : dans le panneau orange sur grand écran, sous le formulaire sur mobile. */
.auth .auth-brand-foot a {
    color: #fff;
    font-weight: 600;
}

.auth-credit {
    margin: 2rem 0 0;
    color: #5b6470;
    font-size: .85rem;
    text-align: center;
}

@media (min-width: 992px) {
    .auth-credit {
        display: none;
    }
}
