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

html {
    /* clip plutot que hidden : preserve position: sticky sur les descendants */
    overflow-x: clip;
    background: var(--color-background);
}
body {
    position: relative;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background: transparent;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-height: 100vh;
}

/* Fond parchemin : grain de papier discret + halo lumineux en haut */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background-color: #e0d6bd;
    background-image:
        repeating-linear-gradient(0deg, rgba(60,50,30,.035) 0 2px, transparent 2px 6px),
        repeating-linear-gradient(90deg, rgba(60,50,30,.025) 0 2px, transparent 2px 7px),
        radial-gradient(900px 480px at 50% 0%, #ece3cd, #e0d6bd 72%, #d9cfb4 100%);
}

a { color: var(--color-accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-text); }

img { max-width: 100%; height: auto; display: block; }

/* Sprites Pokemon : rendu pixel-perfect (look GBA upscale) */
.card img,
.detail-header img,
.coming-soon-card img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: var(--line-height-tight);
    color: var(--color-text);
    letter-spacing: -.01em;
}
/* Tailles calibrees pour Inter (echelle classique) */
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

/* ===== Layout ===== */
.container {
    width: 100%;
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: 6rem;
}
@media (max-width: 1200px) {
    .container { padding-inline: 3rem; }
}
@media (max-width: 900px) {
    .container { padding-inline: 1.5rem; }
}
@media (max-width: 480px) {
    .container { padding-inline: 1rem; }
}

/* ===== Header / Nav =====
   Couleurs hardcodees (violet #6c5ce7 + turquoise #00cec9) pour que le
   header soit visuellement identique sur PokeMMO, Pokemon Champions,
   le chooser et /app/. L'identite rouge/jaune de PokeMMO reste dans
   le reste du site (boutons, badges, accents). */
.site-header {
    background: var(--color-secondary);
    position: sticky;
    top: 0;
    z-index: 100;
    /* Stabilise le header sticky pendant le scroll mobile (barre d'URL qui
       redimensionne le viewport) : couche de composition dédiée, anti-jitter
       sous-pixel. will-change:transform garde .site-header comme containing
       block du menu mobile (position:absolute). */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
/* Barre dégradée jaune (PokeMMO) → blanc → violet (Champions) pour signaler
   l'identité bi-jeu du site, identique au gradient du footer. */
.site-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        rgba(255, 203, 5, 0) 0%,
        rgba(255, 203, 5, .9) 30%,
        rgba(255, 255, 255, .9) 50%,
        rgba(108, 92, 231, .9) 70%,
        rgba(108, 92, 231, 0) 100%);
    pointer-events: none;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: .75rem;
}

/* Le logo conserve la police "retro" Press Start 2P pour preserver
   l'identite Pokemon. Reduction de la taille pour compenser la densite
   de la police pixel. */
.site-logo {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 400;
    color: #fff;
    display: flex;
    align-items: center;
    gap: .6rem;
    letter-spacing: -.01em;
}
.site-logo img {
    height: 46px;
    width: auto;
    max-width: 58vw;
    display: block;
}
.site-logo span { color: #ffcb05; }

.main-nav { display: flex; gap: .25rem; align-items: center; }
.main-nav a {
    color: var(--color-on-dark-muted);
    padding: .5rem .75rem;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: var(--font-weight-medium);
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.main-nav a img.game-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}
.main-nav a:hover,
.main-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.lang-switcher {
    display: flex;
    gap: 2px;
    margin-left: .5rem;
    padding-left: .75rem;
}
.lang-btn {
    color: var(--color-on-dark-muted);
    padding: .35rem .5rem;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: var(--font-weight-bold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
}
/* Indicateur de focus clavier (accessibilite WCAG 2.4.7) */
.main-nav a:focus-visible,
.nav-toggle:focus-visible,
.lang-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}
.lang-btn.active {
    color: #fff;
    background: rgba(108, 92, 231, .25);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--color-on-dark);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Main content ===== */
main {
    min-height: calc(100vh - 70px - 80px);
    padding: 2rem 0;
}

/* ===== Cards grid ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.card {
    background: linear-gradient(180deg, var(--color-surface-elevated) 0%, var(--color-surface) 100%);
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 12px;
    padding: 1.4rem 1rem 1.1rem;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 22px -12px rgba(20,18,15,.45);
}
.card-dex-number {
    position: absolute;
    top: .5rem;
    right: .6rem;
    font-size: .9rem;
    font-weight: 700;
    color: var(--color-text-light);
    opacity: .6;
}

.card img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    image-rendering: pixelated;
    margin-bottom: .5rem;
}
.card img.card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    image-rendering: auto;
    border-radius: 6px;
}

.card .card-name {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
    font-size: .95rem;
    line-height: 1.35;
    word-break: break-word;
}

.card .card-sub {
    color: var(--color-text-light);
    font-size: .85rem;
    margin-top: .25rem;
}

/* ===== Type badges ===== */
.type-badge {
    display: inline-block;
    padding: .15rem .6rem;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    color: #fff;
    letter-spacing: .03em;
}

.type-normal    { background: #9099a1; }
.type-fire      { background: #ff612c; }
.type-water     { background: #2c8cff; }
.type-grass     { background: #3fa129; }
.type-electric  { background: #fac100; color: #1a1a2e; }
.type-ice       { background: #47c8c8; }
.type-fighting  { background: #ff8000; }
.type-poison    { background: #9141cb; }
.type-ground    { background: #915121; }
.type-flying    { background: #78a2ff; }
.type-psychic   { background: #ef3f7a; }
.type-bug       { background: #91a119; }
.type-rock      { background: #afa981; }
.type-ghost     { background: #704170; }
.type-dragon    { background: #5060e0; }
.type-dark      { background: #50413f; }
.type-steel     { background: #60a0b0; }

/* ===== Tables ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: 10px;
    overflow: hidden;
}
.data-table th {
    background: rgba(0,0,0,.05);
    padding: .65rem .9rem;
    text-align: left;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-light);
    font-family: var(--font-heading);
}
.data-table td {
    padding: .5rem .9rem;
    border-top: 1px solid rgba(0,0,0,.04);
    font-size: 1.05rem;
}
.data-table tr:hover td {
    background: rgba(0,0,0,.02);
}

/* ===== Stat bars ===== */
.stat-bar-wrap {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.stat-label {
    width: 70px;
    font-size: .85rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-light);
    text-align: right;
}
.stat-bar {
    flex: 1;
    height: 10px;
    background: rgba(0,0,0,.08);
    border-radius: 5px;
    overflow: hidden;
}
.stat-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width .6s ease;
}
.stat-value {
    width: 35px;
    font-size: .85rem;
    font-weight: var(--font-weight-bold);
}

/* ===== Search ===== */
.search-box {
    width: 100%;
    max-width: 500px;
    position: relative;
    margin-bottom: 1.5rem;
}
.search-box input {
    width: 100%;
    padding: .75rem 1rem .75rem 2.5rem;
    background: var(--color-surface);
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 8px;
    color: var(--color-text);
    font-size: var(--text-base);
    outline: none;
    transition: border-color .2s;
}
.search-box input:focus {
    border-color: var(--color-primary);
}
.search-box i {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
}

/* ===== Filters ===== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}
.filter-btn {
    padding: .4rem .8rem;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 6px;
    background: transparent;
    color: var(--color-text-light);
    font-size: .8rem;
    cursor: pointer;
    transition: all .2s;
}
.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* ===== Detail page ===== */
.detail-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--color-surface);
    border-radius: 12px;
}
.detail-header img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    image-rendering: pixelated;
}
.detail-header img.detail-img {
    width: 320px;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    image-rendering: auto;
    border-radius: 8px;
}
.detail-info h1 { margin-bottom: .5rem; }
.detail-types { display: flex; gap: .5rem; margin-bottom: .75rem; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-section {
    background: var(--color-surface);
    border-radius: 10px;
    padding: 1.25rem;
}
.info-section h2 {
    font-size: var(--text-lg);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

/* ===== Stat Bars ===== */
.stat-table { width: 100%; border-collapse: collapse; }
.stat-table td { padding: .3rem .5rem; font-size: .9rem; white-space: nowrap; }
.stat-table .stat-label { color: var(--color-text-light); width: 80px; }
.stat-table .stat-value { width: 40px; text-align: right; font-weight: var(--font-weight-bold); color: var(--color-text); }
.stat-table .stat-bar-cell { width: 100%; }
.stat-bar { height: 10px; border-radius: 5px; background: rgba(0,0,0,.08); overflow: hidden; }
.stat-bar-fill { height: 100%; border-radius: 5px; transition: width .5s ease; }
.stat-bar-fill.stat-low { background: #e3350d; }
.stat-bar-fill.stat-mid { background: #f0c040; }
.stat-bar-fill.stat-high { background: #4caf50; }
.stat-bar-fill.stat-max { background: #00c8ff; }
.stat-total { font-size: 1rem; font-weight: var(--font-weight-bold); color: var(--color-accent); padding-top: .5rem; border-top: 1px solid rgba(0,0,0,.08); }

/* ===== Pokemon Info Card ===== */
.pkmn-info-row { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.pkmn-info-row:last-child { border-bottom: none; }
.pkmn-info-label { color: var(--color-text-light); font-size: .85rem; }
.pkmn-info-value { color: var(--color-text); font-weight: var(--font-weight-medium); font-size: .9rem; }

/* ===== Move Tabs ===== */
.move-tabs { display: flex; gap: 2px; margin-bottom: 1rem; flex-wrap: wrap; }
.move-tab {
    padding: .5rem .75rem;
    background: rgba(0,0,0,.05);
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: var(--font-weight-medium);
    transition: all .2s;
}
.move-tab:hover { background: rgba(0,0,0,.06); color: var(--color-text); }
.move-tab.active { background: var(--color-primary); color: #fff; }
.move-panel { display: none; }
.move-panel.active { display: block; }

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: .25rem;
    margin-top: 2rem;
}
.pagination a, .pagination span {
    padding: .5rem .75rem;
    border-radius: 6px;
    font-size: .9rem;
}
.pagination a { background: var(--color-surface); color: var(--color-text-light); }
.pagination a:hover { background: var(--color-primary); color: #fff; }
.pagination .current { background: var(--color-primary); color: #fff; }

/* ===== Footer ===== */
.site-footer {
    background: var(--color-secondary);
    border-top: 1px solid rgba(255,255,255,.06);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--color-on-dark-muted);
    font-size: .85rem;
}
.site-footer a { color: var(--color-on-dark); }
.site-footer a:hover { color: #fff; }

/* ===== Hero (homepage) ===== */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero p {
    font-size: var(--text-lg);
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.quick-stats {
    display: flex;
    gap: .75rem;
    max-width: 900px;
    margin: 0 auto 3rem;
    justify-content: center;
}
.quick-stat {
    background: var(--color-surface);
    border-radius: 10px;
    padding: 1rem .75rem;
    text-align: center;
    flex: 1;
    min-width: 0;
}
@media (max-width: 600px) {
    .quick-stats { flex-wrap: wrap; }
    .quick-stat { flex: 0 0 calc(33.33% - .5rem); }
}
.quick-stat .stat-num {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent);
}
.quick-stat .stat-label {
    width: auto;
    text-align: center;
    margin-top: .25rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.section-header h2 { margin: 0; }
.section-header a { font-size: .9rem; }

/* ===== Homepage Dashboard ===== */
.home-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-panel {
    background: var(--color-surface);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid rgba(0,0,0,.06);
}

.dashboard-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.dashboard-panel-header h2 {
    font-size: var(--text-lg);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.dashboard-panel-header h2 i {
    color: var(--color-primary);
}

.news-entry {
    padding: .75rem 0;
    border-bottom: 1px solid rgba(0,0,0,.04);
}
.news-entry:last-child { border-bottom: none; }

.news-date {
    font-size: .75rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: .35rem;
}

.news-title {
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    font-size: .9rem;
    margin-top: .15rem;
}

.news-body {
    font-size: .8rem;
    color: var(--color-text-light);
    margin-top: .25rem;
    line-height: 1.4;
}

.news-empty {
    color: var(--color-text-light);
    font-size: .85rem;
    padding: 1rem 0;
}

.home-timer-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 0;
    border-bottom: 1px solid rgba(0,0,0,.04);
}
.home-timer-card:last-child { border-bottom: none; }

.home-timer-icon {
    font-size: 1.2rem;
    color: var(--color-primary);
    width: 24px;
    text-align: center;
}

.home-timer-info { flex: 1; min-width: 0; }

.home-timer-name {
    font-size: .85rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-timer-bar {
    height: 4px;
    background: rgba(0,0,0,.08);
    border-radius: 2px;
    overflow: hidden;
    margin-top: .3rem;
}

.home-timer-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--color-primary);
    transition: width 1s linear;
}

.home-timer-countdown {
    font-size: .8rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-accent);
    white-space: nowrap;
}

.home-timer-done {
    color: #4caf50;
}

.home-timer-card-done {
    background: rgba(76,175,80,.06);
    border-radius: 6px;
    padding: .6rem .5rem;
    margin: 0 -.5rem;
}

.home-timer-icon-done {
    color: #4caf50;
}

.timers-empty-msg {
    color: var(--color-text-light);
    font-size: .85rem;
    padding: 1rem 0;
}
.timers-empty-msg a { font-weight: var(--font-weight-medium); }

/* ===== Tables responsives (scroll horizontal sur mobile) ===== */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-inline: -.5rem;
    padding-inline: .5rem;
}

/* ===== Tablet ===== */
@media (max-width: 1024px) {
    .home-dashboard { grid-template-columns: 1fr 1fr; }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        min-height: 48px;
        padding: .5rem;
    }
    .site-header .container { padding-inline: 1rem; }

    .main-nav {
        /* Menu mobile : overlay ancré à top:100% du header (= juste sous lui),
           quelle que soit la hauteur variable du header (logo + recherche qui
           passe à la ligne). Le containing block est .site-header (sticky).
           z-index au-dessus du contenu, ombre pour le détacher. */
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--color-secondary);
        border-top: 1px solid rgba(255,255,255,.12);
        box-shadow: 0 14px 28px rgba(0,0,0,.35);
        padding: .5rem 1rem .75rem;
        gap: .15rem;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 200;
    }
    .main-nav.open { display: flex; }
    .main-nav a {
        padding: .85rem 1rem;
        font-size: 1rem;
        border-radius: 8px;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .lang-switcher {
        margin-left: 0;
        padding-left: 0;
        padding-top: .5rem;
        margin-top: .5rem;
        border-top: 1px solid rgba(255,255,255,.1);
        justify-content: center;
        gap: .5rem;
    }
    .lang-btn {
        padding: .65rem 1rem;
        font-size: .9rem;
        min-width: 48px;
        text-align: center;
    }
    h1 { font-size: var(--text-2xl); }
    h2 { font-size: var(--text-xl); }
    h3 { font-size: var(--text-lg); }

    main { padding: 1rem 0; }

    .hero { padding: 2rem 0 1.5rem; }
    .hero p { font-size: var(--text-base); }

    .detail-header {
        flex-direction: column;
        text-align: center;
        padding: 1.25rem;
        gap: 1rem;
    }
    .detail-header img { width: 120px; height: 120px; }
    .detail-header img.detail-img { width: 100%; max-width: 100%; height: auto; max-height: 200px; }
    .detail-types { justify-content: center; flex-wrap: wrap; }

    .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
    .card { padding: .75rem; }
    .card img { width: 80px; height: 80px; }

    .info-grid { grid-template-columns: 1fr; gap: 1rem; }
    .info-section { padding: 1rem; }

    .calc-grid { grid-template-columns: 1fr; }
    .calc-field { flex-wrap: wrap; }
    .calc-field input,
    .calc-field select { width: 100%; min-height: 44px; }
    .calc-field label { min-width: 0; flex: 1 0 100%; }

    .home-dashboard { grid-template-columns: 1fr; gap: 1rem; }
    .dashboard-panel { padding: 1rem; }

    /* Tables : scroll horizontal automatique sur les containers communs */
    .info-section,
    .dashboard-panel,
    .calc-section,
    .calc-parent {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .data-table {
        font-size: .85rem;
    }
    .data-table th,
    .data-table td {
        padding: .5rem .6rem;
    }

    .quick-stats {
        gap: .5rem;
        margin-bottom: 2rem;
    }
    .quick-stat {
        padding: .75rem .5rem;
        flex: 0 0 calc(33.33% - .5rem);
        min-height: 48px;
    }
    .quick-stat .stat-num { font-size: var(--text-xl); }

    .filter-bar { gap: .35rem; }
    .filter-btn {
        padding: .55rem .8rem;
        font-size: .85rem;
        min-height: 44px;
    }

    .move-tab {
        padding: .65rem .9rem;
        min-height: 44px;
    }

    .pagination a, .pagination span {
        padding: .65rem .85rem;
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .breadcrumb { font-size: .85rem; }

    .section-header {
        flex-wrap: wrap;
        gap: .5rem;
    }

    /* Search input plein largeur */
    .search-box { max-width: 100%; }
    .search-box input { font-size: 1rem; min-height: 44px; }
}

/* ===== Small mobile ===== */
@media (max-width: 480px) {
    h1 { font-size: var(--text-xl); }
    h2 { font-size: var(--text-lg); }

    .hero { padding: 1.5rem 0 1rem; }

    .quick-stat { flex: 0 0 calc(50% - .25rem); }
    .quick-stat .stat-num { font-size: var(--text-lg); }
    .quick-stat .stat-label { font-size: .8rem; }

    .card-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
    .card { padding: .6rem; }
    .card img { width: 64px; height: 64px; }
    .card .card-name { font-size: .95rem; }

    .detail-header { padding: 1rem; }
    .detail-header img { width: 100px; height: 100px; }

    .info-section { padding: .85rem; }
    .info-section h2 { font-size: 1rem; }

    .data-table th,
    .data-table td { padding: .45rem .5rem; font-size: .8rem; }

    .site-logo { font-size: 1.05rem; }

    .breadcrumb ol { gap: .25rem; font-size: .8rem; }
}

/* ===== Breeding page ===== */
.breeding-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.calc-parent {
    background: var(--color-surface);
    border-radius: 10px;
    padding: 1.25rem;
}
.calc-parent h3 { margin-bottom: 1rem; }
.calc-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .5rem;
}
.calc-field label {
    font-size: .9rem;
    color: var(--color-text-light);
    min-width: 80px;
}
.calc-field input,
.calc-field select {
    background: var(--color-surface-elevated);
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 8px;
    color: var(--color-text);
    padding: .5rem .75rem;
    font-size: .9rem;
    width: 100px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.calc-field input:focus,
.calc-field select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(31,29,25,.18);
}
.calc-field select {
    width: 160px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239898b0' viewBox='0 0 24 24'%3E%3Cpath d='M12 16l-6-6h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;
    padding-right: 2rem;
    cursor: pointer;
}
.calc-field select option {
    background: var(--color-surface-elevated);
    color: var(--color-text);
}
.calc-iv { text-align: center; }

.egg-group-section .egg-group-content {
    display: none;
    padding-top: .75rem;
}
.egg-group-section.open .egg-group-content { display: block; }
.egg-group-arrow { transition: transform .2s; }
.egg-group-section.open .egg-group-arrow { transform: rotate(90deg); }

.egg-pokemon-card {
    padding: .5rem;
}
.egg-pokemon-card img {
    width: 48px;
    height: 48px;
}

/* Calculator - new planner */
.calc-section {
    background: var(--color-surface);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.calc-section h3 { margin-bottom: .75rem; }
.calc-iv-checks {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.calc-check {
    display: flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    background: var(--color-bg);
    padding: .4rem .75rem;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,.1);
    transition: border-color .2s;
}
.calc-check:has(input:checked) {
    border-color: var(--color-primary);
}
.calc-check input { accent-color: var(--color-primary); }
.calc-check-label { font-size: .9rem; }
.calc-presets {
    display: flex;
    gap: .5rem;
    margin-top: .75rem;
    flex-wrap: wrap;
}
.calc-prices-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Summary cards */
.calc-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.calc-summary-card {
    background: var(--color-surface);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
}
.calc-summary-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: .5rem;
}
.calc-summary-value {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
}
.calc-summary-label {
    font-size: .85rem;
    color: var(--color-text-light);
    margin-top: .25rem;
}

/* Breeding tree */
.tree-node { margin-left: 1.5rem; position: relative; }
.tree-node.depth-0 { margin-left: 0; }
.tree-node::before {
    content: '';
    position: absolute;
    left: -.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0,0,0,.1);
}
.tree-node.depth-0::before { display: none; }
.tree-breed {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .5rem 0;
}
.tree-result {
    background: var(--color-surface);
    padding: .4rem .8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: .9rem;
    border: 1px solid var(--color-primary);
}
.tree-items {
    font-size: .8rem;
    color: var(--color-text-light);
}
.tree-leaf {
    padding: .3rem 0;
    font-size: .85rem;
    color: var(--color-text-light);
}
.tree-children { padding-left: .5rem; }

/* Progress bar */
.calc-progress-bar {
    height: 8px;
    background: var(--color-surface);
    border-radius: 4px;
    overflow: hidden;
}
.calc-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    transition: width .3s ease;
}

/* Interactive tree nodes */
.tree-clickable {
    cursor: pointer;
    user-select: none;
    transition: opacity .2s;
}
.tree-clickable:hover {
    opacity: .8;
}
.tree-check {
    margin-right: .4rem;
    font-size: 1.1rem;
    vertical-align: middle;
}
.tree-check i { color: rgba(0,0,0,.3); }
.tree-clickable.done .tree-check i { color: #4ade80; }
.tree-clickable.done {
    opacity: .5;
}
.tree-clickable.done .tree-result {
    text-decoration: line-through;
    border-color: #4ade80;
}

/* Advanced options accordion */
.calc-advanced-toggle {
    transition: border-color .2s;
}
.calc-advanced-toggle:hover {
    border-color: rgba(0,0,0,.15);
}
.calc-adv-arrow {
    transition: transform .2s;
    font-size: 1.2rem;
}
.calc-advanced-toggle.open .calc-adv-arrow {
    transform: rotate(90deg);
}
.calc-advanced-content {
    display: none;
    margin-top: -.5rem;
}
.calc-advanced-content.open {
    display: block;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: var(--text-sm, .9rem);
    color: var(--color-text-light, #aaa);
}
.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: 0;
    margin: 0;
}
.breadcrumb li {
    display: flex;
    align-items: center;
}
.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: .35rem;
    color: var(--color-text-light, #777);
    opacity: .6;
}
.breadcrumb a {
    color: var(--color-accent);
}
.breadcrumb [aria-current="page"] {
    color: var(--color-text, #fff);
    opacity: .85;
}

/* ===== Recherche globale du header (N&B parchemin) ===== */
.header-search {
    position: relative;
    flex: 1 1 240px;
    max-width: 440px;
    margin: 0 1rem;
}
.header-search { position: relative; flex: 1 1 240px; max-width: 440px; margin: 0 1rem; }
.header-search > i {
    position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
    color: var(--color-on-dark); font-size: 1.1rem; pointer-events: none; z-index: 2;
}
.header-search input {
    width: 100%; height: 42px; padding: 0 .9rem 0 2.2rem;
    border-radius: 8px; border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08); color: var(--color-on-dark); font-size: .9rem;
    outline: none; transition: border-color .2s, background .2s;
}
.header-search input::placeholder { color: var(--color-on-dark-muted); }
.header-search input:focus { border-color: var(--color-on-dark); background: rgba(255,255,255,.14); }

.header-search-results {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 200;
    background: var(--color-surface-elevated); border: 1px solid rgba(0,0,0,.18); border-radius: 10px; padding: .35rem;
    box-shadow: 0 14px 34px rgba(20,18,15,.28); max-height: 72vh; overflow-y: auto;
}
.header-search-results.open { display: block; }
.hsr-group-title {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--color-text-light); font-weight: 700; padding: .45rem .6rem .2rem;
}
.hsr-item {
    display: flex; align-items: center; gap: .6rem; padding: .42rem .6rem;
    border-radius: 7px; color: var(--color-text); text-decoration: none;
}
.hsr-item:hover, .hsr-item.active { background: rgba(0,0,0,.06); color: var(--color-text); }
.hsr-item img {
    width: 34px; height: 34px; object-fit: contain; border-radius: 5px;
    background: var(--color-surface); border: 1px solid rgba(0,0,0,.12); flex-shrink: 0;
    image-rendering: pixelated;
}
.hsr-item .hsr-name { font-weight: 600; font-size: .9rem; }
.hsr-item .hsr-sub { margin-left: auto; font-size: .74rem; color: var(--color-text-light); white-space: nowrap; }
.hsr-empty { padding: .6rem .7rem; color: var(--color-text-light); font-size: .85rem; }

/* ===== Menus deroulants du header (Guides, Langue) ===== */
.nav-dd, .lang-dd { position: relative; }
.nav-dd-toggle, .lang-dd-toggle {
    background: transparent; border: none; cursor: pointer; font-family: var(--font-primary);
    color: var(--color-on-dark-muted); padding: .5rem .75rem; border-radius: 6px;
    font-size: .9rem; font-weight: var(--font-weight-medium);
    display: inline-flex; align-items: center; gap: .4rem; transition: all .2s;
}
.nav-dd-toggle:hover, .lang-dd-toggle:hover,
.nav-dd-toggle.active, .nav-dd.open .nav-dd-toggle, .lang-dd.open .lang-dd-toggle {
    color: #fff; background: rgba(255,255,255,.08);
}
.nav-dd-caret { font-size: 1rem; transition: transform .2s; }
.nav-dd.open .nav-dd-caret, .lang-dd.open .nav-dd-caret { transform: rotate(180deg); }
.nav-dd-menu {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; z-index: 200;
    background: var(--color-secondary); border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
    padding: .35rem; box-shadow: 0 14px 30px rgba(0,0,0,.4);
}
.lang-dd-menu { left: auto; right: 0; min-width: 165px; }
.nav-dd.open .nav-dd-menu, .lang-dd.open .nav-dd-menu { display: block; }
.nav-dd-menu a {
    display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; border-radius: 7px;
    color: var(--color-on-dark-muted); font-size: .9rem; text-decoration: none;#fff; }
.nav-dd-menu a i { font-size: 1.05rem; }
.flag {
    width: 21px; height: 14px; border-radius: 2px; display: inline-block;
    vertical-align: -3px; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(0,0,0,.18);
}

/* Logo header (wordmark) */
.site-header .site-logo img { height: 46px; width: auto; }

@media (max-width: 900px) {
    .header-search { max-width: 280px; }
}
@media (max-width: 768px) {
    .header-search { order: 3; flex-basis: 100%; margin: .15rem 0 .55rem; max-width: none; }
    .site-header .container { flex-wrap: wrap; height: auto; padding-top: .6rem; padding-bottom: .35rem; }
    .nav-dd, .lang-dd { width: 100%; }
    .nav-dd-toggle, .lang-dd-toggle { width: 100%; justify-content: flex-start; }
    .nav-dd-menu { position: static; box-shadow: none; margin: .15rem 0 .15rem 1rem; min-width: 0; }
    .lang-dd-menu { right: auto; left: 0; }
}

/* ===== Durcissement responsive (audit 2026) =====
   Règles transverses appliquées à toutes les pages /Pokemmo/ pour éviter les
   débordements horizontaux et garantir des cibles tactiles >=44px. */

/* Filet de sécurité : une table de données placée directement dans le flux
   (sans wrapper overflow) scrolle au lieu de casser la largeur de page. */
@media (max-width: 768px) {
    main .container > .data-table,
    main .container > table.data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Les tables de stats peuvent renvoyer à la ligne plutôt que déborder. */
    .stat-table td { white-space: normal; }
    /* En-tête de fiche : réduit l'écart quand il reste en ligne (480-768). */
    .detail-header { gap: 1rem; }
}

/* Très petits écrans : tout conteneur de cartes reste en 2 colonnes nettes
   et les encarts à largeur max ne débordent jamais le viewport. */
@media (max-width: 380px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
}

/* Encarts texte à largeur max centrée (about, guides, alerts) : ne jamais
   dépasser la largeur dispo, quel que soit le style inline appliqué. */
@media (max-width: 600px) {
    div[style*="max-width"] { max-width: 100% !important; }
}

/* ===== Carrousel horizontal (Pokemon en vedette) ===== */
.dex-carousel { position: relative; }
.dex-track {
    display: grid; grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3rem) / 4);
    grid-template-columns: none;
    gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-behavior: smooth; padding: .25rem 2px .5rem;
    scrollbar-width: none; -ms-overflow-style: none;
}
.dex-track::-webkit-scrollbar { display: none; }
.dex-track > .card { scroll-snap-align: start; }
.dex-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    background: var(--color-secondary); color: var(--color-on-dark);
    border: 1px solid rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; box-shadow: 0 4px 12px rgba(20,18,15,.25); transition: opacity .2s, transform .15s;
}
.dex-nav:hover { transform: translateY(-50%) scale(1.06); }
.dex-prev { left: -8px; }
.dex-next { right: -8px; }
.dex-nav:disabled { opacity: 0; pointer-events: none; }
@media (max-width: 768px) { .dex-nav { display: none; } }
/* dex-track 2-cols : 2 cartes visibles sur mobile */
@media (max-width: 760px) { .dex-track { grid-auto-columns: calc((100% - 1rem) / 2); } }


/* ============================================================
   Ajouts specifiques Palworld.
   Tout ce qui precede est la copie exacte du main.css PokeMMO
   (source unique du rendu) : ne pas editer au-dessus de cette
   ligne, reporter plutot les evolutions depuis PokeMMO.
   ============================================================ */

/* Drapeaux du selecteur de langue (svg inline dans le header) */
.flag { width: 18px; height: auto; border-radius: 2px; display: inline-block; }

/* Footer : markup + styles dans components/site-footer.php (patron PokeMMO) */

/* ===== Tier list (bandes S/A/B/C/D) ===== */
.tier-note {
    display: flex; align-items: flex-start; gap: .5rem;
    color: var(--color-text-light); font-size: .88rem; line-height: 1.5;
    margin-bottom: 1.25rem; max-width: 780px;
}
.tier-note i { color: var(--color-primary); margin-top: .1rem; flex-shrink: 0; }

/* Bandeau d'annonce (ex : Pals 1.0 à venir sur le Paldex) */
.pal-update-banner {
    display: flex; align-items: flex-start; gap: .8rem;
    background: linear-gradient(180deg, var(--color-surface-elevated), var(--color-surface));
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 12px;
    padding: .9rem 1.15rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.pal-update-banner > i { font-size: 1.5rem; color: var(--color-primary); flex-shrink: 0; margin-top: .1rem; }
.pal-update-banner strong { display: block; font-weight: 800; font-size: 1rem; color: var(--color-text); margin-bottom: .2rem; }
.pal-update-banner p { margin: 0; font-size: .9rem; color: var(--color-text-light); line-height: 1.55; }
.pal-update-banner a { color: var(--color-primary); font-weight: 700; white-space: nowrap; }
.pal-update-banner a:hover { text-decoration: underline; }
.tier-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 2rem; }
.tier-row {
    display: flex; align-items: stretch; border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(0,0,0,.1); background: var(--color-surface-elevated);
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.tier-label {
    flex: 0 0 68px; display: grid; place-items: center;
    font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.9rem; color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.tier-S .tier-label { background: linear-gradient(160deg, #e35b60, #c8353b); }
.tier-A .tier-label { background: linear-gradient(160deg, #ec9a4c, #dd7a2a); }
.tier-B .tier-label { background: linear-gradient(160deg, #e6c451, #d3a72f); }
.tier-C .tier-label { background: linear-gradient(160deg, #63b075, #499a5c); }
.tier-D .tier-label { background: linear-gradient(160deg, #6b96c2, #4d7aa8); }
.tier-pals { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem .6rem; align-content: flex-start; }
.tier-empty { color: var(--color-text-light); font-size: .85rem; padding: .5rem; }
.tier-pal {
    width: 72px; display: flex; flex-direction: column; align-items: center; gap: .1rem;
    padding: .3rem .1rem; border-radius: 8px; text-decoration: none; color: var(--color-text);
    transition: background .15s, transform .12s;
}
.tier-pal:hover { background: rgba(0,0,0,.05); transform: translateY(-2px); color: var(--color-text); }
.tier-pal img { width: 56px; height: 56px; object-fit: contain; }
.tier-pal-name {
    font-size: .68rem; line-height: 1.15; text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
/* Onglet Base : aptitudes de travail (icone + niveau) sous chaque Pal */
.tier-list-base .tier-pal { width: 92px; }
.tier-work { display: flex; flex-wrap: wrap; gap: .1rem .3rem; justify-content: center; margin-top: .2rem; }
.tier-work-item { display: inline-flex; align-items: center; gap: 1px; }
.tier-work-item img { width: 16px; height: 16px; }
.tier-work-item em { font-style: normal; font-size: .62rem; font-weight: 700; color: var(--color-text-light); }
@media (max-width: 560px) {
    .tier-label { flex-basis: 48px; font-size: 1.4rem; }
    .tier-pal { width: 60px; }
    .tier-pal img { width: 46px; height: 46px; }
    .tier-list-base .tier-pal { width: 80px; }
}

/* Badges d'element */
.el-badge {
    display: inline-block; padding: .16rem .5rem; border-radius: 6px;
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff;
}
.el-neutral  { background: #8d99a6; }
.el-fire     { background: #e25822; }
.el-water    { background: #2f86d6; }
.el-grass    { background: #4c9f38; }
.el-electric { background: #d9a400; }
.el-ice      { background: #4db6cf; }
.el-ground   { background: #a0713c; }
.el-dark     { background: #6b4fa0; }
.el-dragon   { background: #7048c8; }

/* Aptitudes de travail sur les cartes du Paldex */
.pal-works { display: flex; gap: .45rem; margin-top: .55rem; flex-wrap: wrap; justify-content: center; }
.pal-work { display: inline-flex; align-items: center; gap: .15rem; }
.pal-work img { width: 20px; height: 20px; }
.pal-work em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--color-text-light); }

/* Fiche Pal */
.pal-num { font-size: .95rem; font-weight: 700; color: var(--color-text-light); }
.pal-hero { display: flex; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; }
.pal-hero-img {
    flex-shrink: 0; width: 180px; height: 180px; border-radius: 16px;
    display: grid; place-items: center;
    background: var(--color-secondary);
    border: 1px solid rgba(0,0,0,.2);
}
.pal-hero-img img { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.pal-hero-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .4rem; }
.pal-hero-body h1 { margin-bottom: .6rem; }
.pal-facts { list-style: none; display: flex; flex-direction: column; gap: .3rem; color: var(--color-text-light); font-size: .93rem; }
.pal-facts i { color: var(--color-primary); margin-right: .3rem; }

.pal-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.stat-row { display: grid; grid-template-columns: 150px 44px 1fr; align-items: center; gap: .6rem; padding: .35rem 0; }
.stat-row .stat-label { font-size: .88rem; color: var(--color-text-light); width: auto; }
.stat-row .stat-val { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.stat-row .stat-bar { height: 9px; border-radius: 5px; background: rgba(0,0,0,.1); overflow: hidden; }
.stat-row .stat-bar em { display: block; height: 100%; border-radius: 5px; background: var(--color-primary); }

.pal-suit-list { list-style: none; display: flex; flex-direction: column; gap: .45rem; padding: 0; }
.pal-suit-list li { display: flex; align-items: center; gap: .6rem; }
.pal-suit-list .suit-level { margin-left: auto; font-size: .82rem; font-weight: 700; color: var(--color-accent); letter-spacing: .1em; }
.pal-drop-list { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem .9rem; padding: 0; }
.pal-drop-list li { color: var(--color-text-light); font-size: .92rem; }
.pal-drop-list i { font-size: .5rem; color: var(--color-accent); vertical-align: middle; margin-right: .3rem; }

@media (max-width: 700px) {
    .pal-hero { flex-direction: column; text-align: center; }
    .pal-hero-meta, .pal-facts { justify-content: center; align-items: center; }
    .pal-detail-grid { grid-template-columns: 1fr; }
    .stat-row { grid-template-columns: 120px 40px 1fr; }
}

/* News (listing en lignes) */
.news-rows { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0 2rem; }
.news-row {
    display: flex; gap: 1.1rem; align-items: flex-start;
    padding: 1.1rem 1.25rem; border-radius: 14px;
    background: linear-gradient(180deg, var(--color-surface-elevated) 0%, var(--color-surface) 100%);
    border: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    color: var(--color-text);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.news-row:hover { transform: translateY(-3px); border-color: var(--color-primary); box-shadow: 0 12px 24px -14px rgba(0,0,0,.35); color: var(--color-text); }
.news-row-icon {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 11px;
    display: grid; place-items: center; font-size: 1.45rem;
    background: rgba(31,29,25,.08); color: var(--color-primary);
    border: 1px solid rgba(31,29,25,.18);
}
.news-row-body { min-width: 0; }
.news-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.news-type {
    font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    padding: .2rem .55rem; border-radius: 6px;
    background: var(--color-primary); color: #fff;
}
.news-meta .news-date { font-size: .8rem; color: var(--color-text-light); }
.news-author { font-size: .85rem; color: var(--color-text-light); }
.news-row-title { font-weight: 700; margin: .1rem 0 .35rem; font-size: 1.14rem; line-height: 1.3; color: var(--color-text); }
.news-row-excerpt { margin: 0 0 .55rem; color: var(--color-text-light); font-size: .92rem; line-height: 1.55; }
.news-card-link { font-size: .85rem; font-weight: 600; color: var(--color-accent); display: inline-flex; align-items: center; gap: .25rem; }
.news-row:hover .news-card-link { color: var(--color-primary); }

/* News (article) */
/* Panneau clair "feuille de papier" pose sur le fond parchemin */
.news-article {
    max-width: 760px; margin: 1.25rem auto 0;
    background: var(--color-surface-elevated);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    padding: 2.4rem 2.6rem;
    box-shadow: 0 6px 28px -14px rgba(20,18,15,.22);
}
@media (max-width: 600px) {
    .news-article { padding: 1.5rem 1.3rem; border-radius: 14px; }
}

/* En-tete editorial : meta, gros titre serif, chapo en exergue */
.news-article-head { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 2px solid rgba(0,0,0,.08); }
.news-article-head .news-meta { margin-bottom: 1rem; }
.news-article-head time { font-size: .82rem; color: var(--color-text-light); font-weight: 600; }
.news-article-head h1 {
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.4rem);
    font-weight: 700; line-height: 1.18; letter-spacing: .005em;
    margin: .35rem 0 .9rem;
}
.news-article-lead {
    font-size: 1.16rem; line-height: 1.65; color: var(--color-text-light); margin: 0;
}

/* Image de couverture */
.news-article-cover { margin: 0 0 2rem; }
.news-article-cover img { width: 100%; height: auto; border-radius: 16px; display: block; box-shadow: 0 10px 34px -14px rgba(20,18,15,.45); }

/* Corps : confort de lecture (mesure ~68 caracteres, interligne aere) */
.news-article-body { font-size: 1.06rem; line-height: 1.8; color: var(--color-text); }
.news-article-body > p:first-of-type { font-size: 1.13rem; }
.news-article-body p { margin: 0 0 1.25rem; }
.news-article-body strong { font-weight: 700; color: var(--color-text); }

/* Sous-titres eventuels (barre d'accent encre) */
.news-article-body h2 {
    font-family: 'Cinzel', Georgia, serif; font-size: 1.45rem; font-weight: 700; line-height: 1.25;
    margin: 2.2rem 0 .85rem; display: flex; align-items: center; gap: .55rem;
}
.news-article-body h2::before { content: ""; width: 5px; height: 1.05em; border-radius: 3px; background: var(--color-primary); flex-shrink: 0; }
.news-article-body h3 { font-size: 1.18rem; font-weight: 700; margin: 1.7rem 0 .6rem; }

/* Listes a puces custom (marqueur encre) + numerotees */
.news-article-body ul { list-style: none; margin: 0 0 1.35rem; padding: 0; }
.news-article-body ul li { position: relative; padding-left: 1.6rem; margin: .6rem 0; line-height: 1.65; }
.news-article-body ul li::before {
    content: ""; position: absolute; left: .15rem; top: .62em;
    width: 8px; height: 8px; border-radius: 50%; background: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
.news-article-body ol { margin: 0 0 1.35rem; padding-left: 1.5rem; }
.news-article-body ol li { margin: .6rem 0; padding-left: .2rem; line-height: 1.65; }
.news-article-body ol li::marker { color: var(--color-primary); font-weight: 700; }

/* Liens editoriaux (encre soulignee) + citations + images inline */
.news-article-body a { color: var(--color-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.news-article-body a:hover { text-decoration-thickness: 2px; }
.news-article-body blockquote {
    margin: 1.6rem 0; padding: .9rem 1.3rem; border: 1px solid rgba(0,0,0,.12);
    background: var(--color-surface); border-radius: 10px; color: var(--color-text-light); font-style: italic;
}
.news-article-body img { max-width: 100%; height: auto; border-radius: 12px; margin: 1rem 0; }
.news-article-cta { margin: 1.75rem 0 .5rem; }
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .75rem 1.4rem; border-radius: 10px; font-weight: 700;
    background: var(--color-primary); color: #fff;
    transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(0,0,0,.4); color: #fff; }
.news-article-nav { display: flex; align-items: stretch; gap: .75rem; margin: 2.5rem auto 1rem; max-width: 760px; }
.news-article-nav-link {
    display: flex; align-items: center; gap: .4rem; flex: 1; min-width: 0;
    padding: .75rem .95rem; border-radius: 10px;
    background: linear-gradient(180deg, var(--color-surface-elevated) 0%, var(--color-surface) 100%);
    border: 1px solid rgba(0,0,0,.10); color: var(--color-text);
    font-size: .85rem; transition: border-color .2s, box-shadow .2s;
}
.news-article-nav-link:hover { border-color: var(--color-primary); box-shadow: 0 6px 16px -10px rgba(0,0,0,.3); color: var(--color-text); }
.news-article-nav-link.next { justify-content: flex-end; text-align: right; }
.news-article-nav-link.center { flex: 0 0 auto; color: var(--color-text-light); }
.news-article-nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
    .news-article-nav { flex-direction: column; }
    .news-article-nav-link.center { order: 3; justify-content: center; }
    .news-row { padding: 1rem; gap: .85rem; }
    .news-row-icon { width: 40px; height: 40px; font-size: 1.25rem; }
}

/* Liste "a venir" (panneau dashboard de la home) */
.coming-list { list-style: none; padding: 0; }
.coming-list li { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; color: var(--color-text-light); line-height: 1.55; }
.coming-list li i { color: var(--color-accent); margin-top: .15rem; }

/* Bandeau Discord generique (news/article ; la home a sa variante inline) */
.discord-cta {
    display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
    margin-top: 2rem; padding: 1.4rem 1.5rem; border-radius: 14px;
    background: var(--color-secondary);
    color: var(--color-on-dark);
}
.discord-cta h2, .discord-cta-text h2 { color: #fff; margin-bottom: .25rem; font-size: var(--text-lg); }
.discord-cta p, .discord-cta-text p { color: var(--color-on-dark-muted); margin: 0; }
.discord-cta-icon { font-size: 2.2rem; color: var(--color-on-dark); flex-shrink: 0; }
.discord-cta .btn { margin-left: auto; }
@media (max-width: 600px) { .discord-cta { flex-direction: column; text-align: center; } .discord-cta .btn { margin-left: 0; } }

/* Les rendus de Pals sont des images lisses (pas des sprites pixel-art) :
   on annule le rendu pixelise herite du CSS PokeMMO. */
.card img { image-rendering: auto; }

/* Dropdowns de filtre (copie PokemonChampions : .filter-row / .filter-select) */
.filter-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: .55rem 2.1rem .55rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,.2);
    background-color: var(--color-surface-elevated);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a1a18' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right .65rem center;
    background-size: 1rem;
    color: var(--color-text);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: .9rem;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.filter-select:hover { border-color: var(--color-primary); }
.filter-select:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(0,0,0,.05); }
.filter-select option { color: #1a1a18; background: #fdfaf0; }
@media (max-width: 420px) {
    .filter-row { flex-direction: column; align-items: stretch; gap: .5rem; }
    .filter-select { width: 100%; flex: none; }
}
