/* ==================================================================
   THÈME « RUNES » DE YGGDRASIL (09/11/2026)
   Chargé à la fin de includes/menu.php (donc après les styles des pages).
   Ne touche pas aux tuiles de la carte (terrains, personnages, monstres…).
   Polices : fonts/ (OFL, Google Fonts, hébergées sur le site) : Almendra
   (titres, noms, boutons ; choisie le 09/11 à la place des gothiques), EB Garamond (texte).
   Images : images/theme/ (SVG faits maison : runes, cercle, textures).
   ================================================================== */

@font-face {
    font-family: "Ygg Almendra";
    src: url("../fonts/almendra-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ygg Almendra";
    src: url("../fonts/almendra-bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ygg Almendra";
    src: url("../fonts/almendra-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Ygg Garamond";
    src: url("../fonts/eb-garamond.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ygg Garamond";
    src: url("../fonts/eb-garamond-italic.woff2") format("woff2");
    font-weight: 400 800;
    font-style: italic;
    font-display: swap;
}

:root {
    --ygg-bg: #0c0b0a;
    --ygg-panel: #15120f;
    --ygg-panel-2: #1d1914;
    --ygg-line: #5c4a2c;
    --ygg-line-dark: #3a2f20;
    --ygg-gold: #d4ad62;
    --ygg-gold-light: #f0d590;
    --ygg-gold-dark: #8a6a35;
    --ygg-text: #e4dac4;
    --ygg-text-dim: #a99d86;
    --ygg-title: "Ygg Almendra", Georgia, serif;
    --ygg-heading: "Ygg Almendra", Georgia, serif;
    --ygg-body: "Ygg Garamond", Georgia, serif;
    --ygg-blade: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
    --ygg-noise: url("../images/theme/noise.svg");
}

/* ---------- Page ---------- */

html body {
    background-color: var(--ygg-bg);
    background-image:
        radial-gradient(ellipse at 50% 30%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 75%, rgba(0, 0, 0, 0.85) 100%),
        url("../images/theme/ring.svg"),
        var(--ygg-noise),
        url("../images/theme/stone.svg");
    background-repeat: no-repeat, no-repeat, repeat, no-repeat;
    background-position: center, center -120px, 0 0, center;
    background-size: 100% 100%, min(1100px, 120vw) auto, 220px 220px, 100% 100%;
    background-attachment: fixed, fixed, fixed, fixed;
    color: var(--ygg-text);
}

/* Police : remplace Georgia (includes/css_font.php l'impose en !important). */
html body,
html body *,
html body input,
html body select,
html body textarea,
html body button {
    font-family: var(--ygg-body) !important;
}

html body pre,
html body pre *,
html body code,
html body code * {
    font-family: monospace !important;
}

html body h1 {
    font-family: var(--ygg-title) !important;
    font-weight: 700;
    font-size: 54px;
    letter-spacing: 1px;
    color: #ddd7cc;
    background: linear-gradient(180deg, #f3efe6 0%, #c9c2b5 55%, #8f877a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 10px rgba(0, 0, 0, 0.9));
}

html body h2,
html body h3,
html body h4 {
    font-family: var(--ygg-heading) !important;
    font-weight: 700;
    color: var(--ygg-gold-light);
    letter-spacing: 0.3px;
}

html body a {
    color: var(--ygg-gold);
}

html body a:hover {
    color: var(--ygg-gold-light);
}

/* Barres de défilement */
html {
    scrollbar-color: #5c4a2c #120f0c;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #120f0c; }
::-webkit-scrollbar-thumb { background: #5c4a2c; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #8a6a35; }

/* Champs */
html body input[type="text"],
html body input[type="number"],
html body input[type="password"],
html body input[type="email"],
html body input[type="search"],
html body select,
html body textarea {
    background: #0f0d0b;
    color: var(--ygg-text);
    border: 1px solid var(--ygg-line);
    border-radius: 3px;
}

html body input:focus,
html body select:focus,
html body textarea:focus {
    outline: none;
    border-color: var(--ygg-gold);
    box-shadow: 0 0 0 2px rgba(212, 173, 98, 0.25);
}

/* ---------- Menu de gauche ---------- */

html body .sidebar-menu {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    scrollbar-color: #5c4a2c transparent;
}

/* Liens dans un cadre de pierre (includes/menu.php : div.sidebar-links). */
html body .sidebar-links {
    margin-top: 4px;
    padding: 12px 9px 6px;
    background:
        var(--ygg-noise),
        linear-gradient(180deg, #16130f 0%, #0d0b09 100%);
    border: 3px solid #45403a;
    border-radius: 4px;
    box-shadow:
        inset 0 0 0 1px #0a0807,
        inset 0 0 0 2px #7a6440,
        inset 0 0 18px rgba(0, 0, 0, 0.85);
}

/* Écran large : un peu plus large (les lames ont besoin de place), toujours
   à gauche de la marge de 220 px réservée par includes/css_menu_space.php. */
@media (min-width: 1201px) {
    html body .sidebar-menu {
        left: 10px;
        width: 200px;
        padding-left: 10px;
        padding-right: 10px;
    }

    html body .sidebar-menu .sidebar-link {
        white-space: nowrap;
    }
}

html body .sidebar-title {
    position: relative;
    font-family: var(--ygg-title) !important;
    font-weight: 700;
    font-size: clamp(24px, calc(1.1vh + 16px), 31px);
    line-height: 1.1;
    letter-spacing: 0.5px;
    color: #ece6da;
    background: none;
    -webkit-text-fill-color: currentColor;
    filter: none;
    text-shadow: 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, 0.9);
    padding-bottom: 9px;
}

html body .sidebar-title::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 0;
    height: 7px;
    background:
        linear-gradient(45deg, transparent 42%, var(--ygg-gold) 42%, var(--ygg-gold) 58%, transparent 58%) center / 7px 7px no-repeat,
        linear-gradient(-45deg, transparent 42%, var(--ygg-gold) 42%, var(--ygg-gold) 58%, transparent 58%) center / 7px 7px no-repeat,
        linear-gradient(90deg, transparent, var(--ygg-gold-dark) 30%, var(--ygg-gold-dark) 70%, transparent) center / 100% 1px no-repeat;
}

/* Panneau du personnage */
html body .sidebar-character-info {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding-left: 2px;
    padding-right: 2px;
    margin-left: 0;
    margin-right: 0;
}

html body .sidebar-character-name {
    font-family: var(--ygg-heading) !important;
    font-size: clamp(21px, calc(1vh + 13px), 28px);
    font-weight: 700;
    color: #f1c48a;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 0 #000, 0 0 10px rgba(234, 177, 92, 0.25);
}

html body .sidebar-character-class {
    color: var(--ygg-text-dim);
    font-size: 14px;
    border-bottom: 0;
}

html body .sidebar-stat-row {
    font-size: 14px;
}

html body .sidebar-stat-label {
    color: #efe6d2;
    letter-spacing: 0.5px;
}

html body .sidebar-stat-value {
    color: #f4ead5;
}

/* Barres PV / PA / XP (09/11/2026, 12 h 45) : cadres fournis par l'utilisateur
   (images/theme/bar-pv.webp, bar-pa.webp, bar-xp.webp : entrelacs celtes rouge,
   bleu, or ; creux rempli de sombre). border-image : les deux bouts gardent leur
   forme (80 px de l'image = 40 px à l'écran), le milieu s'étire. La valeur est
   au-dessus du cadre ; la couleur remplit le creux, bouts arrondis. */
html body .sidebar-stat-row {
    position: relative;
    margin: 0 0 1px;
    padding: 0 8px;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, 0.9);
}

html body .sidebar-stat-bar {
    position: relative;
    height: 26px;
    margin-bottom: clamp(5px, calc(1.2vh - 3px), 11px);
    padding: 0;
    overflow: visible;
    background: transparent;
    border-style: solid;
    border-color: transparent;
    border-width: 0 40px;
    border-radius: 0;
    border-image: url("../images/theme/bar-pv.webp") 0 80 fill / 0 40px stretch;
    clip-path: none;
    box-shadow: none;
}

html body .sidebar-stat-bar:has(.sidebar-pa-fill) {
    border-image-source: url("../images/theme/bar-pa.webp");
}

html body .sidebar-stat-bar:has(.sidebar-xp-fill) {
    border-image-source: url("../images/theme/bar-xp.webp");
}

html body .sidebar-stat-bar::before {
    content: none;
}

/* La couleur dans le creux du cadre : 10 px de haut, bouts arrondis, déborde de
   5 px de chaque côté vers les pointes du creux (largeur en ligne = % + 10 px). */
html body .sidebar-stat-fill {
    position: absolute;
    top: 8px;
    left: -5px;
    height: 10px;
    box-sizing: content-box;
    padding-right: 10px;
    border-radius: 5px;
}

html body .sidebar-stat-fill[style*="width: 0%"] {
    padding-right: 0;
}

html body .sidebar-hp-fill {
    background: linear-gradient(180deg, #ffb3a6 0%, #f0564a 30%, #b4231d 70%, #6d1210 100%);
    box-shadow: 0 0 6px rgba(240, 80, 64, 0.6);
}

html body .sidebar-pa-fill {
    background: linear-gradient(180deg, #cfe9ff 0%, #5aa6f0 30%, #2462b0 70%, #13396b 100%);
    box-shadow: 0 0 6px rgba(80, 150, 240, 0.6);
}

html body .sidebar-xp-fill {
    background: linear-gradient(180deg, #fff6cf 0%, #f2c55c 30%, #b98a2e 70%, #6e4f17 100%);
    box-shadow: 0 0 6px rgba(240, 200, 100, 0.55);
}

/* Liens du menu : lames à bouts pointus, liseré doré. */
html body .sidebar-menu .sidebar-link,
html body .sidebar-menu button.sidebar-link {
    position: relative;
    isolation: isolate;
    padding-left: 18px;
    padding-right: 18px;
    background: linear-gradient(180deg, #6d5732, #3a2e1b);
    border: 0;
    border-radius: 0;
    clip-path: var(--ygg-blade);
    color: #ddd3bf;
    font-weight: 500;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 0 #000;
}

html body .sidebar-menu .sidebar-link::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 45%),
        linear-gradient(180deg, #2b2620 0%, #1a1714 100%);
    clip-path: polygon(11px 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 11px 100%, 0 50%);
}

html body .sidebar-menu .sidebar-link:hover {
    background: linear-gradient(180deg, #a98448, #5e4825);
    color: #f6ecd6;
}

html body .sidebar-menu .sidebar-link:hover::before {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 45%),
        linear-gradient(180deg, #382f24 0%, #211c16 100%);
}

html body .sidebar-menu .sidebar-link.active {
    background: linear-gradient(180deg, #f3d488, #a77a34 55%, #6b4d1f);
    color: #fbe9bd;
}

html body .sidebar-menu .sidebar-link.active::before {
    inset: 2px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(240, 200, 120, 0.28), rgba(0, 0, 0, 0) 70%),
        linear-gradient(180deg, #4a3b26 0%, #2a2118 100%);
}

html body .sidebar-menu .sidebar-link-mj {
    color: var(--ygg-gold-light);
}

html body .sidebar-alert {
    right: 16px;
}

html body .sidebar-pvp {
    border-color: #7a3333;
    background: rgba(122, 51, 51, 0.15);
}

/* ---------- Cadres communs ---------- */

/* Cadre à runes : bandes en haut, en bas et sur les côtés. */
html body .side-panel {
    padding: 34px 30px;
    background:
        url("../images/theme/rune-strip-h.svg") repeat-x left top / auto 22px,
        url("../images/theme/rune-strip-h.svg") repeat-x right bottom / auto 22px,
        url("../images/theme/rune-strip-v.svg") repeat-y left top / 18px auto,
        url("../images/theme/rune-strip-v.svg") repeat-y right top / 18px auto,
        var(--ygg-noise),
        linear-gradient(180deg, #17130f 0%, #100d0b 100%);
    border: 1px solid var(--ygg-line);
    border-radius: 3px;
    box-shadow:
        0 0 0 3px #0a0807,
        0 0 0 4px var(--ygg-line-dark),
        0 12px 30px rgba(0, 0, 0, 0.8);
    scrollbar-color: #5c4a2c #110e0c;
}

/* Cadre à runes sur les grands blocs de section de chaque page (09/11/2026). */
html body .game-container > .card,
html body .character-panel,
html body .equipment-panel,
html body .inventory-panel,
html body .history-panel,
html body .group-panel,
html body .game-container > .panel,
html body .t-box,
html body .container > .section,
html body .world-panel,
html body .wiki-panel,
html body .charte-section,
html body .page .box,
html body .auth-box,
html body .character-container {
    padding: 36px 32px;
    background:
        url("../images/theme/rune-strip-h.svg") repeat-x left top / auto 22px,
        url("../images/theme/rune-strip-h.svg") repeat-x right bottom / auto 22px,
        url("../images/theme/rune-strip-v.svg") repeat-y left top / 18px auto,
        url("../images/theme/rune-strip-v.svg") repeat-y right top / 18px auto,
        var(--ygg-noise),
        linear-gradient(180deg, #17130f 0%, #100d0b 100%);
    border: 1px solid var(--ygg-line);
    border-radius: 3px;
    box-shadow:
        0 0 0 3px #0a0807,
        0 0 0 4px var(--ygg-line-dark),
        0 14px 34px rgba(0, 0, 0, 0.8);
}

/* Cadre de la carte : runes autour, parchemin sombre et usé au milieu. */
html body .game-container > .card {
    background:
        url("../images/theme/rune-strip-h.svg") repeat-x left top / auto 22px,
        url("../images/theme/rune-strip-h.svg") repeat-x right bottom / auto 22px,
        url("../images/theme/rune-strip-v.svg") repeat-y left top / 18px auto,
        url("../images/theme/rune-strip-v.svg") repeat-y right top / 18px auto,
        var(--ygg-noise),
        radial-gradient(ellipse at 50% 50%, #2c241a 0%, #1d1812 70%, #14100c 100%);
}

@media (max-width: 700px) {
    html body .game-container > .card,
    html body .character-panel,
    html body .equipment-panel,
    html body .inventory-panel,
    html body .history-panel,
    html body .group-panel,
    html body .game-container > .panel,
    html body .t-box,
    html body .container > .section,
    html body .world-panel,
    html body .wiki-panel,
    html body .charte-section,
    html body .page .box,
    html body .auth-box,
    html body .character-container {
        padding: 32px 24px;
    }
}

/* ---------- Carte (game.php) : le cadre seulement, pas les tuiles ---------- */

html body .map {
    box-shadow:
        0 0 0 2px #0a0806,
        0 0 0 4px #6b5634,
        0 0 0 5px #0a0806,
        0 0 22px rgba(0, 0, 0, 0.9);
}

html body .map-corner,
html body .map-x-coordinate,
html body .map-y-coordinate {
    color: #cdb27a;
    font-family: var(--ygg-heading) !important;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 0 #000;
}

/* Colonne de droite */
html body .side-panel .position {
    text-align: center;
    color: var(--ygg-text);
    font-size: 18px;
}

html body .side-panel .position strong {
    font-family: var(--ygg-heading) !important;
    color: #f2ead8;
    font-size: 19px;
}

html body .inspection-panel,
html body .side-panel .inspection-panel {
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid var(--ygg-line-dark);
    border-radius: 3px;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.6);
}

html body .inspection-panel h3,
html body .side-panel .inspection-panel h3 {
    font-size: 24px;
    color: #f2ead8;
}

html body .inspection-terrain {
    color: var(--ygg-text-dim);
}

html body .inspection-terrain strong {
    color: #f2ead8;
    font-family: var(--ygg-heading) !important;
    font-size: 17px;
}

html body .inspection-section {
    border-top: 0;
    position: relative;
    padding-top: 18px;
}

html body .inspection-section::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 0;
    height: 7px;
    background:
        linear-gradient(45deg, transparent 42%, var(--ygg-gold-dark) 42%, var(--ygg-gold-dark) 58%, transparent 58%) center / 7px 7px no-repeat,
        linear-gradient(-45deg, transparent 42%, var(--ygg-gold-dark) 42%, var(--ygg-gold-dark) 58%, transparent 58%) center / 7px 7px no-repeat,
        linear-gradient(90deg, transparent, var(--ygg-line) 30%, var(--ygg-line) 70%, transparent) center / 100% 1px no-repeat;
}

html body .inspection-section h4 {
    font-size: 21px;
    color: #efe3c8;
}

html body .pickup-item {
    border-top-color: rgba(92, 74, 44, 0.45);
}

html body .pickup-item-info span {
    color: var(--ygg-text-dim);
}

html body .pickup-item-info strong {
    font-family: var(--ygg-heading) !important;
    font-size: 18px;
}

html body .npc-name-link {
    color: var(--ygg-gold);
}

html body .player-name-link,
html body .npc-name-link,
html body .monster-name-link,
html body .inspection-panel a {
    text-decoration: none;
}

html body .player-name-link:hover,
html body .npc-name-link:hover,
html body .monster-name-link:hover,
html body .inspection-panel a:hover {
    text-decoration: underline;
}

/* États, compétences, trajet, messages */
html body .active-effects,
html body .map-skills,
html body .route-panel,
html body .revive-panel,
html body .portal-panel,
html body .building-panel {
    background:
        var(--ygg-noise),
        linear-gradient(180deg, #1a1612 0%, #120f0c 100%);
    border: 1px solid var(--ygg-line);
    border-radius: 3px;
    box-shadow: inset 0 0 0 3px #0a0807, inset 0 0 0 4px var(--ygg-line-dark);
}

html body .route-panel {
    border-color: #b8952f;
}

html body .route-panel h3 {
    color: #ffd75a;
}

html body .move-message,
html body .pa-cost {
    color: var(--ygg-text-dim);
}

/* ---------- Boutons : lame dorée ---------- */

html body .movement button,
html body .route-panel button,
html body .pickup-form button,
html body .portal-panel button,
html body .revive-button,
html body .test-pa-button,
html body .pickup-popup-ok,
html body .pa-popup-ok {
    position: relative;
    isolation: isolate;
    padding: 9px 26px;
    background: linear-gradient(180deg, #f0cf83 0%, #b07f35 50%, #6e4c1d 100%);
    border: 0;
    border-radius: 0;
    clip-path: var(--ygg-blade);
    color: #f8e7bf;
    font-family: var(--ygg-heading) !important;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

html body .movement button::before,
html body .route-panel button::before,
html body .pickup-form button::before,
html body .portal-panel button::before,
html body .revive-button::before,
html body .test-pa-button::before,
html body .pickup-popup-ok::before,
html body .pa-popup-ok::before {
    content: "";
    position: absolute;
    inset: 2px;
    z-index: -1;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 214, 140, 0.35), rgba(0, 0, 0, 0) 70%),
        linear-gradient(180deg, #8a5f2c 0%, #5a3a17 55%, #3b250e 100%);
    clip-path: polygon(11px 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 11px 100%, 0 50%);
}

html body .movement button:hover:not(:disabled),
html body .route-panel button:hover:not(:disabled),
html body .pickup-form button:hover,
html body .portal-panel button:hover:not(:disabled),
html body .revive-button:hover,
html body .test-pa-button:hover,
html body .pickup-popup-ok:hover,
html body .pa-popup-ok:hover {
    background: linear-gradient(180deg, #ffe7a6 0%, #d29b45 50%, #7e5722 100%);
    color: #fff4d8;
}

html body .movement button:disabled,
html body .route-panel button:disabled,
html body .portal-panel button:disabled {
    filter: grayscale(0.55) brightness(0.8);
    opacity: 0.75;
    color: #e9dcc0;
    cursor: not-allowed;
}

/* Boutons de compétences : même lame, plus sobre. */
html body .movement .map-skill-button {
    padding: 7px 22px;
    font-family: var(--ygg-body) !important;
    font-size: 15px;
}

html body .map-skill-name small,
html body .map-skill-meta {
    color: #e2cc9a;
}

/* ---------- Fenêtres (popups) ---------- */

html body .pickup-popup-content,
html body .pa-popup-content {
    background:
        var(--ygg-noise),
        linear-gradient(180deg, #1a1612 0%, #110e0c 100%);
    border: 1px solid var(--ygg-line);
    border-radius: 3px;
    box-shadow:
        0 0 0 3px #0a0807,
        0 0 0 4px var(--ygg-line-dark),
        0 16px 40px rgba(0, 0, 0, 0.85);
    color: var(--ygg-text);
}

/* ==================================================================
   PAGES HORS DU JEU (09/11/2026) : accueil (index.php), création de compte,
   mot de passe oublié, choix et création du personnage. Le lien vers ce
   fichier est dans leur <head> (includes/theme.php).
   ================================================================== */

/* Encadrés légers : annonces, personnages, petites cartes de présentation. */
html body .page .news,
html body .page .perso,
html body .page .empty,
html body .page .grid .card {
    background:
        var(--ygg-noise),
        linear-gradient(180deg, #1a1612 0%, #120f0c 100%);
    border: 1px solid var(--ygg-line);
    border-radius: 3px;
    box-shadow:
        inset 0 0 0 3px #0a0807,
        inset 0 0 0 4px var(--ygg-line-dark),
        0 8px 22px rgba(0, 0, 0, 0.6);
}

html body .page .news {
    border-left: 3px solid var(--ygg-gold-dark);
}

html body .page .perso:hover {
    border-color: var(--ygg-gold);
}

html body .page .news p,
html body .page .box p,
html body .page .grid .card p {
    color: #d6ccb6;
}

html body .page .news-date {
    color: var(--ygg-gold);
}

html body .page .grid .card h3 {
    color: var(--ygg-gold-light);
    font-size: 18px;
}

html body .page .perso-name {
    font-family: var(--ygg-heading) !important;
    font-size: 22px;
    font-weight: 700;
    color: #eab15c;
}

html body .page .perso-details {
    color: var(--ygg-text-dim);
}

html body .page .perso-image {
    background: #0b0908;
    border-color: var(--ygg-line);
}

html body .subtitle,
html body .home-active,
html body .auth-link,
html body .auth-hint,
html body .note,
html body .footer {
    color: var(--ygg-text-dim);
}

html body .home-active strong {
    color: var(--ygg-gold);
}

html body .page .quote {
    border-color: var(--ygg-line);
    color: #e2d8c2;
}

html body .page .shot {
    background: #0b0908;
    border: 1px solid var(--ygg-line);
    border-radius: 3px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

html body .page .shot figcaption {
    color: var(--ygg-text-dim);
    border-top-color: var(--ygg-line-dark);
}

html body .page .chapter {
    color: var(--ygg-gold);
}

/* Classement de l'accueil */
html body .page .rank-title {
    font-family: var(--ygg-heading) !important;
    color: var(--ygg-gold-light);
}

html body .rank-tabs .rank-table th {
    color: var(--ygg-gold);
}

html body .rank-tabs .rank-table th,
html body .rank-tabs .rank-table td {
    border-bottom-color: rgba(92, 74, 44, 0.45);
}

/* Onglets de l'accueil (aussi en haut du wiki et de la charte sans connexion) et du
   classement : lames sombres, l'onglet choisi en or. */
html body .home-tabs .home-tab,
html body .rank-tabs .rank-tab {
    position: relative;
    isolation: isolate;
    background: linear-gradient(180deg, #6d5732, #3a2e1b);
    border: 0;
    border-radius: 0;
    clip-path: var(--ygg-blade);
    color: #ddd3bf;
    text-shadow: 0 1px 0 #000;
}

html body .home-tabs .home-tab::before,
html body .rank-tabs .rank-tab::before {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 45%),
        linear-gradient(180deg, #2b2620 0%, #1a1714 100%);
    clip-path: polygon(11px 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 11px 100%, 0 50%);
}

html body .home-tabs .home-tab:hover,
html body .rank-tabs .rank-tab:hover {
    background: linear-gradient(180deg, #a98448, #5e4825);
    color: #f6ecd6;
}

html body .home-tabs .home-tab.active,
html body .rank-tabs .rank-tab.active {
    background: linear-gradient(180deg, #f3d488, #a77a34 55%, #6b4d1f);
    color: #fbe9bd;
}

html body .home-tabs .home-tab.active::before,
html body .rank-tabs .rank-tab.active::before {
    inset: 2px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(240, 200, 120, 0.28), rgba(0, 0, 0, 0) 70%),
        linear-gradient(180deg, #4a3b26 0%, #2a2118 100%);
}

/* Boutons : lame dorée (Se connecter, Créer le compte, Jouer…). */
html body .page button:not(.home-tab):not(.rank-tab),
html body .page .button,
html body .auth-box button,
html body .auth-box .button-link,
html body .character-container button {
    position: relative;
    isolation: isolate;
    background: linear-gradient(180deg, #f0cf83 0%, #b07f35 50%, #6e4c1d 100%);
    border: 0;
    border-radius: 0;
    clip-path: var(--ygg-blade);
    color: #f8e7bf;
    font-family: var(--ygg-heading) !important;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-decoration: none;
    text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.6);
}

html body .page button:not(.home-tab):not(.rank-tab)::before,
html body .page .button::before,
html body .auth-box button::before,
html body .auth-box .button-link::before,
html body .character-container button::before {
    content: "";
    position: absolute;
    inset: 2px;
    z-index: -1;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 214, 140, 0.35), rgba(0, 0, 0, 0) 70%),
        linear-gradient(180deg, #8a5f2c 0%, #5a3a17 55%, #3b250e 100%);
    clip-path: polygon(11px 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 11px 100%, 0 50%);
}

html body .page button:not(.home-tab):not(.rank-tab):hover,
html body .page .button:hover,
html body .auth-box button:hover,
html body .auth-box .button-link:hover,
html body .character-container button:hover {
    background: linear-gradient(180deg, #ffe7a6 0%, #d29b45 50%, #7e5722 100%);
    color: #fff4d8;
}

/* « Se déconnecter » (choix du personnage) : lame sombre. */
html body .page button.ghost:not(.home-tab):not(.rank-tab) {
    background: linear-gradient(180deg, #6d5732, #3a2e1b);
    color: #ddd3bf;
}

html body .page button.ghost:not(.home-tab):not(.rank-tab)::before {
    inset: 1px;
    background: linear-gradient(180deg, #2b2620 0%, #1a1714 100%);
}

html body .character-container label {
    color: var(--ygg-gold-light);
    font-family: var(--ygg-heading) !important;
}

html body .character-container .class-display {
    background: #0f0d0b;
    border: 1px solid var(--ygg-line);
    border-radius: 3px;
    color: var(--ygg-text);
}

html body .auth-link a,
html body .footer a,
html body .charte-check a {
    color: var(--ygg-gold);
}

/* ==================================================================
   CADRES ET BOUTONS D'APRÈS LA MAQUETTE DE L'UTILISATEUR (09/11/2026, 13 h)
   Images découpées dans sa maquette (panneau « Position actuelle / Déplacer ») :
   - images/theme/frame.webp : grand cadre (entrelacs aux coins, runes dorées
     sur les bords), 9 parties : coins 80 px, bords répétés (round) ;
   - images/theme/inner.webp : cadre intérieur (fin liseré, petits entrelacs aux
     coins) pour les encadrés dans les grands blocs ;
   - images/theme/btn.webp : bouton « Déplacer » sans le texte (plaque à pans
     coupés, entrelacs aux deux bouts), bouts de 84 px gardés, milieu étiré.
   ================================================================== */

/* Grands blocs */
html body .game-container > .card,
html body .side-panel,
html body .character-panel,
html body .equipment-panel,
html body .inventory-panel,
html body .history-panel,
html body .group-panel,
html body .game-container > .panel,
html body .t-box,
html body .container > .section,
html body .world-panel,
html body .wiki-panel,
html body .charte-section,
html body .page .box,
html body .auth-box,
html body .character-container {
    padding: 16px 14px;
    background: var(--ygg-noise), linear-gradient(180deg, #17130f 0%, #100d0b 100%);
    background-clip: padding-box;
    border-style: solid;
    border-color: transparent;
    border-width: 30px 30px 32px;
    border-radius: 0;
    border-image: url("../images/theme/frame.webp") 80 / 46px round;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
}

html body .game-container > .card {
    background:
        var(--ygg-noise),
        radial-gradient(ellipse at 50% 50%, #2c241a 0%, #1d1812 70%, #14100c 100%);
    background-clip: padding-box;
}

@media (max-width: 700px) {
html body .game-container > .card,
html body .side-panel,
html body .character-panel,
html body .equipment-panel,
html body .inventory-panel,
html body .history-panel,
html body .group-panel,
html body .game-container > .panel,
html body .t-box,
html body .container > .section,
html body .world-panel,
html body .wiki-panel,
html body .charte-section,
html body .page .box,
html body .auth-box,
html body .character-container {
        padding: 12px 8px;
        border-width: 23px 23px 25px;
        border-image-width: 36px;
    }
}

/* Colonne de droite rangée dans le cadre de la carte (écran < 1440 px, seuil relevé le 10/11/2026) : cadre
   intérieur léger au lieu d'un deuxième grand cadre à runes. */
@media (max-width: 1439px) {
    html body .game-container > .card .side-panel {
        padding: 16px 12px;
        border-width: 6px;
        border-image: url("../images/theme/inner.webp") 38 / 19px stretch;
        box-shadow: none;
    }
}

/* Encadrés dans les blocs */
html body .inspection-panel,
html body .side-panel .inspection-panel,
html body .active-effects,
html body .map-skills,
html body .route-panel,
html body .revive-panel,
html body .portal-panel,
html body .building-panel,
html body .pickup-popup-content,
html body .pa-popup-content,
html body .page .news,
html body .page .perso,
html body .page .empty,
html body .page .grid .card {
    border-style: solid;
    border-color: transparent;
    border-width: 6px;
    border-radius: 0;
    border-image: url("../images/theme/inner.webp") 38 / 19px stretch;
    box-shadow: none;
    background:
        var(--ygg-noise),
        linear-gradient(180deg, rgba(26, 22, 18, 0.92) 0%, rgba(14, 11, 9, 0.92) 100%);
}

/* Boutons */
html body .movement button:not(.map-skill-button),
html body .route-panel button,
html body .pickup-form button,
html body .portal-panel button,
html body .revive-button,
html body .test-pa-button,
html body .pickup-popup-ok,
html body .pa-popup-ok,
html body .page button:not(.home-tab):not(.rank-tab):not(.ghost),
html body .page .button,
html body .auth-box button,
html body .auth-box .button-link,
html body .character-container button {
    min-height: 40px;
    padding: 6px 2px;
    background: none;
    clip-path: none;
    border-style: solid;
    border-color: transparent;
    border-width: 0 42px;
    border-radius: 0;
    border-image: url("../images/theme/btn.webp") 0 84 fill / 0 42px stretch;
    box-shadow: none;
    color: #f6e3b4;
    font-family: var(--ygg-heading) !important;
    font-weight: 700;
    text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.85);
}

html body .movement button:not(.map-skill-button)::before,
html body .route-panel button::before,
html body .pickup-form button::before,
html body .portal-panel button::before,
html body .revive-button::before,
html body .test-pa-button::before,
html body .pickup-popup-ok::before,
html body .pa-popup-ok::before,
html body .page button:not(.home-tab):not(.rank-tab):not(.ghost)::before,
html body .page .button::before,
html body .auth-box button::before,
html body .auth-box .button-link::before,
html body .character-container button::before {
    content: none;
}

html body .movement button:not(.map-skill-button):hover,
html body .route-panel button:hover,
html body .pickup-form button:hover,
html body .portal-panel button:hover,
html body .revive-button:hover,
html body .test-pa-button:hover,
html body .pickup-popup-ok:hover,
html body .pa-popup-ok:hover,
html body .page button:not(.home-tab):not(.rank-tab):not(.ghost):hover,
html body .page .button:hover,
html body .auth-box button:hover,
html body .auth-box .button-link:hover,
html body .character-container button:hover {
    background: none;
    color: #fff3d2;
    filter: brightness(1.18);
}

html body .movement button:not(.map-skill-button):disabled,
html body .route-panel button:disabled,
html body .pickup-form button:disabled,
html body .portal-panel button:disabled,
html body .revive-button:disabled,
html body .test-pa-button:disabled,
html body .pickup-popup-ok:disabled,
html body .pa-popup-ok:disabled,
html body .page button:not(.home-tab):not(.rank-tab):not(.ghost):disabled,
html body .page .button:disabled,
html body .auth-box button:disabled,
html body .auth-box .button-link:disabled,
html body .character-container button:disabled {
    filter: grayscale(0.6) brightness(0.7);
    opacity: 0.8;
    cursor: not-allowed;
}

/* ==================================================================
   BOUTON « DÉPLACER » PARTOUT (09/11/2026, 13 h 30) : menu de gauche, petits
   boutons des pages, onglets, compétences. Même image (images/theme/btn.webp),
   bouts un peu plus petits pour les petits boutons.
   ================================================================== */

/* Menu de gauche */
html body .sidebar-menu .sidebar-link,
html body .sidebar-menu button.sidebar-link {
    padding-left: 0;
    padding-right: 0;
    background: none;
    clip-path: none;
    border-style: solid;
    border-color: transparent;
    border-width: 0 22px;
    border-radius: 0;
    border-image: url("../images/theme/btn.webp") 0 84 fill / 0 28px stretch;
    text-align: center;
    color: #f3e2bd;
    font-family: var(--ygg-heading) !important;
    font-weight: 700;
    text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.9);
    filter: brightness(0.72) saturate(0.85);
}

html body .sidebar-menu .sidebar-link::before {
    content: none;
}

html body .sidebar-menu .sidebar-link:hover {
    background: none;
    color: #fff3d2;
    filter: brightness(0.95);
}

html body .sidebar-menu .sidebar-link.active {
    background: none;
    color: #fff6dc;
    filter: brightness(1.15) drop-shadow(0 0 5px rgba(240, 190, 90, 0.55));
}

html body .sidebar-menu .sidebar-alert {
    right: 0;
}

html body .sidebar-links {
    padding-left: 5px;
    padding-right: 5px;
}

/* Petits boutons des pages du jeu (Déséquiper, Filtrer, Envoyer, onglets…) */
html body :is(.game-container, .container) :is(button, input[type="submit"], input[type="button"], .button):not(.link-button, .side-pm, .sidebar-link) {
    min-height: 32px;
    padding: 4px 2px;
    background: none;
    clip-path: none;
    border-style: solid;
    border-color: transparent;
    border-width: 0 28px;
    border-radius: 0;
    border-image: url("../images/theme/btn.webp") 0 84 fill / 0 30px stretch;
    box-shadow: none;
    color: #f6e3b4;
    font-family: var(--ygg-heading) !important;
    font-weight: 700;
    text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.85);
    filter: none;
    cursor: pointer;
}

html body :is(.game-container, .container) :is(button, input[type="submit"], input[type="button"], .button):not(.link-button, .side-pm, .sidebar-link)::before {
    content: none;
}

html body :is(.game-container, .container) :is(button, input[type="submit"], input[type="button"], .button):not(.link-button, .side-pm, .sidebar-link):hover {
    background: none;
    color: #fff3d2;
    filter: brightness(1.18);
}

html body :is(.game-container, .container) :is(button, input[type="submit"], input[type="button"], .button):not(.link-button, .side-pm, .sidebar-link):disabled {
    filter: grayscale(0.6) brightness(0.7);
    opacity: 0.8;
    cursor: not-allowed;
}

/* Onglets (canaux du chat, wiki) : l'onglet choisi plus lumineux. */
html body :is(.chat-channels, .wiki-tabs) button:not(.active) {
    filter: brightness(0.72) saturate(0.85);
}

html body :is(.chat-channels, .wiki-tabs) button.active {
    color: #fff6dc;
    filter: brightness(1.15) drop-shadow(0 0 5px rgba(240, 190, 90, 0.55));
}

/* Boutons « danger » (Abandonner, Quitter le tournoi) : plaque rougie. */
html body :is(.game-container, .container) :is(button, .button).danger:not(.link-button, .side-pm, .sidebar-link) {
    filter: hue-rotate(-28deg) saturate(1.5) brightness(0.9);
}

/* Grands boutons : colonne de droite de la Carte et fenêtres « OK ». */
html body .game-container :is(.side-panel, .pickup-popup, .pa-popup) :is(button, input[type="submit"]):not(.map-skill-button, .link-button) {
    min-height: 40px;
    padding: 6px 2px;
    border-width: 0 42px;
    border-image-width: 0 42px;
}

/* Communication : chaque canal garde sa couleur (or, vert, bleu, violet, comme
   les messages du chat) ; l'onglet actif est éclairé, entouré d'un halo de sa
   couleur, avec une petite gemme de sa couleur dessous. Les autres sont assombris. Les
   !important passent devant la règle générale des petits boutons. */
html body .chat-channels button {
    position: relative;
    --ygg-ch: #f0d590;
    color: var(--ygg-ch) !important;
    filter: brightness(0.78) saturate(0.85) !important;
    transition: filter 0.15s ease;
}

html body .chat-channels button[data-channel="group"] { --ygg-ch: #9fe09f; }
html body .chat-channels button[data-channel="guild"] { --ygg-ch: #a9d6f5; }
html body .chat-channels button[data-channel="private"] { --ygg-ch: #d4bcff; }

html body .chat-channels button:hover:not(:disabled) {
    filter: brightness(0.9) !important;
}

html body .chat-channels button.active {
    filter: brightness(1.2) drop-shadow(0 0 2px var(--ygg-ch)) drop-shadow(0 0 7px var(--ygg-ch)) !important;
}

/* Petite gemme taillée de la couleur du canal, sous l'onglet actif (13 h 50). */
html body .chat-channels button.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 9px;
    height: 9px;
    transform: translateX(-50%) rotate(45deg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 38%),
        linear-gradient(315deg, color-mix(in srgb, var(--ygg-ch) 45%, #000) 0%, var(--ygg-ch) 60%);
    border: 1px solid #c9a45e;
    box-shadow: 0 0 6px var(--ygg-ch), 0 0 2px #000;
}

html body .chat-channels button:disabled {
    filter: grayscale(0.9) brightness(0.45) !important;
    opacity: 0.7;
}

html body .chat-channels {
    padding-bottom: 6px;
}

/* Onglets du wiki : même principe (l'actif éclairé, les autres assombris). */
html body .wiki-tabs button:not(.active) {
    filter: brightness(0.62) saturate(0.7) !important;
}

html body .wiki-tabs button:not(.active):hover {
    filter: brightness(0.9) !important;
}

html body .wiki-tabs button.active {
    color: #fff6dc !important;
    filter: brightness(1.2) drop-shadow(0 0 6px rgba(240, 190, 90, 0.7)) !important;
}

/* Accueil (et barre visiteur du wiki / de la charte) : onglets, onglets du
   classement et « Se déconnecter » avec le bouton « Déplacer » (13 h 55).
   Onglet choisi : éclairé, halo doré et petite gemme dorée dessous. */
html body .home-tabs .home-tab,
html body .rank-tabs .rank-tab,
html body .page button.ghost:not(.home-tab):not(.rank-tab) {
    position: relative;
    min-height: 34px;
    padding: 5px 4px;
    background: none;
    clip-path: none;
    border-style: solid;
    border-color: transparent;
    border-width: 0 28px;
    border-radius: 0;
    border-image: url("../images/theme/btn.webp") 0 84 fill / 0 30px stretch;
    box-shadow: none;
    color: #f6e3b4;
    font-family: var(--ygg-heading) !important;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.85);
    filter: brightness(0.78) saturate(0.85);
}

html body .home-tabs .home-tab::before,
html body .rank-tabs .rank-tab::before,
html body .page button.ghost:not(.home-tab):not(.rank-tab)::before {
    content: none;
}

html body .home-tabs .home-tab:hover,
html body .rank-tabs .rank-tab:hover,
html body .page button.ghost:not(.home-tab):not(.rank-tab):hover {
    background: none;
    color: #fff3d2;
    filter: brightness(1);
}

html body .home-tabs .home-tab.active,
html body .rank-tabs .rank-tab.active {
    background: none;
    color: #fff6dc;
    filter: brightness(1.2) drop-shadow(0 0 2px #f0d590) drop-shadow(0 0 7px rgba(240, 190, 90, 0.75));
}

html body .home-tabs .home-tab.active::after,
html body .rank-tabs .rank-tab.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    width: 9px;
    height: 9px;
    transform: translateX(-50%) rotate(45deg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 38%),
        linear-gradient(315deg, #6b4d1f 0%, #f0d590 60%);
    border: 1px solid #c9a45e;
    box-shadow: 0 0 6px #f0d590, 0 0 2px #000;
}

html body .home-tabs,
html body .rank-tabs {
    row-gap: 14px;
}

/* Carte sur téléphone / tablette (écran < 1440 px depuis le 10/11/2026, 09/11/2026) : la carte et la
   colonne de droite passent l'une sous l'autre ; au lieu d'un seul grand cadre
   qui défile de côté (et emporte la colonne avec lui), chacune a son cadre :
   le cadre de la carte défile seul, la colonne reste centrée sous la carte. */
@media (max-width: 1439px) {
    html body .game-container > .card:has(> .map-wrapper) {
        padding: 0;
        overflow: visible;
        background: none;
        border: 0;
        border-image: none;
        box-shadow: none;
    }

    html body .game-container > .card > .map-wrapper {
        max-width: 100%;
        overflow-x: auto;
        padding: 14px 12px;
        background:
            var(--ygg-noise),
            radial-gradient(ellipse at 50% 50%, #2c241a 0%, #1d1812 70%, #14100c 100%);
        background-clip: padding-box;
        border-style: solid;
        border-color: transparent;
        border-width: 30px 30px 32px;
        border-image: url("../images/theme/frame.webp") 80 / 46px round;
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
    }

    html body .game-container > .card:has(> .map-wrapper) > :not(.map-wrapper) {
        margin-left: auto;
        margin-right: auto;
    }

    html body .game-container > .card:has(> .map-wrapper) > .active-effects {
        margin-top: 18px;
    }

    html body .game-container > .card .side-panel {
        margin-top: 18px;
        padding: 16px 14px;
        border-width: 30px 30px 32px;
        border-image: url("../images/theme/frame.webp") 80 / 46px round;
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
    }
}

@media (max-width: 700px) {
    html body .game-container > .card > .map-wrapper,
    html body .game-container > .card .side-panel {
        padding: 10px 6px;
        border-width: 23px 23px 25px;
        border-image-width: 36px;
    }
}

/* Menu repliable sur téléphone / tablette (version A, 09/11/2026) : quand le menu
   passe au-dessus de la page (écran <= 1200 px), un petit bandeau (nom, PV / PA /
   XP) et un bouton « Menu » ; les liens s'ouvrent en grille de plaques par-dessus
   la page. Écran large : rien ne change (bouton caché). */
html body .sidebar-toggle {
    display: none;
}

@media (max-width: 1200px) {
    html body nav.sidebar-menu {
        position: relative;
        top: auto;
        left: auto;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 8px;
        align-items: center;
        margin-bottom: 14px;
        padding: 8px 10px;
        background: var(--ygg-noise), linear-gradient(180deg, #17130f 0%, #100d0b 100%);
        border: 0;
        border-style: solid;
        border-color: transparent;
        border-width: 6px;
        border-image: url("../images/theme/inner.webp") 38 / 19px stretch;
        z-index: 1500;
    }

    html body nav.sidebar-menu .sidebar-title {
        display: none;
    }

    html body nav.sidebar-menu .sidebar-character-info {
        grid-column: 1 / -1;
        grid-row: 1;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 4px;
        row-gap: 1px;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    html body nav.sidebar-menu :is(.sidebar-character-name, .sidebar-character-class, .sidebar-pvp) {
        grid-column: 1 / -1;
    }

    html body nav.sidebar-menu .sidebar-character-name {
        margin: 0;
        font-size: 19px;
        line-height: 1.15;
        text-align: center;
    }

    html body nav.sidebar-menu .sidebar-character-class {
        margin: 0 0 3px;
        padding: 0;
        font-size: 12.5px;
        text-align: center;
    }

    html body nav.sidebar-menu .sidebar-stat-row {
        gap: 6px;
        margin: 0;
        padding: 0 2px 0 0;
        font-size: 12.5px;
        white-space: nowrap;
    }

    html body nav.sidebar-menu .sidebar-stat-bar {
        height: 20px;
        margin: 0;
        border-width: 0 30px;
        border-image-width: 0 30px;
    }

    html body nav.sidebar-menu .sidebar-stat-fill {
        top: 6px;
        height: 8px;
        left: -4px;
        padding-right: 8px;
    }

    html body nav.sidebar-menu .sidebar-pvp {
        margin-top: 4px;
        padding: 2px 6px;
        font-size: 12px;
    }

    /* Bouton « Menu » : plaque « Déplacer ». */
    html body nav.sidebar-menu button.sidebar-toggle.sidebar-toggle {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: center;
        position: relative;
        z-index: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-width: 170px;
        min-height: 40px;
        margin: 8px 0 2px;
        padding: 4px 2px;
        background: none;
        clip-path: none;
        border-style: solid;
        border-color: transparent;
        border-width: 0 24px;
        border-radius: 0;
        border-image: url("../images/theme/btn.webp") 0 84 fill / 0 30px stretch;
        box-shadow: none;
        color: #f6e3b4;
        font-family: var(--ygg-heading) !important;
        font-size: 16px;
        font-weight: 700;
        white-space: nowrap;
        text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.9);
        cursor: pointer;
        filter: brightness(0.9);
    }

    html body nav.sidebar-menu button.sidebar-toggle.sidebar-toggle::before {
        content: none;
    }

    html body nav.sidebar-menu button.sidebar-toggle.sidebar-toggle:hover {
        filter: brightness(1.05);
    }

    html body nav.sidebar-menu.menu-open button.sidebar-toggle.sidebar-toggle {
        filter: brightness(1.2) drop-shadow(0 0 5px rgba(240, 190, 90, 0.55));
    }

    html body nav.sidebar-menu button.sidebar-toggle.sidebar-toggle .sidebar-alert {
        position: static;
        flex: none;
        width: 7px;
        height: 21px;
        margin: 0 0 0 2px;
    }

    html body nav.sidebar-menu.menu-open button.sidebar-toggle.sidebar-toggle .sidebar-alert {
        display: none;
    }

    /* Grille des liens, fermée par défaut, par-dessus la page quand elle est ouverte. */
    html body nav.sidebar-menu .sidebar-links {
        display: none;
    }

    html body nav.sidebar-menu.menu-open .sidebar-links {
        position: absolute;
        top: calc(100% + 4px);
        left: -6px;
        right: -6px;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 7px 8px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        margin: 0;
        padding: 12px 10px;
        background: var(--ygg-noise), linear-gradient(180deg, #17130f 0%, #0d0b09 100%);
        border-style: solid;
        border-color: transparent;
        border-width: 6px;
        border-radius: 0;
        border-image: url("../images/theme/inner.webp") 38 / 19px stretch;
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.8);
    }

    html body nav.sidebar-menu.menu-open .sidebar-links .sidebar-link {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        margin: 0;
        padding: 3px 0;
        font-size: 14px;
        line-height: 1.15;
        white-space: normal;
    }

    html body nav.sidebar-menu.menu-open .sidebar-links .logout-form {
        margin: 0;
    }
}

/* Alertes du menu plus visibles (09/11/2026, proposition 3) : le lien qui porte
   le point d'exclamation (invitation, message non lu, demande MJ…) pulse en doré,
   et le point est plus grand avec un halo. Même effet sur le bouton « Menu »
   (téléphone / tablette) quand il porte le point et que la grille est fermée. */
@keyframes yggAlertPlate {
    0%, 100% { filter: brightness(0.95) saturate(1) drop-shadow(0 0 0 rgba(255, 207, 74, 0)); }
    50% { filter: brightness(1.28) saturate(1.1) drop-shadow(0 0 7px rgba(255, 207, 74, 0.85)); }
}

@keyframes yggAlertGlow {
    0%, 100% { filter: drop-shadow(0 0 1px rgba(255, 210, 31, 0.9)); }
    50% { filter: drop-shadow(0 0 4px #ffd21f) drop-shadow(0 0 9px rgba(255, 157, 0, 0.9)); }
}

html body .sidebar-menu .sidebar-link:has(.sidebar-alert),
html body nav.sidebar-menu:not(.menu-open) button.sidebar-toggle.sidebar-toggle:has(.sidebar-alert) {
    animation: yggAlertPlate 1.6s ease-in-out infinite;
}

html body .sidebar-menu .sidebar-link .sidebar-alert {
    width: 8px;
    height: 24px;
    margin-top: -12px;
}

html body .sidebar-menu .sidebar-link .sidebar-alert,
html body nav.sidebar-menu button.sidebar-toggle.sidebar-toggle .sidebar-alert {
    animation: sidebarAlertBob 1.6s ease-in-out infinite, yggAlertGlow 1.6s ease-in-out infinite;
}

html body nav.sidebar-menu button.sidebar-toggle.sidebar-toggle .sidebar-alert {
    width: 8px;
    height: 24px;
}

@media (prefers-reduced-motion: reduce) {
    html body .sidebar-menu .sidebar-link:has(.sidebar-alert),
    html body nav.sidebar-menu:not(.menu-open) button.sidebar-toggle.sidebar-toggle:has(.sidebar-alert) {
        animation: none;
        filter: brightness(1.2) drop-shadow(0 0 6px rgba(255, 207, 74, 0.8));
    }

    html body .sidebar-menu .sidebar-link .sidebar-alert,
    html body nav.sidebar-menu button.sidebar-toggle.sidebar-toggle .sidebar-alert {
        animation: none;
        filter: drop-shadow(0 0 4px #ffd21f);
    }
}

/* ---------- Petits écrans ---------- */

@media (max-width: 700px) {
    html body h1 {
        font-size: clamp(34px, 11vw, 52px);
    }

    html body .side-panel {
        padding: 30px 24px;
    }
}

/* ==================================================================
   BOUTON « MENU MJ » EN FER ANCIEN (10/11/2026) : en tête du menu
   (includes/menu.php, au-dessus de « Carte »). Même plaque que les autres
   boutons (images/theme/btn.webp), version fer : images/theme/btn_metal.webp.
   ================================================================== */
html body .sidebar-menu .sidebar-link.sidebar-link-mj {
    border-image: url("../images/theme/btn_metal.webp") 0 84 fill / 0 28px stretch;
    color: #f1e3b8;
    filter: brightness(0.82) saturate(0.9);
    margin-bottom: 8px;
}

html body .sidebar-menu .sidebar-link.sidebar-link-mj:hover {
    color: #fff3d2;
    filter: brightness(1.02);
}

html body .sidebar-menu .sidebar-link.sidebar-link-mj.active {
    color: #fff6dc;
    filter: brightness(1.18) drop-shadow(0 0 5px rgba(200, 215, 235, 0.5));
}

/* Grille du téléphone / tablette : pas de marge en plus sous le bouton. */
@media (max-width: 1200px) {
    html body nav.sidebar-menu.menu-open .sidebar-links .sidebar-link.sidebar-link-mj {
        margin-bottom: 0;
    }
}

/* ==================================================================
   SURBRILLANCE DES COORDONNÉES (10/11/2026) : le numéro de colonne et de
   ligne de la case survolée s'allume comme une rune (js/game_map.js,
   .coord-hover) : halo doré flou derrière le chiffre, sans cadre.
   ================================================================== */
html body .map-x-coordinate,
html body .map-y-coordinate {
    position: relative;
    isolation: isolate;
    transition: color 0.18s ease, text-shadow 0.18s ease, transform 0.18s ease;
}

html body .map-x-coordinate::before,
html body .map-y-coordinate::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 30px;
    height: 30px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 214, 120, 0.75) 0%, rgba(240, 170, 60, 0.35) 38%, rgba(240, 170, 60, 0) 70%);
    filter: blur(2px);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

html body .map-x-coordinate.coord-hover,
html body .map-y-coordinate.coord-hover {
    color: #fff8de;
    transform: scale(1.18);
    text-shadow:
        0 0 3px #ffe9a8,
        0 0 8px rgba(255, 205, 100, 0.95),
        0 0 14px rgba(240, 160, 50, 0.7),
        0 1px 0 #000;
}

html body .map-x-coordinate.coord-hover::before,
html body .map-y-coordinate.coord-hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
