/**
 * GuildNexus WebApp — Design System
 * Direction : le chrome d'interface d'un client MMO lui-même — panneaux HUD à double liseré,
 * plaques de serveur, insignes de rang — plutôt qu'un site "gaming" générique. Palette obsidienne
 * + or de guilde (loot/héraldique) + cyan (statut/liens), thème sombre unique et assumé.
 */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* Icône de déconnexion (glyphe "logout-2" de Tabler Icons, réutilisée depuis myjarvis) :
   seul ce glyphe est repris, pas la police complète (des milliers d'icônes inutiles ici). */
@font-face {
    font-family: 'tabler-icons';
    src: url('fonts/tabler-icons.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}
.icon-logout::before {
    font-family: 'tabler-icons' !important;
    content: "\fa7e";
    speak: none;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
}

/* ============================================
   Design Tokens
   ============================================ */
:root {
    --ink:          #0A0D13;
    --ink-mid:      #0F1420;
    --ink-border:   rgba(232,235,245,0.08);

    --panel:        #131826;
    --panel-2:      #1A2131;
    --steel:        #262E42;
    --steel-2:      #384056;

    --primary:      #C9A227;
    --primary-dark: #A9860F;
    --primary-bg:   rgba(201,162,39,0.10);
    --primary-light:#3A2F10;

    --accent:       #3FD0C9;
    --accent-bg:    rgba(63,208,201,0.10);

    --success:      #4FBF77;
    --warning:      #E1A552;
    --danger:       #E1585A;
    --info:         #5B9CE8;

    --surface:      #131826;
    --surface-2:    #0F1420;
    --surface-3:    #1A2131;

    --border:       #262E42;
    --border-strong:#384056;

    --text-1:       #EDEFF5;
    --text-2:       #A6AEC2;
    --text-3:       #6B7590;

    --font-display: 'Rajdhani', 'Inter', sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'ui-monospace', 'SF Mono', Consolas, monospace;

    --r-xs:  3px;
    --r-sm:  6px;
    --r-md:  8px;
    --r-lg:  12px;
    --r-xl:  16px;
    --r-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.30);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.40);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.50);
    --shadow-gold: 0 0 0 1px rgba(201,162,39,0.35), 0 8px 24px rgba(201,162,39,0.12);

    --t-fast:   120ms ease;
    --t-normal: 220ms ease;
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--r-xs);
}
:focus:not(:focus-visible) { outline: none; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-1);
    background: var(--ink);
    background-image:
        radial-gradient(ellipse 60% 40% at 15% -5%, rgba(201,162,39,0.05) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 100% 20%, rgba(63,208,201,0.04) 0%, transparent 60%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: #7EE0DA; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: var(--text-1);
    text-transform: uppercase;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p  { color: var(--text-2); }
.eyebrow-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
}

/* ============================================
   Layout
   ============================================ */
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
main.container { flex: 1; }

/* ============================================
   Header
   ============================================ */
.app-header {
    background: var(--ink-mid);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--ink-border);
}
.header-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.logo-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-1);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    flex-shrink: 0;
}
.logo-link:hover { color: var(--primary); }
.logo-dot {
    width: 30px; height: 30px;
    background: linear-gradient(145deg, var(--primary), #8A6C10);
    border: 1px solid rgba(232,195,74,0.5);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.logo-dot span { color: #191300; font-size: 0.95rem; font-weight: 800; font-family: var(--font-display); }

.app-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}
.nav-link {
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color var(--t-fast);
}
.nav-link:hover { color: var(--text-1); }
.nav-link-btn {
    background: var(--primary);
    color: #191300 !important;
    padding: 0.4rem 1rem;
    border-radius: var(--r-full);
    font-size: 0.82rem;
    font-weight: 700;
}
.nav-link-btn:hover { background: var(--primary-dark); color: #191300 !important; }

.lang-switch { display: flex; gap: 0.25rem; font-size: 1rem; }
.lang-switch a { opacity: 0.6; transition: opacity var(--t-fast); text-decoration: none; }
.lang-switch a:hover { opacity: 1; }

.nav-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--panel-2);
    border: 1px solid var(--steel-2);
    border-radius: var(--r-full);
    padding: 0.35rem 0.9rem;
    transition: border-color var(--t-fast);
}
.nav-search:focus-within { border-color: var(--accent); }
.nav-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-1);
    font-size: 0.82rem;
    width: 130px;
}
.nav-search input::placeholder { color: var(--text-3); }

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--r-sm);
    border: none;
    cursor: pointer;
    transition: all var(--t-fast);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font-sans);
}
.btn-primary  { background: var(--primary); color: #191300; }
.btn-primary:hover  { background: var(--primary-dark); color: #191300; transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.btn-secondary { background: var(--surface-3); color: var(--text-1); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--steel-2); }
.btn-ghost  { background: transparent; color: var(--accent); border: 1.5px solid var(--steel-2); }
.btn-ghost:hover { background: var(--accent-bg); border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #C13F41; }
.btn-lg  { padding: 0.8rem 1.9rem; font-size: 0.95rem; }
.btn-sm  { padding: 0.35rem 0.9rem; font-size: 0.75rem; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    padding: 5rem 0 4rem;
    text-align: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 50% -10%, rgba(201,162,39,0.10) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 85% 90%, rgba(63,208,201,0.07) 0%, transparent 60%);
    pointer-events: none;
}
.hero-content { position: relative; max-width: 780px; margin: 0 auto; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--panel-2);
    color: var(--primary);
    border: 1px solid var(--steel-2);
    border-radius: var(--r-full);
    padding: 0.35rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.hero-title {
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-1);
    margin-bottom: 1.25rem;
    text-shadow: 0 0 40px rgba(201,162,39,0.15);
}
.hero-title .accent-word { color: var(--primary); }
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-2);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    text-transform: none;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================
   Server-select rail (signature element) — plaques de jeu, façon écran de sélection
   ============================================ */
.plate-rail-wrap { position: relative; margin-top: 3.5rem; }
.plate-rail {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1.25rem;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.plate-rail::-webkit-scrollbar { height: 6px; }
.plate-rail::-webkit-scrollbar-thumb { background: var(--steel-2); border-radius: var(--r-full); }
.game-plate {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 168px;
    position: relative;
    background: linear-gradient(155deg, var(--panel-2) 0%, var(--panel) 100%);
    border: 1px solid var(--steel);
    border-radius: var(--r-md);
    padding: 1.1rem 1rem;
    text-align: left;
    transition: transform var(--t-normal), border-color var(--t-normal), box-shadow var(--t-normal);
}
/* Icône officielle du jeu (favicon self-hébergé, cf. --game-icon posée en ligne par
   index.jsp — absente pour un jeu sans source récupérable) en filigrane sur ::before.
   Assombrie par un voile plutôt qu'avec `opacity` (qui aurait aussi effacé la bordure
   subtile ci-dessous) : la source est en basse résolution (16 à 64px selon le jeu), un rendu
   net (pixelated) et très estompé évite l'effet flou d'un agrandissement lissé. */
.game-plate::before {
    content: "";
    position: absolute; inset: 3px;
    z-index: 0;
    border: 1px solid rgba(232,235,245,0.05);
    border-radius: calc(var(--r-md) - 2px);
    background-image:
        linear-gradient(rgba(19,24,38,0.88), rgba(19,24,38,0.88)),
        var(--game-icon, none);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover, 70%;
    image-rendering: pixelated;
    pointer-events: none;
}
/* ::before est en position:absolute : sans ceci, il peindrait AU-DESSUS du texte en flux
   normal (règle CSS de peinture par empilement, pas par ordre dans le DOM) et le filigrane
   couvrirait le nom du jeu. Ces divs deviennent à leur tour "positionnés" avec un z-index
   supérieur pour rester visuellement au premier plan. */
.game-plate > div { position: relative; z-index: 1; }
.game-plate:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: var(--shadow-gold); }
.game-plate .plate-index { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-3); letter-spacing: 0.08em; }
.game-plate .plate-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-1);
    text-transform: uppercase;
    letter-spacing: 0.01em;
    margin: 0.5rem 0 0.65rem;
    line-height: 1.15;
    min-height: 2.3em;
}
.game-plate .plate-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); }

/* ============================================
   Sections communes
   ============================================ */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--ink-border); border-bottom: 1px solid var(--ink-border); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.section-title { margin-bottom: 0.75rem; }
.section-subtitle { font-size: 1.02rem; color: var(--text-2); max-width: 560px; margin: 0 auto; text-transform: none; }

/* ============================================
   Grille de cartes
   ============================================ */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

/* "bezel-card" : panneau HUD à double liseré, motif de signature réutilisé partout
   (personnages, guildes, événements, publications) */
.card, .bezel-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--steel);
    border-radius: var(--r-lg);
    padding: 1.75rem;
    transition: box-shadow var(--t-normal), transform var(--t-normal), border-color var(--t-normal);
}
.card::before, .bezel-card::before {
    content: "";
    position: absolute; inset: 4px;
    border: 1px solid rgba(232,235,245,0.04);
    border-radius: calc(var(--r-lg) - 3px);
    pointer-events: none;
}
.card:hover, .bezel-card.interactive:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--steel-2); }

.card-icon {
    width: 44px; height: 44px;
    background: var(--primary-bg);
    border: 1px solid var(--steel-2);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}
.card-icon.accent-bg { background: var(--accent-bg); }
.card-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; text-transform: uppercase; margin-bottom: 0.5rem; color: var(--text-1); }
.card-text  { font-size: 0.9rem; color: var(--text-2); line-height: 1.6; }

/* ============================================
   Insignes (rang de guilde, classe, faction, statut)
   ============================================ */
.insignia {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.22rem 0.65rem 0.22rem 0.5rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--steel-2);
    background: var(--surface-3);
    color: var(--text-2);
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}
.insignia-gold    { border-color: rgba(201,162,39,0.5); background: var(--primary-bg); color: var(--gold-bright, #E8C34A); }
.insignia-cyan     { border-color: rgba(63,208,201,0.5); background: var(--accent-bg); color: var(--accent); }
.insignia-danger  { border-color: rgba(225,88,90,0.5); background: rgba(225,88,90,0.10); color: var(--danger); }
.insignia-success { border-color: rgba(79,191,119,0.5); background: rgba(79,191,119,0.10); color: var(--success); }
.insignia-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ============================================
   Stat blocks (personnage, DKP, roster)
   ============================================ */
.stat-block-row { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.stat-block { min-width: 90px; }
.stat-block-label { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.25rem; }
.stat-block-value { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 700; color: var(--text-1); }
.stat-block-value.accent { color: var(--primary); }

/* ============================================
   Auth Pages (login / register)
   ============================================ */
.auth-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(201,162,39,0.08) 0%, transparent 65%),
        var(--ink);
    min-height: calc(100vh - 64px);
}
.auth-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--steel);
    border-radius: var(--r-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.auth-card::before {
    content: "";
    position: absolute; inset: 5px;
    border: 1px solid rgba(232,235,245,0.04);
    border-radius: calc(var(--r-xl) - 4px);
    pointer-events: none;
}
.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 1.75rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
    color: var(--text-1);
    letter-spacing: 0.02em;
}
.auth-logo .logo-dot {
    width: 38px; height: 38px;
}
.auth-title {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 0.4rem;
    color: var(--text-1);
}
.auth-subtitle {
    text-align: center;
    color: var(--text-2);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    text-transform: none;
}

/* ============================================
   Forms
   ============================================ */
.stacked-form { display: flex; flex-direction: column; gap: 1rem; }
.stacked-form label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-2);
    margin-bottom: 0.2rem;
    display: block;
}
.stacked-form input[type="email"],
.stacked-form input[type="password"],
.stacked-form input[type="text"],
.stacked-form input[type="number"],
.stacked-form input[type="datetime-local"],
.stacked-form input[type="url"],
.stacked-form textarea,
.stacked-form select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-1);
    background: var(--surface-2);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.stacked-form input::placeholder, .stacked-form textarea::placeholder { color: var(--text-3); }
.stacked-form input:focus,
.stacked-form textarea:focus,
.stacked-form select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(63,208,201,0.14);
}
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row > .form-group { flex: 1; min-width: 180px; }
.checkbox-row { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-row label { margin-bottom: 0; text-transform: none; font-size: 0.85rem; }
.form-hint { font-size: 0.78rem; color: var(--text-3); }

/* ============================================
   Messages
   ============================================ */
.message-error {
    background: rgba(225,88,90,0.10);
    color: #F4A0A1;
    border: 1px solid rgba(225,88,90,0.35);
    border-radius: var(--r-md);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.message-success {
    background: rgba(79,191,119,0.10);
    color: #8DDDA8;
    border: 1px solid rgba(79,191,119,0.35);
    border-radius: var(--r-md);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ============================================
   Dashboard / pages listing
   ============================================ */
.page-header {
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.page-title {
    font-size: 1.75rem;
    color: var(--text-1);
    letter-spacing: 0.02em;
}
.page-subtitle { color: var(--text-2); font-size: 0.95rem; margin-top: 0.25rem; text-transform: none; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}
.stat-card {
    background: var(--panel);
    border: 1px solid var(--steel);
    border-radius: var(--r-lg);
    padding: 1.25rem 1.5rem;
}
.stat-label { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text-1); font-family: var(--font-mono); }

/* ============================================
   Admin dashboard
   ============================================ */
.admin-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    height: 140px;
    margin-top: 1rem;
}
.bar-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    gap: 0.35rem;
}
.bar-chart-bar {
    width: 100%;
    max-width: 22px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: var(--r-xs) var(--r-xs) 0 0;
    min-height: 2px;
}
.bar-chart-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-3);
    white-space: nowrap;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th {
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    padding: 0.6rem 0.75rem;
    border-bottom: 2px solid var(--border);
}
.data-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
}
.data-table tr:hover td { background: rgba(232,235,245,0.02); }
.data-table tr:last-child td { border-bottom: none; }
.section-block { margin-bottom: 2.5rem; }
.section-block-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; text-transform: uppercase; margin-bottom: 1rem; color: var(--text-1); }

/* ============================================
   Empty states
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-2);
    border: 1px dashed var(--steel-2);
    border-radius: var(--r-lg);
}
.empty-state .card-icon { margin: 0 auto 1rem; }

/* ============================================
   Footer
   ============================================ */
.app-footer {
    background: var(--ink-mid);
    color: var(--text-3);
    font-size: 0.85rem;
    margin-top: auto;
    border-top: 1px solid var(--ink-border);
}
.footer-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.footer-brand { color: var(--text-2); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-3); font-size: 0.85rem; }
.footer-links a:hover { color: var(--text-1); }

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-sm { gap: 0.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.hidden { display: none; }
.muted { color: var(--text-3); }
.no-transform { text-transform: none; }

/* ============================================
   Visite guidée (js/tour.js)
   ============================================ */
.tour-overlay { position: fixed; inset: 0; z-index: 2000; }
.tour-spotlight {
    position: fixed;
    border-radius: var(--r-md);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 9999px rgba(10,13,19,0.78);
    pointer-events: none;
    transition: top var(--t-normal), left var(--t-normal), width var(--t-normal), height var(--t-normal);
}
.tour-tooltip {
    position: fixed;
    max-width: 320px;
    background: var(--panel-2);
    border: 1px solid var(--steel-2);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem;
    z-index: 2001;
}
.tour-tooltip-title { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 0.5rem; color: var(--text-1); }
.tour-tooltip-text { font-size: 0.9rem; color: var(--text-2); margin: 0 0 1rem; }
.tour-tooltip-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.tour-tooltip-progress { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); }
.tour-tooltip-actions { display: flex; gap: 0.4rem; }
.tour-replay-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1500;
    width: 44px;
    height: 44px;
    border-radius: var(--r-full);
    background: var(--primary);
    color: #191300;
    border: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform var(--t-fast), background var(--t-fast);
}
.tour-replay-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .app-nav { gap: 0.75rem; }
    .nav-link:not(.nav-link-btn) { display: none; }
    .nav-search { display: none; }
    .hero-section { padding: 3.5rem 0 2.5rem; }
    .section { padding: 3rem 0; }
    .auth-card { padding: 1.75rem; }
    .footer-container { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; flex-wrap: wrap; gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
