:root {
    --bg-deep: #010130;
    --bg-mid: #0a2240;
    --bg-card: #0f2e54;
    --blue-accent: #4a89b5;
    --blue-dim: rgba(74, 137, 181, 0.35);
    --orange: #FF6B20;
    --white: #ffffff;
    --text-primary: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-waiting: rgba(255, 255, 255, 0.28);
    --border: rgba(255, 255, 255, 0.1);
    --status-offline: #e05555;
    --font-display: "Century Gothic", "Futura", "Trebuchet MS", Arial, sans-serif;
    --font-body: "Poppins", system-ui, -apple-system, sans-serif;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --page-pad: clamp(1rem, 3vw, 2rem);
    --max-w: 56rem;
    --header-blue-dark: #1b4674;
    --header-blue: #3d6692;
    --header-blue-gradient: linear-gradient(
        90deg,
        var(--header-blue-dark) 0%,
        var(--header-blue) 50%,
        var(--header-blue-dark) 100%
    );
}

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

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

body {
    min-height: 100%;
    min-height: 100dvh;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-deep);
}

.event-page {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    background: var(--bg-deep);
}

.event-page > .stage {
    min-height: 0;
}

/* ── Header bandeau (fond HD + texte vectoriel) ── */

.event-header {
    width: 100%;
    padding-top: var(--safe-top);
    border-bottom: none;
}

.event-header.is-minimal .event-header__band {
    display: none;
}

.event-header__band {
    position: relative;
    width: 100%;
    min-height: clamp(4.75rem, 12vw, 7rem);
    overflow: hidden;
    background-color: var(--header-blue-dark);
}

.event-header__visual {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.event-header__visual-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 68% 42%;
    transform: scale(1.03);
}

.event-header__band::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            105deg,
            rgba(1, 1, 48, 0.72) 0%,
            rgba(1, 1, 48, 0.38) 38%,
            rgba(27, 70, 116, 0.22) 62%,
            rgba(1, 1, 48, 0.65) 100%
        ),
        linear-gradient(
            to bottom,
            transparent 0%,
            rgba(1, 1, 48, 0.15) 72%,
            var(--bg-deep) 100%
        );
    pointer-events: none;
}

.event-header__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    justify-items: center;
    text-align: center;
    gap: 0.15rem;
    width: 100%;
    min-height: clamp(4.75rem, 12vw, 7rem);
    padding:
        0.5rem
        calc(var(--page-pad) + var(--safe-right))
        0.7rem
        calc(var(--page-pad) + var(--safe-left));
}

.event-header__brand {
    display: flex;
    align-items: flex-start;
    justify-self: start;
    align-self: start;
    padding-top: 0.1rem;
    gap: clamp(0.5rem, 1.5vw, 0.85rem);
    flex-shrink: 0;
}

.event-header__logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

.event-header__logo-link:hover {
    opacity: 0.85;
}

.event-header__logo-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 3px;
}

.event-header__logo {
    display: block;
    width: auto;
    height: clamp(1.35rem, 3.2vw, 1.85rem);
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    mix-blend-mode: screen;
}

.event-header__center {
    width: 100%;
    text-align: center;
    min-width: 0;
    padding-top: 0;
    margin-top: -0.2rem;
}

.event-header__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.06rem;
}

/* Typo effet verre liquide */
.glass-text {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.glass-text--title {
    font-family: "Montserrat", var(--font-display);
    font-size: clamp(1rem, 4.2vw, 1.85rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.05;
    text-transform: uppercase;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.78) 48%,
        rgba(255, 255, 255, 0.95) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter:
        drop-shadow(0 0 18px rgba(255, 255, 255, 0.22))
        drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
}

.glass-text--accent {
    font-family: "Montserrat", var(--font-display);
    font-size: clamp(1rem, 4.2vw, 1.85rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.05;
    color: var(--orange);
    -webkit-text-fill-color: var(--orange);
    filter: drop-shadow(0 0 10px rgba(255, 107, 32, 0.55));
}

.event-header__title {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.event-header__forum {
    margin: -0.05rem 0 0;
    padding: 0 0 0 0.38em;
    font-family: "Montserrat", var(--font-display);
    font-size: clamp(0.42rem, 1.1vw, 0.58rem);
    font-weight: 300;
    letter-spacing: 0.38em;
    text-indent: 0;
    text-transform: uppercase;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.92);
    text-shadow:
        0 0 16px rgba(255, 255, 255, 0.2),
        0 1px 8px rgba(0, 0, 0, 0.35);
}

.event-header__baseline {
    margin: 0.95rem auto 0;
    transform: translateY(-0.4rem);
    max-width: 22em;
    font-family: var(--font-body);
    font-size: clamp(0.52rem, 1.35vw, 0.72rem);
    font-weight: 300;
    letter-spacing: 0.01em;
    line-height: 1.45;
    text-align: center;
    color: rgba(255, 255, 255, 0.94);
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.4),
        0 4px 14px rgba(1, 1, 48, 0.35);
}

.event-header__baseline strong {
    font-weight: 600;
    color: #ffffff;
    text-shadow:
        0 0 22px rgba(255, 255, 255, 0.28),
        0 1px 2px rgba(0, 0, 0, 0.35);
}

.glass-text--baseline {
    position: relative;
}

.glass-text--baseline::before {
    content: "";
    position: absolute;
    inset: -0.35rem -0.5rem;
    z-index: -1;
    border-radius: 6px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.02) 45%,
        rgba(255, 255, 255, 0.08) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
}

.stage__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    flex-shrink: 0;
    padding: 0.9rem 1rem 1rem;
    margin-bottom: 0.65rem;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
}

.stage__live {
    width: 100%;
    margin-bottom: 0;
    font-size: clamp(0.9rem, 2.8vw, 1.15rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    color: var(--orange);
    -webkit-text-fill-color: var(--orange);
}

.stage__live::before {
    content: "";
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    margin-right: 0.45rem;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 8px rgba(255, 107, 32, 0.7);
    vertical-align: middle;
    animation: pulse 2s ease-in-out infinite;
}

/* ── Barre langues (au-dessus de la traduction) ── */

.stage__lang {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    margin-bottom: 0;
}

.language-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lang-pill {
    padding: 0.38rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.8);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.lang-pill--accent {
    color: var(--white);
    background: rgba(74, 137, 181, 0.25);
    border-color: var(--blue-dim);
}

.lang-arrow {
    font-size: 0.85rem;
    color: var(--blue-accent);
}

/* ── Statut connexion (header) ── */

.event-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 2rem;
    font-size: 0.58rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    flex-shrink: 0;
}

.status-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}

.event-status.is-live {
    border-color: rgba(255, 107, 32, 0.4);
    color: var(--white);
}

.event-status.is-live .status-dot {
    background: var(--orange);
    box-shadow: 0 0 8px rgba(255, 107, 32, 0.7);
    animation: pulse 2s ease-in-out infinite;
}

.event-status.is-offline {
    border-color: rgba(224, 85, 85, 0.45);
    color: rgba(255, 255, 255, 0.85);
}

.event-status.is-offline .status-dot {
    background: var(--status-offline);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* ── Scène traduction (centre) ── */

.stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: calc(var(--max-w) + var(--page-pad) * 2);
    min-height: 0;
    margin: 0 auto;
    padding:
        0.35rem
        calc(var(--page-pad) + var(--safe-right))
        1rem
        calc(var(--page-pad) + var(--safe-left));
}

/* ── Zone traduction ── */

.translation-stage {
    flex: 1;
    width: 100%;
    min-height: clamp(10rem, 38vh, 28rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: linear-gradient(
        165deg,
        var(--header-blue-dark) 0%,
        var(--bg-card) 48%,
        var(--header-blue) 100%
    );
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    overflow: hidden;
}

.translation-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(0.75rem, 2.5vw, 1.25rem);
    width: 100%;
    max-width: 48rem;
}

.translation-block.is-live .translation-source {
    display: none;
}

.translation-block.is-live {
    gap: 0;
}

.translation-source {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2.8vw, 1.15rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.45;
    text-align: center;
    color: var(--text-muted);
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
}

.translation-source.is-waiting {
    color: var(--text-waiting);
}

.translation-text {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 5.5vw, 3rem);
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    color: var(--white);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    width: 100%;
    max-width: 48rem;
}

.translation-text.is-waiting {
    font-family: var(--font-body);
    font-size: clamp(1rem, 3vw, 1.25rem);
    font-weight: 300;
    font-style: italic;
    color: var(--text-waiting);
}

.translation-text.is-new {
    animation: fadeUp 0.35s ease-out;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.source-hint {
    margin-top: 1rem;
    max-width: 40rem;
    font-size: 0.8rem;
    font-weight: 300;
    font-style: italic;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 0 0.5rem;
}

/* ── Partenaires (optionnel, ?partners=1) ── */

.partners-section {
    width: 100%;
    max-width: calc(var(--max-w) + var(--page-pad) * 2);
    margin: 0 auto;
    padding: 1rem calc(var(--page-pad) + var(--safe-right)) 1.5rem calc(var(--page-pad) + var(--safe-left));
    border-top: 1px solid var(--border);
}

.partners-section[hidden] {
    display: none;
}

.partners-heading {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 0.75rem;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.partners-grid--media {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 0.75rem;
}

.partner-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.partner-card img {
    max-height: 1.75rem;
    max-width: 100%;
    object-fit: contain;
}

.partners-link {
    display: block;
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-accent);
    text-decoration: none;
}

/* ── Pied de page minimal ── */

.foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding:
        0.65rem
        calc(var(--page-pad) + var(--safe-right))
        calc(0.65rem + var(--safe-bottom))
        calc(var(--page-pad) + var(--safe-left));
    border-top: 1px solid var(--border);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.foot__sep {
    opacity: 0.4;
}

/* ── Responsive ── */

@media (max-width: 900px) {
    .event-header__inner {
        gap: 0.1rem;
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }

    .event-header__brand {
        justify-self: start;
    }

    .event-header__date {
        white-space: normal;
    }
}

@media (max-width: 640px) {
    .stage__live {
        text-align: center;
    }
}

@media (min-width: 1024px) {
    .partners-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .foot,
    .partners-section,
    .source-hint {
        display: none;
    }

    .translation-stage {
        min-height: 60vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .translation-text.is-new,
    .event-status.is-live .status-dot,
    .stage__live::before {
        animation: none;
    }
}

/* ── Format portrait 9:16 (smartphone / écran vertical) ── */

@media (orientation: portrait) {
    :root {
        --page-pad: clamp(0.7rem, 3.5vw, 1.1rem);
    }

    .event-header__band,
    .event-header__inner {
        min-height: clamp(4.25rem, 10.5vh, 5.75rem);
    }

    .event-header__visual-img {
        object-position: center 45%;
    }

    .event-header__inner {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        align-items: start;
        justify-items: center;
        text-align: center;
        gap: 0;
        padding:
            clamp(0.3rem, 0.9vh, 0.45rem)
            calc(var(--page-pad) + var(--safe-right))
            clamp(0.45rem, 1.2vh, 0.6rem)
            calc(var(--page-pad) + var(--safe-left));
    }

    .event-header__brand {
        justify-self: start;
        align-self: start;
        padding-top: 0;
    }

    .event-header__logo {
        height: clamp(0.95rem, 2.6vh, 1.2rem);
    }

    .event-header__center {
        width: 100%;
        text-align: center;
        padding-top: 0;
        margin-top: clamp(-0.3rem, -0.85vh, -0.18rem);
    }

    .event-header__copy {
        align-items: center;
        gap: 0.04rem;
    }

    .event-header__title {
        text-align: center;
        line-height: 1.08;
    }

    .glass-text--title,
    .glass-text--accent {
        font-size: clamp(0.7rem, 2.6vh, 0.92rem);
        line-height: 1.1;
    }

    .event-header__forum {
        display: inline-block;
        margin-top: -0.06rem;
        font-size: clamp(0.28rem, 0.85vh, 0.36rem);
        letter-spacing: 0.24em;
        text-indent: 0;
        padding-left: 0.24em;
        text-align: center;
    }

    .event-header__baseline {
        font-size: clamp(0.36rem, 1.05vh, 0.46rem);
        max-width: 17em;
        margin: clamp(0.7rem, 1.9vh, 0.95rem) auto 0;
        transform: translateY(clamp(-0.3rem, -0.85vh, -0.45rem));
        line-height: 1.42;
        text-align: center;
    }

    .glass-text--baseline::before {
        inset: -0.25rem -0.4rem;
    }

    .stage {
        padding:
            0
            0
            0.45rem
            0;
        overflow: hidden;
    }

    .stage__meta {
        align-items: center;
        gap: clamp(0.65rem, 2vh, 0.9rem);
        padding:
            clamp(0.85rem, 2.5vh, 1.15rem)
            clamp(1.1rem, 4vw, 1.5rem);
        margin-bottom: clamp(0.5rem, 1.6vh, 0.75rem);
        width: 100%;
    }

    .stage__live {
        font-size: clamp(0.78rem, 2.4vh, 0.95rem);
        letter-spacing: 0.12em;
        text-align: center;
    }

    .stage__lang {
        justify-content: center;
        gap: 0.6rem;
    }

    .lang-pill {
        padding: 0.3rem 0.7rem;
        font-size: clamp(0.64rem, 1.8vh, 0.72rem);
        letter-spacing: 0.1em;
    }

    .lang-arrow {
        font-size: 0.75rem;
    }

    .translation-stage {
        width: calc(100% - 2 * var(--page-pad));
        margin-left: auto;
        margin-right: auto;
        flex: 1;
        min-height: 0;
        padding: clamp(1.1rem, 3.2vh, 1.75rem) clamp(1rem, 3.5vw, 1.35rem);
        border-radius: 6px;
    }

    .translation-block {
        gap: clamp(0.55rem, 1.8vh, 0.9rem);
    }

    .translation-source {
        font-size: clamp(0.78rem, 2.2vh, 0.92rem);
        line-height: 1.42;
    }

    .translation-text {
        font-size: clamp(1.05rem, 4.2vh, 2rem);
        line-height: 1.45;
    }

    .translation-text.is-waiting {
        font-size: clamp(0.85rem, 2.6vh, 1rem);
        line-height: 1.5;
    }

    .foot {
        padding-top: 0.35rem;
        padding-bottom: calc(0.35rem + var(--safe-bottom));
        font-size: 0.5rem;
    }
}

@media (orientation: portrait) and (max-aspect-ratio: 9/16) {
    .foot {
        display: none;
    }

    .translation-text {
        font-size: clamp(1rem, 3.8vh, 1.85rem);
        line-height: 1.48;
    }
}
