:root {
    --bg-dark: #0f1115;
    --bg-light: #f2f2f2;
    --card-dark: #181b22;
    --card-light: #ffffff;
    --text-dark: #eaeaea;
    --text-light: #111111;
    --muted-dark: #a0a0a0;
    --muted-light: #555555;

    --tier-s: #ff2e2e;
    --tier-a: #ff9f1c;
    --tier-b: #3a86ff;
    --tier-c: #2ec4b6;

    --amazon: #ff9900;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-dark);
    padding: 20px;
    transition: all 0.3s ease;
}

body.light {
    background: var(--bg-light);
    color: var(--text-light);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

header {
    display:flex;
    justify-content:center;
    align-items:center;
    gap:20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

#theme-toggle {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.tiers {
    max-width: 1200px;
    margin: auto;
    display: grid;
    gap: 30px;
}

.tier {
    background: var(--card-dark);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
    border-left: 6px solid;
    transition: all 0.3s ease;
}

body.light .tier {
    background: var(--card-light);
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.badge {
    display:inline-block;
    padding:6px 14px;
    border-radius:999px;
    font-weight:bold;
    color:#000;
}

/* Tier colors */
.tier.s { border-color: var(--tier-s); }
.tier.s .badge { background: var(--tier-s); }

.tier.a { border-color: var(--tier-a); }
.tier.a .badge { background: var(--tier-a); }

.tier.b { border-color: var(--tier-b); }
.tier.b .badge { background: var(--tier-b); }

.tier.c { border-color: var(--tier-c); }
.tier.c .badge { background: var(--tier-c); }

.commentaire {
    font-style: italic;
    margin-bottom: 15px;
    color: var(--muted-dark);
}

body.light .commentaire { color: var(--muted-light); }

.components {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.component {
    background: #10131a;
    padding: 12px;
    border-radius: 10px;
    display:flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

body.light .component {
    background:#e8e8e8;
}

.component-info {
    display:flex;
    flex-direction: column;
}

.component-info span.price {
    font-weight:bold;
    font-size:0.85rem;
    margin-top:3px;
    color: var(--text-dark);
}

body.light .component-info span.price {
    color: var(--text-light);
}

.amazon-btn {
    background: var(--amazon);
    color: #000;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: .8rem;
    text-decoration: none;
    white-space: nowrap;
}

.amazon-btn:hover {
    box-shadow: 0 0 10px rgba(255,153,0,.6);
}

.total-price {
    font-weight:bold;
    margin-top:10px;
}

.performance {
    margin-top: 25px;
}

.performance h3 {
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--muted-dark);
}

body.light .performance h3 { color: var(--muted-light); }

.stat {
    margin-bottom: 8px;
}

.stat-label {
    display:flex;
    justify-content:space-between;
    font-size:.85rem;
    margin-bottom:3px;
}

.bar {
    background: #0b0d11;
    border-radius:6px;
    overflow:hidden;
    height: 10px;
}
body.light .bar {
    background:#ddd;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f5ff, #00ff85);
}
.site-footer {
    text-align: center;
    padding: 20px 10px;
    margin-top: 40px;
    color: var(--muted-dark);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

body.light .site-footer {
    color: var(--muted-light);
    border-top: 1px solid rgba(0,0,0,0.1);
}

.site-footer a {
    color: inherit;
    text-decoration: underline;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--amazon);
}

.last-update-container {
    display: flex;
    justify-content: center; 
    margin-bottom: 40px;
}
.last-update {
    padding: 8px 16px;
    background-color: rgba(255,255,255,0.05);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    text-align: center;
}
.seo-intro {
  max-width: 1000px;
  margin: 20px auto;
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: center;
  color: #cccccc;
}

@media (max-width: 768px) {

    body {
        padding: 12px;
        overflow-x: hidden; /* empêche le scroll horizontal */
    }

    .tiers {
        gap: 20px;
    }

    .tier {
        padding: 16px;
    }

    .components {
        grid-template-columns: 1fr; /* ✅ UNE SEULE COLONNE */
    }

    .component {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .amazon-btn {
        align-self: stretch;
        text-align: center;
    }

    .tier-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .badge {
        align-self: flex-start;
    }
}