/* ═══════════════════════════════════════════════════════════════════════════
   FLUX.IO — Styles Version 7.0 (nettoyé)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ==================== VARIABLES CSS ==================== */
:root {
    --primary:         #f7a64f;
    --primary-dark:    #e89540;
    --success:         #51CF66;
    --error:           #FF8787;
    --bg:              #222;
    --surface:         #2C2E33;
    --surface-mid:     #444;
    --surface-hover:   #3a3939;
    --text:            #FFFFFF;
    --text-muted:      #C1C2C5;
    --border:          rgba(255,255,255,.10);
    --border-faint:    rgba(255,255,255,.05);
    --font:            'Verdana', Geneva, Tahoma, sans-serif;
    --t-fast:          .18s;
    --t-normal:        .25s;
    --t-slow:          .3s;
    --shadow-sm:       0 2px 8px rgba(0,0,0,.2);
    --shadow-md:       0 4px 16px rgba(0,0,0,.4);
    --shadow-lg:       0 10px 36px rgba(0,0,0,.55);
    --radius-sm:       4px;
    --radius-md:       8px;
    --radius-lg:       12px;
    --radius-xl:       16px;
    --header-h:        56px;
    --ticker-h:        40px;
    --top-offset:      calc(var(--header-h) + var(--ticker-h));
}

/* ==================== RESET & BASE ==================== */
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==================== SKIP LINK ==================== */
.skip-link {
    position: absolute; top: -100px; left: 0;
    background: var(--primary); color: #fff;
    padding: .5rem 1rem; text-decoration: none;
    z-index: 9999; font-family: var(--font);
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ==================== HEADER ==================== */
.header {
    position: sticky;
    top: 0; z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: var(--header-h);
    width: 100%;
    background: #16181d;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    box-shadow: var(--shadow-md);
    gap: 1rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: var(--font);
    transition: color var(--t-fast);
}
.logo:hover { color: #ffb870; }
.logo:active { transform: scale(.98); }
.logo:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: var(--radius-sm); }

.header-right-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow: hidden;
    min-width: 0;
}

.market-selector {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: .82rem;
    font-family: var(--font);
    cursor: pointer;
    flex-shrink: 1;
    min-width: 0;
    max-width: 180px;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: border-color var(--t-normal);
}
.market-selector:hover { border-color: var(--primary); }
.market-selector:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ==================== SLIDER ==================== */
.slider-container {
    position: relative;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    aspect-ratio: 16 / 5; /* ratio desktop */
    overflow: hidden;
}
/* Toutes les slides en position absolue empilées */
.slider-container .slider { position: absolute; inset: 0; }
.slider-container .slide {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.slider-container .slide.active {
    opacity: 1;
    pointer-events: auto;
}
.slider-container .slide a { display: block; width: 100%; height: 100%; }
.slider-container .slide img { display: block; width: 100%; height: 100%; object-fit: cover; }

.slider-controls {
    position: absolute; bottom: 1rem; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: .5rem; z-index: 10;
}
.slider-dot {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,.5); cursor: pointer;
    transition: background var(--t-fast); border: none; padding: 0;
}
.slider-dot.active            { background: var(--primary); }
.slider-dot:hover:not(.active){ background: rgba(255,255,255,.7); }
.slider-dot:focus-visible     { outline: 2px solid #fff; outline-offset: 2px; }

/* ==================== HERO SECTION ==================== */
.hero-section {
    width: 100%;
    background: linear-gradient(180deg, rgba(247,166,79,.04) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255,255,255,.05);
    padding: 1.25rem 1rem;
}
.hero-content { max-width: 860px; margin: 0 auto; text-align: center; }
.hero-title { font-size: 1.35rem; font-weight: 800; color: var(--text); margin: 0 0 .25rem; line-height: 1.3; }
.hero-sub   { font-size: .82rem; color: #888; margin: 0 0 1rem; }

/* Guide défilant */
.hero-guide {
    background: var(--surface-mid);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px; overflow: hidden;
    max-width: 620px; margin: 0 auto;
}
.hero-guide-track { position: relative; min-height: 52px; }
.hero-tip {
    position: absolute; inset: 0;
    display: flex; align-items: center; gap: .75rem;
    padding: .85rem 1rem;
    opacity: 0; transform: translateY(8px);
    transition: opacity .4s ease, transform .4s ease;
    pointer-events: none;
}
.hero-tip.active {
    opacity: 1; transform: translateY(0);
    pointer-events: auto;
}
.hero-tip.exit {
    opacity: 0; transform: translateY(-8px);
}
.hero-tip-icon { font-size: 1.3rem; flex-shrink: 0; }
.hero-tip-text { font-size: .83rem; color: #C1C2C5; text-align: left; line-height: 1.4; }
.hero-tip-text strong { color: var(--text); }

/* Points de navigation */
.hero-guide-dots {
    display: flex; justify-content: center; gap: .4rem;
    padding: .5rem 1rem .65rem;
    border-top: 1px solid rgba(255,255,255,.05);
}
.hero-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.2); border: none; cursor: pointer;
    transition: background .2s, transform .2s; padding: 0;
}
.hero-dot.active { background: var(--primary); transform: scale(1.3); }
.hero-dot:hover:not(.active) { background: rgba(255,255,255,.4); }

@media (max-width: 576px) {
    .hero-title { font-size: 1.1rem; }
    .hero-tip-text { font-size: .78rem; }
    .hero-tip-icon { font-size: 1.1rem; }
}

/* ==================== BULLES BRVM ==================== */
.bubbles-section {
    width: 100%; position: relative;
    background: var(--bg);
    border-bottom: 1px solid rgba(255,255,255,.06);
    overflow: hidden;
}
.bubbles-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: .6rem 1rem .3rem;
}
.bubbles-title { font-size: .78rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .06em; }
.bubbles-legend { display: flex; gap: .75rem; }
.bubbles-leg { font-size: .72rem; font-weight: 600; }
.bubbles-leg.up   { color: #2ECC71; }
.bubbles-leg.down { color: #E74C3C; }
.bubbles-leg.flat { color: #888; }
.bubbles-canvas { display: block; width: 100%; cursor: pointer; }
.bubbles-tooltip {
    position: absolute; pointer-events: none;
    background: rgba(26,27,30,.95); border: 1px solid rgba(247,166,79,.3);
    border-radius: 8px; padding: .5rem .75rem; font-size: .78rem;
    color: #fff; z-index: 100; white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

/* ==================== CARROUSEL PUB ==================== */
.adslider-section {
    width: 100%; position: relative;
    border-bottom: 1px solid rgba(255,255,255,.06);
    overflow: hidden;
}
.adslider { position: relative; width: 100%; }
.adslide {
    display: none; width: 100%;
    transition: opacity .4s ease;
}
.adslide.active { display: block; }
.adslide img {
    width: 100%; height: auto;
    display: block; max-height: 220px;
    object-fit: cover;
}
.adslider-dots {
    display: flex; justify-content: center; gap: .4rem;
    padding: .45rem 0;
    background: rgba(0,0,0,.3);
}
.adslider-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,.25); border: none;
    cursor: pointer; transition: background .2s;
}
.adslider-dot.active { background: var(--primary); }

@media(max-width:576px){
    .adslide img { max-height: 160px; }
}

/* ==================== RECHERCHE ==================== */
.search-container {
    padding: 1rem; display: flex; justify-content: center;
    width: 100%; max-width: 440px;
    margin: 0 auto;
}
.search-input-wrapper { position: relative; width: 100%; }
.search-input {
    width: 100%; padding: .8rem 3rem .8rem 1rem;
    background: var(--surface); border: 1px solid var(--text);
    border-radius: var(--radius-md); color: var(--text);
    font-size: .95rem; font-family: var(--font);
    transition: border-color var(--t-normal), box-shadow var(--t-normal);
}
.search-input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(247,166,79,.15);
}
.search-icon {
    position: absolute; right: 1rem; top: 50%;
    transform: translateY(-50%); color: var(--text-muted); pointer-events: none;
}

/* ==================== BADGE STATUT ==================== */
.update-container {
    display: flex; justify-content: center;
    width: 100%; margin: 15px 0 25px; padding: 0 10px;
}
.update-info {
    display: flex; flex-wrap: wrap; justify-content: center;
    align-items: center; gap: 12px;
    color: var(--text-muted); font-size: .85rem; text-align: center;
}
.badge-live {
    min-width: 140px; text-align: center; color: #fff;
    font-size: .62rem; font-weight: 900; font-family: var(--font);
    padding: 4px 10px; border-radius: var(--radius-sm);
    text-transform: uppercase; letter-spacing: .5px;
}
.state-open   { background: var(--success); animation: pulse-market 2s infinite; }
.state-closed { background: var(--error); opacity: .9; }
@keyframes pulse-market { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }

/* ==================== TABLE ==================== */
.table-wrapper {
    width: 100%;
    margin: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}
.table-container {
    background: var(--bg);
    width: max-content;
    min-width: 100%;
}
.currency-table {
    font-size: 1rem; font-family: var(--font);
    width: 100%; border-collapse: collapse;
}
.currency-table th {
    background: var(--surface-mid); color: var(--text);
    padding: .8rem .5rem; cursor: pointer; user-select: none;
    font-size: .82rem; white-space: nowrap;
    transition: background var(--t-fast); position: relative;
}
.currency-table th:hover { background: #555; }
.currency-table th:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.currency-table th.sorted-asc::after,
.currency-table th.sorted-desc::after {
    content: ''; position: absolute; right: 8px; top: 50%;
    transform: translateY(-50%); width: 0; height: 0;
    border-left: 4px solid transparent; border-right: 4px solid transparent;
}
.currency-table th.sorted-asc::after  { border-bottom: 6px solid var(--primary); }
.currency-table th.sorted-desc::after { border-top: 6px solid var(--primary); }

.currency-table td {
    padding: .65rem .6rem;
    border-bottom: 1px solid rgba(64,64,64,.3);
    white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; min-width: 70px; font-size: .88rem;
}
.currency-table tr { transition: background var(--t-fast); height: 50px; }
.currency-table tr:hover { background: var(--surface-hover); }
.currency-table tr.blacklisted { opacity: .55; }

/* ==================== ÉTATS ==================== */
.empty-state, .loading-state, .error-state {
    text-align: center; padding: 2.5rem; color: var(--text-muted); font-family: var(--font);
}
.loading-state { color: var(--primary); display: flex; align-items: center; justify-content: center; gap: .75rem; }
.error-state   { color: var(--error); }
.loading-spinner {
    display: inline-block; width: 20px; height: 20px;
    border: 3px solid rgba(247,166,79,.3); border-top-color: var(--primary);
    border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.retry-btn {
    display: inline-block; margin-top: .75rem; padding: .5rem 1.25rem;
    background: var(--error); color: #fff; border: none; border-radius: var(--radius-sm);
    cursor: pointer; font-size: .82rem; font-family: var(--font); font-weight: 700;
    transition: background var(--t-fast);
}
.retry-btn:hover { background: #ff6b6b; }

/* ==================== NAME CELL ==================== */
.name-cell { display: flex; align-items: center; gap: .65rem; }
.action-menu-btn {
    background: #444; color: #fff; border: 2px solid rgba(255,255,255,.75);
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    font-size: 1.3rem; font-weight: bold; font-family: var(--font);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all var(--t-fast); line-height: 1; position: relative;
}
.action-menu-btn:hover {
    border-color: var(--primary); color: var(--primary);
    transform: scale(1.1); box-shadow: 0 0 10px rgba(247,166,79,.3);
}
.action-menu-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.action-menu-btn.is-favorite::after {
    content: '★'; position: absolute; top: -4px; right: -4px;
    font-size: .55rem; color: #ffd700; line-height: 1;
}

/* ==================== MENU DÉROULANT ==================== */
.action-menu {
    position: fixed; background: var(--surface-mid); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); z-index: 9999; min-width: 240px; overflow: hidden;
    animation: menuIn var(--t-fast) ease; border: 1px solid var(--border);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.action-menu-item {
    padding: .9rem 1.1rem; display: flex; align-items: center; gap: .85rem;
    cursor: pointer; color: var(--text); font-size: .85rem; font-family: var(--font);
    transition: background var(--t-fast);
}
.action-menu-item:hover, .action-menu-item:focus { background: rgba(247,166,79,.18); outline: none; }
.action-menu-item:not(:last-child) { border-bottom: 1px solid var(--border-faint); }
.action-menu-blacklist-label {
    padding: .75rem 1.1rem; display: flex; align-items: center; gap: .85rem;
    color: var(--error); font-size: .8rem; font-family: var(--font); font-weight: 700;
    border-bottom: 1px solid var(--border); background: rgba(255,135,135,.07); pointer-events: none;
}
.menu-icon-lg { font-size: 1.1rem; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.menu-icon {
    font-size: .95rem; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border: 1.5px solid rgba(255,255,255,.7); border-radius: 50%; background: transparent;
    flex-shrink: 0; transition: all var(--t-fast);
}
.action-menu-item:hover .menu-icon, .action-menu-item:focus .menu-icon { border-color: var(--primary); background: rgba(247,166,79,.12); }

/* ==================== LOGO & NOM ==================== */
.currency-header { display: flex; align-items: center; gap: .65rem; }
.currency-header img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ls-Noms {
    display: flex; align-items: center; gap: .65rem;
    text-decoration: none; color: var(--text); font-size: .85rem; transition: color var(--t-fast);
}
.ls-Noms:hover { color: var(--primary); }
.ls-Noms:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }

/* ==================== INDICATEURS ==================== */
.right  { text-align: right; }
.center { text-align: center; }
.price-value       { font-weight: 600; }
.price-value small { font-size: .72rem; color: var(--text-muted); margin-left: 2px; }
.price-change {
    padding: 2px 6px; border-radius: var(--radius-sm); font-weight: 600;
    display: inline-block; font-size: .82rem;
}
.price-change.positive { background: rgba(81,207,102,.25); color: var(--success); }
.price-change.negative { background: rgba(255,135,135,.25); color: var(--error); }
.rank-cell { display: inline-flex; align-items: center; gap: .4rem; }
.rank-number { font-weight: 600; }
.rank-arrow-up::before  { content: '▲'; color: var(--success); font-size: .85rem; }
.rank-arrow-down::before{ content: '▼'; color: var(--error);   font-size: .85rem; }

/* ==================== SGI LIENS ==================== */
.sgi-cell { min-width: 90px; }
.sgi-link {
    display: inline-flex; align-items: center; justify-content: center;
    margin: 0 3px; opacity: .7; transition: opacity var(--t-fast), transform var(--t-fast); text-decoration: none;
}
.sgi-link:hover  { opacity: 1; transform: scale(1.12); }
.sgi-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.sgi-link img { width: 22px; height: 22px; border-radius: var(--radius-sm); object-fit: cover; }

/* ==================== PAGINATION ==================== */
.pagination-wrapper {
    display: flex; justify-content: center; align-items: center;
    gap: 1.5rem; margin: 1.5rem 0; width: 100%; max-width: 1800px; padding: 0 1rem;
}
.pagination {
    display: flex; justify-content: center; align-items: center;
    gap: .7rem; flex: 1; flex-wrap: nowrap; min-width: 0;
}
.pagination-info { color: var(--text-muted); font-size: .8rem; font-family: var(--font); white-space: nowrap; }
.pagination-btn {
    background: var(--primary); color: #fff; border: none; padding: .5rem 1rem;
    border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: .8rem;
    font-family: var(--font); white-space: nowrap; flex-shrink: 0; transition: all var(--t-fast);
}
.pagination-btn:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pagination-btn:disabled { background: var(--text-muted); cursor: not-allowed; opacity: .5; }
.pagination-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pagination-pages { display: flex; gap: .3rem; flex-wrap: nowrap; }
.page-btn {
    background: var(--surface); color: var(--text); border: 1.5px solid var(--border);
    width: 32px; height: 32px; border-radius: var(--radius-sm); cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: .8rem;
    font-weight: 600; font-family: var(--font); flex-shrink: 0; transition: all var(--t-fast);
}
.page-btn:hover        { border-color: var(--primary); color: var(--primary); }
.page-btn.active       { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:focus-visible{ outline: 2px solid var(--primary); outline-offset: 2px; }

/* ==================== STATS PORTFOLIO ==================== */
#portfolioStatsContainer { width: 100%; max-width: 1800px; margin: 0 auto; }
.portfolio-stats-button-container { display: flex; justify-content: center; padding: 1.5rem 1rem; }
.portfolio-stats-btn {
    background: var(--primary); color: #fff; border: none; padding: .9rem 2.5rem;
    border-radius: 10px; cursor: pointer; font-weight: 700; font-size: .95rem;
    font-family: var(--font); display: flex; align-items: center; gap: .7rem;
    box-shadow: 0 4px 16px rgba(247,166,79,.3); transition: all var(--t-normal);
}
.portfolio-stats-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(247,166,79,.45); }
.portfolio-stats-btn:active { transform: translateY(0); }
.portfolio-stats-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }

/* ==================== MODALES ==================== */
.custom-dialog-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.78);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; opacity: 0; transition: opacity var(--t-slow) ease;
    padding: 1rem; overflow-y: auto;
}
.custom-dialog-overlay.active { opacity: 1; }
.custom-dialog {
    background: var(--surface); border-radius: var(--radius-xl);
    width: 100%; max-width: 520px; max-height: calc(100svh - 2rem);
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,.65); transform: scale(.9); opacity: 0;
    transition: all var(--t-slow) cubic-bezier(.34,1.56,.64,1); margin: auto;
}
.custom-dialog.active { transform: scale(1); opacity: 1; }
.dialog-header { padding: 1.6rem 1.8rem 1.2rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.dialog-header h3 { font-size: 1.2rem; font-weight: 700; font-family: var(--font); margin-bottom: .3rem; }
.dialog-header p  { color: var(--text-muted); font-size: .85rem; margin: 0; }
.dialog-header .stock-name { color: var(--primary); font-weight: 600; }
.dialog-body   { padding: 1.4rem 1.8rem; overflow-y: auto; flex: 1; }
.dialog-footer { padding: 1rem 1.8rem 1.4rem; border-top: 1px solid var(--border-faint); display: flex; gap: .8rem; flex-shrink: 0; }
.portfolio-form { display: flex; flex-direction: column; gap: 1.2rem; }
.form-group     { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { color: var(--text); font-weight: 700; font-size: .78rem; font-family: var(--font); text-transform: uppercase; letter-spacing: .4px; }
.portfolio-input {
    width: 100%; padding: .85rem 1rem; background: var(--bg); border: 2px solid var(--border);
    border-radius: var(--radius-md); color: var(--text); font-size: .95rem; font-family: var(--font);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.portfolio-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(247,166,79,.15); }
.price-info {
    background: rgba(247,166,79,.1); border: 1px solid rgba(247,166,79,.25);
    padding: .65rem 1rem; border-radius: var(--radius-md); text-align: center; font-size: .83rem; font-family: var(--font);
}
.dialog-btn { flex: 1; padding: .88rem; font-size: .88rem; font-weight: 700; font-family: var(--font); border: none; border-radius: 9px; cursor: pointer; transition: all var(--t-fast); }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(247,166,79,.4); }
.btn-secondary { background: rgba(255,255,255,.1); color: var(--text); }
.btn-secondary:hover { background: rgba(255,255,255,.17); }
.btn-yes { background: var(--success); color: #fff; }
.btn-yes:hover { background: #45b359; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(81,207,102,.4); }
.btn-no  { background: var(--error); color: #fff; }
.btn-no:hover { background: #ff6b6b; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(255,135,135,.4); }
.btn-primary:active,.btn-secondary:active,.btn-yes:active,.btn-no:active { transform: translateY(0); }
.dialog-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ==================== MODAL STATS ==================== */
.stats-modal { max-width: 860px; }
.stats-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--bg); border-radius: 10px; padding: 1.1rem 1rem; border: 2px solid var(--border); transition: transform var(--t-fast), box-shadow var(--t-fast); }
.stat-card:hover     { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card.positive  { border-color: var(--success); background: rgba(81,207,102,.06); }
.stat-card.negative  { border-color: var(--error);   background: rgba(255,135,135,.06); }
.stat-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; font-family: var(--font); letter-spacing: .5px; margin-bottom: .5rem; }
.stat-value { font-size: 1.25rem; font-weight: 700; font-family: var(--font); word-break: break-word; }
.stat-card.positive .stat-value { color: var(--success); }
.stat-card.negative .stat-value { color: var(--error); }
.stat-value small { display: block; font-size: .8rem; margin-top: .2rem; opacity: .8; }
.stats-details-title { font-size: .95rem; font-weight: 700; font-family: var(--font); margin-bottom: .75rem; }
.stats-table-wrapper { overflow-x: auto; border-radius: var(--radius-md); }
.stats-table { width: 100%; min-width: 540px; border-collapse: collapse; font-family: var(--font); font-size: .8rem; }
.stats-table thead { background: rgba(255,255,255,.05); }
.stats-table th { padding: .75rem .65rem; text-align: left; font-size: .7rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.stats-table td { padding: .7rem .65rem; border-top: 1px solid var(--border-faint); }
.stats-table tr:hover { background: rgba(255,255,255,.03); }
.stats-table .positive { color: var(--success); font-weight: 600; }
.stats-table .negative { color: var(--error);   font-weight: 600; }

/* ==================== CONVERTISSEUR ==================== */
.converter-section {
    margin: 2rem auto; background: var(--bg); padding: 2rem;
    border-radius: var(--radius-lg); width: 90%; max-width: 1800px;
    box-shadow: var(--shadow-md); box-sizing: border-box;
}
.converter-title { text-align: center; margin-bottom: 2rem; font-size: 1.4rem; font-weight: 700; font-family: var(--font); }
.converter-form {
    display: flex; align-items: center; justify-content: center;
    gap: 1rem; max-width: 750px; margin: 0 auto; flex-wrap: wrap;
}
#actionSelector { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; text-overflow: ellipsis; overflow: hidden; }
.converter-input,
.converter-select {
    flex: 1; min-width: 0; max-width: 100%; width: 100%;
    padding: .85rem 2.5rem .85rem 1rem; background: #2a2a2a;
    border: 1px solid #444; border-radius: var(--radius-md);
    color: var(--text); font-size: .88rem; font-family: var(--font);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    box-sizing: border-box; text-overflow: ellipsis; overflow: hidden;
}
.converter-input:focus,
.converter-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(247,166,79,.15); }
.converter-input:hover:not(:focus),
.converter-select:hover:not(:focus) { border-color: rgba(247,166,79,.5); }
.converter-select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23f7a64f' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 1rem center;
}
.converter-group { display: flex; flex-direction: column; gap: .5rem; flex: 1; min-width: 0; width: 100%; }
.converter-result-label { text-align: center; color: #999; font-size: .68rem; font-weight: 700; font-family: var(--font); text-transform: uppercase; }
.converter-equals {
    width: 42px; height: 42px; flex-shrink: 0;
    background: var(--primary); color: #fff; border: none; border-radius: var(--radius-md);
    font-size: 1.3rem; font-weight: bold; display: flex; align-items: center; justify-content: center; cursor: default;
}
#toAmount { text-align: center; font-size: 1.05rem; font-weight: 600; }
.conversion-summary {
    text-align: center; margin-top: 1.5rem; padding: 1rem;
    background: rgba(247,166,79,.08); border-radius: var(--radius-md); font-size: .88rem;
    font-family: var(--font); border: 1px solid rgba(247,166,79,.2); min-height: 1px;
}
.conversion-summary:empty { display: none; }
.conversion-details {
    background: #2a2a2a; border-radius: var(--radius-md); padding: 1rem; margin-top: 1rem;
    text-align: center; color: #999; font-size: .8rem; font-family: var(--font);
}
.conversion-details div { margin: .28rem 0; }
.conversion-note { font-size: .8rem; color: #bb4444; margin-top: .5rem; font-family: var(--font); }

/* ==================== SENTIMENT DE MARCHÉ ==================== */
.sentiment-section {
    width: 100%; padding: 1.25rem 1rem;
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.sentiment-wrapper { max-width: 700px; margin: 0 auto; }
.sentiment-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem;
}
.sentiment-title { font-size: .9rem; font-weight: 700; color: var(--text); }
.sentiment-count { font-size: .78rem; color: #888; }

.sentiment-btns { display: flex; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.sentiment-btn {
    flex: 1; min-width: 90px; padding: .65rem .5rem;
    border-radius: 8px; border: 1px solid rgba(255,255,255,.1);
    background: var(--surface-mid); color: var(--text);
    font-size: .85rem; font-weight: 700; cursor: pointer;
    transition: all .2s; text-align: center;
}
.sentiment-btn.bull:hover,    .sentiment-btn.bull.voted    { background: rgba(46,204,113,.15);  border-color: #2ECC71; color: #2ECC71; }
.sentiment-btn.neutral:hover, .sentiment-btn.neutral.voted { background: rgba(247,166,79,.15);  border-color: var(--primary); color: var(--primary); }
.sentiment-btn.bear:hover,    .sentiment-btn.bear.voted    { background: rgba(231,76,60,.15);   border-color: #E74C3C; color: #E74C3C; }
.sentiment-btn:disabled { opacity: .6; cursor: not-allowed; }

.sentiment-bars { margin-top: .5rem; display: flex; flex-direction: column; gap: .6rem; }
.sentiment-bar-row { display: flex; align-items: center; gap: .75rem; }
.sentiment-bar-label { font-size: .78rem; color: #888; width: 90px; flex-shrink: 0; }
.sentiment-bar-track { flex: 1; height: 8px; background: rgba(255,255,255,.07); border-radius: 4px; overflow: hidden; }
.sentiment-bar { height: 100%; border-radius: 4px; transition: width .5s ease; }
.bull-bar    { background: #2ECC71; }
.neutral-bar { background: var(--primary); }
.bear-bar    { background: #E74C3C; }
.sentiment-bar-pct { font-size: .78rem; font-weight: 700; color: var(--text); width: 35px; text-align: right; flex-shrink: 0; }
.sentiment-voted { font-size: .8rem; color: #2ECC71; margin: .5rem 0 0; text-align: center; }

@media (max-width: 576px) {
    .sentiment-btn { font-size: .78rem; padding: .55rem .4rem; }
    .sentiment-bar-label { width: 70px; font-size: .72rem; }
}

/* ==================== FOOTER ==================== */
.footer {
    display: flex; flex-wrap: wrap; justify-content: space-between;
    margin: 40px auto; padding-top: 50px;
    width: 85%; max-width: 1800px; border-top: 1px solid #333; gap: 30px;
    align-self: center;
}
.footer-section { flex: 1; min-width: 250px; }
.footer-header  { font-size: 1.3rem; font-weight: bold; font-family: var(--font); margin-bottom: 20px; }
.footer-description { line-height: 1.7; color: #b0b0b0; font-size: .85rem; font-family: var(--font); }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-link  { color: var(--text-muted); transition: color var(--t-normal); }
.social-link:hover { color: var(--primary); }
.social-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.footer-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.footer-link {
    display: flex; align-items: center; padding: 8px 12px; background: #1e1e1e;
    border-radius: var(--radius-sm); text-decoration: none; color: #e0e0e0;
    font-size: .82rem; font-family: var(--font); transition: background var(--t-normal);
}
.footer-link:hover { background: #2d2d2d; }
.footer-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.footer-link img { width: 20px; height: 20px; margin-right: 10px; border-radius: var(--radius-sm); }
.payment-methods { display: flex; justify-content: center; align-items: center; margin-top: 25px; gap: 1.2rem; flex-wrap: wrap; }
.payment-method { text-decoration: none; display: flex; }
.payment-method img {
    width: 48px; height: 48px; border-radius: 50%; object-fit: contain;
    background: #fff; padding: 5px; border: 1px solid var(--border); cursor: pointer;
    transition: transform var(--t-normal);
}
.payment-method img:hover { transform: scale(1.1); }
.copyright-bar {
    text-align: center; border-top: 1px solid rgba(255,255,255,.05); padding: 2rem 0;
    color: var(--text-muted); font-size: .85rem; font-family: var(--font); width: 100%;
}
.copyright-bar strong { color: var(--primary); }

/* ==================== INFOS ==================== */
.update-notice {
    width: 100%; max-width: 1800px; margin: 0 auto 0.75rem;
    padding: 0.6rem 1.2rem; background: rgba(247,166,79,.10);
    border-left: 4px solid #f7a64f; border-radius: 0 6px 6px 0;
    color: #C1C2C5; font-size: 0.88rem; font-family: var(--font);
}
.update-notice strong { color: #f7a64f; }

/* ==================== FIREBASE AUTH UI ==================== */
.firebase-login-btn {
    display: flex; align-items: center; gap: 7px; padding: 6px 12px;
    background: #fff; color: #444; border: 1px solid #ddd; border-radius: 6px;
    font-size: .82rem; font-weight: 600; font-family: var(--font); cursor: pointer;
    transition: box-shadow .2s, background .2s; white-space: nowrap; flex-shrink: 0;
}
.firebase-login-btn:hover { box-shadow: 0 2px 8px rgba(0,0,0,.2); background: #f5f5f5; }
.firebase-login-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.firebase-user-info { display: none; align-items: center; gap: 8px; flex-shrink: 0; }
.firebase-user-info.visible { display: flex; }
.firebase-avatar { border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); flex-shrink: 0; }
.firebase-username {
    font-size: .82rem; font-weight: 600; color: var(--text);
    max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.firebase-logout-btn {
    padding: 5px 9px; background: transparent; color: var(--error);
    border: 1px solid var(--error); border-radius: 5px; font-size: .75rem;
    font-family: var(--font); cursor: pointer; transition: background .2s, color .2s;
    white-space: nowrap; flex-shrink: 0;
}
.firebase-logout-btn:hover { background: var(--error); color: #fff; }

/* ==================== PWA INSTALL BANNER ==================== */
.pwa-install-banner {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    width: calc(100% - 2rem); max-width: 420px; background: #2C2E33;
    border: 1px solid rgba(247,166,79,.35); border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.6); z-index: 5000; display: none;
    align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem;
}
@keyframes pwaSlideUp {
    from { transform: translateX(-50%) translateY(100px); opacity: 0; }
    to   { transform: translateX(-50%) translateY(0);     opacity: 1; }
}
.pwa-install-banner[style*="flex"] { animation: pwaSlideUp .4s cubic-bezier(.34,1.56,.64,1); }
.pwa-install-content { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 0; }
.pwa-install-icon { border-radius: 10px; flex-shrink: 0; }
.pwa-install-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pwa-install-text strong { font-size: .88rem; font-weight: 700; color: #fff; font-family: var(--font); }
.pwa-install-text span { font-size: .75rem; color: var(--text-muted); font-family: var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwa-install-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.pwa-install-accept {
    padding: .55rem 1.1rem; background: var(--primary); color: #fff;
    border: none; border-radius: 8px; font-size: .82rem; font-weight: 700;
    font-family: var(--font); cursor: pointer; transition: background .2s, transform .15s; white-space: nowrap;
}
.pwa-install-accept:hover  { background: #e89540; transform: translateY(-1px); }
.pwa-install-accept:active { transform: translateY(0); }
.pwa-install-dismiss {
    background: transparent; color: var(--text-muted); border: none;
    font-size: 1rem; cursor: pointer; padding: .3rem; border-radius: 4px;
    transition: color .2s; line-height: 1;
}
.pwa-install-dismiss:hover { color: #fff; }

/* ==================== TOAST CONNEXION ==================== */
.toast-connect {
    position: fixed; bottom: 2rem; right: 2rem; width: 320px;
    background: var(--surface); border: 1px solid rgba(247,166,79,.35);
    border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.6);
    z-index: 4000; overflow: hidden;
    transform: translateY(120px); opacity: 0;
    transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .3s ease;
}
.toast-connect.visible { transform: translateY(0); opacity: 1; }
.toast-connect-bar {
    height: 3px; background: var(--primary); width: 100%;
    transform-origin: left; animation: toastTimer 8s linear forwards;
}
@keyframes toastTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.toast-connect-body { padding: 1rem 1.1rem; display: flex; gap: .85rem; align-items: flex-start; }
.toast-connect-icon { font-size: 1.8rem; flex-shrink: 0; line-height: 1; }
.toast-connect-text { flex: 1; min-width: 0; }
.toast-connect-text strong { display: block; font-size: .88rem; font-weight: 700; color: #fff; font-family: var(--font); margin-bottom: .25rem; }
.toast-connect-text span { font-size: .76rem; color: var(--text-muted); font-family: var(--font); line-height: 1.4; }
.toast-connect-actions { display: flex; gap: .5rem; margin-top: .75rem; }
.toast-connect-btn {
    flex: 1; padding: .5rem; background: var(--primary); color: #fff;
    border: none; border-radius: 8px; font-size: .78rem; font-weight: 700;
    font-family: var(--font); cursor: pointer; transition: background .2s, transform .15s;
    display: flex; align-items: center; justify-content: center; gap: .4rem;
}
.toast-connect-btn:hover { background: #e89540; transform: translateY(-1px); }
.toast-connect-dismiss {
    position: absolute; top: .6rem; right: .6rem;
    background: transparent; border: none; color: var(--text-muted);
    font-size: .9rem; cursor: pointer; padding: .2rem .4rem;
    border-radius: 4px; line-height: 1; transition: color .2s;
}
.toast-connect-dismiss:hover { color: #fff; }

/* ==================== LIEN BOC HEADER ==================== */
.boc-nav-link {
    color: var(--text); text-decoration: none;
    font-size: .82rem; font-weight: 600;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 6px;
    transition: border-color .2s, color .2s;
    white-space: nowrap; flex-shrink: 0;
}
.boc-nav-link:hover { border-color: var(--primary); color: var(--primary); }

/* ==================== BANNIÈRE BOC ==================== */
.boc-banner {
    width: 100%;
    background: linear-gradient(90deg, rgba(247,166,79,.08), rgba(247,166,79,.03));
    border-top: 1px solid rgba(247,166,79,.15);
    border-bottom: 1px solid rgba(247,166,79,.15);
    padding: .75rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
    flex-wrap: wrap;
}
.boc-banner-icon { font-size: 1.2rem; flex-shrink: 0; }
.boc-banner-text { color: #C1C2C5; font-size: .88rem; flex: 1; }
.boc-banner-link {
    color: var(--primary); font-weight: 700; font-size: .85rem;
    text-decoration: none; white-space: nowrap;
    padding: .4rem .9rem; border: 1px solid rgba(247,166,79,.3);
    border-radius: 6px; transition: background .2s;
    flex-shrink: 0;
}
.boc-banner-link:hover { background: rgba(247,166,79,.1); }

@media (max-width: 576px) {
    .boc-banner { padding: .6rem .75rem; gap: .4rem; flex-wrap: wrap; }
    .boc-banner-icon { font-size: 1rem; order: 0; }
    .boc-banner-text { font-size: .78rem; flex-basis: 100%; order: 1; }
    .boc-banner-link { font-size: .74rem; padding: .28rem .6rem; order: 2; }
}

/* ==================== POPUP NOTIFICATIONS ==================== */
.notif-popup-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    display: flex; align-items: center; justify-content: center;
    z-index: 99999; padding: 1rem;
    opacity: 0; transition: opacity .3s ease;
}
.notif-popup-overlay.active { opacity: 1; }
.notif-popup-overlay[hidden] { display: none; }

.notif-popup {
    background: var(--surface-mid);
    border: 1px solid rgba(247,166,79,.25);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    max-width: 380px; width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    transform: translateY(20px);
    transition: transform .3s ease;
}
.notif-popup-overlay.active .notif-popup { transform: translateY(0); }

.notif-popup-close {
    position: absolute; top: .75rem; right: .75rem;
    background: transparent; border: none;
    color: #888; font-size: 1rem; cursor: pointer; padding: .25rem .5rem;
    border-radius: 4px; transition: color .2s;
}
.notif-popup-close:hover { color: #fff; }
.notif-popup-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.notif-popup-title {
    font-size: 1.05rem; font-weight: 700;
    color: var(--text); margin: 0 0 .75rem; line-height: 1.4;
}
.notif-popup-text {
    font-size: .85rem; color: #C1C2C5;
    margin: 0 0 1.25rem; line-height: 1.6;
}
.notif-popup-accept {
    display: block; width: 100%;
    background: var(--primary); color: #fff;
    border: none; border-radius: 8px;
    padding: .75rem 1rem; font-size: .9rem; font-weight: 700;
    cursor: pointer; margin-bottom: .6rem;
    transition: opacity .2s;
}
.notif-popup-accept:hover { opacity: .88; }
.notif-popup-accept:disabled { opacity: .5; cursor: not-allowed; }
.notif-popup-later {
    background: transparent; border: none;
    color: #888; font-size: .82rem; cursor: pointer;
    padding: .4rem; transition: color .2s;
}
.notif-popup-later:hover { color: #C1C2C5; }

/* ==================== BOUTON NOTIFICATION ====================
.notif-btn {
    background: transparent; border: 1px solid rgba(255,255,255,.2);
    color: #C1C2C5; border-radius: 6px; padding: 5px 9px;
    cursor: pointer; font-size: 1rem; transition: all .2s; flex-shrink: 0; line-height: 1;
}
.notif-btn:hover { border-color: rgba(247,166,79,.5); color: #f7a64f; }
.notif-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.notif-btn.notif-active { border-color: var(--primary); color: var(--primary); }
.notif-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ==================== BADGE PORTEFEUILLE (tableau) ==================== */
.pf-in-badge {
    font-size: .75rem; cursor: pointer; opacity: .65;
    transition: opacity .15s, transform .15s;
    margin-left: .3rem; vertical-align: middle; display: inline-block;
}
.pf-in-badge:hover { opacity: 1; transform: scale(1.2); }

/* ==================== LOGIN INFO PWA ==================== */
.login-info-pwa-row { width: 100%; }
.login-info-btn-pwa {
    width: 100%; padding: .6rem; background: rgba(247,166,79,.12);
    color: var(--primary); border: 1px solid rgba(247,166,79,.3);
    border-radius: 10px; font-size: .82rem; font-weight: 700;
    font-family: var(--font); cursor: pointer; transition: background .2s; text-align: center;
}
.login-info-btn-pwa:hover { background: rgba(247,166,79,.2); }

/* ==================== SECTION SEO ==================== */
.seo-section { background: var(--bg); padding: 3rem 1.5rem; border-top: 1px solid rgba(255,255,255,.06); width: 100%; }
.seo-content { max-width: 1100px; margin: 0 auto; }
.seo-content h2 { font-size: 1.4rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; font-family: var(--font); }
.seo-content > p { font-size: .9rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 2rem; max-width: 800px; }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.seo-card { background: var(--surface); border-radius: 12px; padding: 1.2rem 1.4rem; border: 1px solid rgba(255,255,255,.05); }
.seo-card h3 { font-size: .88rem; font-weight: 700; color: #fff; margin-bottom: .6rem; font-family: var(--font); }
.seo-card p  { font-size: .78rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ==================== SKELETON CHARGEMENT ==================== */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
#table-skeleton { padding: .5rem 0; }

/* ==================== SCORE DE SANTÉ ==================== */
.health-score {
    font-weight: 800; font-size: .85rem; line-height: 1;
}
.health-score small {
    font-size: .65rem; font-weight: 400; color: #888; margin-left: 1px;
}
.score-cell { white-space: nowrap; }

/* ==================== BANNIÈRE PARTENAIRE ==================== */
.ad-banner-section {
    margin: 1rem 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(247,166,79,.18);
}
.ad-banner-label {
    font-size: .63rem; font-weight: 700; color: #555;
    text-transform: uppercase; letter-spacing: .08em;
    padding: .2rem .75rem;
    background: rgba(255,255,255,.02);
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.ad-banner-link {
    display: block; text-decoration: none;
    transition: opacity .2s;
}
.ad-banner-link:hover { opacity: .88; }
.ad-banner-img {
    display: block; width: 100%;
    height: auto; max-height: 100px;
    object-fit: cover;
}

/* ==================== RESPONSIVE ==================== */

/* Tablette (≤ 768px) */
@media (max-width: 768px) {
    :root { --header-h: 60px; }
    .header { padding: 0 1rem; gap: .5rem; height: 60px; }
    .logo   { font-size: 1.5rem; }
    .market-selector { font-size: .75rem; padding: .4rem .6rem; max-width: 160px; }


    /* Slider: ratio plus haut sur mobile */
    .slider-container { aspect-ratio: 2 / 1; }

    .pagination-wrapper { flex-direction: column; align-items: center; gap: .8rem; padding: 0 .75rem; margin: 1rem 0; }
    .pagination { width: 100%; justify-content: center; gap: .35rem; overflow-x: auto; padding: .3rem .25rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .pagination::-webkit-scrollbar { display: none; }
    .pagination-btn { padding: .42rem .65rem; font-size: .75rem; }
    .page-btn       { width: 28px; height: 28px; font-size: .75rem; }
    .pagination-info{ font-size: .7rem; }

    .converter-form   { flex-direction: column; align-items: stretch; }
    .converter-group  { width: 100%; max-width: 100%; }
    .converter-equals { transform: rotate(90deg); margin: .5rem auto; align-self: center; }
    .converter-section{ padding: 1.5rem 1rem; width: 100%; }
    #actionSelector   { max-width: 100%; }
    .converter-select,
    .converter-input  { min-width: 0; width: 100%; }

    .custom-dialog-overlay { padding: .5rem; }
    .custom-dialog { max-height: calc(100svh - 1rem); }
    .dialog-body   { padding: 1.1rem 1.3rem; }
    .dialog-footer { padding: .8rem 1.3rem 1.2rem; }
    .dialog-header { padding: 1.3rem 1.3rem 1rem; }

    .stats-modal { max-width: 100%; }
    .stats-cards { grid-template-columns: 1fr; gap: .75rem; }
    .stat-value  { font-size: 1.1rem; }
    .action-menu-btn { width: 35px; height: 35px; font-size: 1.15rem; }
    .footer      { flex-direction: column; gap: 2rem; }
    .seo-grid    { grid-template-columns: 1fr; }
    .seo-section { padding: 2rem 1rem; }
}

/* Mobile (≤ 576px) */
@media (max-width: 576px) {
    .header { padding: 0 .75rem; }
    .logo   { font-size: 1.1rem; }
    .market-selector { font-size: .7rem; padding: .35rem .5rem; max-width: 130px; }

    .table-wrapper   { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .currency-table    { font-size: .82rem; }
    .currency-table th { padding: .42rem .28rem; font-size: .64rem; }
    .currency-table td { padding: .38rem .28rem; min-width: 0; font-size: .82rem; }
    .currency-table td:nth-child(2) { max-width: 110px; }

    .name-cell { gap: .3rem; }
    .ls-Noms span { max-width: 75px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
    .currency-header img { width: 18px; height: 18px; }
    .action-menu-btn { width: 28px; height: 28px; font-size: .85rem; border-width: 1.5px; }
    .menu-icon       { width: 22px; height: 22px; font-size: .8rem; }

    .pagination-btn  { padding: .36rem .5rem; font-size: .7rem; }
    .page-btn        { width: 25px; height: 25px; font-size: .7rem; }
    .pagination-info { font-size: .65rem; }

    .dialog-footer   { flex-direction: column; }
    .stat-label      { font-size: .66rem; }
    .stat-value      { font-size: .96rem; }
    .stats-table     { font-size: .74rem; }
    .stats-table th,
    .stats-table td  { padding: .55rem .45rem; }

    .converter-title   { font-size: 1.15rem; }
    .converter-section { padding: 1.2rem .75rem; }
    .converter-select,
    .converter-input   { font-size: .82rem; padding: .7rem .85rem; }

    .firebase-login-btn span { display: none; }
    .firebase-login-btn      { padding: 6px 8px; }
    .firebase-username       { display: none; }
    .firebase-logout-btn     { font-size: .68rem; padding: 4px 7px; }

    .toast-connect { width: calc(100% - 2rem); right: 1rem; bottom: 1rem; }
}

/* Très petit (≤ 400px) */
@media (max-width: 400px) {
    .logo { font-size: 1rem; }
    .market-selector { font-size: .65rem; padding: .3rem .4rem; max-width: 110px; }
    .pwa-install-banner { padding: .75rem .85rem; gap: .6rem; }
    .pwa-install-text span { display: none; }
    .pwa-install-accept { padding: .5rem .85rem; font-size: .78rem; }
}