/* =====================================================================
   JUJUTSU ECLIPSE — Écran de chargement
   Scène de 1920×1080 (image assets/img/scene.jpg) mise à l'échelle par
   loading.js. Les éléments dynamiques sont placés au pixel près sur les
   coordonnées de la maquette. Pas de variables CSS, flexbox ni grid :
   compatible avec l'ancien navigateur intégré de Garry's Mod.
   ===================================================================== */

@font-face {
    font-family: 'Inter';
    font-weight: 400;
    src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'),
         url('../fonts/inter-latin-400-normal.woff') format('woff');
}
@font-face {
    font-family: 'Inter';
    font-weight: 600;
    src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'),
         url('../fonts/inter-latin-600-normal.woff') format('woff');
}
@font-face {
    font-family: 'Inter';
    font-weight: 700;
    src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'),
         url('../fonts/inter-latin-700-normal.woff') format('woff');
}
@font-face {
    font-family: 'Shippori Mincho';
    font-weight: 500;
    src: url('../fonts/shippori-mincho-latin-500-normal.woff2') format('woff2'),
         url('../fonts/shippori-mincho-latin-500-normal.woff') format('woff');
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #050407;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
}

/* ---------- Bords d'écran (hors 16:9) ---------- */
#bg {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}
#band-ext {               /* prolonge le bandeau sur les écrans très larges */
    display: none;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: 134px;
    background: #050407;
    border-top: 2px solid #B11219;
    box-shadow: 0 -2px 6px rgba(163, 18, 31, 0.45);
}
body.is-wide #band-ext { display: block; }

/* ---------- Scène ---------- */
#stage {
    position: absolute;
    left: 0; top: 0;
    width: 1920px;
    height: 1080px;
    overflow: hidden;
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
}
#scene {
    position: absolute;
    left: 0; top: 0;
    width: 1920px;
    height: 1080px;
    display: block;
}
body.is-wide #scene {
    -webkit-mask-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0) 0, #000 40px, #000 1880px, rgba(0, 0, 0, 0) 1920px);
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0, #000 40px, #000 1880px, rgba(0, 0, 0, 0) 1920px);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0, #000 40px, #000 1880px, rgba(0, 0, 0, 0) 1920px);
}
body.is-tall #scene {
    -webkit-mask-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0, #000 60px);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, #000 60px);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, #000 60px);
}

/* ---------- Effets ---------- */
#pulse {                  /* halo de l'éclipse, centré sur le disque (960 × 109) */
    display: none;
    position: absolute;
    left: 760px; top: -91px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: -webkit-radial-gradient(center, circle, rgba(255, 40, 40, 0) 22%, rgba(220, 20, 30, 0.55) 26%, rgba(163, 18, 31, 0.18) 40%, rgba(163, 18, 31, 0) 62%);
    background: radial-gradient(circle, rgba(255, 40, 40, 0) 22%, rgba(220, 20, 30, 0.55) 26%, rgba(163, 18, 31, 0.18) 40%, rgba(163, 18, 31, 0) 62%);
    opacity: 0;
    -webkit-animation: pulse 7s ease-in-out infinite;
    animation: pulse 7s ease-in-out infinite;
}
body.fx-pulse #pulse { display: block; }
body.is-static #pulse { display: none; }
@-webkit-keyframes pulse { 0%, 100% { opacity: 0; -webkit-transform: scale(0.96); } 50% { opacity: 0.55; -webkit-transform: scale(1.04); } }
@keyframes pulse { 0%, 100% { opacity: 0; transform: scale(0.96); } 50% { opacity: 0.55; transform: scale(1.04); } }

#particles {
    position: absolute;
    left: 0; top: 0;
    width: 1920px; height: 946px;   /* s'arrête au bandeau */
    overflow: hidden;
    pointer-events: none;
}
#particles .p {
    position: absolute;
    bottom: -6px;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: #C49BF5;
    box-shadow: 0 0 6px 1px rgba(138, 79, 209, 0.85);
    opacity: 0;
    -webkit-animation-name: rise;
    animation-name: rise;
    -webkit-animation-timing-function: linear;
    animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
}
@-webkit-keyframes rise {
    0% { opacity: 0; -webkit-transform: translate(0, 0); }
    12% { opacity: 0.75; }
    75% { opacity: 0.45; }
    100% { opacity: 0; -webkit-transform: translate(30px, -620px); }
}
@keyframes rise {
    0% { opacity: 0; transform: translate(0, 0); }
    12% { opacity: 0.75; }
    75% { opacity: 0.45; }
    100% { opacity: 0; transform: translate(30px, -620px); }
}

/* ---------- Sous-titre du logo ---------- */
#subtitle {
    position: absolute;
    left: 708.5px;
    width: 500px;
    top: 549px;
    height: 50px;
    text-align: center;
    white-space: nowrap;
    font-family: 'Shippori Mincho', 'Times New Roman', serif;
    font-weight: 500;
    font-size: 41px;
    line-height: 50px;
    letter-spacing: 31.6px;
    text-indent: 31.6px;        /* recentre malgré l'espacement après la dernière lettre */
    color: #9A9693;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ---------- Astuce ---------- */
#tip-text {
    position: absolute;
    left: 459px;
    width: 1000px;
    top: 902px;
    height: 30px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    font-size: 20.9px;
    line-height: 30px;
    font-weight: 400;
    color: #F4F3F1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    -webkit-transition: opacity 0.5s ease;
    transition: opacity 0.5s ease;
}
#tip-text.hidden { opacity: 0; }

/* ---------- Bandeau : statut ---------- */
#status {
    position: absolute;
    left: 35px;
    top: 975px;
    width: 490px;
    height: 36px;
    white-space: nowrap;
    overflow: hidden;
    font-size: 26.3px;
    line-height: 36px;
    font-weight: 700;
    color: #FFFFFF;
}

/* ---------- Bandeau : barre ----------
   La piste grise fait partie de la scène. Ici : remplissage rouge
   (tranche de la maquette répétée) + tête animée découpée dans la maquette. */
#bar {
    position: absolute;
    left: 535px;
    top: 954px;
    width: 1047px;
    height: 76px;
    overflow: hidden;
}
#bar-cap {                /* colonne de bord anticrénelée de la maquette */
    position: absolute;
    left: 0; top: 32px;
    width: 1px; height: 20px;
    background: url('../img/bar-fill.png') repeat-x;
    opacity: 0.5;
}
#bar-fill {
    position: absolute;
    left: 1px; top: 32px;
    width: 0; height: 20px;
    background: url('../img/bar-fill.png') repeat-x;
}
#bar-head {
    position: absolute;
    left: -232px; top: 0;
    width: 232px; height: 76px;
    background: url('../img/bar-head.png') no-repeat;
}
#bar-head.animated {
    -webkit-animation: head 1.1s ease-in-out infinite alternate;
    animation: head 1.1s ease-in-out infinite alternate;
}
@-webkit-keyframes head { from { opacity: 0.88; } to { opacity: 1; } }
@keyframes head { from { opacity: 0.88; } to { opacity: 1; } }

/* ---------- Bandeau : joueurs ---------- */
#players {
    position: absolute;
    right: 36px;              /* bord droit du texte à 1883 px */
    top: 975.5px;
    height: 38px;
    white-space: nowrap;
}
#players-icon {
    position: absolute;
    right: 100%;
    top: -2px;
    margin-right: 8px;
    width: 46px;
    height: 38px;
}
#players-text {
    display: block;
    font-size: 21.15px;
    line-height: 38px;
    font-weight: 600;
    color: #AFAFAE;
}

/* ---------- Nom du fichier (désactivé par défaut) ---------- */
#file-line {
    display: none;
    position: absolute;
    left: 36px;
    top: 1040px;
    width: 1500px;
    white-space: nowrap;
    overflow: hidden;
    font-size: 14px;
    line-height: 20px;
    color: #6F6C68;
}
body.show-file #file-line { display: block; }

/* ---------- Mode debug ---------- */
#debug-overlay {
    position: absolute;
    left: 0; top: 0;
    width: 1920px; height: 1080px;
    opacity: 0;
    pointer-events: none;
}
#debug-panel {
    position: fixed;
    left: 12px; top: 12px;
    z-index: 60;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #A3121F;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 22px;
    color: #EDE8E0;
}
#debug-panel label, #debug-panel button { display: block; margin-top: 6px; }
body.is-static #debug-panel { display: none; }
