/* Pages de connexion / inscription — responsive professionnel */

.auth-violet-bg {
    position: relative;
    isolation: isolate;
    background-color: #001433;
    background-image:
        radial-gradient(ellipse 90% 55% at 50% -5%, rgba(212, 175, 55, 0.18) 0%, transparent 58%),
        radial-gradient(ellipse 45% 35% at 100% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse 40% 30% at 0% 100%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        linear-gradient(160deg, #000d26 0%, #001a4d 28%, #002366 55%, #003087 82%, #0047ab 100%);
}

.auth-violet-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(125deg, transparent 42%, rgba(212, 175, 55, 0.14) 50%, transparent 58%),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.015) 0,
            rgba(255, 255, 255, 0.015) 1px,
            transparent 1px,
            transparent 10px
        );
    pointer-events: none;
}

.auth-page__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    margin-inline: auto;
}

.auth-page {
    display: flex;
    min-height: 100dvh;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    overflow-x: hidden;
}

.auth-page__inner--md {
    max-width: 28rem;
}

.auth-page__inner--lg {
    max-width: 42rem;
}

.auth-card {
    width: 100%;
    max-width: 100%;
    border-top: 3px solid #d4af37;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 20px 45px rgba(0, 26, 77, 0.22);
    padding: clamp(1rem, 4vw, 2rem);
}

.auth-card__title {
    font-size: clamp(1.25rem, 4.5vw, 1.5rem);
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
}

.auth-card__subtitle {
    margin-top: 0.5rem;
    font-size: clamp(0.8125rem, 3vw, 0.875rem);
    color: #4b5563;
    line-height: 1.45;
}

.auth-lang-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.625rem 0.875rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(212, 175, 55, 0.55);
    border-radius: 0.75rem;
    box-shadow:
        0 10px 28px rgba(0, 10, 40, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.auth-lang-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #003087;
    white-space: nowrap;
}

.auth-lang-label svg {
    width: 1rem;
    height: 1rem;
    color: #d4af37;
    flex-shrink: 0;
}

.auth-lang-form {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.auth-lang-select {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23003087'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    background-size: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-lang-select:hover {
    border-color: #d4af37;
}

.auth-lang-select:focus {
    outline: none;
    border-color: #0047ab;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35);
}

@media (min-width: 480px) {
    .auth-lang-select {
        width: auto;
        min-width: 11.5rem;
        max-width: 16rem;
    }
}

.auth-field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.auth-input {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0.75rem 0.875rem 0.75rem 2.5rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #111827;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #0047ab;
    box-shadow: 0 0 0 2px rgba(0, 71, 171, 0.25);
}

.auth-input-wrap {
    position: relative;
    min-width: 0;
}

.auth-input-icon {
    position: absolute;
    inset-block: 0;
    left: 0.75rem;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: #9ca3af;
}

.auth-input-icon--top {
    align-items: flex-start;
    padding-top: 0.85rem;
}

.auth-textarea {
    min-height: 5rem;
    resize: vertical;
}

.auth-select {
    appearance: none;
    padding-right: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 1rem;
}

.auth-password-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.5rem;
}

.auth-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.auth-btn:hover {
    filter: brightness(1.05);
}

@media (min-width: 768px) {
    .auth-btn:hover {
        transform: translateY(-1px);
    }
}

.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    min-width: 0;
}

@media (min-width: 768px) {
    .auth-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.auth-alert {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    border-radius: 0.375rem;
    word-break: break-word;
}

.auth-footer {
    padding-top: 1rem;
    margin-top: 0.5rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
    color: #4b5563;
}

/* Logo auth — adapté à la largeur de la carte, pas du viewport */
.site-logo--auth .site-logo__img {
    height: clamp(3.75rem, 22vw, 5.5rem);
    width: auto;
    max-width: min(100%, 16rem);
    min-width: 0;
}

.site-logo--auth {
    padding: 0;
}

.site-logo__tagline {
    margin-top: 0.75rem;
    font-size: clamp(0.75rem, 3vw, 0.875rem);
    padding-inline: 0.5rem;
}

.auth-header {
    margin-bottom: clamp(1rem, 4vw, 2rem);
}

@media (max-width: 380px) {
    .auth-page {
        padding-inline: 0.75rem;
    }

    .auth-card {
        padding: 0.875rem;
        border-radius: 0.875rem;
    }
}
