/* ==========================================================================
   LEXORIA — Thème Azuriom  ·  Direction "Atelier · forge à la nuit tombée"
   Fond sombre chaud, blocs vivants dispersés, fumée & braises d'ambiance.
   Toutes les couleurs proviennent des variables injectées par la config.
   ========================================================================== */

:root {
    --lex-bg:        #1f1712;   /* fond sombre chaud */
    --lex-bg-2:      #2b211b;   /* fond alterné */
    --lex-panel:     #fbf3e6;   /* blocs clairs (contraste) */
    --lex-brick:     #b8483a;   /* rouge brique du logo */
    --lex-brick-d:   #8f3428;
    --lex-copper:    #c8763c;   /* cuivre */
    --lex-copper-d:  #a55f2c;
    --lex-ember:     #e89b3c;   /* braise dorée */

    --lex-navbar:    #241c16;   /* navbar sombre assortie */
    --lex-navbar-2:  #2e241c;

    --lex-cream:     #fbf3e6;   /* texte clair sur fond sombre */
    --lex-cream-soft:#c9b199;
    --lex-ink:       #3a2a20;   /* texte foncé sur blocs clairs */
    --lex-ink-soft:  #7a6555;
    --lex-line:      #e0cdaf;   /* bordure claire des blocs */
    --lex-line-dark: rgba(232,155,60,0.14);

    --lex-radius:    14px;
    --lex-radius-sm: 10px;
    --lex-font:      'Barlow', system-ui, sans-serif;
    --lex-font-display: 'Oswald', 'Barlow', sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--lex-bg);
    background-image:
        radial-gradient(circle at 85% 8%, rgba(232,155,60,0.10), transparent 42%),
        radial-gradient(circle at 5% 60%, rgba(184,72,58,0.08), transparent 40%),
        linear-gradient(180deg, var(--lex-bg-2) 0%, var(--lex-bg) 100%);
    background-attachment: fixed;
    color: var(--lex-cream);
    font-family: var(--lex-font);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--lex-font-display);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--lex-cream);
    margin: 0 0 0.6rem;
}

a { color: var(--lex-ember); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--lex-copper); }

img { max-width: 100%; height: auto; }
.container { max-width: 1180px; }

::selection { background: var(--lex-copper); color: #fff; }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--lex-bg); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--lex-brick), var(--lex-copper));
    border-radius: 20px; border: 2px solid var(--lex-bg);
}

/* Réglage accessibilité : couper les animations si demandé */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .lex-block { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   NAVBAR — sombre assortie au fond
   ========================================================================== */
.lex-navbar {
    background: var(--lex-navbar);
    background-image: linear-gradient(180deg, var(--lex-navbar-2), var(--lex-navbar));
    border-bottom: 1px solid var(--lex-line-dark);
    box-shadow: 0 6px 24px -10px rgba(0,0,0,0.7);
    position: sticky; top: 0; z-index: 1030;
    min-height: 72px;
    padding-top: 0; padding-bottom: 0;
}
/* Tout est centré verticalement sur la même ligne */
.lex-navbar .container { display: flex; align-items: center; min-height: 72px; }
.lex-navbar .navbar-collapse { align-items: center; }

/* Logo : dépasse légèrement la navbar pour l'impact, sans la déformer */
.lex-navbar .navbar-brand {
    display: flex; align-items: center;
    padding: 0; margin-right: 1.5rem;
    height: 72px;
}
.lex-navbar .navbar-brand img {
    height: 96px; width: auto;
    margin: -12px 0;              /* déborde en haut/bas sans agrandir la navbar */
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.55));
    transition: transform 0.25s ease;
}
.lex-navbar .navbar-brand:hover img { transform: scale(1.05); }

/* Avatar utilisateur : carré, même hauteur visuelle que les liens */
.lex-user-avatar {
    width: 28px; height: 28px;
    border-radius: 6px;
    object-fit: cover;
    image-rendering: pixelated;
    border: 2px solid rgba(232,155,60,0.4);
}

.lex-navbar .nav-link {
    color: var(--lex-cream-soft) !important;
    font-family: var(--lex-font-display);
    text-transform: uppercase;
    font-weight: 500;
    font-size: 0.92rem;
    letter-spacing: 0.06em;
    padding: 0.55rem 1rem !important;
    margin: 0 0.1rem;
    border-radius: var(--lex-radius-sm);
    display: flex; align-items: center; gap: 0.45rem;
    line-height: 1;
    transition: all 0.2s ease;
    position: relative;
}
.lex-navbar .nav-link:hover { color: var(--lex-cream) !important; background: rgba(232,155,60,0.08); }
.lex-navbar .nav-item.active > .nav-link,
.lex-navbar .nav-link.active {
    color: #fff !important;
    background: linear-gradient(160deg, var(--lex-copper), var(--lex-brick));
    box-shadow: 0 2px 0 var(--lex-brick-d), inset 0 1px 0 rgba(255,255,255,0.2);
}
.lex-navbar .nav-link i { font-size: 1rem; }

/* Bouton PLAY / IP */
.lex-navbar .btn-play {
    background: linear-gradient(160deg, var(--lex-ember), var(--lex-copper));
    color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    font-family: var(--lex-font-display);
    font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; font-size: 0.86rem;
    padding: 0.55rem 1.35rem;
    border-radius: var(--lex-radius-sm);
    border: none;
    box-shadow: 0 3px 0 var(--lex-copper-d), inset 0 1px 0 rgba(255,255,255,0.35);
    display: inline-flex; align-items: center; gap: 0.5rem;
    transition: all 0.15s ease;
}
.lex-navbar .btn-play:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--lex-copper-d); color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.lex-navbar .btn-play:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--lex-copper-d); }

.lex-navbar .dropdown-menu {
    background: var(--lex-navbar-2);
    border: 1px solid var(--lex-line-dark);
    border-radius: var(--lex-radius-sm);
    box-shadow: 0 18px 45px -20px rgba(0,0,0,0.8);
    padding: 0.4rem;
}
.lex-navbar .dropdown-item { color: var(--lex-cream-soft); border-radius: 8px; padding: 0.5rem 0.85rem; }
.lex-navbar .dropdown-item:hover { background: var(--lex-copper); color: #fff; }
.lex-navbar .navbar-toggler {
    border: 1px solid var(--lex-line-dark);
    color: var(--lex-cream);
    padding: 0.4rem 0.6rem;
}
.lex-navbar .navbar-toggler:focus { box-shadow: none; }
/* Icône hamburger claire (visible sur navbar sombre) */
.lex-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23fbf3e6' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ==========================================================================
   AMBIANCE VIVANTE — fumée qui monte + braises qui flottent
   ========================================================================== */
.lex-atmosphere { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.lex-smoke {
    position: absolute; bottom: -50px; border-radius: 50%;
    background: radial-gradient(circle, rgba(200,180,160,0.22), transparent 70%);
    filter: blur(10px); animation: lexRise linear infinite;
}
@keyframes lexRise {
    0%   { transform: translateY(0) scale(0.6); opacity: 0; }
    15%  { opacity: 0.45; }
    100% { transform: translateY(-480px) scale(1.7); opacity: 0; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.lex-hero {
    position: relative; overflow: hidden;
    padding: 6rem 0 7rem; text-align: center;
    background-size: cover; background-position: center;
}
.lex-hero::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: rgba(31,23,18, var(--lex-hero-overlay, 0.5));
}
.lex-hero > .container { position: relative; z-index: 2; }

/* Vidéo de fond du hero */
.lex-hero-video {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    z-index: 0;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
}
/* Masquer les contrôles/bouton play natifs (iOS/Safari) */
.lex-hero-video::-webkit-media-controls,
.lex-hero-video::-webkit-media-controls-start-playback-button,
.lex-hero-video::-webkit-media-controls-play-button {
    display: none !important;
    -webkit-appearance: none;
}

.lex-hero .hero-logo {
    max-width: 300px; margin-bottom: 1.4rem;
    filter: drop-shadow(0 14px 30px rgba(0,0,0,0.65));
    animation: lexBob 5s ease-in-out infinite;
}
@keyframes lexBob { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-12px);} }

.lex-hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    color: #fff; margin-bottom: 0.8rem;
    text-shadow: 0 4px 24px rgba(0,0,0,0.6);
}
.lex-hero .hero-subtitle {
    font-family: var(--lex-font); text-transform: none;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #fff;
    max-width: 640px; margin: 0 auto 2rem;
}

/* IP copiable */
.lex-ip-box {
    display: inline-flex; align-items: center; gap: 0.9rem;
    background: rgba(43,33,27,0.85); backdrop-filter: blur(6px);
    border: 1px solid var(--lex-line-dark);
    border-radius: var(--lex-radius);
    padding: 0.6rem 0.6rem 0.6rem 1.35rem; margin-top: 1.5rem;
    box-shadow: 0 10px 30px -14px rgba(0,0,0,0.7);
}
.lex-ip-box .ip-label { color: var(--lex-cream-soft); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.15em; }
.lex-ip-box .ip-value { font-family: var(--lex-font-display); font-size: 1.15rem; color: #fff; font-weight: 600; }
.lex-ip-copy {
    background: linear-gradient(160deg, var(--lex-ember), var(--lex-copper));
    border: none; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35); font-family: var(--lex-font-display);
    font-weight: 600; text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.04em;
    padding: 0.6rem 0.95rem; border-radius: var(--lex-radius-sm); cursor: pointer;
    box-shadow: 0 3px 0 var(--lex-copper-d); transition: transform 0.15s ease;
}
.lex-ip-copy:hover { transform: translateY(-2px); }
.lex-ip-copy.copied { background: linear-gradient(160deg, #66bb6a, #43a047); color: #fff; box-shadow: 0 3px 0 #2e7d32; }

/* ==========================================================================
   BOUTONS
   ========================================================================== */
.btn {
    font-family: var(--lex-font-display); font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.04em;
    border-radius: var(--lex-radius-sm); padding: 0.65rem 1.5rem;
    transition: all 0.15s ease;
}
.btn-primary {
    background: linear-gradient(160deg, var(--lex-ember), var(--lex-copper));
    border: none; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    box-shadow: 0 3px 0 var(--lex-copper-d), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-primary:hover { transform: translateY(-2px); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35); box-shadow: 0 5px 0 var(--lex-copper-d); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 2px 0 var(--lex-copper-d); }
.btn-outline-primary {
    border: 2px solid var(--lex-copper); color: var(--lex-ember); background: transparent;
}
.btn-outline-primary:hover { background: var(--lex-copper); color: #fff; transform: translateY(-2px); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ==========================================================================
   SECTIONS + composition vivante de blocs
   ========================================================================== */
.lex-section { padding: 5rem 0; position: relative; overflow: hidden; }

.lex-head { margin-bottom: 1rem; position: relative; z-index: 2; }
.lex-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--lex-brick); color: #fff;
    font-family: var(--lex-font-display); font-size: 0.72rem;
    letter-spacing: 0.2em; text-transform: uppercase;
    padding: 0.35rem 0.9rem; border-radius: 4px;
    box-shadow: 0 2px 0 var(--lex-brick-d); margin-bottom: 0.8rem;
}
.lex-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); color: #fff; line-height: 1; }
.lex-head .lex-sub {
    font-family: var(--lex-font); text-transform: none;
    color: var(--lex-cream-soft); font-size: 1.05rem; margin-top: 0.5rem;
}

/* --- Composition dispersée (desktop) --- */
.lex-compo { position: relative; z-index: 2; margin-top: 2.5rem; min-height: 430px; }

.lex-block {
    background: var(--lex-panel);
    border: 2px solid var(--lex-line);
    border-radius: var(--lex-radius);
    padding: 1.6rem 1.5rem;
    color: var(--lex-ink);
    box-shadow: 0 6px 0 var(--lex-line), 0 16px 32px rgba(0,0,0,0.45);
    opacity: 1;
    animation: lexDrop 0.6s cubic-bezier(.2,.9,.3,1.3) both, lexBlockBob 4.5s ease-in-out infinite;
    will-change: transform;
}
@keyframes lexDrop {
    0%   { opacity: 0; transform: translateY(-60px) rotate(var(--rot,0deg)) scale(0.9); }
    70%  { opacity: 1; transform: translateY(6px) rotate(var(--rot,0deg)) scale(1); }
    100% { opacity: 1; transform: translateY(0) rotate(var(--rot,0deg)) scale(1); }
}
@keyframes lexBlockBob {
    0%,100% { transform: translateY(0) rotate(var(--rot,0deg)); }
    50%     { transform: translateY(-7px) rotate(var(--rot,0deg)); }
}
.lex-block:hover {
    transform: translateY(-10px) rotate(0deg) scale(1.03) !important;
    box-shadow: 0 12px 0 var(--lex-copper-d), 0 22px 38px rgba(0,0,0,0.5);
    animation-play-state: paused; z-index: 10;
}
.lex-block .lex-chip {
    width: 50px; height: 50px; border-radius: 12px;
    background: linear-gradient(160deg, var(--lex-copper), var(--lex-brick));
    display: grid; place-items: center; color: #fff;
    font-family: var(--lex-font-display); font-weight: 700; font-size: 1.4rem;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.3), 0 3px 0 var(--lex-brick-d);
    margin-bottom: 1rem;
}
.lex-block .lex-chip i { font-size: 1.4rem; }
.lex-block h3 { font-size: 1.2rem; color: var(--lex-ink); margin-bottom: 0.45rem; }
.lex-block p { font-family: var(--lex-font); text-transform: none; color: var(--lex-ink-soft); font-size: 0.93rem; line-height: 1.55; margin: 0; }

/* Positions dispersées — 4 blocs (desktop) */
.lex-compo.count-3 .lex-block:nth-child(1){ position:absolute; left:1%;  top:35px; width:30%; --rot:-2deg; animation-delay:.05s; }
.lex-compo.count-3 .lex-block:nth-child(2){ position:absolute; left:35%; top:0;    width:30%; --rot:1.5deg; animation-delay:.25s; z-index:3; }
.lex-compo.count-3 .lex-block:nth-child(3){ position:absolute; left:69%; top:55px; width:30%; --rot:-1deg; animation-delay:.45s; }

.lex-compo.count-4 .lex-block:nth-child(1){ position:absolute; left:0;    top:45px; width:29%; --rot:-2deg;  animation-delay:.05s; }
.lex-compo.count-4 .lex-block:nth-child(2){ position:absolute; left:31%; top:0;    width:32%; --rot:1.5deg; animation-delay:.22s; z-index:3; }
.lex-compo.count-4 .lex-block:nth-child(3){ position:absolute; left:34%; top:225px;width:26%; --rot:-1.2deg;animation-delay:.4s; }
.lex-compo.count-4 .lex-block:nth-child(4){ position:absolute; left:66%; top:60px; width:30%; --rot:2deg;   animation-delay:.58s; }

/* ==========================================================================
   ACTUALITÉS — cartes claires, même langage
   ========================================================================== */
.lex-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; position: relative; z-index: 2; }
.lex-news {
    background: var(--lex-panel); border: 2px solid var(--lex-line);
    border-radius: var(--lex-radius); overflow: hidden;
    box-shadow: 0 6px 0 var(--lex-line), 0 16px 32px rgba(0,0,0,0.4);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: flex; flex-direction: column;
}
.lex-news:hover { transform: translateY(-6px); box-shadow: 0 10px 0 var(--lex-copper-d), 0 20px 34px rgba(0,0,0,0.5); }
.lex-news .news-img { height: 175px; background-size: cover; background-position: center; }
.lex-news .news-body { padding: 1.3rem; }
.lex-news .news-date { color: var(--lex-brick); font-family: var(--lex-font-display); font-size: 0.78rem; letter-spacing: 0.08em; display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 0.5rem; }
.lex-news h3 { font-size: 1.1rem; color: var(--lex-ink); margin-bottom: 0.5rem; }
.lex-news h3 a { color: var(--lex-ink); }
.lex-news h3 a:hover { color: var(--lex-copper); }
.lex-news p { font-family: var(--lex-font); text-transform: none; color: var(--lex-ink-soft); font-size: 0.9rem; margin-bottom: 1rem; }

/* ==========================================================================
   CTA
   ========================================================================== */
.lex-cta {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--lex-brick), var(--lex-copper));
    border-radius: var(--lex-radius); padding: 3.4rem 2rem; text-align: center;
    box-shadow: 0 8px 0 var(--lex-brick-d), 0 20px 40px rgba(0,0,0,0.4);
}
.lex-cta::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 20% 15%, rgba(255,255,255,0.14), transparent 45%); }
.lex-cta > * { position: relative; z-index: 1; }
.lex-cta h2 { color: #fff; margin-bottom: 0.7rem; }
.lex-cta p { font-family: var(--lex-font); text-transform: none; color: rgba(255,255,255,0.92); margin-bottom: 1.6rem; }
.lex-cta .btn-primary { background: #fff; color: var(--lex-brick-d) !important; text-shadow: none !important; box-shadow: 0 3px 0 rgba(0,0,0,0.2); }
.lex-cta .btn-primary:hover { background: var(--lex-bg); color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.35) !important; }

/* ==========================================================================
   CONTENU (pages, plugins, formulaires)
   ========================================================================== */
.card {
    background: var(--lex-panel); border: 2px solid var(--lex-line);
    border-radius: var(--lex-radius); color: var(--lex-ink);
    box-shadow: 0 6px 0 var(--lex-line), 0 16px 32px rgba(0,0,0,0.35);
}
.card-header { background: rgba(0,0,0,0.04); border-bottom: 2px solid var(--lex-line); font-family: var(--lex-font-display); text-transform: uppercase; color: var(--lex-ink); }
.page-title, .content-title { color: #fff; }

/* Conteneur des pages internes (app.blade.php) */
main.content {
    padding-top: 3rem;
    padding-bottom: 3rem;
    min-height: 60vh;
}
main.content h1, main.content h2, main.content h3 { color: #fff; }
main.content > p, main.content > .lex-head, main.content > div > p { color: var(--lex-cream); }

/* Dans les cartes claires (plugins boutique/vote), le texte doit être foncé */
.card, .card p, .card li, .card td, .card th, .card span, .card div,
.card small, .card label, .card strong {
    color: var(--lex-ink);
}
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 { color: var(--lex-ink); }
.card a:not(.btn) { color: var(--lex-copper-d); }

/* En-têtes de tableau foncés : garder le texte clair dessus */
.card thead th, .card .table-dark th, .card table thead th {
    color: #fff !important;
}
.card .text-muted { color: #8a7560 !important; }

.form-control, .form-select {
    background: #fff; border: 2px solid var(--lex-line); color: var(--lex-ink); border-radius: var(--lex-radius-sm);
}
.form-control:focus, .form-select:focus { background: #fff; border-color: var(--lex-copper); color: var(--lex-ink); box-shadow: 0 0 0 0.2rem rgba(200,118,60,0.25); }

.badge.bg-primary { background: var(--lex-copper) !important; }
.text-primary { color: var(--lex-ember) !important; }
.bg-primary { background: var(--lex-copper) !important; }

.page-link { background: var(--lex-panel); border-color: var(--lex-line); color: var(--lex-copper); }
.page-item.active .page-link { background: var(--lex-copper); border-color: var(--lex-copper); color: #fff; }

.alert { border-radius: var(--lex-radius-sm); }

/* ==========================================================================
   RESPONSIVE — la composition dispersée retombe en colonne propre
   ========================================================================== */
@media (max-width: 991px) {
    .lex-navbar .navbar-collapse { background: var(--lex-navbar-2); margin-top: 0.8rem; padding: 1rem; border-radius: var(--lex-radius); }
    .lex-navbar .btn-play { margin-top: 0.6rem; width: 100%; justify-content: center; }
    .lex-hero { padding: 4rem 0 5rem; }
    /* Cadrage vidéo mobile : hauteur maîtrisée */
    .lex-hero.has-video { min-height: 70vh; display: flex; align-items: center; }
    .lex-hero.has-video > .container { width: 100%; }
    .lex-news-grid { grid-template-columns: 1fr; }

    /* on neutralise les positions absolues */
    .lex-compo { min-height: 0; display: flex; flex-direction: column; gap: 1.3rem; }
    .lex-compo .lex-block {
        position: static !important; width: 100% !important;
        --rot: 0deg !important; animation: lexDrop 0.6s ease forwards !important;
    }
}
@media (max-width: 576px) {
    .lex-ip-box { flex-direction: column; padding: 1rem; gap: 0.6rem; }
}

/* ==========================================================================
   BOUTIQUE — cartes et images uniformes, centrage forcé
   ========================================================================== */
.row .col-md-4 > .card,
.row .col-lg-4 > .card,
.row .col-md-6 > .card,
.row .col-lg-3 > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.card .card-body .btn { margin-top: auto; }

/* Lien image : conteneur flex centré (neutralise tout décalage) */
.card > a[data-package-url] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 220px;
    background: rgba(0, 0, 0, 0.15);
    overflow: hidden;
}
.card > a[data-package-url] .card-img-top {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    object-position: center !important;
    margin: 0 auto !important;
    display: block;
    padding: 0.5rem;
}

/* --- BOUTIQUE TEBEX : images card-img-top (avec ou sans lien) --- */
.card > .card-img-top,
.card > a > .card-img-top {
    width: 100% !important;
    height: 200px !important;
    object-fit: contain !important;
    object-position: center !important;
    background: rgba(0, 0, 0, 0.06);
    padding: 0.6rem;
    display: block;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

/* Carte Tebex (overflow-hidden position-relative card h-100) : flex colonne */
.card.h-100 {
    display: flex !important;
    flex-direction: column;
}
.card.h-100 .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.card.h-100 .card-body .d-flex {
    margin-top: auto;
}

/* Toutes les cartes de la grille (Tebex + Azuriom) : hauteur égale */
.row > [class*="col-"] > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}



/* ==========================================================================
   BOUTONS — texte blanc lisible partout (thème + plugins boutique/vote)
   ========================================================================== */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.shop-package .btn,
.card .btn-primary,
a.btn-primary,
button.btn-primary {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   TITRES DE CARTES (plugins vote/boutique) — pas de fond orange coupé
   ========================================================================== */
/* Un titre de section dans une carte reste foncé, pleine largeur, sans fond */
.card h1, .card h2, .card h3, .card h4 {
    background: none !important;
    color: var(--lex-ink) !important;
    display: block;
    width: 100%;
    padding: 0;
    -webkit-text-fill-color: initial;
}
/* Si un titre porte bg-primary/text-white, on neutralise le fond mais garde lisible */
.card h1.bg-primary, .card h2.bg-primary, .card h3.bg-primary, .card h4.bg-primary,
.card .card-title.bg-primary, .card .card-header.bg-primary {
    background: none !important;
    color: var(--lex-ink) !important;
}
/* Card-header en revanche (barre de titre pleine) : garder son style propre */
.card > .card-header {
    display: block;
    width: 100%;
    background: rgba(0,0,0,0.04) !important;
    color: var(--lex-ink) !important;
    padding: 0.85rem 1.25rem;
}

/* ==========================================================================
   CLASSEMENT VOTE — liste verticale stylée avec têtes (lex-vote-rank)
   ========================================================================== */
.lex-vote-rank {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* En-tête */
.lex-vote-head {
    display: flex;
    align-items: center;
    font-family: var(--lex-font-display);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: var(--lex-ink-soft) !important;
    padding: 0 1.3rem 0.2rem;
}

/* Ligne joueur = carte */
.lex-vote-row {
    display: flex;
    align-items: center;
    background: var(--lex-panel);
    border: 2px solid var(--lex-line);
    border-radius: 12px;
    padding: 0.65rem 1.3rem;
    box-shadow: 0 3px 0 var(--lex-line);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.lex-vote-row:hover {
    transform: translateX(4px);
    border-color: var(--lex-copper);
    box-shadow: 0 3px 0 var(--lex-copper-d);
}

/* Colonnes */
.lvr-rank { flex: 0 0 50px; font-family: var(--lex-font-display); font-weight: 700; font-size: 1.15rem; color: var(--lex-ink-soft); }
.lvr-name { flex: 1; display: flex; align-items: center; gap: 0.8rem; font-family: var(--lex-font-display); font-weight: 500; font-size: 1.05rem; color: var(--lex-ink); }
.lvr-votes { flex: 0 0 90px; display: flex; justify-content: flex-end; }

/* Tête du joueur */
.lvr-name img {
    width: 42px; height: 42px;
    border-radius: 8px;
    border: 2px solid var(--lex-line);
    image-rendering: pixelated;
}

/* Badge votes cuivré */
.lvr-badge {
    background: linear-gradient(160deg, var(--lex-ember), var(--lex-copper));
    color: #fff;
    font-family: var(--lex-font-display);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 0 var(--lex-copper-d);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Podium top 3 */
.lex-vote-row:nth-child(2) { border-color: #e8b84c; box-shadow: 0 3px 0 #b8912f; }
.lex-vote-row:nth-child(2) .lvr-rank { color: #c99a2e; }
.lex-vote-row:nth-child(3) { border-color: #c9c9c9; box-shadow: 0 3px 0 #999; }
.lex-vote-row:nth-child(3) .lvr-rank { color: #888; }
.lex-vote-row:nth-child(4) { border-color: #cd9b6a; box-shadow: 0 3px 0 #a06b3d; }
.lex-vote-row:nth-child(4) .lvr-rank { color: #a06b3d; }

@media (max-width: 576px) {
    .lvr-name { font-size: 0.9rem; gap: 0.5rem; }
    .lvr-name img { width: 34px; height: 34px; }
    .lvr-rank { flex: 0 0 34px; }
}

/* ==========================================================================
   PAGES ARTICLES (posts) — tailles maîtrisées
   ========================================================================== */

/* Image dans un article individuel : hauteur limitée, jamais géante */
.content img.img-fluid,
.content .card-body img,
.content > .card img,
.post-content img,
article.post img,
.post-text img,
.markdown img {
    max-height: 400px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    border-radius: 12px;
    display: block;
    margin: 0 auto 1.5rem;
}

/* --- LISTE d'articles : forcer les images d'en-tête à une hauteur fixe --- */
.card > img,
.card > a > img,
.card .card-img-top,
.card-img,
article .card > img,
article img.card-img-top {
    height: 200px !important;
    max-height: 200px !important;
    width: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 12px 12px 0 0 !important;
}

/* --- RAPPEL PRIORITAIRE : têtes du classement vote (après les règles articles) --- */
.lex-vote-rank .lvr-name img {
    width: 42px !important;
    height: 42px !important;
    max-height: 42px !important;
    max-width: 42px !important;
    border-radius: 8px !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    display: inline-block !important;
    image-rendering: pixelated;
    border: 2px solid var(--lex-line);
}

/* Cartes d'articles de hauteur homogène */
.row > [class*="col-"] > .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.row > [class*="col-"] > .card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

/* Message "aucun résultat" de recherche : visible et lisible */
.content .alert,
.alert-info,
.no-results,
.search-empty {
    display: block !important;
    background: var(--lex-panel);
    border: 2px solid var(--lex-line);
    color: var(--lex-ink) !important;
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    text-align: center;
    box-shadow: 0 3px 0 var(--lex-line);
}

/* ==========================================================================
   FIX : bouton blanc du CTA — texte foncé lisible (priorité finale)
   ========================================================================== */
.lex-cta .btn-primary,
.lex-cta a.btn-primary,
.lex-cta button.btn-primary {
    color: var(--lex-brick-d) !important;
    text-shadow: none !important;
}
.lex-cta .btn-primary:hover {
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35) !important;
}

/* ==========================================================================
   FOOTER — sobre & moderne, colonnes configurables
   ========================================================================== */
.lex-footer {
    background: linear-gradient(180deg, #1c1510 0%, #150f0b 100%);
    padding: 3.5rem 0 0;
    margin-top: 4rem;
    color: var(--lex-cream-soft);
    position: relative;
    border-top: 1px solid var(--lex-line-dark);
}
.lex-footer::before {
    content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232,155,60,0.5), transparent);
}

.lex-footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2.5rem;
    padding-bottom: 2.8rem;
}
.lex-footer-brand { flex: 1 1 280px; max-width: 340px; }
.lex-footer-col { flex: 1 1 150px; min-width: 130px; }

.lex-footer-brand img {
    height: 160px; margin-bottom: 1rem;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.5));
}
.lex-footer-brand p {
    font-family: var(--lex-font); text-transform: none;
    font-size: 0.88rem; line-height: 1.65;
    color: var(--lex-cream-soft); margin: 0 0 1.4rem; max-width: 280px;
}
.lex-footer-social { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.lex-footer-social a {
    width: 40px; height: 40px; display: grid; place-items: center;
    background: rgba(232,155,60,0.08);
    border: 1px solid var(--lex-line-dark);
    border-radius: 10px; color: var(--lex-ember); font-size: 1.1rem;
    transition: all 0.25s ease; text-decoration: none;
}
.lex-footer-social a:hover {
    background: linear-gradient(160deg, var(--lex-ember), var(--lex-copper));
    color: #fff; transform: translateY(-3px);
    box-shadow: 0 6px 14px -4px rgba(200,118,60,0.5);
}

.lex-footer-col h5 {
    color: #fff; font-family: var(--lex-font-display);
    text-transform: uppercase; font-size: 0.82rem; letter-spacing: 0.12em;
    margin: 0 0 1.1rem; position: relative; padding-bottom: 0.6rem;
}
.lex-footer-col h5::after {
    content: ""; position: absolute; bottom: 0; left: 0;
    width: 26px; height: 2px; background: var(--lex-copper); border-radius: 2px;
}
.lex-footer-col a {
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--lex-cream-soft); text-decoration: none;
    font-size: 0.9rem; padding: 0.4rem 0; transition: all 0.15s ease;
}
.lex-footer-col a::before {
    content: "›"; color: var(--lex-copper); opacity: 0;
    transform: translateX(-4px); transition: all 0.15s ease;
}
.lex-footer-col a:hover { color: var(--lex-ember); }
.lex-footer-col a:hover::before { opacity: 1; transform: translateX(0); }

.lex-footer-bottom {
    border-top: 1px solid var(--lex-line-dark); padding: 1.4rem 0;
    display: flex; justify-content: center; align-items: center;
    flex-wrap: wrap; gap: 0.5rem; text-align: center;
    font-family: var(--lex-font); text-transform: none;
    font-size: 0.82rem; color: var(--lex-cream-soft);
}
.lex-footer-bottom .credits a { color: var(--lex-ember); text-decoration: none; }
.lex-footer-bottom .credits a:hover { color: var(--lex-copper); }
.lex-footer-ip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(232,155,60,0.08); border: 1px solid var(--lex-line-dark);
    border-radius: 8px; padding: 0.4rem 0.9rem; color: #fff;
    font-family: var(--lex-font-display); font-size: 0.85rem;
}

@media (max-width: 768px) {
    .lex-footer-top { gap: 2rem; }
    .lex-footer-brand { flex: 1 1 100%; max-width: 100%; }
    .lex-footer-col { flex: 1 1 40%; }
    .lex-footer-bottom { flex-direction: column; text-align: center; }
}

/* ==========================================================================
   RÉCOMPENSES VOTE — barres de chance
   ========================================================================== */
.lex-rewards { display: flex; flex-direction: column; gap: 12px; }

.lex-reward {
    background: var(--lex-panel);
    border: 2px solid var(--lex-line);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
    box-shadow: 0 3px 0 var(--lex-line);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.lex-reward:hover {
    border-color: var(--lex-copper);
    box-shadow: 0 3px 0 var(--lex-copper-d);
}

.lex-reward-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.55rem; gap: 1rem;
}
.lex-reward-name {
    font-family: var(--lex-font-display); font-weight: 500;
    font-size: 1rem; color: var(--lex-ink);
    display: flex; align-items: center; gap: 0.6rem;
}
.lex-reward-name i { color: var(--lex-copper); font-size: 1.2rem; }
.lex-reward-name img {
    width: 32px; height: 32px; border-radius: 6px;
    object-fit: contain; image-rendering: pixelated;
}
.lex-reward-pct {
    font-family: var(--lex-font-display); font-weight: 700;
    color: var(--lex-copper-d); font-size: 0.95rem; white-space: nowrap;
}
.lex-reward-track {
    height: 9px; background: rgba(58,42,32,0.1);
    border-radius: 10px; overflow: hidden;
}
.lex-reward-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lex-ember), var(--lex-copper));
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
    transition: width 0.6s ease;
}

/* ==========================================================================
   CHAMP MOT DE PASSE — bouton œil (afficher/masquer)
   ========================================================================== */
.lex-pass-wrap {
    position: relative;
    display: block;
}
.lex-pass-wrap input {
    width: 100%;
    padding-right: 2.8rem !important;
}
.lex-pass-toggle {
    position: absolute;
    top: 50%; right: 0.6rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--lex-copper, #c8763c);
    cursor: pointer;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    transition: color 0.15s ease;
}
.lex-pass-toggle:hover {
    color: var(--lex-brick, #b8483a);
}
.lex-pass-toggle:focus {
    outline: none;
}

/* ==========================================================================
   BOUTON DISCORD (hero) — bleu Discord officiel, texte blanc
   ========================================================================== */
.lex-discord-btn {
    background: #5865f2 !important;
    color: #fff !important;
    border: none !important;
    font-family: var(--lex-font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 0 #3c45c4, 0 8px 20px -6px rgba(88,101,242,0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-shadow: none;
}
.lex-discord-btn:hover {
    background: #4752e0 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #3c45c4, 0 12px 26px -6px rgba(88,101,242,0.7);
}
.lex-discord-btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 0 #3c45c4;
}
.lex-discord-btn i {
    color: #fff !important;
}

/* ==========================================================================
   RÉCOMPENSE PODIUM dans le classement vote
   ========================================================================== */
.lvr-votes {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: flex-end;
}
.lvr-reward {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(200,118,60,0.12);
    border: 1px solid var(--lex-line);
    color: var(--lex-copper-d);
    font-family: var(--lex-font-display);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    white-space: nowrap;
}
.lvr-reward i { color: var(--lex-copper); font-size: 0.85rem; }

@media (max-width: 576px) {
    .lvr-reward { display: none; }
}

/* Afficher les images Tebex en entier */
.card img.card-img-top[src*="cloudfront.net/packages/images/"] {
    object-fit: contain !important;
}




