/* ===================================
   LE ZAAP DU SAVOIR — Thème "Énergie de Zaap"
   Bleu électrique / Cyan / Violet sur fond bleu-noir profond
   =================================== */

:root {
    /* Fonds */
    --bg-dark: #05070f;
    --bg-card: #0d1120;
    --bg-card-hover: #131a30;
    --bg-surface: #0a0d1a;
    --bg-nav: #0a0e1c;

    /* Ancien "vert" : conservé en NOM (référencé par app.js), remappé en bleu Zaap */
    --green-primary: #4f7cff;
    --green-dark: #3b5fe0;
    --green-glow: rgba(79, 124, 255, 0.14);
    --green-glow-strong: rgba(79, 124, 255, 0.32);
    --green-muted: #24306b;

    /* Texte */
    --text-primary: #e2e6f3;
    --text-secondary: #98a0bd;
    --text-muted: #5f6788;

    /* Bordures */
    --border-color: #1a2138;
    --border-green: rgba(79, 124, 255, 0.22);

    /* Sémantiques (inchangées) */
    --red: #ff5252;
    --orange: #ffab40;
    --blue: #448aff;
    --purple: #b388ff;

    /* Nouvelle identité Zaap */
    --zaap-blue: #4f7cff;
    --zaap-cyan: #22d3ee;
    --zaap-violet: #8b5cf6;
    --zaap-cyan-glow: rgba(34, 211, 238, 0.18);
    --zaap-violet-glow: rgba(139, 92, 246, 0.18);
    --zaap-gradient: linear-gradient(135deg, #22d3ee 0%, #4f7cff 50%, #8b5cf6 100%);
    --zaap-gradient-h: linear-gradient(90deg, #22d3ee 0%, #4f7cff 50%, #8b5cf6 100%);
    --zaap-text-gradient: linear-gradient(90deg, #7ee7ff 0%, #7c9bff 48%, #b79cff 100%);

    /* Éléments Dofus (reconnaissables) */
    --elem-eau: #4488ff;
    --elem-feu: #ff6b35;
    --elem-terre: #c9a227;
    --elem-air: #7ec8e3;

    --radius: 8px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.5);
    --shadow-green: 0 0 20px rgba(79, 124, 255, 0.12), 0 0 42px rgba(34, 211, 238, 0.06);
    --shadow-zaap-hover: 0 8px 28px rgba(0,0,0,0.5), 0 0 22px rgba(34, 211, 238, 0.14), 0 0 46px rgba(139, 92, 246, 0.10);
    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-color: #2c3a66 var(--bg-dark);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

::selection {
    background: rgba(79, 124, 255, 0.35);
    color: #fff;
}

a {
    color: var(--green-primary);
    text-decoration: none;
    transition: color var(--transition), text-shadow var(--transition);
}

a:hover {
    color: var(--zaap-cyan);
}

h1, h2, h3, h4 {
    font-family: 'Cinzel', serif;
    color: #fff;
    line-height: 1.3;
    letter-spacing: 0.03em;
}

h1 {
    text-shadow: 0 0 26px rgba(79, 124, 255, 0.28), 0 0 60px rgba(139, 92, 246, 0.14);
}

h2 {
    text-shadow: 0 0 18px rgba(79, 124, 255, 0.18);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-green {
    color: var(--zaap-cyan);
    background: var(--zaap-gradient-h);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mt-2 {
    margin-top: 2rem;
}

/* ===== KEYFRAMES RÉUTILISABLES ===== */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(34, 211, 238, 0.25), 0 0 24px rgba(79, 124, 255, 0.18);
    }
    50% {
        box-shadow: 0 0 18px rgba(34, 211, 238, 0.45), 0 0 42px rgba(139, 92, 246, 0.30);
    }
}

@keyframes shine-sweep {
    from { transform: translateX(-160%) skewX(-18deg); }
    to   { transform: translateX(260%) skewX(-18deg); }
}

@keyframes zaap-flicker {
    0%, 100% { opacity: 1; }
    92%      { opacity: 1; }
    94%      { opacity: 0.82; }
    96%      { opacity: 0.96; }
    98%      { opacity: 0.88; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== TOP BAR ===== */
.top-bar {
    background: #04060c;
    border-bottom: 1px solid rgba(26, 33, 56, 0.85);
    padding: 5px 0;
    font-size: 0.72rem;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 22px;
}

.top-bar-text {
    color: var(--text-muted);
    letter-spacing: 0.02em;
    opacity: 0.85;
}

.top-bar-links {
    display: flex;
    align-items: center;
}

.top-bar-links a {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 2px 12px;
    border-left: 1px solid rgba(26, 33, 56, 0.9);
    transition: color 0.22s ease;
}

.top-bar-links a:first-child {
    border-left: none;
}

.top-bar-links a:last-child {
    padding-right: 0;
}

.top-bar-links a:hover {
    color: #cfe9ff;
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}

/* ===== HEADER ===== */
.header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 22px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 0;
}

/* Pastille Zaap : vortex de zaap-night.png cadré dans un cercle */
.logo-icon {
    display: block;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: #060a18;
    /* Dofus Turquoise (logo.png 1920x1080, œuf centré ~50%/52%) zoomé pour remplir la pastille */
    background-image:
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.10), rgba(5, 7, 15, 0) 62%),
        url('../logo.png');
    background-size: 100% 100%, auto 185%;
    background-position: center, 50% 52%;
    background-repeat: no-repeat;
    border: 1px solid rgba(79, 124, 255, 0.55);
    box-shadow:
        0 0 0 3px rgba(34, 211, 238, 0.08),
        0 0 14px rgba(34, 211, 238, 0.28),
        0 0 32px rgba(139, 92, 246, 0.18),
        inset 0 0 10px rgba(5, 7, 15, 0.55);
    animation: pulse-glow 3.2s ease-in-out infinite;
    transition: box-shadow 0.25s ease;
}

.logo:hover .logo-icon {
    box-shadow:
        0 0 0 3px rgba(34, 211, 238, 0.14),
        0 0 20px rgba(34, 211, 238, 0.42),
        0 0 44px rgba(139, 92, 246, 0.26),
        inset 0 0 10px rgba(5, 7, 15, 0.45);
}

.logo-title {
    font-family: 'Cinzel', serif;
    font-size: 1.42rem;
    font-weight: 700;
    display: block;
    line-height: 1.25;
    letter-spacing: 0.045em;
    color: #eaf2ff;
    background: var(--zaap-text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 14px rgba(79, 124, 255, 0.22));
}

.logo-subtitle {
    font-size: 0.68rem;
    color: var(--text-muted);
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    margin-top: 2px;
}

/* Recherche : pill translucide, loupe intégrée */
.search-bar {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 480px;
    background: rgba(13, 17, 32, 0.65);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 4px 5px 4px 20px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.search-bar:hover {
    border-color: #232c4d;
}

.search-bar:focus-within {
    background: rgba(13, 17, 32, 0.9);
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow:
        0 0 0 1px rgba(34, 211, 238, 0.18),
        0 0 18px rgba(34, 211, 238, 0.14),
        inset 0 0 14px rgba(79, 124, 255, 0.06);
}

.search-bar input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    padding: 7px 12px 7px 0;
    color: var(--text-primary);
    font-size: 0.88rem;
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
}

.search-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.search-btn:hover,
.search-bar:focus-within .search-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--zaap-blue), var(--zaap-violet));
    box-shadow: 0 0 12px rgba(79, 124, 255, 0.35);
}

.mobile-menu-btn {
    display: none;
    background: rgba(13, 17, 32, 0.65);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.3rem;
    line-height: 1;
    padding: 9px 13px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.22s ease, color 0.22s ease;
}

.mobile-menu-btn:hover {
    border-color: rgba(34, 211, 238, 0.45);
    color: var(--zaap-cyan);
}

/* Tiroir mobile : voile de fond + en-tête (invisibles sur desktop) */
.nav-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: rgba(3, 5, 12, 0.72);
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-drawer-head {
    display: none;
}

body.nav-locked {
    overflow: hidden;
}

/* ===== NAVIGATION ===== */
.nav {
    background: rgba(10, 14, 28, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid;
    border-image: linear-gradient(90deg, rgba(34, 211, 238, 0.45) 0%, rgba(79, 124, 255, 0.45) 50%, rgba(139, 92, 246, 0.45) 100%) 1;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2px;
}

.nav-item > a {
    display: block;
    padding: 15px 15px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.22s ease;
    position: relative;
}

.nav-item > a::after {
    content: '';
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 0;
    height: 2px;
    border-radius: 1px;
    background: var(--zaap-gradient-h);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0.9;
    pointer-events: none;
}

.nav-item > a:hover {
    color: #dff3ff;
}

.nav-item.active > a {
    color: #eaf6ff;
    text-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
}

.nav-item > a:hover::after,
.nav-item.active > a::after {
    transform: scaleX(1);
}

.nav-item.has-dropdown {
    position: relative;
}

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

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(13, 17, 32, 0.98);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    min-width: 210px;
    padding: 6px 0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(79, 124, 255, 0.08);
    z-index: 200;
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #2c3a66 transparent;
}

.nav-item.has-dropdown:hover .dropdown {
    display: block;
    animation: dropdown-in 0.2s ease both;
}

.dropdown li a {
    display: block;
    padding: 9px 20px;
    color: var(--text-secondary);
    font-size: 0.84rem;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    border-left: 2px solid transparent;
}

.dropdown li a:hover {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.08), rgba(139, 92, 246, 0.04));
    color: #dff3ff;
    border-left-color: var(--zaap-cyan);
}

/* ===== MAIN ===== */
.main {
    padding: 30px 0;
    min-height: 60vh;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ===== BREADCRUMB ===== */
.breadcrumb {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--zaap-cyan);
}

.page-title {
    font-size: 2rem;
    margin-bottom: 10px;
    letter-spacing: 0.04em;
    color: #7c9bff;
    background: var(--zaap-text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 14px rgba(79, 124, 255, 0.35));
    text-shadow: none;
}

.page-desc {
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 700px;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(79, 124, 255, 0.06) 60%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.14) 0%, rgba(79, 124, 255, 0.08) 40%, transparent 70%);
    pointer-events: none;
    animation: zaap-flicker 7s linear infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(3, 5, 12, 0.45);
    border: 1px solid rgba(79, 124, 255, 0.16);
    border-radius: var(--radius);
    padding: 16px 24px;
    text-align: center;
    box-shadow: inset 0 0 18px rgba(79, 124, 255, 0.05);
}

.stat-number {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--zaap-cyan);
    background: var(--zaap-text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.30));
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--zaap-blue) 0%, var(--zaap-violet) 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(79, 124, 255, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5f8aff 0%, #9d74ff 100%);
    color: #fff;
    box-shadow: 0 0 18px rgba(79, 124, 255, 0.45), 0 0 36px rgba(139, 92, 246, 0.25);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--zaap-cyan);
    color: var(--zaap-cyan);
}

.btn-secondary:hover {
    background: rgba(34, 211, 238, 0.10);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.30);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.btn-block {
    display: block;
    text-align: center;
    width: 100%;
}

.btn-small {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 4px;
    color: var(--zaap-cyan);
    border: 1px solid rgba(34, 211, 238, 0.25);
}

.btn-small:hover {
    background: rgba(34, 211, 238, 0.10);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.25);
}

.btn-small-green {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(79, 124, 255, 0.14));
    color: #9db8ff;
    border: 1px solid var(--border-green);
    display: inline-block;
}

.btn-small-green:hover {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.20), rgba(139, 92, 246, 0.22));
    color: #fff;
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 0 14px rgba(79, 124, 255, 0.30);
}

/* ===== SECTIONS ===== */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    font-size: 1.3rem;
}

.see-all {
    font-size: 0.85rem;
    color: var(--zaap-cyan);
    font-weight: 600;
}

/* ===== UPDATE BANNER ===== */
.update-banner {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.10) 0%, rgba(79, 124, 255, 0.06) 40%, transparent 100%);
    border: 1px solid var(--border-green);
    border-left: 4px solid var(--zaap-cyan);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: inset 0 0 20px rgba(34, 211, 238, 0.04);
}

.update-badge {
    background: var(--zaap-gradient);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(79, 124, 255, 0.35);
}

.update-banner p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.update-banner p strong {
    color: var(--text-primary);
}

.update-banner a {
    color: var(--zaap-cyan);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.update-banner a:hover {
    color: #7ee7f7;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
}

/* ===== ACTUS RSS DOFUS (dernière MAJ + événements en cours) ===== */
#rss-maj {
    flex-wrap: wrap;
}

.rss-loading {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 0;
}

.rss-new-badge {
    display: inline-block;
    background: var(--zaap-cyan);
    color: #05070f;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    vertical-align: 2px;
    margin-left: 4px;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.45);
}

.rss-source-note {
    width: 100%;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.event-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 18px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
    border-color: var(--border-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 211, 238, 0.08);
}

.event-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.event-type {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--zaap-cyan);
    font-weight: 700;
}

.event-chip {
    background: var(--green-muted);
    color: var(--text-primary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.event-chip-urgent {
    background: rgba(255, 82, 82, 0.16);
    color: var(--red);
    border: 1px solid rgba(255, 82, 82, 0.35);
}

.event-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.35;
    margin: 0;
}

.event-end {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.event-end strong {
    color: var(--text-primary);
}

.event-link {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--zaap-cyan);
    font-weight: 600;
}

.event-card:hover .event-link {
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
}

.event-empty {
    grid-column: 1 / -1;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 18px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.event-empty a {
    color: var(--zaap-cyan);
    font-weight: 600;
    margin-left: 6px;
}

/* ===== CARD GRID ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Balayage lumineux diagonal (shine) */
.card::after,
.class-detail-card::after,
.dofus-card::after {
    content: '';
    position: absolute;
    top: -10%;
    left: 0;
    width: 45%;
    height: 120%;
    background: linear-gradient(105deg,
        transparent 0%,
        rgba(160, 200, 255, 0.05) 42%,
        rgba(139, 92, 246, 0.09) 52%,
        transparent 68%);
    transform: translateX(-160%) skewX(-18deg);
    pointer-events: none;
}

.card:hover::after,
.class-detail-card:hover::after,
.dofus-card:hover::after {
    animation: shine-sweep 0.85s ease forwards;
}

.card:hover {
    border-color: rgba(34, 211, 238, 0.30);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-zaap-hover);
}

.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.14), rgba(139, 92, 246, 0.16));
    color: #8fd8ff;
    border: 1px solid rgba(34, 211, 238, 0.25);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}
.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.card:hover .card-icon {
    border-color: var(--border-green);
    box-shadow: 0 0 14px var(--green-glow);
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.difficulty {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.difficulty.easy {
    background: rgba(34, 211, 238, 0.14);
    color: var(--zaap-cyan);
}

.difficulty.medium {
    background: rgba(255, 171, 64, 0.15);
    color: var(--orange);
}

.difficulty.hard {
    background: rgba(255, 82, 82, 0.15);
    color: var(--red);
}

.difficulty.veryhard {
    background: rgba(139, 92, 246, 0.18);
    color: #a78bfa;
}

/* ===== CLASS GRID (HOME) ===== */
.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.class-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
}

.class-card:hover {
    border-color: var(--zaap-cyan);
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.08), rgba(79, 124, 255, 0.12));
    transform: translateY(-2px);
    box-shadow: 0 0 16px rgba(34, 211, 238, 0.18);
}

.class-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    margin: 0 auto 8px;
    border: 2px solid var(--border-color);
    transition: all var(--transition);
}
.class-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.class-card:hover .class-icon {
    border-color: var(--zaap-cyan, var(--green-primary));
    box-shadow: 0 0 12px var(--green-glow-strong);
    transform: scale(1.05);
}

.class-name {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.class-card:hover .class-name {
    color: var(--zaap-cyan);
}

/* ===== DOFUS GRID ===== */
.dofus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.dofus-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.dofus-card:hover {
    border-color: var(--zaap-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-zaap-hover);
}

.dofus-icon {
    display: block;
    margin-bottom: 8px;
    width: 56px;
    height: 56px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

/* fallback si l'image ne charge pas */
.dofus-icon[src=""] {
    font-size: 2.5rem;
    width: auto;
    height: auto;
}

.dofus-card h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.dofus-card p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(139, 92, 246, 0.14));
    border-color: var(--zaap-cyan);
    color: var(--zaap-cyan);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.20);
}

/* ===== CLASS DETAIL GRID ===== */
.class-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.class-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    gap: 20px;
    padding: 24px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.class-detail-card:hover {
    border-color: rgba(34, 211, 238, 0.30);
    box-shadow: var(--shadow-zaap-hover);
}

.class-detail-icon {
    width: 74px;
    height: 74px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    transition: all var(--transition);
}
.class-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.class-detail-card:hover .class-detail-icon {
    border-color: var(--zaap-cyan, var(--green-primary));
    box-shadow: 0 0 16px var(--green-glow-strong);
}

.class-detail-info h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.class-role {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.class-role.dps {
    background: rgba(255, 82, 82, 0.15);
    color: var(--red);
}

.class-role.tank {
    background: rgba(68, 138, 255, 0.15);
    color: var(--blue);
}

.class-role.heal {
    background: rgba(34, 211, 238, 0.14);
    color: var(--zaap-cyan);
}

.class-role.support {
    background: rgba(179, 136, 255, 0.15);
    color: var(--purple);
}

.class-detail-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.class-elements {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.element {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.element.feu { background: rgba(255,107,53,0.15); color: var(--elem-feu); }
.element.eau { background: rgba(68,136,255,0.15); color: var(--elem-eau); }
.element.terre { background: rgba(201,162,39,0.15); color: var(--elem-terre); }
.element.air { background: rgba(126,200,227,0.15); color: var(--elem-air); }

/* ===== DUNGEON LIST ===== */
.dungeon-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Catégorie Boss Anomalie */
.tag-anomalie {
    color: #c4b5fd !important;
    background: rgba(139, 92, 246, 0.14) !important;
    border: 1px solid rgba(139, 92, 246, 0.45) !important;
    font-weight: 800;
}
.filter-btn.filter-anomalie {
    border-color: rgba(139, 92, 246, 0.45);
    color: #c4b5fd;
}
.filter-btn.filter-anomalie.active, .filter-btn.filter-anomalie:hover {
    background: rgba(139, 92, 246, 0.18);
    border-color: #8b5cf6;
    color: #ede9fe;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}
.dungeon-card[data-anomalie="1"] {
    border-color: rgba(139, 92, 246, 0.35);
    background: linear-gradient(165deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.08) 100%);
}

/* Sprite du boss sur les cartes donjons */
.dungeon-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    width: 92px;
}
.dungeon-boss-sprite {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 40%, rgba(79, 124, 255, 0.13), rgba(5, 7, 15, 0.45) 75%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.dungeon-boss-sprite img {
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.55));
    transition: transform var(--transition);
}
.dungeon-card:hover .dungeon-boss-sprite img { transform: scale(1.1); }
.dungeon-left .dungeon-level { margin: 0; text-align: center; }

.dungeon-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition);
}

.dungeon-card:hover {
    border-color: rgba(34, 211, 238, 0.30);
    box-shadow: var(--shadow-zaap-hover);
}

.dungeon-level {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(79, 124, 255, 0.14));
    color: #8fd8ff;
    border: 1px solid var(--border-green);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
    min-width: 70px;
}

.dungeon-info {
    flex: 1;
}

.dungeon-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.dungeon-info p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.dungeon-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-card-hover);
    color: var(--text-muted);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* ===== PAGE QUÊTES DOFUS — GRILLE ÉPURÉE ===== */
.dofus-quest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
}
.dq-card {
    background: linear-gradient(165deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.06) 60%, rgba(34, 211, 238, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 20px 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    text-align: center;
    cursor: pointer;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.dq-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-green);
    box-shadow: var(--shadow-zaap-hover, var(--shadow-green)), var(--shadow);
}
.dq-card.complete { border-color: rgba(34, 211, 238, 0.5); }
.dq-sprite {
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dq-sprite img {
    max-height: 88px;
    max-width: 88px;
    object-fit: contain;
    filter: grayscale(1) brightness(0.35);
    transition: filter 0.6s ease, transform var(--transition);
}
.dq-card:hover .dq-sprite img { transform: scale(1.08); }
.dq-name {
    font-family: 'Cinzel', serif;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.25;
}
.dq-level {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--zaap-cyan, #22d3ee);
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.28);
    padding: 2px 10px;
    border-radius: 20px;
}
.dq-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 4px;
}
.dq-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--zaap-gradient-h, linear-gradient(90deg, #22d3ee, #4f7cff, #8b5cf6));
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.45);
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.dq-prereq-arrow { font-size: 0.68rem; opacity: 0.75; margin-left: 4px; }

/* Boutons de la barre de progression des guides */
.gqp-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}
.gqp-actions { display: flex; gap: 10px; }
.gqp-btn {
    padding: 8px 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.gqp-validate {
    background: linear-gradient(135deg, #22d3ee, #4f7cff);
    border: none;
    color: #04101f;
    font-weight: 800;
}
.gqp-validate:hover {
    filter: brightness(1.12);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
}
.gqp-reset {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.gqp-reset:hover {
    border-color: var(--border-green);
    color: var(--text-primary);
}

/* Panneau Pré-requis des pages guides (sommaire) */
.guide-prereqs {
    background: linear-gradient(150deg, rgba(139, 92, 246, 0.09), rgba(5, 7, 15, 0.35));
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: var(--radius-lg, 14px);
    padding: 1.1rem 1.3rem 1rem;
    margin-bottom: 1.6rem;
}
.guide-prereqs h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0 0 4px;
}
.gp-count {
    margin-left: auto;
    font-family: 'Inter', sans-serif;
    font-size: 0.74rem;
    font-weight: 800;
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 20px;
    padding: 2px 11px;
    white-space: nowrap;
}
.gp-hint {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin: 0 0 10px;
}
.gp-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.gp-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.83rem;
    line-height: 1.35;
    transition: background 0.15s ease;
}
.gp-row:hover { background: rgba(139, 92, 246, 0.1); }
.gp-row input[type="checkbox"] {
    accent-color: #8b5cf6;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}
.gp-img {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 7, 15, 0.55);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.gp-img img {
    max-width: 26px;
    max-height: 26px;
    object-fit: contain;
    transition: filter 0.25s ease, opacity 0.25s ease;
}
.gp-ico { font-size: 0.95rem; }
.gp-name {
    flex: 1;
    min-width: 0;
    color: var(--text-secondary);
    font-weight: 600;
}
.gp-name.is-link, .gp-name.is-ext {
    color: var(--zaap-cyan, #22d3ee);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition);
}
.gp-name.is-link:hover, .gp-name.is-ext:hover {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.gp-ext-ico { font-size: 0.7rem; margin-left: 5px; opacity: 0.8; }
.gp-note {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.gp-row.done .gp-name { color: var(--text-muted); text-decoration: line-through; }
.gp-row.done .gp-name.is-link:hover, .gp-row.done .gp-name.is-ext:hover { color: var(--zaap-cyan, #22d3ee); }
.gp-row.done .gp-img img { filter: grayscale(0.8); opacity: 0.6; }
@media (max-width: 560px) {
    .gp-note { display: none; }
}

/* Sous-quêtes cochables dans les guides Dofus */
.qs-check {
    display: flex;
    align-items: center;
    margin-right: 10px;
    flex-shrink: 0;
}
.qs-check input[type="checkbox"] {
    accent-color: var(--zaap-cyan, #22d3ee);
    width: 20px;
    height: 20px;
    cursor: pointer;
}
.quest-accordion-item.done > .quest-accordion-header .quest-accordion-title h3 {
    color: var(--text-muted);
    text-decoration: line-through;
}
.quest-accordion-item.done > .quest-accordion-header .quest-num { opacity: 0.55; }

/* Barre de progression des sous-quêtes (page guide) */
.guide-quest-progress {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 13px 16px 11px;
    margin-bottom: 18px;
}
.gqp-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.gqp-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.gqp-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.gqp-count strong {
    color: var(--zaap-cyan, #22d3ee);
    font-size: 1.05rem;
    font-weight: 800;
}
.gqp-pct {
    text-align: right;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Carte de progression globale (page Quêtes Dofus) */
.dofus-global-card { margin-bottom: 26px; }

/* Section Alignement (Dofus Ivoire) — choix Bonta/Brâkmar + quêtes cochables */
.guide-align {
    background: linear-gradient(150deg, rgba(59, 130, 246, 0.06), rgba(239, 68, 68, 0.06));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 14px);
    padding: 1.1rem 1.3rem 1rem;
    margin-bottom: 1.6rem;
}
.guide-align h3 {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0 0 4px;
}
.align-note {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}
.align-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
.align-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 22px 24px;
    border-radius: 18px;
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color var(--transition), box-shadow 0.3s ease, opacity var(--transition);
    opacity: 0.9;
}
.align-card:hover { transform: translateY(-6px); opacity: 1; }
.align-card-img {
    width: 112px;
    height: 112px;
    object-fit: contain;
    border-radius: 22px;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.align-card:hover .align-card-img { transform: scale(1.12) rotate(-3deg); }
.align-card-name {
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}
.align-card-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.align-card-badge {
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 20px;
    transition: all var(--transition);
}
.align-card.bonta {
    background: linear-gradient(165deg, rgba(59, 130, 246, 0.14), rgba(5, 7, 15, 0.5) 70%);
    border: 1px solid rgba(59, 130, 246, 0.4);
}
.align-card.bonta .align-card-name { color: #93c5fd; }
.align-card.bonta .align-card-badge {
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.45);
    color: #bfdbfe;
}
.align-card.bonta:hover, .align-card.bonta.active {
    border-color: #3b82f6;
    box-shadow: 0 10px 34px rgba(59, 130, 246, 0.3), 0 0 22px rgba(59, 130, 246, 0.22);
}
.align-card.brakmar {
    background: linear-gradient(165deg, rgba(239, 68, 68, 0.14), rgba(5, 7, 15, 0.5) 70%);
    border: 1px solid rgba(239, 68, 68, 0.4);
}
.align-card.brakmar .align-card-name { color: #fca5a5; }
.align-card.brakmar .align-card-badge {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fecaca;
}
.align-card.brakmar:hover, .align-card.brakmar.active {
    border-color: #ef4444;
    box-shadow: 0 10px 34px rgba(239, 68, 68, 0.3), 0 0 22px rgba(239, 68, 68, 0.22);
}
.align-card.active {
    opacity: 1;
    border-width: 2px;
    transform: translateY(-3px);
}
.align-card.active .align-card-badge {
    background: linear-gradient(135deg, #22d3ee, #4f7cff);
    border-color: transparent;
    color: #04101f;
}
.align-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin: 4px 0 6px;
}
.align-progress { margin-bottom: 12px; }
.align-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    position: relative;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.align-fill.bonta {
    background: linear-gradient(90deg, #60a5fa, #3b82f6, #2563eb);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.55);
}
.align-fill.brakmar {
    background: linear-gradient(90deg, #f87171, #ef4444, #dc2626);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.55);
}
.align-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.28) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: archi-shimmer 2.4s linear infinite;
}
.al-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}
.al-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 8px;
    border-radius: 7px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease;
}
.al-row:hover { background: rgba(148, 163, 184, 0.08); }
.al-row input[type="checkbox"] {
    accent-color: var(--zaap-cyan, #22d3ee);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}
.al-num {
    flex-shrink: 0;
    min-width: 38px;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-muted);
}
.al-name { flex: 1; min-width: 0; }
.al-lvl {
    flex-shrink: 0;
    font-size: 0.68rem;
    color: var(--text-muted);
}
.al-row.done .al-name { color: var(--text-muted); text-decoration: line-through; }
a.al-name.is-ext {
    color: var(--zaap-cyan, #22d3ee);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition);
}
a.al-name.is-ext:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }
.al-row.done a.al-name.is-ext { color: var(--text-muted); }
/* Quêtes d'Ordre (section séparée) */
.align-ordres {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}
.ord-head {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0 0 4px;
}
.ord-group { margin-top: 16px; }
.ord-title {
    font-family: 'Cinzel', serif;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 8px;
    padding: 7px 14px;
    border-radius: 10px;
    display: inline-block;
}
.ord-title.bonta {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
}
.ord-title.brakmar {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.ord-palier {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.ord-palier.bonta {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.ord-palier.brakmar {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.align-page .ord-head { font-size: 1.25rem; }

@media (max-width: 560px) {
    .align-cards { grid-template-columns: 1fr; }
    .align-card-img { width: 92px; height: 92px; }
}

/* Page Alignement dédiée : liste complète, typographie plus grande et aérée */
.align-page { padding: 1.6rem 1.9rem 1.5rem; }
.align-page h3 { font-size: 1.25rem; }
.align-page .align-note { font-size: 0.92rem; margin-bottom: 18px; }
.align-page .align-cards { max-width: 760px; margin-left: auto; margin-right: auto; }
.align-page .al-list { max-height: none; overflow-y: visible; padding-right: 0; gap: 4px; }
.align-page .al-row { padding: 9px 14px; font-size: 0.98rem; border-radius: 10px; }
.align-page .al-row input[type="checkbox"] { width: 18px; height: 18px; }
.align-page .al-num { min-width: 46px; font-size: 0.78rem; }
.align-page .archi-gauge { height: 16px; }
.align-page .gqp-count { font-size: 0.95rem; }
.align-page .gqp-count strong { font-size: 1.2rem; }
.align-page .align-progress { margin: 4px 0 16px; }

/* Titres de sous-quêtes cliquables (guides Dofus) */
.qs-link {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}
.qs-link:hover {
    color: var(--zaap-cyan, #22d3ee);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.qs-ext { font-size: 0.8rem; margin-left: 7px; opacity: 0.9; }

/* Liste des objectifs */
.dq-objs {
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.dq-obj {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 0.79rem;
    line-height: 1.4;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease;
}
.dq-obj:hover { background: rgba(79, 124, 255, 0.08); }
.dq-obj input[type="checkbox"] {
    accent-color: var(--zaap-cyan, var(--green-primary));
    width: 15px;
    height: 15px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}
.dq-obj-ico {
    font-size: 0.76rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.dq-obj.done .dq-obj-text {
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Actions */
.dq-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}
.dq-btn {
    flex: 1;
    padding: 9px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.dq-validate {
    background: linear-gradient(135deg, #22d3ee, #4f7cff);
    border: none;
    color: #04101f;
    font-weight: 800;
}
.dq-validate:hover {
    filter: brightness(1.12);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
}
.dq-reset {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.dq-reset:hover {
    border-color: var(--border-green);
    color: var(--text-primary);
}
.dq-guide-link {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--zaap-cyan, var(--green-primary));
    text-decoration: underline;
    text-underline-offset: 3px;
}
.dq-guide-link:hover { color: var(--text-primary); }

@media (max-width: 480px) {
    .dq-head { flex-wrap: wrap; }
    .dq-ring-wrap { order: -1; margin-left: auto; }
    .dq-actions { flex-wrap: wrap; }
    .dq-btn { flex: 1 1 45%; }
}

/* ===== WIDGET ALMANAX (accueil, API dofusdu.de) ===== */
.almanax-widget {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.07) 55%, rgba(34, 211, 238, 0.06) 100%);
    border: 1px solid var(--border-green);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.6rem;
    position: relative;
    overflow: hidden;
}
.almanax-widget::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--zaap-gradient, linear-gradient(180deg, #22d3ee, #4f7cff, #8b5cf6));
}
.almanax-widget-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}
.almanax-widget-title {
    font-size: 1.15rem;
    margin: 0;
}
.almanax-widget-date {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: capitalize;
}
.almanax-widget-body {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
}
.almanax-offering {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.almanax-offering img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 6px;
}
.almanax-offering-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.almanax-offering-info strong {
    color: var(--text-primary);
    font-size: 0.98rem;
}
.almanax-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--zaap-cyan, var(--green-primary));
    font-weight: 700;
}
.almanax-kamas {
    font-size: 0.8rem;
    color: var(--orange);
    font-weight: 600;
}
.almanax-bonus {
    flex: 1;
    min-width: 260px;
    border-left: 1px solid var(--border-color);
    padding-left: 28px;
}
.almanax-bonus p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}
.almanax-widget-loading {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.6rem 0;
}
@media (max-width: 700px) {
    .almanax-bonus {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border-color);
        padding-top: 14px;
    }
}

/* ===== FOOTER ===== */
.footer {
    background: #04060c;
    border-top: 1px solid var(--border-color);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #8fd8ff;
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
}

.footer-disclaimer {
    margin-top: 12px;
    font-size: 0.75rem !important;
    font-style: italic;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-col ul li a:hover {
    color: var(--zaap-cyan);
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--zaap-blue), var(--zaap-violet));
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 500;
    box-shadow: 0 0 16px rgba(79, 124, 255, 0.35);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: linear-gradient(135deg, #5f8aff, #9d74ff);
    transform: translateY(-3px);
    box-shadow: 0 0 22px rgba(139, 92, 246, 0.5);
}

/* ===== SEARCH MODAL ===== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 4, 10, 0.88);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(79, 124, 255, 0.25);
    border-radius: var(--radius-lg);
    width: 600px;
    max-width: 90vw;
    max-height: 60vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(79, 124, 255, 0.12);
}

.search-modal-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.search-modal-header input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 18px 20px;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
}

.search-modal-header input::placeholder {
    color: var(--text-muted);
}

.search-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 18px 20px;
    font-size: 1.1rem;
    cursor: pointer;
}

.search-modal-close:hover {
    color: var(--red);
}

.search-results {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.search-placeholder {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
}

.search-result-item {
    padding: 12px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 4px;
}

.search-result-item:hover {
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.10), rgba(139, 92, 246, 0.08));
}

.search-result-item .result-type {
    font-size: 0.72rem;
    color: var(--zaap-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.search-result-item .result-title {
    font-weight: 600;
    color: #fff;
    margin-top: 2px;
}

.search-result-item .result-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== GUIDE DETAIL PAGE ===== */
.guide-detail {
    max-width: 1100px;
    margin: 0 auto;
}

.guide-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 38px 42px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.guide-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--zaap-gradient-h);
    box-shadow: 0 0 14px rgba(79, 124, 255, 0.45);
}

.guide-header-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.guide-icon {
    font-size: 2.5rem;
}

/* Quand guide.icon est une URL image */
.guide-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.6));
    display: block;
}

.guide-header-top h1 {
    font-size: 2.15rem;
    flex: 1;
    letter-spacing: 0.02em;
}

.guide-boss-image {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

.guide-boss-image img {
    max-height: 180px;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: rgba(0,0,0,0.25);
    padding: 8px;
    border: 1px solid var(--border-color);
}

.guide-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.guide-meta-tag {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.guide-meta-tag strong {
    color: var(--zaap-cyan);
}

.guide-header p {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.75;
}

.guide-toc {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 30px;
}

.guide-toc h3 {
    font-size: 1.12rem;
    margin-bottom: 12px;
    color: #8fd8ff;
}

.guide-toc ol {
    list-style: none;
    counter-reset: toc;
    padding: 0;
}

.guide-toc ol li {
    counter-increment: toc;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.97rem;
}

.guide-toc ol li:last-child {
    border-bottom: none;
}

.guide-toc ol li::before {
    content: counter(toc) ".";
    color: var(--zaap-cyan);
    font-weight: 700;
    margin-right: 10px;
}

.guide-toc ol li a {
    color: var(--text-secondary);
}

.guide-toc ol li a:hover {
    color: var(--zaap-cyan);
}

.guide-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    margin-bottom: 24px;
}

.guide-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    color: #8fd8ff;
    text-shadow: 0 0 14px rgba(34, 211, 238, 0.20);
}

.guide-section h3 {
    font-size: 1rem;
    margin: 16px 0 8px;
}

.guide-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 12px;
}

.guide-section ul,
.guide-section ol {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    padding-left: 20px;
    margin-bottom: 12px;
}

.guide-section li {
    margin-bottom: 6px;
}

.guide-step {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--zaap-blue);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.guide-step-number {
    color: var(--zaap-cyan);
    font-weight: 700;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}

.guide-step p {
    margin-bottom: 0;
}

.guide-tip {
    background: rgba(34, 211, 238, 0.06);
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 16px 0;
}

.guide-tip::before {
    content: '💡 Astuce';
    display: block;
    color: var(--zaap-cyan);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.guide-tip p {
    margin-bottom: 0;
}

.guide-warning {
    background: rgba(255, 82, 82, 0.08);
    border: 1px solid rgba(255, 82, 82, 0.2);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 16px 0;
}

.guide-warning::before {
    content: '⚠️ Attention';
    display: block;
    color: var(--red);
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.guide-warning p {
    margin-bottom: 0;
}

.guide-comp {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.guide-comp-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}

.guide-comp-item .comp-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 4px;
}

.guide-comp-item .comp-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}

.guide-comp-item .comp-role {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.guide-nav-bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 16px;
}

.guide-nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 24px;
    flex: 1;
    transition: all var(--transition);
    text-decoration: none;
    cursor: pointer;
}

.guide-nav-btn:hover {
    border-color: var(--zaap-cyan);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(139, 92, 246, 0.10));
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.18);
}

.guide-nav-btn .nav-btn-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.guide-nav-btn .nav-btn-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.guide-nav-btn.next {
    text-align: right;
}

/* ===== QUEST ACCORDIONS ===== */
.quest-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.quest-accordion-item {
    border: 1px solid rgba(79, 124, 255, 0.20);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.quest-accordion-item.open {
    border-color: var(--zaap-blue);
    box-shadow: 0 0 16px rgba(79, 124, 255, 0.14);
}

.quest-accordion-header {
    padding: 17px 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(79, 124, 255, 0.04);
    transition: background 0.2s;
    user-select: none;
    gap: 12px;
}

.quest-accordion-header:hover {
    background: rgba(79, 124, 255, 0.10);
}

.quest-accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.quest-num {
    background: linear-gradient(135deg, var(--zaap-cyan), var(--zaap-violet));
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 0 8px rgba(79, 124, 255, 0.35);
}

.quest-accordion-header h3 {
    font-size: 1.08rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
    text-shadow: none;
}

.quest-accordion-header .quest-badge {
    font-size: 0.8rem;
    padding: 4px 11px;
    border-radius: 20px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--zaap-cyan);
    border: 1px solid rgba(34, 211, 238, 0.30);
    white-space: nowrap;
    flex-shrink: 0;
}

.quest-accordion-arrow {
    font-size: 1rem;
    color: var(--zaap-cyan);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.quest-accordion-item.open .quest-accordion-arrow {
    transform: rotate(180deg);
}

.quest-accordion-body {
    display: none;
    padding: 26px 30px;
    border-top: 1px solid rgba(79, 124, 255, 0.12);
    background: rgba(255, 255, 255, 0.015);
}

.quest-accordion-item.open .quest-accordion-body {
    display: block;
}

.quest-step-block {
    margin-bottom: 20px;
}

.quest-step-block h4 {
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--zaap-cyan);
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

.quest-step-block ol,
.quest-step-block ul {
    padding-left: 20px;
    margin: 0;
}

.quest-step-block li {
    margin-bottom: 9px;
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 1rem;
}

.quest-step-block li strong {
    color: var(--text-primary);
}

.quest-items-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.quest-item-tag {
    background: rgba(79, 124, 255, 0.08);
    border: 1px solid rgba(79, 124, 255, 0.25);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.quest-item-tag.important {
    background: rgba(255, 170, 0, 0.08);
    border-color: rgba(255, 170, 0, 0.35);
    color: #ffaa00;
}

/* Ressources de sous-quêtes : sprite + nom + quantité + case */
.quest-items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.qi-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 12px;
    background: rgba(79, 124, 255, 0.05);
    border: 1px solid rgba(79, 124, 255, 0.18);
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}
.qi-row:hover {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(79, 124, 255, 0.1);
}
.qi-row input[type="checkbox"] {
    accent-color: var(--zaap-cyan, #22d3ee);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}
.qi-img {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 7, 15, 0.55);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    overflow: hidden;
}
.qi-img img {
    max-width: 30px;
    max-height: 30px;
    object-fit: contain;
    image-rendering: pixelated;
    transition: filter 0.25s ease, opacity 0.25s ease;
}
.qi-name { flex: 1; min-width: 0; }
.qi-qty {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--zaap-cyan, #22d3ee);
    white-space: nowrap;
}
.qi-row.important { border-color: rgba(255, 170, 0, 0.4); }
.qi-row.important .qi-qty { color: #ffaa00; }
.qi-row.done { opacity: 0.85; }
.qi-row.done .qi-name { color: var(--text-muted); text-decoration: line-through; }
.qi-row.done .qi-img img { filter: grayscale(0.8); opacity: 0.55; }

/* Section « Ressources principales à préparer » (aperçu avec sprites) */
.rp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}
.rp-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 12px;
    background: rgba(79, 124, 255, 0.05);
    border: 1px solid rgba(79, 124, 255, 0.18);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.rp-img {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 7, 15, 0.55);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    overflow: hidden;
}
.rp-img img {
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    image-rendering: pixelated;
}
.rp-name { flex: 1; min-width: 0; }
.rp-qty {
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--zaap-cyan, #22d3ee);
    white-space: nowrap;
}
.rp-more { font-size: 0.85rem; color: var(--text-muted); }

/* ===== PAGE SONGES ===== */
.songes-bestiaire-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 34px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.songes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}
.songe-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 16px 10px 13px;
    background: linear-gradient(165deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.06) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.songe-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-green);
    box-shadow: var(--shadow-zaap-hover, var(--shadow-green)), var(--shadow);
}
.songe-img {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.songe-img img {
    max-height: 68px;
    max-width: 90px;
    object-fit: contain;
    filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.5));
    transition: transform var(--transition);
}
.songe-card:hover .songe-img img { transform: scale(1.09); }
.songe-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}
.songe-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.songes-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
#songes-presentation .guide-section { padding: 24px 28px; }

/* Coordonnées cliquables (copie /travel x,y) */
.coord-copy {
    position: relative;
    color: var(--zaap-cyan, #22d3ee);
    font-weight: 700;
    border-bottom: 1px dashed rgba(34, 211, 238, 0.5);
    cursor: copy;
    white-space: nowrap;
    transition: color var(--transition), border-color var(--transition);
}
.coord-copy:hover {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}
.coord-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    background: #04101f;
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.5);
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
    pointer-events: none;
    z-index: 50;
    animation: coord-tip-pop 1.3s ease forwards;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
@keyframes coord-tip-pop {
    0% { opacity: 0; transform: translateX(-50%) translateY(4px); }
    12%, 75% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-4px); }
}

/* ===== PAGES BOSS : 4 SECTIONS ===== */
.patch-list li {
    font-size: 0.97rem;
    line-height: 1.65;
    margin-bottom: 8px;
    color: var(--text-secondary);
}
.patch-list li::marker { content: '🆕 '; }

.strat-list li {
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 10px;
    color: var(--text-secondary);
}
.strat-list li::marker { color: var(--zaap-cyan, #22d3ee); font-weight: 800; }

.mech-block {
    background: rgba(79, 124, 255, 0.04);
    border: 1px solid rgba(79, 124, 255, 0.18);
    border-left: 3px solid var(--zaap-cyan, #22d3ee);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 14px;
}
.mech-block h4 {
    font-size: 1.02rem;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.mech-block p, .mech-block li {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}
.mech-block ul { margin: 8px 0 0; padding-left: 20px; }
.mech-block > img {
    display: block;
    max-width: 100%;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid var(--border-color);
}
.mech-block.mech-unique {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.spell-rows {
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.spell-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 12px;
}
.spell-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 7, 15, 0.55);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}
.spell-icon img { max-width: 40px; max-height: 40px; object-fit: contain; }
.spell-icon.has-visual {
    width: auto;
    min-width: 46px;
    max-width: 110px;
    cursor: zoom-in;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.spell-icon.has-visual img { max-width: 102px; max-height: 42px; object-fit: contain; }
.spell-icon.has-visual:hover {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.25);
}
.spell-body { flex: 1; min-width: 0; }
.spell-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.98rem;
}
.spell-name { font-weight: 800; color: var(--text-primary); }
.spell-sep { color: var(--text-muted); opacity: 0.6; }
.spell-po {
    font-weight: 700;
    color: var(--zaap-cyan, #22d3ee);
    white-space: nowrap;
}
.spell-modif {
    font-size: 0.78rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.spell-modif.yes {
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.35);
}
.spell-modif.no {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.spell-relance {
    font-size: 0.78rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.35);
}
.spell-desc {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 4px 0 0;
}

.boss-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.98rem;
}
.boss-stats-table th, .boss-stats-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.boss-stats-table tr:last-child th, .boss-stats-table tr:last-child td { border-bottom: none; }
.boss-stats-table th { color: var(--text-muted); font-weight: 700; width: 38%; }
.boss-stats-table td { color: var(--text-primary); font-weight: 600; }
.res-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.res-chip {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    border: 1px solid;
}
.res-chip.neutre { color: #cbd5e1; background: rgba(148, 163, 184, 0.1); border-color: rgba(148, 163, 184, 0.35); }
.res-chip.terre { color: #d4b483; background: rgba(180, 130, 60, 0.12); border-color: rgba(180, 130, 60, 0.4); }
.res-chip.feu { color: #fca5a5; background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.35); }
.res-chip.eau { color: #93c5fd; background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.35); }
.res-chip.air { color: #86efac; background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.35); }
.boss-stats-shot {
    display: block;
    text-align: center;
    margin-bottom: 16px;
}
.boss-stats-shot img {
    max-width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(5, 7, 15, 0.4);
    padding: 6px;
    transition: transform var(--transition);
}
.boss-stats-shot:hover img { transform: scale(1.015); }
.boss-data-note {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* Classes conseillées (guides donjons) */
.class-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.class-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 15px 7px 8px;
    background: rgba(79, 124, 255, 0.07);
    border: 1px solid rgba(79, 124, 255, 0.25);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: border-color var(--transition), background var(--transition);
}
.class-chip:hover {
    border-color: rgba(34, 211, 238, 0.5);
    background: rgba(79, 124, 255, 0.13);
}
.class-chip img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(5, 7, 15, 0.5);
    border: 1px solid var(--border-color);
}
.rp-row { cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.rp-row:hover { border-color: rgba(34, 211, 238, 0.45); background: rgba(79, 124, 255, 0.1); }
.rp-check {
    accent-color: var(--zaap-cyan, #22d3ee);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}
.rp-row.done { opacity: 0.85; }
.rp-row.done .rp-name { color: var(--text-muted); text-decoration: line-through; }
.rp-row.done .rp-img img { filter: grayscale(0.8); opacity: 0.55; }

.quest-images-gallery {
    margin: 16px 0 8px;
}

.quest-images-gallery h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quest-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.quest-images-grid a {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.quest-images-grid a:hover {
    border-color: var(--zaap-cyan);
    transform: scale(1.02);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.22);
}

.quest-images-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .quest-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .quest-images-grid img {
        height: 90px;
    }
}

.quest-npc-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.quest-npc-line .npc-icon {
    font-size: 1rem;
}

.quest-npc-line .npc-coords {
    margin-left: auto;
    color: var(--zaap-cyan);
    font-size: 0.8rem;
    font-family: monospace;
}

.quest-reward-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.quest-reward-line:last-child { border-bottom: none; }

.quest-reward-line .reward-icon { font-size: 1rem; }

/* ===== LOADING SPINNER (utilisé par app.js) ===== */
.loading-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 3px solid rgba(79, 124, 255, 0.18);
    border-top-color: var(--zaap-cyan);
    border-right-color: var(--zaap-violet);
    animation: spin 0.9s linear infinite;
    box-shadow: 0 0 16px rgba(79, 124, 255, 0.15);
}

/* ===== PAGINATION (utilisée par app.js) ===== */
.page-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    min-width: 34px;
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}

.page-btn:hover:not(:disabled):not(.active) {
    border-color: var(--zaap-cyan);
    color: #fff;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.22);
}

.page-btn.active {
    background: var(--zaap-gradient);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(79, 124, 255, 0.35);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #24304f;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--zaap-cyan), var(--zaap-violet));
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .hero {
        padding: 30px 24px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .class-detail-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .search-bar {
        order: 3;
        max-width: 100%;
        flex-basis: 100%;
        margin-top: 10px;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Nav = tiroir coulissant depuis la droite */
    .nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(82vw, 320px);
        height: 100dvh;
        background: rgba(7, 10, 20, 0.98);
        border-bottom: none;
        border-image: none;
        border-left: 1px solid rgba(34, 211, 238, 0.28);
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        z-index: 9999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(103%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.32s cubic-bezier(0.22, 0.9, 0.3, 1), visibility 0s linear 0.32s;
    }

    .nav.open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.32s cubic-bezier(0.22, 0.9, 0.3, 1);
    }

    .nav > .container {
        padding: 0;
        max-width: none;
    }

    .nav-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-drawer-title {
        font-family: 'Cinzel', serif;
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--zaap-cyan);
        letter-spacing: 0.06em;
    }

    .nav-close-btn {
        background: rgba(13, 17, 32, 0.65);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
        font-size: 1.05rem;
        line-height: 1;
        min-width: 44px;
        min-height: 44px;
        padding: 10px 13px;
        border-radius: var(--radius-md);
        cursor: pointer;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-item > a {
        padding: 15px 20px;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item > a::after {
        display: none;
    }

    /* Le sous-menu Classes est inutile dans le tiroir : la page Classes liste les 19 classes */
    .nav-item.has-dropdown .dropdown,
    .nav-item.has-dropdown:hover .dropdown {
        display: none;
    }

    .hero-stats {
        flex-direction: column;
        gap: 10px;
    }

    .stat-card {
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .class-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .dungeon-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .tools-page-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo-title {
        font-size: 1.15rem;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .page-title {
        font-size: 1.5rem;
    }
}

/* ===================================
   BUILDS PAGE — Design Premium
   =================================== */

/* Layout : panneau de filtres latéral + grille */
.builds-layout { display: flex; gap: 28px; align-items: flex-start; }
.builds-main { flex: 1; min-width: 0; }

.builds-panel {
    width: 272px;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-surface) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.4rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(79, 124, 255, 0.08), var(--shadow);
}
/* Sticky uniquement si l'écran est assez haut pour afficher le panneau entier,
   sinon budget/niveau seraient piégés derrière un scroll interne peu visible */
@media (min-height: 940px) {
    .builds-panel {
        position: sticky;
        top: 90px;
    }
}
.bp-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.bp-reset {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
    padding: 0;
    text-transform: none;
    letter-spacing: 0;
}
.bp-reset:hover { color: var(--zaap-cyan); }
.bp-label {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.65rem;
}

/* Classe : grille de portraits */
.class-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.class-all {
    grid-column: 1 / -1;
    padding: 7px 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 0.74rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
}
.class-all:hover { border-color: var(--zaap-blue); color: var(--text-primary); }
.class-all.active {
    background: linear-gradient(135deg, var(--zaap-blue), var(--zaap-violet));
    border-color: transparent;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 12px rgba(79, 124, 255, 0.35);
}
.class-portrait {
    aspect-ratio: 1;
    border-radius: 11px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-surface);
    cursor: pointer;
    padding: 0;
    transition: all var(--transition);
    position: relative;
}
.class-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.6);
    opacity: 0.7;
    transition: all var(--transition);
}
.class-portrait:hover { border-color: var(--border-green); }
.class-portrait:hover img, .class-portrait.active img { filter: none; opacity: 1; }
.class-portrait.active {
    border-color: var(--zaap-cyan);
    box-shadow: 0 0 14px rgba(34, 211, 238, 0.35), 0 0 26px rgba(139, 92, 246, 0.18);
}

/* Élément : pastilles icônes */
.elem-chips { display: flex; gap: 8px; }
.elem-chip {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-color);
    cursor: pointer;
    font-size: 1.05rem;
    display: grid;
    place-items: center;
    transition: all var(--transition);
    filter: grayscale(0.5);
    opacity: 0.8;
}
.elem-chip:hover { filter: none; opacity: 1; border-color: var(--border-green); }
.elem-chip.active { filter: none; opacity: 1; }
.elem-chip.active[data-val=""]    { border-color: var(--zaap-cyan); box-shadow: 0 0 10px rgba(34, 211, 238, 0.40); }
.elem-chip.active[data-val="eau"]   { border-color: var(--elem-eau); box-shadow: 0 0 10px rgba(68,136,255,0.35); }
.elem-chip.active[data-val="feu"]   { border-color: var(--elem-feu); box-shadow: 0 0 10px rgba(255,107,53,0.35); }
.elem-chip.active[data-val="terre"] { border-color: var(--elem-terre); box-shadow: 0 0 10px rgba(201,162,39,0.35); }
.elem-chip.active[data-val="air"]   { border-color: var(--elem-air); box-shadow: 0 0 10px rgba(126,200,227,0.35); }
/* Sprites officiels des éléments (dofusdb tx_*) */
.elem-chip img { width: 26px; height: 26px; object-fit: contain; pointer-events: none; }
.el-pill .el-ico { width: 16px; height: 16px; object-fit: contain; display: inline-block; vertical-align: -3px; }

/* Niveau : dropdown */
.bf-select {
    width: 100%;
    padding: 10px 36px 10px 12px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2322d3ee' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.bf-select:hover, .bf-select:focus {
    border-color: var(--zaap-blue);
    outline: none;
    box-shadow: 0 0 10px rgba(79, 124, 255, 0.18);
}

/* Budget : radios */
.bud-radios { display: flex; flex-direction: column; gap: 9px; }
.bud-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.84rem;
    transition: color var(--transition);
}
.bud-radio:hover { color: var(--text-primary); }
.bud-radio input {
    accent-color: var(--zaap-blue);
    width: 15px;
    height: 15px;
    cursor: pointer;
    margin: 0;
}
.bud-radio input:checked + span { color: var(--text-primary); font-weight: 600; }
.bud-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 2px; }
.bud-dot-low  { background: var(--zaap-cyan); box-shadow: 0 0 6px rgba(34, 211, 238, 0.6); }
.bud-dot-mid  { background: var(--orange); }
.bud-dot-high { background: var(--red); }

/* Barre de résultats */
.builds-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1.4rem;
}
.builds-count-label { font-size: 0.85rem; color: var(--text-muted); }
.builds-count-label strong { color: var(--zaap-cyan); font-size: 1rem; }
.builds-pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Grille */
.builds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
    gap: 24px;
}
.builds-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
}
.builds-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}
.builds-empty strong { display: block; font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-secondary); }

/* Carte de build */
.build-card {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-surface) 100%);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 1.3rem 1.15rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    transition: all 0.25s ease;
    position: relative;
}
/* Liseré énergie en haut de la carte (pas d'overflow:hidden ici : les
   tooltips des slots doivent pouvoir dépasser) */
.build-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 18px;
    right: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--zaap-gradient-h);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.build-card:hover::before { opacity: 1; }
.build-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.28);
    box-shadow: var(--shadow-zaap-hover);
}
.build-card-top { text-align: center; min-width: 0; }
.build-card-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.35rem;
}
.build-card-sub {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.sub-sep { opacity: 0.5; }

/* Paperdoll : personnage centré, équipements autour */
.build-paperdoll {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.pd-col { display: flex; flex-direction: column; gap: 8px; }
.pd-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 205px;
    position: relative;
}
.pd-center::before {
    content: '';
    position: absolute;
    inset: auto 0 -6px 0;
    height: 75%;
    background: radial-gradient(ellipse at center bottom, rgba(34, 211, 238, 0.12) 0%, rgba(139, 92, 246, 0.08) 40%, transparent 68%);
    pointer-events: none;
}
.pd-body {
    max-height: 200px;
    max-width: 100%;
    object-fit: contain;
    position: relative;
    filter: drop-shadow(0 10px 16px rgba(0,0,0,0.55));
    transition: transform var(--transition);
}
.build-card:hover .pd-body { transform: scale(1.03); }

.pd-slot {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: grid;
    place-items: center;
    position: relative;
    transition: border-color var(--transition);
}
.build-card:hover .pd-slot { border-color: rgba(79, 124, 255, 0.28); }
.pd-slot img { width: 37px; height: 37px; object-fit: contain; }
.pd-slot.pd-empty::after { content: ''; }
.pd-slot.pd-empty {
    border-style: dashed;
    opacity: 0.45;
}
.pd-slot.small { width: 32px; height: 32px; border-radius: 9px; }
.pd-slot.small img { width: 25px; height: 25px; }

/* Tooltip des slots */
.pd-slot[data-tip]:hover::before {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #04060c;
    color: var(--text-primary);
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 6px;
    padding: 4px 9px;
    font-size: 0.68rem;
    white-space: nowrap;
    z-index: 30;
    pointer-events: none;
    box-shadow: var(--shadow), 0 0 10px rgba(34, 211, 238, 0.15);
}

/* Rangée basse : bouclier / dofus / familier */
.build-bottom-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.pd-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 5px;
}

/* Pied de carte */
.build-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.footer-class { display: flex; align-items: center; gap: 5px; font-weight: 600; }
.el-pill { font-size: 0.7rem; }
.build-card-footer a {
    color: var(--green-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition), text-shadow var(--transition);
}
.build-card-footer a:hover {
    color: var(--zaap-cyan);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.45);
}

/* Responsive */
@media (max-width: 980px) {
    .builds-layout { flex-direction: column; }
    .builds-panel {
        width: 100%;
        position: static;
        max-height: none;
    }
    .class-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); }
    .class-all { grid-column: 1 / -1; }
    .bud-radios { flex-direction: row; flex-wrap: wrap; gap: 14px; }
}
@media (max-width: 600px) {
    .builds-grid { grid-template-columns: 1fr; }
}

/* ===== ACCESSIBILITÉ : MOUVEMENT RÉDUIT ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .logo-icon,
    .hero::before {
        animation: none !important;
    }
    .card:hover::after,
                .class-detail-card:hover::after,
    .dofus-card:hover::after {
        animation: none !important;
    }
}

/* ===================================
   PAGE ARCHIMONSTRES — ÉTERNELLE MOISSON
   =================================== */

/* Jauge de progression globale */
.archi-progress-card {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-surface) 100%);
    border: 1px solid var(--border-green);
    border-radius: 16px;
    padding: 22px 26px;
    margin-bottom: 22px;
    box-shadow: 0 0 24px rgba(79, 124, 255, 0.08);
}
.archi-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.archi-progress-title {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: 0.04em;
}
.archi-progress-count {
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.archi-progress-count strong {
    font-size: 1.35rem;
    background: var(--zaap-text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.archi-gauge {
    height: 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    overflow: hidden;
}
.archi-gauge-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--zaap-gradient-h);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.55);
    position: relative;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.archi-gauge-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.28) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: archi-shimmer 2.4s linear infinite;
}
@keyframes archi-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}
.archi-progress-pct {
    margin-top: 9px;
    font-size: 0.82rem;
    color: var(--zaap-cyan);
}

/* Barre de filtres */
.archi-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.archi-search {
    flex: 1 1 220px;
    min-width: 200px;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.archi-search::placeholder { color: var(--text-muted); }
.archi-search:hover, .archi-search:focus {
    border-color: var(--zaap-blue);
    outline: none;
    box-shadow: 0 0 10px rgba(79, 124, 255, 0.18);
}
.archi-select { width: auto; max-width: 230px; }
.archi-status {
    display: flex;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 4px;
}
.archi-status-btn {
    padding: 6px 13px;
    background: transparent;
    border: none;
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.archi-status-btn:hover { color: var(--text-primary); }
.archi-status-btn.active {
    background: var(--green-glow-strong);
    color: var(--text-primary);
}
.archi-status-btn.active[data-val="done"] {
    background: rgba(34, 197, 94, 0.22);
    color: #6ee7a0;
}
.archi-results-bar {
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Grille de cartes */
.archi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
    gap: 14px;
    margin-bottom: 40px;
}
.archi-empty {
    grid-column: 1 / -1;
    padding: 46px 20px;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: 14px;
}
.archi-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 30px 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    text-align: center;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.archi-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-green);
    box-shadow: 0 6px 18px rgba(79, 124, 255, 0.12);
}
.archi-img {
    height: 88px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.archi-img img {
    max-height: 88px;
    max-width: 120px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    transition: filter 0.35s ease, opacity 0.35s ease;
}
.archi-name {
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.25;
    margin: 2px 0 0;
}
.archi-zone {
    font-size: 0.72rem;
    color: var(--text-secondary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.archi-level {
    font-size: 0.72rem;
    color: var(--zaap-cyan);
    font-weight: 600;
}
.archi-quest {
    position: absolute;
    top: 9px;
    right: 9px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.archi-quest.ocre    { background: rgba(255, 171, 64, 0.14); color: var(--orange); border: 1px solid rgba(255, 171, 64, 0.35); }
.archi-quest.dokille { background: rgba(34, 211, 238, 0.12); color: var(--zaap-cyan); border: 1px solid rgba(34, 211, 238, 0.32); }

/* Badge ✓ + état vaincu */
.archi-badge {
    position: absolute;
    top: 7px;
    left: 9px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #22c55e;
    color: #05240f;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.55);
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.archi-card.done { border-color: rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.045); }
.archi-card.done .archi-badge { opacity: 1; transform: scale(1); }
.archi-card.done .archi-img img { filter: grayscale(0.85) brightness(0.72); opacity: 0.7; }
.archi-card.done .archi-name { color: var(--text-muted); }

/* Case à cocher "Vaincu" */
.archi-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 6px;
    padding: 6px 12px;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    font-size: 0.76rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    user-select: none;
}
.archi-check:hover { border-color: rgba(34, 197, 94, 0.45); color: var(--text-primary); }
.archi-check input {
    accent-color: #22c55e;
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.archi-card.done .archi-check {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.45);
    color: #6ee7a0;
}

/* Compteur +/- */
.archi-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    margin-top: 4px;
    padding: 4px;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 9px;
}
.archi-counter-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.archi-counter-btn:hover {
    border-color: var(--border-green);
    color: var(--text-primary);
    background: rgba(34, 197, 94, 0.1);
}
.archi-counter-value {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 24px;
    text-align: center;
}

@media (max-width: 640px) {
    .archi-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .archi-select { max-width: none; flex: 1 1 45%; }
    .archi-status { flex: 1 1 100%; justify-content: center; }
    .archi-progress-card { padding: 16px 16px; }
}



/* ===== PAGE DOFUS : encart info, recherche, temps estimé ===== */
.dq-info-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-left: 3px solid var(--zaap-cyan);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
}
.dq-info-box .dq-info-icon { font-size: 1.25rem; line-height: 1.4; }
.dq-info-box p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin: 0;
}
.dq-info-box p strong { color: var(--text-primary); }

.dq-toolbar { margin-bottom: 18px; }

.rp-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.75;
    background: rgba(139, 92, 246, 0.06);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 14px;
}
.rp-img.rp-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* =====================================================
   AÉRATION GÉNÉRALE (2026-07-10)
   Plus de respiration entre les blocs : marges de
   sections, interlignes et espacements de grilles.
   ===================================================== */
body { line-height: 1.7; }

.section { margin-bottom: 56px; }
.section-header { margin-bottom: 26px; }
.hero { margin-bottom: 52px; }
.page-title { margin-bottom: 14px; }
.page-desc { margin-bottom: 40px; line-height: 1.75; }
.breadcrumb { margin-bottom: 26px; }

.guide-section { padding: 38px 42px; margin-bottom: 34px; }
.guide-section h2 { margin-bottom: 26px; }
.guide-section h3 { margin: 24px 0 12px; }
.guide-section p { margin-bottom: 18px; line-height: 1.85; }
.guide-section ul, .guide-section ol { margin-bottom: 18px; line-height: 1.85; }
.guide-section li { margin-bottom: 10px; }
.mech-block { margin-bottom: 26px; }
.spell-row { margin-bottom: 12px; }

.card-grid { gap: 26px; }
.dungeon-list { gap: 18px; }
.dofus-quest-grid { gap: 26px; }
.songes-grid { gap: 20px; }
.archi-grid { gap: 18px; }
.builds-grid { gap: 30px; }
.class-detail-grid { gap: 26px; }

.archi-toolbar { margin-bottom: 22px; }
.filter-bar { margin-bottom: 28px; }
.update-banner { padding: 26px 30px; gap: 20px; }
#songes-presentation .guide-section { padding: 34px 38px; }
.songes-bestiaire-title { margin-top: 52px; margin-bottom: 20px; }

/* =====================================================
   DIAGRAMMES DE ZONE D'EFFET DES SORTS (grille Dofus)
   ===================================================== */
:root { --border: var(--border-color); }

.zone-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0 0 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.zone-legend span { display: inline-flex; align-items: center; gap: 7px; }
.zone-key {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    border-radius: 3px;
    display: inline-block;
}
.zone-key.boss { background: #0891b2; border: 1px solid #0891b2; }
.zone-key.hit { background: #ef444420; border: 1px solid #ef4444; }
.zone-key.free { background: rgba(148, 163, 184, 0.08); border: 1px solid rgba(148, 163, 184, 0.3); }

.spell-zone {
    display: grid;
    gap: 1px;
    flex-shrink: 0;
    align-self: center;
    padding: 6px;
    background: rgba(5, 7, 15, 0.55);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.zone-cell {
    width: 8px;
    height: 8px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1px;
}
.zone-cell.hit { background: #ef444420; border-color: #ef4444; }
.zone-cell.boss { background: #0891b2; border-color: #22d3ee; }
.spell-row { flex-wrap: wrap; }

/* =====================================================
   OPTIMISATION MOBILE ≤ 768px
   Grilles 1-2 colonnes, filtres tactiles, tableaux
   scrollables, typo et boutons adaptés.
   ===================================================== */
@media (max-width: 768px) {
    .container { padding: 0 14px; }

    /* --- Typo générale --- */
    .page-title { font-size: 1.55rem; }
    .page-desc { font-size: 0.95rem; }

    /* --- Hero accueil --- */
    .hero { padding: 28px 18px; margin-bottom: 26px; }
    .hero h1 { font-size: 1.5rem; }
    .hero p { font-size: 0.95rem; }
    .hero-buttons { flex-wrap: wrap; gap: 10px; }
    .hero-buttons .btn { flex: 1 1 100%; text-align: center; }

    /* --- Filtres : compacts, tactiles, sans débordement --- */
    .filter-bar { gap: 8px; }
    .filter-btn {
        padding: 10px 13px;
        font-size: 0.86rem;
        min-height: 42px;
    }
    .archi-toolbar { gap: 8px; }
    .archi-search {
        flex: 1 1 100%;
        min-width: 0;
        font-size: 1rem; /* ≥16px : évite le zoom auto d'iOS au focus */
        min-height: 44px;
    }
    .archi-select {
        flex: 1 1 calc(50% - 4px);
        max-width: none;
        min-width: 0;
        min-height: 44px;
        font-size: 0.9rem;
    }
    .archi-status { flex-wrap: wrap; }
    .archi-status button { min-height: 40px; }
    .bf-select, .gqp-btn { min-height: 44px; }

    /* --- Grilles : 1 ou 2 colonnes --- */
    .class-detail-grid { grid-template-columns: 1fr; }
    .class-detail-card { padding: 16px 14px; gap: 14px; }
    .dofus-quest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .songes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .archi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .archi-card, .songe-card, .dq-card { min-width: 0; }
    .builds-grid { grid-template-columns: 1fr; }
    .quest-items-grid, .rp-grid, .qi-grid { grid-template-columns: 1fr; }

    /* --- Cartes donjons : sprite + badge niveau côte à côte --- */
    .dungeon-left { width: auto; max-width: 100%; flex-direction: row; gap: 12px; }
    .dungeon-level { white-space: normal; }

    /* --- Guides / fiches de boss --- */
    .guide-header { padding: 20px 16px; }
    .guide-section { padding: 20px 16px; }
    #songes-presentation .guide-section { padding: 20px 16px; }
    .guide-detail h1 { font-size: 1.6rem; }
    .spell-row { flex-wrap: wrap; row-gap: 6px; }
    .mech-block img { max-width: 100%; height: auto; }

    /* --- Tableaux : scroll horizontal --- */
    .boss-stats-table,
    .page table,
    .guide-detail table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    /* --- Quêtes Dofus / alignement --- */
    .gqp-actions { flex-wrap: wrap; }
    .gqp-actions .gqp-btn { flex: 1 1 auto; }
    .align-cards { gap: 14px; }

    /* --- Breadcrumb et bouton retour haut --- */
    .breadcrumb { font-size: 0.85rem; flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .dofus-quest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .class-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
    .guide-detail h1 { font-size: 1.4rem; }
    .filter-btn { flex: 1 1 auto; }
}

/* ===== GUIDE LEVELING — sidebar chapitres + étapes en cartes ===== */
:root {
    --lvl-cyan: #0891b2;
    --lvl-cyan-light: #22b8d4;
    --lvl-violet: #7c3aed;
    --lvl-orange: #f59e0b;
    --surface-1: var(--bg-card);
}

.lvl-layout {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* --- Sidebar chapitres --- */
.lvl-sidebar {
    position: sticky;
    top: 62px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: calc(100vh - 80px);
}

.lvl-chapters {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.lvl-ch-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    padding: 9px 10px 9px 12px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.lvl-ch-item:hover { background: rgba(8, 145, 178, 0.08); }

.lvl-ch-item.active {
    border-left-color: var(--lvl-cyan);
    background: rgba(8, 145, 178, 0.12);
}

.lvl-ch-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}

.lvl-ch-item.active .lvl-ch-title { color: var(--text-primary); }

.lvl-ch-lvls {
    color: var(--lvl-cyan);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.lvl-ch-count {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.lvl-ch-count.full { color: var(--lvl-cyan-light); }
.lvl-ch-count.full::after { content: ' ✓'; }

/* --- Progression globale (bas de sidebar) --- */
.lvl-side-progress {
    border-top: 0.5px solid var(--border-color);
    padding: 12px 4px 4px;
}

.lvl-side-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lvl-side-head span:last-child { color: var(--lvl-cyan-light); }

.lvl-progress-track {
    height: 7px;
    border-radius: 999px;
    background: #141a30;
    overflow: hidden;
}

.lvl-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #0891b2 0%, #7c3aed 100%);
    box-shadow: 0 0 10px rgba(8, 145, 178, 0.5);
    transition: width 0.35s ease;
}

.lvl-side-count {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

/* --- En-tête de chapitre --- */
.lvl-ch-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.lvl-ch-h {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.lvl-ch-sub {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-top: 2px;
}

.lvl-ch-head-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lvl-lvls-badge {
    color: var(--lvl-cyan);
    border: 1px solid rgba(8, 145, 178, 0.5);
    background: rgba(8, 145, 178, 0.1);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

/* --- Badge builds (violet) --- */
.lvl-builds-btn {
    background: var(--lvl-violet);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 6px 16px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.lvl-builds-btn:hover {
    background: #8b5cf6;
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.45);
    transform: translateY(-1px);
}

/* --- Sections (accordéons) --- */
.lvl-section { margin-bottom: 14px; }

.lvl-sec-head {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-1);
    border: 0.5px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.lvl-sec-head:hover { border-color: rgba(8, 145, 178, 0.55); }

.lvl-sec-chevron { color: var(--lvl-cyan); font-size: 0.85rem; width: 14px; }

.lvl-sec-title {
    flex: 1;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem;
}

.lvl-sec-count {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.lvl-sec-count.full { color: var(--lvl-cyan-light); }
.lvl-sec-count.full::after { content: ' ✓'; }

.lvl-sec-body { padding: 12px 0 4px 10px; }

/* --- Cartes d'étape --- */
.lvl-step-card {
    background: var(--surface-1);
    border: 0.5px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.lvl-step-card:hover { border-color: rgba(8, 145, 178, 0.4); }

.lvl-step-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.lvl-step-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    min-width: 0;
}

.lvl-step-name {
    font-weight: 700;
    color: var(--lvl-cyan);
    font-size: 0.92rem;
    line-height: 1.4;
}

/* Étapes cochées : barré + opacité réduite */
.lvl-step-card.done { opacity: 0.55; }

.lvl-step-card.done .lvl-step-name,
.lvl-step-card.done .lvl-gany {
    text-decoration: line-through;
    text-decoration-color: rgba(148, 163, 184, 0.55);
}

.lvl-step-card.done .lvl-step-name { color: var(--text-muted); }

/* Checkbox */
.lvl-check {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 1.5px solid #3a4a6b;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.lvl-check:hover { border-color: var(--lvl-cyan); }

.lvl-check:checked {
    background: var(--lvl-cyan);
    border-color: var(--lvl-cyan);
    box-shadow: 0 0 8px rgba(8, 145, 178, 0.5);
}

.lvl-check:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 4px;
    height: 9px;
    border: solid #05070f;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* --- Contenu HTML des étapes (PNJ doré / directions cyan via styles inline) --- */
.lvl-gany {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-wrap: break-word;
}

.lvl-gany p { margin: 0 0 8px; }
.lvl-gany p:last-child { margin-bottom: 0; }

.lvl-gany img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
    display: block;
}

.lvl-gany a {
    color: var(--lvl-cyan-light);
    text-decoration: none;
    border-bottom: 1px dotted rgba(8, 145, 178, 0.5);
}

.lvl-gany a:hover { color: #67e8f9; }

.lvl-gany ul, .lvl-gany ol { padding-left: 22px; margin: 6px 0; }

/* Encart avertissement */
.lvl-gany .lvl-warn-p {
    border-left: 3px solid var(--lvl-orange);
    background: rgba(245, 158, 11, 0.07);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 8px 0;
}

/* Coordonnées : pill monospace cliquable (copie + "✓ Copié !" via handler global) */
.lvl-coord {
    display: inline-block;
    font-family: 'Cascadia Code', 'Fira Mono', Consolas, monospace;
    font-size: 0.8rem;
    background: rgba(8, 145, 178, 0.12);
    border: 1px solid rgba(8, 145, 178, 0.45);
    border-bottom: 1px solid rgba(8, 145, 178, 0.45);
    border-radius: 999px;
    padding: 2px 10px;
    color: var(--lvl-cyan-light);
    line-height: 1.5;
}

.lvl-coord:hover {
    background: rgba(8, 145, 178, 0.25);
    color: #67e8f9;
    border-color: #67e8f9;
}

/* --- Badges donjons / Dofus --- */
.lvl-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(26, 33, 56, 0.7);
}

.lvl-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(8, 145, 178, 0.12);
    color: var(--lvl-cyan-light);
    border: 1px solid rgba(8, 145, 178, 0.45);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.lvl-badge:hover {
    background: rgba(8, 145, 178, 0.25);
    box-shadow: 0 0 12px rgba(8, 145, 178, 0.3);
    color: #67e8f9;
}

/* --- Bouton "Étape suivante" (fixe, bas droite) --- */
.lvl-next-step {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 60;
    background: var(--lvl-cyan);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 22px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 18px rgba(8, 145, 178, 0.35);
    transition: var(--transition);
}

.lvl-next-step:hover {
    background: #0ea5c4;
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 26px rgba(8, 145, 178, 0.55);
}

.lvl-loading {
    color: var(--text-muted);
    padding: 22px 0;
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 860px) {
    .lvl-layout { grid-template-columns: 1fr; }
    .lvl-sidebar {
        position: static;
        max-height: none;
    }
    .lvl-chapters {
        flex-direction: row;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 6px;
    }
    .lvl-ch-item {
        flex: 0 0 auto;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 8px 8px 0 0;
    }
    .lvl-ch-item.active { border-bottom-color: var(--lvl-cyan); }
    .lvl-next-step { right: 14px; bottom: 14px; padding: 10px 16px; }
    .lvl-sec-body { padding-left: 0; }
}

/* Task lists dans le contenu des étapes (sous-cases à cocher persistées) */
.lvl-gany ul[data-type="taskList"] {
    list-style: none;
    padding-left: 2px;
}

.lvl-gany li[data-type="taskItem"] {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0;
}

.lvl-gany li[data-type="taskItem"] > label { flex: 0 0 auto; margin-top: 2px; }
.lvl-gany li[data-type="taskItem"] > div { min-width: 0; }

.lvl-subcheck {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border: 1.5px solid #3a4a6b;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.lvl-subcheck:hover { border-color: var(--lvl-cyan); }

.lvl-subcheck:checked {
    background: var(--lvl-cyan);
    border-color: var(--lvl-cyan);
}

.lvl-subcheck:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 3px;
    height: 7px;
    border: solid #05070f;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.lvl-gany li[data-type="taskItem"][data-checked="true"] > div {
    opacity: 0.55;
    text-decoration: line-through;
    text-decoration-color: rgba(148, 163, 184, 0.55);
}

/* Suffixe succès sur les badges donjons — (Tour du Monde) / (Tornade des Donjons) */
.lvl-badge-suf {
    font-weight: 500;
    font-size: 0.72rem;
    opacity: 0.75;
    white-space: nowrap;
}

/* Références inter-chapitres cliquables */
.lvl-ch-link {
    color: var(--lvl-cyan-light);
    border-bottom: 1px dotted rgba(8, 145, 178, 0.6);
    cursor: pointer;
    transition: var(--transition);
}

.lvl-ch-link:hover {
    color: #67e8f9;
    border-bottom-color: #67e8f9;
}

/* Listes de ressources : grille compacte 2 colonnes */
.lvl-gany ul.lvl-res-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 16px;
    padding-left: 0;
}

.lvl-gany ul.lvl-res-grid li[data-type="taskItem"] {
    margin: 0;
    padding: 3px 6px;
    border-radius: 6px;
    align-items: center;
    min-width: 0;
}

.lvl-gany ul.lvl-res-grid li[data-type="taskItem"]:hover { background: rgba(8, 145, 178, 0.07); }

.lvl-gany ul.lvl-res-grid li[data-type="taskItem"] > label { margin-top: 0; }

.lvl-gany ul.lvl-res-grid li[data-type="taskItem"] p {
    margin: 0;
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Icônes des widgets (ressources, monstres…) : inline compact, pas en bloc */
.lvl-gany span[data-type="custom-tag"] img {
    display: inline-block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 4px;
    margin: 0 4px 0 0;
    vertical-align: middle;
}

.lvl-gany span[data-type="custom-tag"] > span { vertical-align: middle; }

@media (max-width: 640px) {
    .lvl-gany ul.lvl-res-grid { grid-template-columns: 1fr; }
}

/* Menu « Aller à une étape » (en-tête de chapitre) */
.lvl-step-jump {
    max-width: 240px;
    background: var(--surface-1);
    color: var(--text-secondary);
    border: 0.5px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 5px 12px;
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
}

.lvl-step-jump:hover,
.lvl-step-jump:focus {
    border-color: rgba(8, 145, 178, 0.6);
    color: var(--lvl-cyan-light);
    outline: none;
}

/* Renvois « étape N » cliquables dans le texte */
.lvl-step-link {
    color: var(--lvl-cyan-light);
    border-bottom: 1px dotted rgba(8, 145, 178, 0.6);
    cursor: pointer;
    transition: var(--transition);
}

.lvl-step-link:hover {
    color: #67e8f9;
    border-bottom-color: #67e8f9;
}

/* Mise en évidence de l'étape ciblée après navigation */
@keyframes lvl-step-flash-kf {
    0%, 60% { box-shadow: 0 0 0 2px rgba(8, 145, 178, 0.75), 0 0 22px rgba(8, 145, 178, 0.35); }
    100% { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0); }
}

.lvl-step-flash {
    animation: lvl-step-flash-kf 2s ease-out;
    border-radius: 12px;
}

@media (max-width: 640px) {
    .lvl-step-jump { max-width: 100%; width: 100%; }
}

/* ===================================
   PROFIL JOUEUR (pseudo + classe + niveau)
   =================================== */

/* --- Bouton profil (header) --- */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 4px 12px 4px 5px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.profile-btn:hover {
    border-color: var(--green-primary);
    box-shadow: 0 0 14px var(--green-glow-strong);
}

.profile-btn-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-btn-emoji { font-size: 1rem; padding-left: 5px; }

.profile-btn-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

@media (max-width: 640px) {
    .profile-btn { padding: 4px; }
    .profile-btn-name { display: none; }
}

/* --- Bandeau de bienvenue (accueil + Guide Leveling) --- */
.profile-welcome {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-green);
    border-radius: 14px;
    padding: 12px 18px;
    margin-bottom: 20px;
}

.profile-welcome > img {
    width: 46px;
    height: 46px;
    border-radius: 12px;
}

.profile-welcome-txt {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.profile-welcome-txt strong { color: var(--text-primary); font-size: 1.02rem; }

.profile-welcome-txt span { color: var(--text-secondary); font-size: 0.85rem; }

.profile-welcome-edit {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-secondary);
    padding: 5px 14px;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.profile-welcome-edit:hover {
    border-color: var(--green-primary);
    color: var(--text-primary);
}

/* --- Modal profil --- */
.pf-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(3, 5, 12, 0.75);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pf-overlay[hidden] { display: none; }

body.pf-modal-open { overflow: hidden; }

.pf-modal {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-green);
    border-radius: 18px;
    padding: 26px 26px 22px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.pf-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    padding: 6px 9px;
    border-radius: 8px;
    transition: var(--transition);
}

.pf-close:hover { color: var(--text-primary); background: rgba(148, 163, 184, 0.12); }

.pf-title { color: var(--text-primary); font-size: 1.25rem; margin: 0 24px 6px 0; }

.pf-sub { color: var(--text-secondary); font-size: 0.88rem; margin: 0 0 16px; }

.pf-label {
    display: block;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 14px 0 6px;
}

.pf-level-hint { color: var(--text-muted); font-weight: 400; }

.pf-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    padding: 9px 12px;
    transition: var(--transition);
}

.pf-input:focus { outline: none; border-color: var(--green-primary); }

.pf-classes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 8px;
}

.pf-class {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 4px 6px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.72rem;
    cursor: pointer;
    transition: var(--transition);
}

.pf-class img {
    width: 44px;
    height: 44px;
    border-radius: 9px;
}

.pf-class:hover { border-color: rgba(79, 124, 255, 0.55); color: var(--text-primary); }

.pf-class.selected {
    border-color: var(--green-primary);
    background: var(--green-glow);
    color: var(--text-primary);
    box-shadow: 0 0 12px var(--green-glow-strong);
}

.pf-level-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pf-level-row input[type="range"] {
    flex: 1;
    accent-color: var(--green-primary);
}

.pf-input-num { width: 86px; text-align: center; }

.pf-error {
    color: var(--red);
    font-size: 0.85rem;
    margin: 12px 0 0;
}

.pf-save {
    width: 100%;
    margin-top: 18px;
    background: var(--green-primary);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.pf-save:hover { background: var(--green-dark); box-shadow: 0 0 18px var(--green-glow-strong); }

@media (max-width: 640px) {
    .pf-modal { padding: 20px 16px 16px; }
    .pf-classes { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
    .pf-class img { width: 36px; height: 36px; }
}

/* --- Encart d'introduction du Guide Leveling (infos pratiques) --- */
.lvl-tips {
    background: rgba(8, 145, 178, 0.06);
    border: 0.5px solid rgba(8, 145, 178, 0.32);
    border-radius: 12px;
    padding: 12px 16px 13px;
    margin-bottom: 18px;
}

.lvl-tips-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lvl-tips-ico { font-size: 0.95rem; }

.lvl-tips-head strong {
    flex: 1;
    color: var(--lvl-cyan-light);
    font-size: 0.9rem;
}

.lvl-tips-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 3px 7px;
    border-radius: 6px;
    transition: var(--transition);
}

.lvl-tips-close:hover { color: var(--text-primary); background: rgba(148, 163, 184, 0.12); }

.lvl-tips-list {
    margin: 8px 0 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.45;
}

.lvl-tips-list li::marker { color: var(--lvl-cyan); }

.lvl-tips-list strong { color: var(--text-primary); font-weight: 600; }

/* ===================================
   MODE OVERLAY (app Electron — ?mobile=true)
   Interface épurée verticale : contenu essentiel uniquement.
   =================================== */
html.overlay-mode .header,
html.overlay-mode .nav,
html.overlay-mode .nav-overlay,
html.overlay-mode .footer,
html.overlay-mode .breadcrumb,
html.overlay-mode .mobile-menu-btn,
html.overlay-mode .hero,
html.overlay-mode .page-desc {
    display: none !important;
}

html.overlay-mode body {
    overflow-x: hidden;
}

html.overlay-mode .main {
    padding: 0;
}

html.overlay-mode .container {
    padding: 10px 10px 24px;
    max-width: none;
}

html.overlay-mode .page-title {
    font-size: 1.15rem;
    margin: 2px 0 10px;
}

/* Guide Leveling compact : chapitres repliés en barre horizontale défilante */
html.overlay-mode .lvl-layout {
    grid-template-columns: 1fr;
    gap: 12px;
}

/* indispensable : sans min-width:0, les items de grille gonflent à la largeur
   de leur contenu (barre de chapitres) au lieu de la laisser défiler */
html.overlay-mode .lvl-sidebar,
html.overlay-mode .lvl-main {
    min-width: 0;
    max-width: 100%;
}

html.overlay-mode .lvl-chapters {
    max-width: 100%;
}

html.overlay-mode .lvl-sidebar {
    position: static;
    max-height: none;
}

html.overlay-mode .lvl-chapters {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
}

html.overlay-mode .lvl-ch-item {
    flex: 0 0 auto;
    min-width: 130px;
}

html.overlay-mode .lvl-side-progress {
    margin-top: 8px;
}

html.overlay-mode .lvl-ch-head {
    flex-wrap: wrap;
    gap: 8px;
}

html.overlay-mode .lvl-step-jump {
    max-width: 100%;
    width: 100%;
}

/* Bandeau profil + encart infos : plus compacts en overlay */
html.overlay-mode .profile-welcome {
    padding: 8px 12px;
    margin-bottom: 12px;
}

html.overlay-mode .profile-welcome > img {
    width: 34px;
    height: 34px;
}

html.overlay-mode .lvl-tips {
    padding: 10px 12px;
}

/* Confort de lecture en colonne étroite */
html.overlay-mode .lvl-gany img {
    max-width: 100%;
    height: auto;
}

html.overlay-mode .builds-grid {
    grid-template-columns: 1fr;
}

/* ===================================
   PAGE TÉLÉCHARGER L'APP
   =================================== */

/* --- Lien header --- */
.header-dl-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 7px 15px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(8, 145, 178, 0.22));
    border: 1px solid rgba(124, 58, 237, 0.5);
    color: var(--text-primary);
    font-size: 0.83rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.header-dl-btn:hover {
    border-color: #a78bfa;
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.45);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .header-dl-btn span { display: none; }
    .header-dl-btn { padding: 7px 10px; }
}

/* --- Héro --- */
.dl-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 56px 24px 48px;
    margin-bottom: 26px;
    border-radius: 22px;
    background:
        radial-gradient(ellipse 60% 70% at 30% 0%, rgba(124, 58, 237, 0.22), transparent 65%),
        radial-gradient(ellipse 60% 70% at 70% 100%, rgba(8, 145, 178, 0.2), transparent 65%),
        var(--bg-card);
    border: 1px solid rgba(124, 58, 237, 0.35);
}

.dl-version {
    display: inline-block;
    padding: 4px 14px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.16);
    border: 1px solid rgba(124, 58, 237, 0.5);
    color: #c4b5fd;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.dl-title {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    color: var(--text-primary);
    margin-bottom: 10px;
}

.dl-title-accent {
    background: linear-gradient(90deg, #22b8d4, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dl-desc {
    color: var(--text-secondary);
    font-size: 1.02rem;
    max-width: 520px;
    margin: 0 auto 22px;
}

.dl-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.dl-features span {
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.1);
    border: 0.5px solid rgba(8, 145, 178, 0.4);
    color: var(--lvl-cyan-light, #22b8d4);
    font-size: 0.8rem;
    white-space: nowrap;
}

/* --- Boutons de téléchargement --- */
.dl-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.dl-btn {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 24px;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    text-align: left;
    transition: var(--transition);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}

.dl-btn-ico { display: flex; align-items: center; }

.dl-btn-txt { display: flex; flex-direction: column; gap: 1px; }

.dl-btn-txt strong { font-size: 0.98rem; }

.dl-btn-txt small { font-size: 0.76rem; opacity: 0.8; font-weight: 400; }

.dl-mac { background: linear-gradient(135deg, #7c3aed, #5b21b6); }

.dl-mac:hover {
    box-shadow: 0 0 26px rgba(124, 58, 237, 0.55);
    transform: translateY(-2px);
}

.dl-win { background: linear-gradient(135deg, #0891b2, #0e7490); }

.dl-win:hover {
    box-shadow: 0 0 26px rgba(8, 145, 178, 0.55);
    transform: translateY(-2px);
}

/* --- Instructions --- */
.dl-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dl-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 22px;
}

.dl-step h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 12px;
}

.dl-step ol {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dl-step li::marker { color: #a78bfa; font-weight: 700; }

.dl-step strong { color: var(--text-primary); }

.dl-note {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .dl-steps { grid-template-columns: 1fr; }
    .dl-btn { width: 100%; justify-content: center; }
    .dl-hero { padding: 40px 16px 34px; }
}

/* Note discrète Gatekeeper/SmartScreen sous les boutons de téléchargement */
.dl-gatekeeper-note {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    max-width: 620px;
    margin: 18px auto 0;
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
    text-align: left;
}

.dl-gatekeeper-note strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* --- Section « Comment utiliser le guide » (accordéon + onglets web/app) --- */
.lvl-howto {
    background: var(--surface-1);
    border: 0.5px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    margin-bottom: 18px;
    overflow: hidden;
}

.lvl-howto-head {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.lvl-howto-head:hover { background: rgba(8, 145, 178, 0.07); }

.lvl-howto-ico { font-size: 0.9rem; }

.lvl-howto-head strong { flex: 1; text-align: left; font-weight: 600; }

.lvl-howto-chevron { color: var(--text-muted); font-size: 0.8rem; }

.lvl-howto-body {
    padding: 4px 16px 15px;
    border-top: 0.5px solid rgba(148, 163, 184, 0.18);
}

.lvl-howto-tabs {
    display: flex;
    gap: 6px;
    margin: 10px 0 12px;
}

.lvl-howto-tab {
    padding: 5px 14px;
    border-radius: 999px;
    background: transparent;
    border: 0.5px solid rgba(148, 163, 184, 0.35);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.lvl-howto-tab:hover { color: var(--text-primary); }

.lvl-howto-tab.active {
    background: rgba(8, 145, 178, 0.14);
    border-color: rgba(8, 145, 178, 0.6);
    color: var(--lvl-cyan-light);
}

.lvl-howto-pane ul {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

.lvl-howto-pane li::marker { color: var(--lvl-cyan); }

.lvl-howto-pane strong { color: var(--text-primary); font-weight: 600; }

.lvl-howto-pane a[data-page] {
    color: var(--lvl-cyan-light);
    text-decoration: none;
    border-bottom: 1px dotted rgba(8, 145, 178, 0.6);
}

.lvl-howto-pane kbd {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.12);
    border: 0.5px solid rgba(148, 163, 184, 0.35);
    color: var(--text-primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.76rem;
}

.lvl-howto-dlbtn {
    display: inline-block;
    margin-top: 12px;
    padding: 7px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(8, 145, 178, 0.28));
    border: 1px solid rgba(124, 58, 237, 0.5);
    color: var(--text-primary);
    font-size: 0.83rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.lvl-howto-dlbtn:hover {
    border-color: #a78bfa;
    box-shadow: 0 0 14px rgba(124, 58, 237, 0.4);
}

/* --- Sections cycles (Torkélonia lune / Vortex cadran) --- */
.cycle-note {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 16px;
}

.cycle-tip {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.08);
    border: 0.5px solid rgba(34, 197, 94, 0.35);
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.moon-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.moon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    padding: 14px 10px 12px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.moon-card .moon-ico { font-size: 1.9rem; line-height: 1; filter: drop-shadow(0 0 8px rgba(148, 163, 184, 0.35)); }

.moon-card strong { color: var(--text-primary); font-size: 0.86rem; }

.moon-card p { color: var(--text-secondary); font-size: 0.8rem; margin: 0; line-height: 1.4; }

.moon-card.danger {
    background: rgba(229, 72, 77, 0.07);
    border-color: rgba(229, 72, 77, 0.45);
}

.moon-card.danger .moon-ico { filter: drop-shadow(0 0 10px rgba(229, 72, 77, 0.5)); }

.moon-warn {
    margin-top: 4px;
    color: #ff8589;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
}

.vx-hours {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.vx-hour {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.vx-hour-badge {
    flex-shrink: 0;
    min-width: 34px;
    text-align: center;
    padding: 3px 6px;
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.18);
    border: 1px solid rgba(124, 58, 237, 0.5);
    color: #c4b5fd;
    font-size: 0.78rem;
    font-weight: 700;
}

.vx-hour p { color: var(--text-secondary); font-size: 0.8rem; margin: 0; line-height: 1.35; }

.spell-desc { color: var(--text-secondary); font-size: 0.85rem; margin: 6px 0 0; }

@media (max-width: 900px) {
    .moon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vx-hours { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
    .vx-hours { grid-template-columns: 1fr; }
}

/* Liste des donjons épurée : sprite + nom + niveau uniquement */
.dungeon-info h3 { margin-bottom: 0; }

.dungeon-card .dungeon-boss-sprite { flex-shrink: 0; }

/* --- Déchireuse : les 3 saisons d'Osavora --- */
.season-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.season-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 16px 14px 14px;
    border-radius: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--border-color);
}

.season-card .season-ico { font-size: 1.7rem; line-height: 1; }

.season-card > strong { color: var(--text-primary); font-size: 0.95rem; }

.season-line { color: var(--text-secondary); font-size: 0.8rem; line-height: 1.45; margin: 0; }

.season-line em { color: var(--text-muted); font-style: normal; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.03em; display: block; }

.season-key {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.season-card.naissances { border-top-color: #4ade80; background: linear-gradient(180deg, rgba(74, 222, 128, 0.07), transparent 45%), var(--bg-surface); }
.season-card.chasse { border-top-color: #fb923c; background: linear-gradient(180deg, rgba(251, 146, 60, 0.07), transparent 45%), var(--bg-surface); }
.season-card.repos { border-top-color: #60a5fa; background: linear-gradient(180deg, rgba(96, 165, 250, 0.07), transparent 45%), var(--bg-surface); }

/* étapes de délock par saison */
.season-steps {
    margin: 12px 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--border-color);
}

.season-steps.naissances { border-left-color: #4ade80; }
.season-steps.chasse { border-left-color: #fb923c; }
.season-steps.repos { border-left-color: #60a5fa; }

.season-steps h4 { color: var(--text-primary); font-size: 0.92rem; margin-bottom: 8px; }

.season-steps ol {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
}

.season-steps li::marker { color: var(--text-muted); font-weight: 700; }

@media (max-width: 860px) {
    .season-grid { grid-template-columns: 1fr; }
}

/* --- Page Guide Songe --- */
.sg-guide-intro {
    margin-bottom: 22px;
}

.sg-guide-intro p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.sg-guide-intro p + p { margin-top: 10px; }

.sg-guide-list .quest-accordion-item { cursor: default; }

.sg-guide-wip {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
    padding: 4px 0;
}

/* ===================================
   SOUS-MENU NAVIGATION (Songes)
   =================================== */
.nav-item-sub { position: relative; }

.nav-caret { font-size: 0.65em; opacity: 0.7; margin-left: 2px; }

.nav-sub {
    list-style: none;
    margin: 0;
    padding: 6px;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 170px;
    background: var(--bg-nav);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 600;
}

.nav-item-sub:hover .nav-sub,
.nav-item-sub:focus-within .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-sub li a {
    display: block;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-sub li a:hover {
    background: var(--green-glow);
    color: var(--text-primary);
}

/* tiroir mobile : sous-menu affiché en ligne, indenté */
@media (max-width: 768px) {
    .nav-sub {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        min-width: 0;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0 0 0 18px;
    }
    .nav-caret { display: none; }
}

/* ===================================
   TOGGLE THÈME CLAIR/SOMBRE
   =================================== */
.theme-toggle {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--green-primary);
    box-shadow: 0 0 14px var(--green-glow-strong);
    transform: translateY(-1px);
}

/* ===== Mode clair ===== */
html.light-theme {
    --bg-dark: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-surface: #f8fafc;
    --bg-nav: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-green: rgba(79, 124, 255, 0.30);
    --green-glow: rgba(79, 124, 255, 0.10);
    --green-glow-strong: rgba(79, 124, 255, 0.20);
}

html.light-theme body { background: var(--bg-dark); }

html.light-theme .nav-sub { box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14); }

html.light-theme .pf-overlay { background: rgba(15, 23, 42, 0.45); }

html.light-theme .dl-hero {
    background:
        radial-gradient(ellipse 60% 70% at 30% 0%, rgba(124, 58, 237, 0.10), transparent 65%),
        radial-gradient(ellipse 60% 70% at 70% 100%, rgba(8, 145, 178, 0.09), transparent 65%),
        var(--bg-card);
}

/* Mode clair : éléments à fond codé en dur */
html.light-theme .nav {
    background: rgba(255, 255, 255, 0.92);
}

html.light-theme .search-bar {
    background: rgba(241, 245, 249, 0.9);
}

html.light-theme .search-bar input { color: var(--text-primary); }

html.light-theme .top-bar {
    background: #e2e8f0;
}

html.light-theme .top-bar-text,
html.light-theme .top-bar a { color: #475569; }

/* Mode clair : titres et éléments à couleurs codées en dur */
html.light-theme h1,
html.light-theme h2,
html.light-theme h3,
html.light-theme h4 {
    color: #1e293b;
}

html.light-theme h1 {
    text-shadow: 0 0 26px rgba(79, 124, 255, 0.14);
}

html.light-theme .nav-item > a:hover { color: var(--green-primary); }

html.light-theme .nav-item.active > a {
    color: #1e293b;
    text-shadow: none;
}

html.light-theme .stat-card {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(79, 124, 255, 0.22);
    box-shadow: inset 0 0 18px rgba(79, 124, 255, 0.04);
}

/* ===================================
   FILTRE DE VOIE + COMPTEUR DE PERSONNAGES
   =================================== */
.path-filter {
    display: flex;
    gap: 10px;
    margin: 14px 0 18px;
}

.path-btn {
    flex: 1;
    max-width: 260px;
    padding: 11px 18px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.path-btn:hover { border-color: var(--green-primary); color: var(--text-primary); }

.path-btn.active {
    background: rgba(79, 124, 255, 0.14);
    border-color: var(--green-primary);
    color: var(--text-primary);
    box-shadow: 0 0 14px var(--green-glow-strong);
}

.char-counter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 16px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.cc-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.cc-btn:hover { border-color: var(--green-primary); }

.cc-val {
    min-width: 26px;
    text-align: center;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.05rem;
}

.cc-suffix { color: var(--text-muted); font-size: 0.8rem; }

/* Compteur du Guide Leveling */
.lvl-chars-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.lvl-chars {
    background: var(--surface-1);
    color: var(--text-secondary);
    border: 0.5px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.lvl-res-qty { font-weight: 600; }

.lvl-res-qty.scaled {
    color: var(--lvl-cyan-light);
    font-weight: 800;
}

/* Accordéon ressources d'alignement */
.align-res-acc { margin-bottom: 24px; }

.align-res-acc .quest-items-list {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Compteur de personnages : version compacte sur la ligne du titre */
.char-counter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    font-size: 0.8rem;
    vertical-align: middle;
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 400;
    letter-spacing: 0;
}

.res-head-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.align-res-acc .quest-accordion-title { flex-wrap: wrap; gap: 10px; }

@media (max-width: 640px) {
    .align-res-acc .char-counter .cc-suffix { display: none; }
}
