/* Charm — site. Reprend les menus en jeu : polices du jeu (Columna, Hybrid), textures natives (fond de légende,
   filets dégradés, bouton natif, losanges de l'index, ornement du pied), bleu nuit et or. Sobre : pas de couleur
   hors de l'or, peu d'effets. Courbes de la charte : entrée cubic-bezier(.2,.8,.2,1), reste (.4,0,.2,1). */
@font-face { font-family: CharmColumna; src: url('../natif/Columna.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: CharmHybrid; src: url('../natif/Hybrid.otf') format('opentype'); font-display: swap; }
:root {
    --nuit: #05080f; --nuit-2: #0b1424;
    --or: #b89a63; --or-clair: #d9c08e; --or-sombre: #7d6a45;
    --creme: #eadfc6; --secondaire: #a9a08c; --repos: #a0a0a0;
    --entree: cubic-bezier(.2, .8, .2, 1); --courbe: cubic-bezier(.4, 0, .2, 1);
    --haut: 84px; --case: 76px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--haut); background: var(--nuit); }
html, html * { cursor: url('../natif/pointeur-32.png') 16 16, default; }
body { margin: 0; min-height: 100vh; color: var(--creme); font: 17px/1.6 CharmHybrid, Georgia, serif; -webkit-font-smoothing: antialiased; overflow-x: hidden;
    background: radial-gradient(120% 80% at 12% 0%, var(--nuit-2) 0%, var(--nuit) 62%) fixed, var(--nuit); }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90; background: radial-gradient(ellipse at 50% 45%, transparent 55%, #000a 100%); }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: #b89a6355; color: #fff; }
:focus-visible { outline: 1px solid var(--or-clair); outline-offset: 4px; }
h1, h2, h3 { margin: 0; font-family: CharmColumna, serif; font-weight: normal; }
small { font-family: CharmColumna, serif; }

/* ------------------------------------------------------------------ boutons (identiques au jeu) */
.bouton-principal { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 13px 26px; font: 14px CharmColumna, serif; letter-spacing: .1em; text-transform: uppercase; color: #ecd29a;
    background: url('../natif/UI_T_NewButtonBack.png') center / 100% 100% no-repeat; border: 0; transition: color 160ms; white-space: nowrap; }
.bouton-principal:hover { color: #fff1cc; background-image: url('../natif/UI_T_NewButtonHighlightGradient.png'), url('../natif/UI_T_NewButtonBack.png'); }
.bouton-texte { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 11px 14px; font: 12px CharmColumna, serif; letter-spacing: .08em; text-transform: uppercase; color: var(--creme); background: none; border: 0; white-space: nowrap; }
.bouton-texte::after { content: ''; position: absolute; inset: auto 4px 0; height: 4px; background: url('../natif/UI_T_Divider_H_Fade.png') center / 100% 100% no-repeat; opacity: .35; transition: opacity 160ms; }
.bouton-texte:hover { color: #fff1cc; }
.bouton-texte:hover::after { opacity: .95; }
[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* ------------------------------------------------------------------ intro */
.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--nuit); animation: intro-sortie 600ms 1600ms var(--courbe) forwards; pointer-events: none; }
.intro-in { display: grid; justify-items: center; gap: 22px; }
.intro-embleme { width: min(30vmin, 200px); height: auto; animation: intro-embleme 1200ms var(--entree) both; }
.intro-ligne { display: block; width: min(280px, 60vw); height: 4px; overflow: hidden; }
.intro-ligne i { display: block; height: 100%; background: url('../natif/UI_T_Divider_H_Fade.png') center / 100% 100% no-repeat; transform: scaleX(0); animation: intro-ligne 900ms 400ms var(--entree) forwards; }
@keyframes intro-embleme { from { opacity: 0; transform: scale(.8); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes intro-ligne { to { transform: scaleX(1); } }
@keyframes intro-sortie { to { opacity: 0; visibility: hidden; } }
.sans-intro .intro { display: none; }

/* ------------------------------------------------------------------ en-tête : logo du serveur à gauche */
.haut { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--haut); display: flex; align-items: center; gap: 30px; padding: 0 clamp(16px, 3vw, 44px); transition: background-color 300ms var(--courbe); }
.haut.opaque { background: #05080fe6; }
.haut.opaque::after { content: ''; position: absolute; inset: auto 0 0; height: 4px; background: url('../natif/UI_T_Divider_H_Fade.png') center / 100% 100% no-repeat; opacity: .35; }
.haut-logo { display: block; flex: none; }
.haut-logo img { display: block; width: auto; height: 50px; }
.haut-nav { display: flex; gap: 6px; margin-left: 10px; }
.haut-nav a { position: relative; padding: 10px 14px; font: 13px CharmColumna, serif; letter-spacing: .08em; text-transform: uppercase; color: var(--repos); transition: color 160ms; }
.haut-nav a::after { content: ''; position: absolute; inset: auto 6px 0; height: 4px; background: url('../natif/UI_T_Divider_H_Fade.png') center / 100% 100% no-repeat; opacity: 0; transition: opacity 160ms; }
.haut-nav a:hover, .haut-nav a.actif { color: #fff; }
.haut-nav a:hover::after, .haut-nav a.actif::after { opacity: .9; }
.haut-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.compte { display: inline-flex; align-items: center; gap: 10px; padding: 6px 4px; font: 12px CharmColumna, serif; letter-spacing: .08em; text-transform: uppercase; color: var(--creme); }
.compte:hover { color: #fff1cc; }
.compte-avatar { width: 34px; height: 34px; border-radius: 50%; padding: 2px; border: 1px solid var(--or); overflow: hidden; }
.compte-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.compte-nom { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.haut-progression { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--or-sombre), var(--or-clair)); transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); opacity: .7; }

/* ------------------------------------------------------------------ emblème en filigrane (derrière le contenu) */
.filigrane { position: fixed; z-index: 0; left: 50%; top: 50%; width: min(66vh, 78vw); height: auto; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
main, .pied { position: relative; z-index: 1; }

/* ------------------------------------------------------------------ scène d'ouverture */
.scene-piste { position: relative; height: 210vh; }
.scene { position: sticky; top: 0; height: 100vh; min-height: 520px; overflow: hidden; display: grid; place-items: center; }
.ciel { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-marque { position: relative; display: grid; justify-items: center; gap: 16px; padding: var(--haut) 20px 0; text-align: center; }
.scene-logo { width: min(700px, 84vw); height: auto; animation: flotter 7s ease-in-out infinite; }
@keyframes flotter { 0%, 100% { transform: translate3d(0, 2px, 0) rotate(-.35deg); } 50% { transform: translate3d(2px, -8px, 0) rotate(.35deg) scale(1.012); } }
.scene-titre { margin: 0; font: 14px CharmColumna, serif; letter-spacing: .3em; text-transform: uppercase; color: var(--or-clair); }
.scene-boutons { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; }
.defiler { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; font: 11px CharmColumna, serif; letter-spacing: .3em; text-transform: uppercase; color: var(--secondaire); }
.defiler::after { content: ''; width: 1px; height: 40px; background: linear-gradient(var(--or-clair), transparent); animation: defiler 2.2s var(--courbe) infinite; transform-origin: top; }
@keyframes defiler { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { opacity: 0; } }

/* ------------------------------------------------------------------ sections */
.section { max-width: 1080px; margin: 0 auto; padding: clamp(80px, 13vh, 140px) clamp(18px, 4vw, 40px); }
.entete { display: grid; justify-items: center; gap: 8px; margin-bottom: 40px; padding-bottom: 18px; text-align: center; background: url('../natif/UI_T_Divider_H_Fade.png') bottom / min(520px, 90%) 4px no-repeat; }
.entete small { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--or-clair); }
.entete h2 { font-size: clamp(28px, 3.4vw, 38px); letter-spacing: .06em; text-transform: uppercase; }

/* Panneau du Guide (menu Échap) : fond de légende, filet GoldLeaf vertical, rubriques en losange. */
.panneau { position: relative; padding: 26px 30px 26px 44px; isolation: isolate; }
.panneau::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #08131cdd url('../natif/UI_T_LegendBack.png') center / cover no-repeat;
    -webkit-mask: radial-gradient(ellipse 120% 140% at 0% 50%, #000 60%, transparent 92%); mask: radial-gradient(ellipse 120% 140% at 0% 50%, #000 60%, transparent 92%); }
.panneau::after { content: ''; position: absolute; left: 18px; top: 22px; bottom: 22px; width: 2px; background: url('../natif/UI_T_GoldLeaf_VM.png') center / 2px 64px repeat-y; opacity: .45; }
.rubriques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 34px; }
.rubrique { position: relative; display: flex; align-items: center; gap: 20px; min-height: calc(var(--case) + 12px); padding: 0 6px; color: var(--repos); transform-origin: left center; transition: transform 200ms var(--entree); }
.rubrique::before { content: ''; position: absolute; left: calc(var(--case) + 24px); right: 3px; bottom: 8px; height: 10px; background: url('../natif/UI_T_Divider_H_Fade.png') right center / 100% 100% no-repeat; opacity: .5; transition: opacity 200ms; }
.rubrique[data-fond="settings"] { --fond: url('../natif/UI_T_FG_Settings_Back.webp'); }
.rubrique[data-fond="mail"] { --fond: url('../natif/UI_T_FG_OwlMail_Back.webp'); }
.rubrique[data-fond="talents"] { --fond: url('../natif/UI_T_FG_Talents_Back.webp'); }
.rubrique[data-fond="inventory"] { --fond: url('../natif/UI_T_FG_Inventory_Back.webp'); }
.rubrique[data-fond="collections"] { --fond: url('../natif/UI_T_FG_Collections_Back.webp'); }
.rubrique[data-fond="quests"] { --fond: url('../natif/UI_T_FG_QuestLog_Back.webp'); }
.objet { position: relative; flex: 0 0 var(--case); height: var(--case); isolation: isolate; }
.losange { position: absolute; inset: 0; display: grid; place-items: center; clip-path: polygon(50% 8%, 92% 50%, 50% 92%, 8% 50%); overflow: hidden; }
.losange::before { content: ''; position: absolute; inset: 8px; background: var(--fond) center / contain no-repeat; transform: rotate(-45deg); opacity: .85; transition: transform 200ms; }
.losange img { position: relative; width: 74%; height: 74%; object-fit: contain; transition: transform 200ms; }
.objet::after { content: ''; position: absolute; inset: 0; z-index: 2; background: url('../natif/UI_T_FG_IndexIconBorder.webp') center / contain no-repeat; opacity: .68; transition: opacity 200ms, transform 200ms; }
.libelle { min-width: 0; flex: 1; padding-bottom: 6px; }
.libelle strong { display: block; font: 18px CharmColumna, serif; font-weight: normal; text-transform: uppercase; transition: color 200ms; }
.libelle small { display: block; margin-top: 6px; font-size: 14px; line-height: 1.3; color: var(--secondaire); }
.rubrique:hover { transform: scale(1.03); }
.rubrique:hover strong { color: #fff; }
.rubrique:hover::before, .rubrique:hover .objet::after { opacity: 1; }
.rubrique:hover .objet::after { transform: scale(1.05); }
.rubrique:hover .losange img { transform: scale(1.1); }
.rubrique:hover .losange::before { transform: rotate(-45deg) scale(1.1); }

/* Fenêtre flottante (Métier, Administration) : fond de légende découpé par le contour ondulé. */
.fenetre { position: relative; max-width: 820px; margin: 0 auto; padding: clamp(26px, 4vh, 40px) clamp(24px, 4vw, 48px) 26px; isolation: isolate; }
.texture { position: absolute; inset: -5%; z-index: -1; overflow: hidden; background: #08131ced url('../natif/UI_T_LegendBack.png') center / cover no-repeat;
    -webkit-mask: url('../natif/contour-panneau.svg') center / 100% 100% no-repeat; mask: url('../natif/contour-panneau.svg') center / 100% 100% no-repeat; }
.etapes { list-style: none; margin: 0; padding: 0; }
.etapes li { display: flex; align-items: center; gap: 22px; padding: 18px 4px 22px; background: url('../natif/UI_T_Divider_H_Fade.png') bottom / 100% 4px no-repeat; }
.etapes li:last-child { background: none; }
.etape-num { position: relative; z-index: 0; flex: none; display: grid; place-items: center; width: 52px; height: 52px; font: 15px CharmColumna, serif; color: var(--or-clair); }
.etape-num::before { content: ''; position: absolute; z-index: -1; inset: 0; background: url('../natif/UI_T_FG_IndexIconBorder.webp') center / contain no-repeat; opacity: .75; }
.etapes li.fait .etape-num { color: #fff; }
.etapes li.fait .etape-num::before { opacity: 1; filter: drop-shadow(0 0 8px #d9c08e88); }
.etape-texte { flex: 1; min-width: 0; }
.etape-texte strong { display: block; font: 18px CharmColumna, serif; font-weight: normal; text-transform: uppercase; color: var(--creme); }
.etape-texte small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.35; color: var(--secondaire); }
.etapes li.fait .etape-texte small { color: var(--or-clair); }
.note { margin: 16px 0 0; text-align: center; font: 11px CharmColumna, serif; letter-spacing: .14em; text-transform: uppercase; color: var(--secondaire); }

/* ------------------------------------------------------------------ pied : ornement natif du Guide */
.pied { display: grid; justify-items: center; gap: 18px; padding: 60px 20px 36px; text-align: center; }
.pied::before { content: ''; width: 64px; height: 16px; background: var(--or); -webkit-mask: url('../natif/UI_T_MenuOrnament.png') center / contain no-repeat; mask: url('../natif/UI_T_MenuOrnament.png') center / contain no-repeat; }
.pied-liens { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; }
.pied-liens a { position: relative; padding: 10px 12px; font: 12px CharmColumna, serif; letter-spacing: .08em; text-transform: uppercase; color: var(--repos); }
.pied-liens a:hover { color: #fff; }
.pied small { max-width: 680px; font-size: 12px; line-height: 1.6; color: #6f6858; }

/* ------------------------------------------------------------------ message flottant */
.toast { position: fixed; z-index: 150; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: min(560px, 92vw); padding: 14px 24px; background: #08131cf2 url('../natif/UI_T_Divider_H_Fade.png') bottom / 100% 4px no-repeat; font: 14px CharmColumna, serif; letter-spacing: .04em; color: var(--or-clair); text-align: center; animation: toast 300ms var(--entree); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ------------------------------------------------------------------ espace joueur */
.page-simple { min-height: 100vh; display: grid; place-items: center; padding: calc(var(--haut) + 30px) 18px 50px; }
.page-simple .fenetre { width: min(620px, 100%); text-align: center; animation: monter 400ms var(--entree) both; }
@keyframes monter { from { opacity: 0; transform: translateX(-24px); } }
.medaillon { width: 112px; height: 112px; margin: 0 auto 16px; border-radius: 50%; padding: 4px; border: 1px solid var(--or); box-shadow: 0 0 0 4px #05080f, 0 0 0 5px #b89a6355; }
.medaillon img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.fenetre h1 { font-size: clamp(26px, 3.6vw, 32px); letter-spacing: .06em; text-transform: uppercase; }
.sous-titre { margin: 8px 0 22px; font-size: 15px; color: var(--secondaire); }
.statuts { margin: 0 0 22px; padding: 0; list-style: none; text-align: left; }
.statuts li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 6px; background: url('../natif/UI_T_Divider_H_Fade.png') bottom / 100% 4px no-repeat; }
.statuts span { font: 13px CharmColumna, serif; letter-spacing: .06em; text-transform: uppercase; color: var(--repos); }
.statuts b { font: 14px CharmColumna, serif; font-weight: normal; text-align: right; }
.statuts .oui { color: #b9d7a6; } .statuts .non { color: #dfa79c; } .statuts .neutre { color: var(--or-clair); }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; }
.page-simple form { margin: 12px 0 0; }
.erreur { margin: 0 0 18px; padding: 10px 14px; background: #3a121299; font-size: 14px; color: #f1c0b8; }

/* ------------------------------------------------------------------ petits écrans */
@media (max-width: 860px) {
    .rubriques { grid-template-columns: 1fr; }
    .etapes li { flex-wrap: wrap; }
    .etapes li > a { margin-left: 74px; }
}
@media (max-width: 640px) {
    :root { --haut: 66px; --case: 64px; }
    .haut-logo img { height: 38px; }
    .haut-nav, .haut-actions .bouton-texte { display: none; }
    .panneau { padding: 18px 12px 18px 30px; }
    .panneau::after { left: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
    .intro { display: none; }
    .scene-piste { height: auto; }
    .scene { position: relative; }
    .filigrane { opacity: .06; }
}
