/* Theme Park Industries — page connexion (play.php), style plat et sobre */

:root {
    --tp-bg-deep: #0a0c0f;
    --tp-panel: rgba(24, 26, 30, 0.88);
    --tp-accent: #6a9398;
    --tp-accent-hover: #7fa3a8;
    --tp-text: #e8eaef;
    --tp-text-muted: rgba(232, 234, 239, 0.5);
    --tp-input-bg: rgba(12, 14, 18, 0.9);
    --tp-input-border: rgba(255, 255, 255, 0.1);
    --tp-radius: 12px;
    --tp-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--tp-font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--tp-text);
    background: var(--tp-bg-deep);
}

.play-lang-switch {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(10, 14, 20, 0.55);
    border: 1px solid rgba(106, 147, 152, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.play-lang-switch__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--tp-text);
    text-decoration: none;
    border: 1px solid transparent;
}

.play-lang-switch__btn.is-active {
    color: #0b1115;
    background: var(--tp-accent);
}

/* Grain SVG (feTurbulence) — texture légère par-dessus le fond */
.play-backdrop {
    --tp-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: var(--tp-bg-deep);
    background-image: url("../../img/fond.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
}

/* Halos discrets (teintes du ciel / herbe du visuel) — pas d’assombrissement global */
.play-backdrop::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 55% at 18% 12%, rgba(120, 170, 190, 0.14), transparent 58%),
        radial-gradient(ellipse 75% 60% at 88% 22%, rgba(210, 150, 95, 0.1), transparent 55%),
        radial-gradient(ellipse 100% 45% at 50% 100%, rgba(45, 75, 65, 0.12), transparent 45%);
    mix-blend-mode: soft-light;
    pointer-events: none;
}

/* Grain fin type “pellicule”, très léger */
.play-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.045;
    background-image: var(--tp-grain);
    background-repeat: repeat;
    background-size: 256px 256px;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.play-shell {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 4vw, 2.5rem);
}

.play-card {
    width: 100%;
    max-width: 400px;
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: var(--tp-radius);
    background: var(--tp-panel);
    border: 1px solid rgba(106, 147, 152, 0.4);
    box-shadow: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Évite le débordement des champs (largeur connexion / inscription) */
    overflow: hidden;
    /* La grille 2 colonnes suit la largeur réelle de la carte, pas celle de l’écran */
    container-type: inline-size;
    transition: max-width 0.22s ease;
}

.play-card[data-view="register"] {
    max-width: 640px;
}

/* Connexion avec bloc « e-mail non vérifié » : élargir jusqu’à +100 % (400px → 800px max) si l’écran le permet */
.play-card[data-pending-verification="1"] {
    max-width: min(800px, 100%);
}

.play-card__head {
    text-align: center;
    margin-bottom: 1.25rem;
}

.play-card__logo {
    display: block;
    width: clamp(96px, 26vw, 120px);
    height: auto;
    margin: 0 auto;
}

.play-panels {
    position: relative;
    opacity: 1;
    transition: opacity 0.16s ease;
}

.play-panels.play-panels--fade-out {
    opacity: 0;
    pointer-events: none;
}

.play-panel[hidden] {
    display: none;
}

.play-alert {
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* Bloc d’alerte (inscription) : centré, pleine largeur du formulaire */
.play-alert--banner {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.45;
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.play-alert--error {
    color: #f0d0d0;
    background: rgba(140, 40, 40, 0.35);
    border: 1px solid rgba(200, 80, 80, 0.45);
}

.play-alert--banner.play-alert--error {
    color: #f5d7d7;
    background: rgba(110, 35, 40, 0.42);
    border: 1px solid rgba(220, 90, 95, 0.55);
}

.play-alert--success {
    color: #d4f5e8;
    background: rgba(35, 120, 90, 0.38);
    border: 1px solid rgba(80, 200, 150, 0.48);
}

/* Bloc connexion : e-mail non verifie */
.play-verify-block {
    margin: 0 0 1rem;
    padding: 1rem 1rem 1.1rem;
    text-align: center;
    border-radius: 12px;
    background: linear-gradient(165deg, rgba(35, 90, 95, 0.28) 0%, rgba(18, 32, 48, 0.55) 100%);
    border: 1px solid rgba(106, 147, 152, 0.45);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.play-verify-block__title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tp-text);
    letter-spacing: -0.02em;
}

.play-verify-block__lead {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(232, 234, 239, 0.88);
}

.play-verify-block__email {
    color: #9ee5df;
    font-weight: 600;
}

.play-verify-block__list {
    margin: 0 0 1rem;
    padding: 0 0 0 1.1rem;
    text-align: left;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--tp-text-muted);
}

.play-verify-block__list li {
    margin-bottom: 0.35rem;
}

.play-verify-block__list li:last-child {
    margin-bottom: 0;
}

.play-verify-block__hint {
    margin: 0 0 0.85rem;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--tp-text-muted);
    text-align: center;
}

.play-verify-block__feedback {
    margin: 0 0 0.85rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.45;
    text-align: center;
}

.play-verify-block__feedback--success {
    color: #d4f5e8;
    background: rgba(35, 120, 90, 0.35);
    border: 1px solid rgba(80, 200, 150, 0.45);
}

.play-verify-block__feedback--error {
    color: #f5d7d7;
    background: rgba(110, 35, 40, 0.38);
    border: 1px solid rgba(220, 90, 95, 0.5);
}

.play-verify-block__resend {
    margin: 0 0 0.85rem;
}

.play-verify-block__support {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.55;
    color: var(--tp-text-muted);
}

.play-verify-block__link {
    color: var(--tp-accent);
    font-weight: 600;
    text-decoration: none;
}

.play-verify-block__link:hover {
    color: var(--tp-accent-hover);
    text-decoration: underline;
}

.play-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.play-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.play-label-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
}

.play-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tp-text-muted);
}

.play-link {
    color: var(--tp-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.12s ease;
}

.play-link:hover {
    color: var(--tp-accent-hover);
}

.play-link:focus-visible {
    outline: 2px solid var(--tp-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.play-link--small {
    font-size: 0.75rem;
    font-weight: 500;
}

.play-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.85rem;
    border-radius: 8px;
    background: var(--tp-input-bg);
    border: 1px solid var(--tp-input-border);
    transition: border-color 0.12s ease;
}

.play-input-wrap:focus-within {
    border-color: var(--tp-accent);
}

.play-input-icon {
    flex-shrink: 0;
    display: flex;
    color: var(--tp-text-muted);
    transition: color 0.12s ease;
}

.play-input-wrap:focus-within .play-input-icon {
    color: var(--tp-text-muted);
}

.play-input {
    flex: 1;
    min-width: 0;
    padding: 0.8rem 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 0.9375rem;
    color: var(--tp-text);
}

.play-input::placeholder {
    color: rgba(232, 234, 239, 0.28);
}

.play-input:focus {
    outline: none;
}

.play-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a8a8b0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 1.35rem;
}

.play-select option {
    padding: 0.5rem;
    background: var(--tp-input-bg);
    color: var(--tp-text);
}

/* Inscription : deux colonnes à partir d’une largeur confortable */
.play-form--register {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Deux colonnes seulement quand la carte est assez large (inscription déployée) */
@container (min-width: 31.5rem) {
    .play-form--register {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .play-form--register .play-field--full {
        grid-column: 1 / -1;
    }
}

.play-form--register > .play-btn {
    grid-column: 1 / -1;
}

.play-label__opt {
    font-weight: 400;
    color: var(--tp-text-muted);
}

.play-hint {
    margin: 0.4rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--tp-text-muted);
}

.play-field--check {
    margin-top: 0.15rem;
}

.play-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--tp-text-muted);
    user-select: none;
}

.play-check__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.play-check__box {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.12rem;
    border-radius: 4px;
    border: 1.5px solid rgba(106, 147, 152, 0.55);
    background: var(--tp-input-bg);
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.play-check__input:focus-visible + .play-check__box {
    outline: 2px solid var(--tp-accent);
    outline-offset: 2px;
}

.play-check__input:checked + .play-check__box {
    border-color: var(--tp-accent);
    background-color: rgba(106, 147, 152, 0.25);
    box-shadow: inset 0 0 0 2px var(--tp-accent);
}

.play-check__text .play-link {
    font-weight: 600;
}

.play-switch {
    margin: 1.15rem 0 0;
    font-size: 0.8125rem;
    text-align: center;
    color: var(--tp-text-muted);
}

.play-switch__btn {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-weight: 600;
    color: var(--tp-accent);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.12s ease;
}

.play-switch__btn:hover {
    color: var(--tp-accent-hover);
}

.play-switch__btn:focus-visible {
    outline: 2px solid var(--tp-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.8rem 1.15rem;
    border: none;
    border-radius: 8px;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.play-btn--primary {
    color: #121418;
    background-color: #c5cad1;
}

.play-btn--primary:hover {
    background-color: #d8dce2;
}

.play-btn--primary:active {
    background-color: #b8bdc5;
}

.play-btn--primary:focus-visible {
    outline: 2px solid var(--tp-accent);
    outline-offset: 2px;
}

.play-btn--signup {
    margin-top: 0.25rem;
    color: #f2f3f5;
    background-color: #3a4f52;
    border: 1px solid rgba(106, 147, 152, 0.75);
}

.play-btn--signup:hover {
    background-color: #455c60;
}

.play-btn--signup:active {
    background-color: #334548;
}

.play-btn--signup:focus-visible {
    outline: 2px solid var(--tp-accent);
    outline-offset: 2px;
}

.play-btn.play-btn--verify-resend {
    margin-top: 0;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: #0a1218;
    background: rgba(106, 147, 152, 0.95);
    border: 1px solid rgba(140, 180, 185, 0.6);
    border-radius: 10px;
    transition: background 0.15s ease;
}

.play-btn.play-btn--verify-resend:hover {
    background: rgba(127, 163, 168, 1);
}

.play-btn.play-btn--verify-resend:focus-visible {
    outline: 2px solid var(--tp-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .play-panels {
        transition: none;
    }

    .play-link,
    .play-input-wrap,
    .play-input-icon,
    .play-btn,
    .play-check__box,
    .play-switch__btn {
        transition: none;
    }
}
