:root {
    --accent: #7aa7ff;
    --accent-rgb: 122, 167, 255;
    --bg: #06080c;
    --panel: rgba(255, 255, 255, 0.04);
    --panel-2: rgba(255, 255, 255, 0.07);
    --line: rgba(255, 255, 255, 0.09);
    --text: #eaf0f7;
    --muted: #8a95a5;
    --overlay: 0.55;
    --blur: 0px;
    --font: "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font); user-select: none; }
button { font-family: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Couches ---------- */
.layer { position: fixed; inset: 0; width: 100%; height: 100%; }
#video { object-fit: cover; opacity: 0; transition: opacity 1.4s ease; filter: blur(var(--blur)); }
#video.on { opacity: 1; }
#images { filter: blur(var(--blur)); }
#images .img { position: absolute; inset: -3%; background-size: cover; background-position: center; opacity: 0; transition: opacity 2.2s ease; }
#images .img.on { opacity: 1; animation: kenburns 18s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }

.shade {
    pointer-events: none;
    background:
        radial-gradient(ellipse at 28% 45%, rgba(6, 8, 12, calc(var(--overlay) * 0.35)) 0%, rgba(6, 8, 12, var(--overlay)) 85%),
        linear-gradient(to top, rgba(6, 8, 12, 0.95) 0%, rgba(6, 8, 12, 0) 42%),
        linear-gradient(to bottom, rgba(6, 8, 12, 0.6) 0%, rgba(6, 8, 12, 0) 20%);
}

/* Fond abstrait (sans média) */
.orbs { overflow: hidden; opacity: 0; transition: opacity 1.2s ease; }
body.no-media .orbs { opacity: 1; }
.orbs i { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); opacity: 0.38; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.55), transparent 65%); animation: drift 26s ease-in-out infinite alternate; }
.orbs i:nth-child(1) { left: -15vmax; top: -20vmax; }
.orbs i:nth-child(2) { right: -20vmax; bottom: -25vmax; animation-duration: 32s; animation-delay: -8s; opacity: 0.28; }
.orbs i:nth-child(3) { left: 35vw; top: 30vh; width: 30vmax; height: 30vmax; animation-duration: 22s; animation-delay: -14s; opacity: 0.16; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(7vw, 6vh) scale(1.2); } }

#fx { pointer-events: none; }
.glow { position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.13), transparent 62%); will-change: transform; }
.scan { position: fixed; left: 0; right: 0; top: 0; height: 2px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.5), transparent); opacity: 0; animation: sweep 9s linear 2.5s infinite; }
@keyframes sweep { 0% { transform: translateY(-4px); opacity: 0; } 6% { opacity: 0.8; } 40% { opacity: 0; transform: translateY(100vh); } 100% { opacity: 0; transform: translateY(100vh); } }

/* ---------- Structure ---------- */
.app { position: relative; z-index: 3; height: 100%; display: flex; flex-direction: column; padding: 3.2vh 3.6vw; }
.reveal { opacity: 0; transform: translateY(18px); animation: rise 1s var(--ease) forwards; animation-delay: calc(0.15s + var(--i, 0) * 0.11s); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- En-tête ---------- */
.top { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo { position: relative; width: 46px; height: 46px; display: grid; place-items: center; color: var(--accent); }
.logo img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), 0.45)); }
.logo svg { width: 30px; height: 30px; stroke-width: 2.6; filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.6)); }
.logo .ring { position: absolute; inset: -2px; border-radius: 50%; border: 1px solid transparent; border-top-color: var(--accent); border-right-color: rgba(var(--accent-rgb), 0.3); animation: spin 5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-name { font-weight: 700; letter-spacing: 0.28em; font-size: 15px; }

.chips { display: flex; gap: 10px; }
.chip { display: flex; align-items: center; gap: 8px; padding: 8px 15px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(12px); border-radius: 999px; font-size: 13px; }
.chip b { font-weight: 700; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.8); } }

/* ---------- Centre ---------- */
.main { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 4vw; min-height: 0; }
.hero { max-width: 56vw; }
.eyebrow { color: var(--accent); letter-spacing: 0.4em; text-transform: uppercase; font-size: 13px; margin-bottom: 12px; display: flex; align-items: center; gap: 14px; }
.eyebrow::after { content: ""; width: 60px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }

h1 { font-size: clamp(70px, 13vw, 210px); line-height: 0.92; font-weight: 800; letter-spacing: -0.03em; display: flex; flex-wrap: wrap; }
h1 .ch {
    display: inline-block; white-space: pre;
    background: linear-gradient(180deg, #fff 25%, rgba(255, 255, 255, 0.32));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    opacity: 0; transform: translateY(60%) rotateX(-70deg); filter: blur(14px);
    animation: letter 1.1s var(--ease) forwards; animation-delay: calc(0.35s + var(--n) * 0.09s);
    transform-origin: 50% 100%;
}
@keyframes letter { to { opacity: 1; transform: none; filter: blur(0); } }

.subtitle { margin-top: 10px; font-size: clamp(14px, 1.4vw, 20px); font-weight: 600; color: var(--accent); letter-spacing: 0.9em; text-transform: uppercase; animation-name: rise, tighten; animation-duration: 1s, 2.4s; animation-timing-function: var(--ease); animation-fill-mode: forwards; }
@keyframes tighten { from { letter-spacing: 1.6em; } to { letter-spacing: 0.9em; } }
.tagline { margin-top: 20px; font-size: clamp(15px, 1.4vw, 21px); color: #b4bdca; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8); max-width: 34em; line-height: 1.55; }

.tip { margin-top: 4.2vh; padding-left: 18px; border-left: 2px solid var(--accent); max-width: 34em; }
.tip > * { transition: opacity 0.45s ease, transform 0.45s ease; }
.tip.swap > * { opacity: 0; transform: translateY(6px); }
.tip-label { display: block; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.tip p { font-size: 15.5px; line-height: 1.5; }

.actions { display: flex; gap: 12px; margin-top: 3.6vh; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); backdrop-filter: blur(12px); cursor: pointer; font-size: 14px; font-weight: 600; position: relative; overflow: hidden; transition: transform 0.35s var(--ease), border-color 0.25s, background 0.25s, box-shadow 0.35s; }
.btn svg { width: 19px; height: 19px; color: var(--accent); }
.btn::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(var(--accent-rgb), 0.18) 50%, transparent 70%); transform: translateX(-120%); transition: transform 0.7s var(--ease); }
.btn:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.5); }
.btn:hover::before { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(0.97); }
kbd { display: inline-block; min-width: 22px; text-align: center; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: rgba(0, 0, 0, 0.3); font-family: inherit; font-size: 11px; color: var(--muted); }

/* ---------- Actualités ---------- */
.side { width: min(23vw, 330px); }
.card { padding: 20px 22px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(16px); border-radius: 16px; }
.card h2 { font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; font-weight: 600; }
.card ul { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.card li { position: relative; padding-left: 16px; }
.card li::before { content: ""; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.card li small { display: block; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
.card li strong { display: block; font-size: 14.5px; }
.card li span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* ---------- Bas ---------- */
.bottom { padding-top: 1.6vh; }
.progress-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; font-size: 14px; }
.percent { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1; }
.percent small { font-size: 15px; color: var(--accent); margin-left: 2px; }
.bar { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.09); overflow: hidden; position: relative; }
.fill { position: relative; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.35), var(--accent)); box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.8); overflow: hidden; }
.fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%); animation: shimmer 2.2s linear infinite; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.fill .head { position: absolute; right: 0; top: -2px; width: 10px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 3px var(--accent); }

.dock { display: flex; justify-content: space-between; align-items: center; margin-top: 2.2vh; gap: 20px; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.social { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); backdrop-filter: blur(12px); cursor: pointer; color: var(--text); transition: transform 0.35s var(--ease), border-color 0.25s, color 0.25s, box-shadow 0.35s; }
.social svg { width: 20px; height: 20px; }
.social img { width: 22px; height: 22px; object-fit: contain; }
.social:hover { transform: translateY(-4px); color: var(--accent); border-color: var(--accent); box-shadow: 0 10px 26px -10px rgba(var(--accent-rgb), 0.7); }
.social .tip-s { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: rgba(10, 13, 19, 0.92); white-space: nowrap; font-size: 11.5px; color: var(--text); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.3s var(--ease); }
.social:hover .tip-s { opacity: 1; transform: translate(-50%, 0); }
.social { animation: pop 0.7s var(--ease) both; animation-delay: calc(1.3s + var(--k) * 0.07s); }
@keyframes pop { from { opacity: 0; transform: scale(0.6) translateY(10px); } }

/* ---------- Lecteur ---------- */
.player { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(16px); border-radius: 16px; }
.disc { position: relative; width: 44px; height: 44px; border-radius: 50%; flex: none; background: conic-gradient(from 0deg, rgba(var(--accent-rgb), 0.9), rgba(var(--accent-rgb), 0.15), rgba(var(--accent-rgb), 0.9)); animation: spin 5s linear infinite; animation-play-state: paused; }
.disc i { position: absolute; inset: 14px; border-radius: 50%; background: var(--bg); }
.player.playing .disc { animation-play-state: running; }
.meta { width: 150px; min-width: 0; }
.meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 14px; }
.tbar { margin-top: 5px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); }
.tbar div { height: 100%; width: 0; background: var(--accent); border-radius: 2px; }
#viz { width: 96px; height: 30px; flex: none; }
.pc { display: flex; align-items: center; gap: 6px; }
.ib { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: 50%; cursor: pointer; color: var(--text); transition: background 0.2s, color 0.2s, transform 0.25s var(--ease); }
.ib svg { width: 17px; height: 17px; }
.ib:hover { background: var(--panel-2); color: var(--accent); }
.ib:active { transform: scale(0.88); }
.ib.big { width: 40px; height: 40px; background: var(--accent); color: #06080c; }
.ib.big:hover { background: #fff; color: #06080c; }
.ib.big svg { fill: currentColor; stroke: none; width: 16px; height: 16px; }
#prevBtn svg, #nextBtn svg { fill: currentColor; stroke-width: 2.2; }
.ib.off #waves { display: none; }
input[type=range] { -webkit-appearance: none; width: 80px; height: 3px; background: rgba(255, 255, 255, 0.16); border-radius: 3px; outline: none; margin-left: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: 0 0 10px var(--accent); }

/* ---------- Fenêtres ---------- */
.modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; visibility: hidden; pointer-events: none; }
.modal.open { visibility: visible; pointer-events: auto; }
.backdrop { position: absolute; inset: 0; background: rgba(4, 6, 10, 0.6); backdrop-filter: blur(0); opacity: 0; transition: opacity 0.4s ease, backdrop-filter 0.4s ease; }
.modal.open .backdrop { opacity: 1; backdrop-filter: blur(10px); }
.sheet { position: relative; width: min(880px, 90vw); max-height: 80vh; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 22px; background: rgba(12, 15, 22, 0.88); backdrop-filter: blur(24px); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(var(--accent-rgb), 0.06); opacity: 0; transform: translateY(24px) scale(0.96); transition: opacity 0.4s ease, transform 0.55s var(--ease); }
.modal.open .sheet { opacity: 1; transform: none; }
.sheet header { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px 16px; border-bottom: 1px solid var(--line); }
.sheet h3 { font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.sheet-body { padding: 22px 26px 28px; overflow-y: auto; }
.sheet-body::-webkit-scrollbar { width: 6px; }
.sheet-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

.grade-title { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 700; color: var(--gc); }
.grade-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gc), transparent); opacity: 0.45; }
.grade-title em { font-style: normal; color: var(--muted); letter-spacing: 0; font-weight: 500; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 26px; }
.member { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); opacity: 0; transform: translateY(14px); animation: rise 0.7s var(--ease) forwards; animation-delay: calc(0.1s + var(--m) * 0.06s); transition: border-color 0.25s, transform 0.35s var(--ease), background 0.25s; }
.member:hover { border-color: var(--gc); background: var(--panel-2); transform: translateY(-3px); }
.avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--bg); border: 2px solid var(--gc); box-shadow: 0 0 18px -4px var(--gc); font-weight: 800; font-size: 19px; color: var(--gc); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.member .who { min-width: 0; }
.member .who b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gc); background: color-mix(in srgb, var(--gc) 15%, transparent); border: 1px solid color-mix(in srgb, var(--gc) 40%, transparent); }
.member .who span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }

.rule { display: flex; gap: 16px; padding: 14px 4px; border-bottom: 1px solid var(--line); opacity: 0; animation: rise 0.7s var(--ease) forwards; animation-delay: calc(0.1s + var(--m) * 0.07s); }
.rule:last-child { border-bottom: 0; }
.rule .n { font-size: 22px; font-weight: 800; color: var(--accent); width: 34px; font-variant-numeric: tabular-nums; }
.rule b { display: block; font-size: 15px; margin-bottom: 3px; }
.rule span { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.toast { position: fixed; left: 50%; bottom: 14vh; z-index: 20; transform: translate(-50%, 20px); padding: 11px 20px; border-radius: 999px; border: 1px solid var(--accent); background: rgba(10, 13, 19, 0.92); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.5s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1150px) { .side { display: none; } .hero { max-width: 100%; } .meta { width: 110px; } #viz { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01s !important; animation-delay: 0s !important; } }
