/* REM Live · la page d'entrée plein écran (entrée directe par formulaire, /acces et /acces?connexion=1).
   Une vraie page, immersive, dans l'esprit des meilleures pages de connexion mobiles : le visuel de l'événement en
   haut (à gauche sur l'ordinateur) qui se fond dans la nuit, un grand titre en deux tons dont la fin est en dégradé
   (soleil, braise, pervenche), le compte à rebours en une ligne, des champs sombres et larges, un bouton doré qui
   brille. Depuis l'accueil, la photo et le bouton glissent jusqu'ici (view transitions), sinon chargement normal. */

.site--nu {
    --e-nuit: #0d1331;
    --e-nuit-2: #141c42;
    --e-trait: rgba(255, 255, 255, 0.16);
    --e-degrade: linear-gradient(90deg, #fbb93a 0%, #f29100 45%, #c9a0e8 100%);
    min-height: 100vh;
    min-height: 100svh;
    background: var(--e-nuit);
    color: #ffffff;
}

.site--nu .site-contenu {
    max-width: none;
    padding: 0;
}

.entree {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100svh;
}

/* ── Le visuel ── */
.entree__visuel {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background: var(--e-nuit-2);
    view-transition-name: entree-visuel;
}

.entree__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 70%;
    z-index: -2;
}

.entree__voile {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(13, 19, 49, 0.4) 0%, rgba(13, 19, 49, 0) 22%),
        linear-gradient(0deg, var(--e-nuit) 0%, rgba(13, 19, 49, 0.55) 22%, rgba(13, 19, 49, 0) 48%),
        linear-gradient(90deg, rgba(13, 19, 49, 0) 82%, var(--e-nuit) 100%);
}

.entree__retour {
    position: absolute;
    top: calc(24px + env(safe-area-inset-top));
    left: 28px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 18px 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(13, 19, 49, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.4s cubic-bezier(0.25, 1.35, 0.45, 1);
}

.entree__retour:hover {
    background: rgba(13, 19, 49, 0.6);
    transform: translateX(-3px);
}

.entree__retour:focus-visible {
    outline: 2px solid #fbb93a;
    outline-offset: 3px;
}

.entree__fleche {
    width: 18px;
    height: 18px;
    rotate: 180deg;
}

.entree__logo {
    position: absolute;
    top: calc(24px + env(safe-area-inset-top));
    right: 28px;
    z-index: 2;
    width: auto;
    height: 40px;
}

.entree__logo--empile {
    height: 84px;
}

/* Le motif reste au-dessus du titre, jamais dessous (charte) */
.entree__motif {
    top: 22%;
    right: 7%;
    width: min(34vh, 22vw);
    z-index: 0;
    opacity: 0.95;
}

.entree__accroche {
    position: absolute;
    right: 48px;
    bottom: 56px;
    left: 48px;
    z-index: 1;
}

.entree__evenement,
.entree__quand {
    margin: 0;
    font-family: var(--s-police-titre);
    font-size: clamp(36px, 4vw, 64px);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.entree__evenement {
    max-width: 14ch;
    color: #ffffff;
    view-transition-name: entree-titre;
}

.entree__quand,
.entree__degrade {
    background: var(--e-degrade);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ── Le panneau ── */
.entree__panneau {
    position: relative;
    display: grid;
    align-items: center;
    padding: 64px clamp(24px, 5vw, 80px);
    background:
        radial-gradient(60% 40% at 20% 0%, rgba(251, 185, 58, 0.14) 0%, transparent 70%),
        radial-gradient(70% 50% at 100% 100%, rgba(153, 157, 208, 0.18) 0%, transparent 70%),
        var(--e-nuit);
}

.entree__carte {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.entree__compte {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 0 0 28px;
    padding: 8px 16px 8px 12px;
    border: 1px solid var(--e-trait);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 500;
}

.entree__compte strong {
    color: #ffffff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.entree__point {
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #ff4d5e;
    box-shadow: 0 0 0 4px rgba(255, 77, 94, 0.22);
}

.entree__titre {
    margin: 0;
    color: #ffffff;
    font-family: var(--s-police-titre);
    font-size: clamp(44px, 4.6vw, 68px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.045em;
}

.entree__degrade {
    display: block;
    padding-bottom: 0.08em;
}

.entree__texte {
    margin: 18px 0 32px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 18px;
    line-height: 1.55;
}

.entree__bascule {
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    text-align: center;
}

.entree__bascule a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #fbb93a;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* ── Le formulaire, en sombre ── */
.entree .porte__formulaire {
    gap: 20px;
}

.entree .porte__groupe,
.entree .porte__formulaire .formulaire__grille {
    display: grid;
    gap: 20px;
}

/* Le motif s'assemble à l'arrivée : chaque pièce pivote jusqu'à sa place exacte */
.entree .motif > g {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .avec-js .entree .motif > g {
        animation: entree-piece 1.3s cubic-bezier(0.22, 1, 0.36, 1) backwards;
        animation-delay: calc(0.35s + var(--ordre, 0) * 0.09s);
    }
}

@keyframes entree-piece {
    from { opacity: 0; transform: rotate(-90deg) scale(0.8); }
}

.entree .porte__groupe > legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.entree .porte__formulaire .champ label,
.entree .porte__formulaire .champ--choix legend {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    font-weight: 600;
}

.entree .porte__formulaire input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 60px;
    padding: 0 20px;
    border: 1.5px solid var(--e-trait);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-size: 17px;
    caret-color: #fbb93a;
    transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.3s ease;
}

.entree .porte__formulaire input::placeholder {
    color: rgba(255, 255, 255, 0.36);
}

.entree .porte__formulaire input:not([type="checkbox"]):not([type="radio"]):hover {
    border-color: rgba(255, 255, 255, 0.32);
}

.entree .porte__formulaire input:not([type="checkbox"]):not([type="radio"]):focus {
    border-color: #fbb93a;
    outline: none;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 5px rgba(251, 185, 58, 0.18), 0 0 30px -6px rgba(251, 185, 58, 0.5);
}

.entree .porte__formulaire input:-webkit-autofill {
    -webkit-text-fill-color: #ffffff;
    box-shadow: 0 0 0 100px #1a2149 inset;
}

.entree .champ--erreur input {
    border-color: #ff6b7a;
}

.entree .champ__erreur {
    color: #ff9aa5;
}

.entree .porte__progression {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.entree .porte__progression span {
    background: var(--e-degrade);
}

.entree .porte__formulaire .case {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.entree .porte__formulaire .case a {
    color: #ffffff;
}

.entree .porte__formulaire input[type="checkbox"] {
    accent-color: #fbb93a;
}

.entree .porte__formulaire button[type="submit"] {
    min-height: 62px;
    margin-top: 4px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #fbb93a 0%, #f29100 100%);
    color: #1d2a5c;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 20px 44px -14px rgba(242, 145, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: transform 0.4s cubic-bezier(0.25, 1.35, 0.45, 1), box-shadow 0.3s ease, filter 0.3s ease;
    view-transition-name: entree-action;
}

.entree .porte__formulaire button[type="submit"]:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 26px 54px -14px rgba(242, 145, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.entree .porte__formulaire button[type="submit"]:active {
    transform: scale(0.98);
}

.entree .porte__formulaire button[type="submit"]:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.entree .message {
    border: 1px solid rgba(255, 107, 122, 0.4);
    background: rgba(255, 107, 122, 0.12);
    color: #ffd5da;
}

/* ── L'arrivée : le titre puis les champs montent en cascade ── */
@media (prefers-reduced-motion: no-preference) {
    .entree__carte > * {
        animation: entree-monte 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    }

    .entree__carte > :nth-child(2) { animation-delay: 0.06s; }
    .entree__carte > :nth-child(3) { animation-delay: 0.12s; }
    .entree__carte > :nth-child(4) { animation-delay: 0.18s; }
    .entree__carte > :nth-child(5) { animation-delay: 0.24s; }
    .entree__carte > :nth-child(6) { animation-delay: 0.3s; }

    .entree__accroche > * {
        animation: entree-monte 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s backwards;
    }

    .entree__accroche > :nth-child(2) {
        animation-delay: 0.2s;
    }

    .entree__photo img {
        animation: entree-photo 1.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
    }
}

@keyframes entree-monte {
    from { opacity: 0; transform: translateY(24px); }
}

@keyframes entree-photo {
    from { transform: scale(1.08); }
}

/* ── Tablette et téléphone : le visuel devient un bandeau en haut, la page défile ── */
@media (max-width: 1068px) {
    .entree {
        grid-template-columns: minmax(0, 1fr);
    }

    .entree__visuel {
        position: relative;
        height: 40vh;
        height: 40svh;
        min-height: 280px;
    }

    .entree__voile {
        background:
            linear-gradient(180deg, rgba(13, 19, 49, 0.35) 0%, rgba(13, 19, 49, 0) 30%),
            linear-gradient(0deg, var(--e-nuit) 0%, rgba(13, 19, 49, 0.45) 38%, rgba(13, 19, 49, 0) 70%);
    }

    .entree__motif {
        display: none;
    }

    .entree__accroche {
        right: 24px;
        bottom: 18px;
        left: 24px;
    }

    .entree__evenement,
    .entree__quand {
        font-size: clamp(30px, 7.4vw, 48px);
    }

    .entree__panneau {
        align-items: start;
        padding: 28px 24px calc(48px + env(safe-area-inset-bottom));
        background:
            radial-gradient(80% 30% at 0% 0%, rgba(251, 185, 58, 0.1) 0%, transparent 70%),
            var(--e-nuit);
    }

    .entree__carte {
        max-width: 560px;
    }
}

@media (max-width: 734px) {
    .entree__retour {
        top: calc(14px + env(safe-area-inset-top));
        left: 16px;
        padding: 0 14px 0 8px;
        font-size: 14px;
    }

    .entree__logo {
        top: calc(14px + env(safe-area-inset-top));
        right: 16px;
        height: 32px;
    }

    .entree__logo--empile {
        height: 62px;
    }

    .entree__evenement,
    .entree__quand {
        font-size: 30px;
    }

    .entree__panneau {
        padding: 22px 20px calc(40px + env(safe-area-inset-bottom));
    }

    .entree__compte {
        margin-bottom: 22px;
        font-size: 13px;
    }

    .entree__titre {
        font-size: 46px;
    }

    .entree__texte {
        margin: 14px 0 26px;
        font-size: 17px;
    }

    .entree .porte__formulaire input:not([type="checkbox"]):not([type="radio"]) {
        min-height: 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .entree__retour,
    .entree .porte__formulaire input,
    .entree .porte__formulaire button[type="submit"] {
        transition: none;
    }
}

/* Audit du 19/11 : le compte à rebours garde ses espaces ; sur téléphone, le formulaire arrive plus haut et ne passe
   plus sous le bouton de Rémi IA ; la case d'accord est une vraie cible */
.entree__compte {
    display: inline-block;
}

.entree__point {
    display: inline-block;
    vertical-align: 1px;
}

.entree .porte__formulaire input[type="checkbox"] {
    width: 22px;
    height: 22px;
    flex: none;
}

@media (max-width: 1068px) {
    .entree__visuel {
        height: 30vh;
        height: 30svh;
        min-height: 220px;
    }
}

@media (max-width: 734px) {
    .entree__panneau {
        padding-bottom: calc(110px + env(safe-area-inset-bottom));
    }

    .entree__titre {
        font-size: 40px;
    }
}
