/* --- RESET & BASICS --- */
:root {
    /* Dark Mode (défaut) */
    --bg: #211f1b;
    --bg-card: #45423d;
    --accent: #e25a43;
    --text: #c2c0b6;
    --text-muted: #8a887f;
    --border: #c2c0b6;
    --bezel: #c2c0b6;

    /* Scores et indicateurs */
    --score-high: #7cb97c;
    --score-low: #e25a43;
}

/* Light Mode */
[data-theme="light"] {
    --bg: #c2c0b6;
    --bg-card: #d8d6ce;
    --text: #211f1b;
    --text-muted: #4a4840;
    --border: #211f1b;
    --bezel: #211f1b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding-bottom: 60px;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}


/* --- HEADER --- */
.header {
    width: 100%;
    max-width: 1200px;      /* Largeur standard pour la plupart des écrans */
    margin: 0 auto;
    background: var(--bg);
}

.header-container {
    padding: 35px 40px 20px 40px;
    display: flex;
    align-items: flex-end;  /* Aligne les éléments par le bas */
    justify-content: space-between;
}

.logo-plus-sous-titre {
    
    display: flex;
    align-items: flex-end;  /* Aligne les éléments par le bas */
}

/* Icône bouton générique header */
.header-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.header-icon-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--text);
    transition: stroke 0.2s ease;
}

.header-icon-btn:hover svg {
    stroke: var(--accent);
}

/* Logo */
.header-logo-link {
    display: flex;
    align-items: center;
    padding-bottom: 2px;
}

.logo-header {
    height: 48px;
    width: auto;
    transition: opacity 0.3s ease;
}

/* Sous-titre desktop */
.header-subtitle-desktop {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
    white-space: nowrap;
}

/* Sous-titre mobile */
.header-subtitle-mobile {
    display: none;
}

/* Navigation desktop */
.header-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-right: 20px;
}

.header-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.header-nav-link svg {
    width: 18px;
    height: 18px;
    stroke: var(--text);
    transition: stroke 0.2s ease;
}

.header-nav-link:hover {
    color: var(--accent);
}

.header-nav-link:hover svg {
    stroke: var(--accent);
}

.header-nav-link small {
    font-size: 0.75rem;
    opacity: 0.7;
}

.header-nav-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.header-nav-disabled:hover {
    color: var(--text);
}

.header-nav-disabled:hover svg {
    stroke: var(--text);
}

/* Toggle thème */
.theme-toggle {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
}

.theme-icon {
    width: 20px;
    height: 20px;
    stroke: var(--text);
    transition: stroke 0.2s ease;
}

.theme-toggle:hover .theme-icon {
    stroke: var(--accent);
}

/* En dark mode (défaut), on montre le soleil */
.theme-icon-dark {
    display: inline;
}

.theme-icon-light {
    display: none;
}

/* En light mode, on montre la lune */
[data-theme="light"] .theme-icon-dark {
    display: none;
}

[data-theme="light"] .theme-icon-light {
    display: inline;
}

/* Menu hamburger mobile - caché sur desktop */
.header-menu-btn {
    display: none;
}

/* Séparateur header */
.header-separator {
    height: 1px;
    background: var(--border);
    opacity: 0.3;
}

/* Menu mobile - caché sur desktop */
.header-mobile-menu {
    display: none;
}

.search-container { display: none; }

.controls-bar.centered {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}
.toggle-group.no-border {
    border: none;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* États du toggle : texte en gras quand actif */
.toggle-group.no-border span {
    transition: font-weight 0.2s;
}

.toggle-group.no-border span.active {
    font-weight: 700;
}


/* --- LE CŒUR DU DESIGN : PHONE & WRAPPER --- */

.ranking-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 70vh; 
}

/* Le cadre du smartphone */
.phone-bezel {
    border: 12px solid var(--bezel);
    border-radius: 50px;
    padding: 20px 0 0 0;
    background: var(--bg-card);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);

    width: 400px;
    height: 650px;
    overflow: hidden;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-color 0.3s ease,
                background-color 0.3s ease;
    position: relative;
    display: flex;
}

/* L'état "Tablette" étendu (droite) */
.phone-bezel.tablet-mode {
    width: 1050px; /* Élargi pour inclure la colonne Design */
}

/* L'état "Personnalisation" étendu (gauche) */
.phone-bezel.customize-mode {
    width: 750px; /* 350px customize + 400px phone */
}

/* Les deux extensions activées */
.phone-bezel.tablet-mode.customize-mode {
    width: 1400px; /* 350px customize + 1050px phone */
}

/* Section personnalisation intégrée */
.customize-integrated {
    width: 0;
    overflow: hidden;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    flex-shrink: 0;
}

.phone-bezel.customize-mode .customize-integrated {
    width: 350px;
}

.customize-content {
    width: 350px;
    padding: 40px 25px;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;

    /* Scrollbar stylisée */
    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) var(--bg-card);
}

.customize-content::-webkit-scrollbar {
    width: 8px;
}

.customize-content::-webkit-scrollbar-track {
    background: var(--bg-card);
}

.customize-content::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

.customize-content::-webkit-scrollbar-thumb:hover {
    background: var(--text);
}

/* L'écran à l'intérieur du cadre */
.phone-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0 25px 0 25px;
    overflow-x: hidden;
    flex-shrink: 0;
    width: 400px;
    transition: width 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.phone-bezel.tablet-mode .phone-screen {
    width: 1050px;
}


/* --- LA FLÈCHE D'EXPANSION --- */
.expand-trigger {
    font-size: 4rem;
    font-weight: 300;
    margin-left: 30px;
    cursor: pointer;
    user-select: none;
    color: var(--text);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.2s ease;
}

.expand-trigger:hover {
    color: var(--accent);
}

.expand-trigger.rotated {
    transform: rotate(180deg);
}


/* --- LA GRILLE DU TABLEAU (CSS Grid animé) --- */

/* Définition de la grille de base (Smartphone) */
.grid-layout {
    display: grid;
    grid-template-columns: 40px 2fr 80px 0fr 0fr 0fr 0fr 0fr; /* 8 colonnes avec Design */
    gap: 0px;
    align-items: center;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Définition de la grille étendue (Tablette) */
.phone-bezel.tablet-mode .grid-layout {
    grid-template-columns: 40px 1.5fr 80px 1fr 1fr 1fr 1fr 1fr; /* Design inclus */
    gap: 15px;
}


/* --- STYLE DU CONTENU DU TABLEAU --- */

.table-header {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
    padding-bottom: 15px;
    color: var(--text-muted);
}

.header-separator {
    height: 2px;
    background: var(--text);
    margin-bottom: 20px;
    width: 100%;
}

/* Gestion de l'apparition des colonnes détails */
.col-detail, .sortable:not(.header-note) {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease 0.1s, visibility 0.4s;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    font-size: 0.9rem;
    text-align: center;
}

/* Quand on passe en mode tablette, on les rend visibles */
.phone-bezel.tablet-mode .col-detail,
.phone-bezel.tablet-mode .sortable:not(.header-note) {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.2s;
}

/* Icônes des catégories dans le header */
.table-header .col-detail.sortable {
    cursor: pointer;
}

.table-header .col-detail.sortable svg {
    width: 18px;
    height: 18px;
    stroke: var(--text);
    transition: stroke 0.2s ease;
}

.table-header .col-detail.sortable:hover svg {
    stroke: var(--accent);
}

.table-header .col-detail.sortable.active svg {
    stroke: var(--accent);
}

.scrollable-content {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: thin;
    scrollbar-color: var(--text-muted) var(--bg-card);
    padding-right: 5px;
}

.scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: var(--bg-card);
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: var(--text);
}

.phone-row {
    padding: 15px 0;
    border-bottom: 1px solid rgba(194, 192, 182, 0.15);
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    transition: border-bottom 0.3s ease;
    cursor: pointer;
}

.phone-row:hover {
    background: rgba(194, 192, 182, 0.05);
}

/* Quand le détail est ouvert, on cache la bordure de la ligne */
.phone-row-group.expanded .phone-row {
    border-bottom: none;
}

/* La bordure passe sous le contenu déplié */
.phone-row-group::after {
    content: '';
    display: block;
    height: 1px;
    background: var(--bg-card);
    margin: 0;
    transition: margin-top 0.4s ease-out;
}

.phone-row-group.expanded::after {
    margin-top: 0;
}
/* Médailles pour le podium */
.col-rank {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
}

/* MODIFICATION 3 : Cacher le numéro pour le top 3 */
.podium-1 .col-rank,
.podium-2 .col-rank,
.podium-3 .col-rank {
    color: transparent; /* Cache le numéro */
}

.medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 5px;
    vertical-align: middle;
    border: 2px solid;
}

.medal-gold {
    border-color: var(--accent);
    color: var(--accent);
}

.medal-silver {
    border-color: var(--text);
    color: var(--text);
}

.medal-bronze {
    border-color: var(--text);
    color: var(--text);
}


.col-score {
    font-weight: 700;
    text-align: right;
    font-size: 1.2rem;
    color: var(--text);
}

.header-note { text-align: right; }


/* --- ACCORDÉON DESCRIPTIF MODIFIÉ --- */
.toggle-desc-btn {
    font-size: 1.5rem;
    margin-left: 8px;
    cursor: pointer;
    vertical-align: middle;
    color: var(--text);
    transition: transform 0.3s, color 0.2s;
    display: inline-block;
    rotate: 90deg;
}

.toggle-desc-btn:hover,
.phone-row:hover .toggle-desc-btn {
    color: var(--accent);
}





.phone-desc-content {
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.4s ease-out;
    margin: 0 -25px;
}

.phone-desc-content.open { 
    max-height: 180px; 
}

.desc-inner {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    margin: 10px 0;
}

/* Image miniature avec fond blanc arrondi */
.phone-mini-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px;
}

/* Zone cliquable pour accéder à la fiche complète */
.desc-link-area {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.desc-link-area:hover {
    opacity: 0.85;
}

.desc-link-area:hover .read-more-link {
    color: var(--accent);
}

.desc-text {
    flex: 1;
}

.desc-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: var(--text);
}

.read-more-link {
    display: inline-block;
    margin-top: 5px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: color 0.2s ease;
}

.read-more-link:hover {
    color: var(--accent);
}

/* Section prix dans la description dépliée */
.desc-price-section {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-left: auto;
    padding-left: 20px;
    border-left: 1px solid rgba(194, 192, 182, 0.2);
}

/* Afficher la section prix uniquement en mode tablette */
.phone-bezel.tablet-mode .desc-price-section {
    display: flex;
}

.desc-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.buy-link {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.buy-link:hover {
    background: #c94a35;
}


/* --- TOGGLE SWITCH --- */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin: 0 10px;
    vertical-align: middle;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    transition: .4s;
}

.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 2px;
    background-color: var(--text);
    transition: .4s;
}

input:checked + .slider { background-color: var(--bg-card); border-color: var(--border); }
input:checked + .slider:before { transform: translateX(20px); background-color: #fff; }


/* ========================================= */
/* --- PAGE DÉTAILLÉE (PHONE.HTML) --- */
/* ========================================= */

.detail-controls {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    padding: 0px 0;
    margin-bottom: 0px;
}

.detail-page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
}

/* Cadre style tablette pour la page détaillée - TAILLE FIXE */
.detail-bezel {
    width: 1050px !important;
    height: 650px !important;
    padding: 40px 0 !important;
    overflow: hidden;
    margin-bottom: 0;
}

.detail-screen {
    padding: 0 50px !important;
    padding-right: 30px !important; /* Laisser de la place pour la scrollbar */
    overflow-y: scroll !important; /* Toujours afficher la scrollbar */
    overflow-x: hidden;
    height: 100% !important;

    scrollbar-width: auto;
    scrollbar-color: var(--text) var(--bg);
}

.detail-screen::-webkit-scrollbar {
    width: 12px;
}

.detail-screen::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 6px;
}

.detail-screen::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 6px;
    border: 3px solid var(--bg);
}

.detail-screen::-webkit-scrollbar-thumb:hover {
    background: var(--text);
}

/* Indicateur de scroll en bas pour signaler le contenu scrollable */
.detail-bezel::after {
    content: '';
    position: absolute;
    bottom: 40px; /* Au-dessus du padding du bezel */
    left: 12px;
    right: 12px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
    pointer-events: none;
    border-radius: 0 0 38px 38px;
    z-index: 10;
}

/* En-tête avec image */
.detail-header {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid var(--border);
}

/* Image avec fond blanc arrondi */
.detail-phone-img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 20px;
    padding: 15px;
}

.detail-header-text {
    flex: 1;
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: -1px;
    color: var(--text);
}

.detail-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 0 0 20px 0;
    font-weight: 500;
}

/* Stats : Classement + Note */
.detail-stats {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 20px;
}

.detail-rank {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.rank-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.rank-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

.rank-total {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.detail-global-score {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.score-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text);
    transition: color 0.3s;
}

.score-max {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Synthèse */
.detail-synthesis {
    margin-bottom: 40px;
}

.detail-synthesis h2 {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    color: var(--text);
}

.detail-synthesis p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
}

/* Points forts/faibles */
.detail-points-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.points-box {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.points-box h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.points-forts h3 {
    color: var(--score-high);
}

.points-faibles h3 {
    color: var(--accent);
}

.points-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.points-box li {
    padding: 8px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
    border-bottom: 1px solid rgba(194, 192, 182, 0.2);
}

.points-box li:last-child {
    border-bottom: none;
}

/* Tableau des prix */
.price-table {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 40px;
    border: 1px solid var(--border);
}

.price-table h3 {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 20px 0;
    color: var(--text);
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(194, 192, 182, 0.2);
}

.price-row:last-child {
    border-bottom: none;
}

.price-row.best-price {
    background: rgba(226, 90, 67, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--accent);
}

.best-badge {
    background: var(--score-high);
    color: #fff;
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 20px;
    margin-left: 10px;
    font-weight: 600;
}

.merchant-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text);
}

.price {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--score-high);
}

.price-unavailable {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.price-update-info {
    margin-top: 15px;
    text-align: center;
}

.price-update-info small {
    color: var(--text-muted);
}

.buy-btn {
    background: var(--accent);
    color: #fff;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    background: #c94a35;
    transform: translateY(-2px);
}

/* Grille des catégories */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.cat-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.cat-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.cat-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text);
}

.cat-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    transition: color 0.3s;
}

.cat-score-max {
    font-size: 1rem;
    color: var(--text-muted);
}

.cat-subtitle {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0 0 15px 0;
    font-style: italic;
}

.cat-details {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
}

/* Date de synthèse */
.synthesis-date {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-style: italic;
}

/* Lien retour sous le cadre */
.back-link-container {
    text-align: center;
    margin-top: 30px;
    padding-top: 0;
    border-top: none;
    width: 100%;
}

.back-link {
    border-radius: 6px;
    padding: 12px 24px;
    margin: 5px;
    border: 2px solid var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    display: inline-block;
}

.back-link:hover {
    border: 2px solid var(--accent);
    color: var(--accent);
}

/* Footer pour les mentions légales */
footer {
    max-width: 1200px;
    background: var(--bg);
    margin-top: 40px;
    border-top: 3px solid var(--bg-card);
    justify-self: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 40px;
    text-align: center;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--accent);
}

.footer-sep {
    color: var(--text-muted);
    margin: 0 15px;
}

/* Page mentions légales */
.legal-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.legal-page h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text);
}

.legal-page h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text);
}

.legal-page p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: var(--text);
}

/* ========================================= */
/* --- RESPONSIVE MOBILE --- */
/* ========================================= */

@media (max-width: 768px) {
    /* Réduction des marges générales */
    body {
        padding-bottom: 30px;
    }

    /* === HEADER MOBILE === */
    .header-container {
        padding: 15px 15px;
        gap: 12px;
    }

    .logo-header {
        height: 36px;
    }

    /* Cacher les éléments desktop */
    .header-subtitle-desktop {
        display: none;
    }

    .header-nav {
        display: none;
    }

    .theme-toggle {
        display: none;
    }

    /* Afficher le sous-titre mobile */
    .header-subtitle-mobile {
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: var(--text-muted);
        letter-spacing: 2px;
        text-transform: uppercase;
        font-weight: 500;
        padding: 0 15px 15px 15px;
    }

    /* Afficher le bouton menu hamburger */
    .header-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        margin-left: auto;
    }

    .header-menu-btn svg {
        width: 24px;
        height: 24px;
        stroke: var(--text);
        transition: stroke 0.2s ease;
    }

    .header-menu-btn:hover svg {
        stroke: var(--accent);
    }

    .menu-icon-close {
        display: none;
    }

    .header-menu-btn.active .menu-icon-open {
        display: none;
    }

    .header-menu-btn.active .menu-icon-close {
        display: inline;
    }

    /* Séparateur */
    .header-separator {
        margin: 0 15px;
    }

    /* Menu accordéon mobile */
    .header-mobile-menu {
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        background: var(--bg);
    }

    .header-mobile-menu.open {
        max-height: 300px;
    }

    .mobile-nav {
        display: flex;
        flex-direction: column;
        padding: 15px;
        gap: 5px;
    }

    .mobile-nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 15px;
        text-decoration: none;
        color: var(--text);
        font-weight: 500;
        font-size: 1rem;
        border-radius: 8px;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .mobile-nav-link svg {
        width: 20px;
        height: 20px;
        stroke: var(--text);
        transition: stroke 0.2s ease;
    }

    .mobile-nav-link:hover {
        background: var(--bg-card);
        color: var(--accent);
    }

    .mobile-nav-link:hover svg {
        stroke: var(--accent);
    }

    .mobile-nav-link small {
        font-size: 0.8rem;
        opacity: 0.7;
    }

    .mobile-nav-disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .mobile-nav-disabled:hover {
        background: transparent;
        color: var(--text);
    }

    .mobile-nav-disabled:hover svg {
        stroke: var(--text);
    }

    /* Bouton thème mobile */
    .mobile-theme-toggle {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 15px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text);
        font-weight: 500;
        font-size: 1rem;
        border-radius: 8px;
        transition: background 0.2s ease, color 0.2s ease;
        width: 100%;
        text-align: left;
    }

    .mobile-theme-toggle svg {
        width: 20px;
        height: 20px;
        stroke: var(--text);
        transition: stroke 0.2s ease;
    }

    .mobile-theme-toggle:hover {
        background: var(--bg-card);
        color: var(--accent);
    }

    .mobile-theme-toggle:hover svg {
        stroke: var(--accent);
    }

    .theme-label-dark {
        display: inline;
    }

    .theme-label-light {
        display: none;
    }

    [data-theme="light"] .theme-label-dark {
        display: none;
    }

    [data-theme="light"] .theme-label-light {
        display: inline;
    }

    /* Footer mobile */
    .footer-container {
        padding: 20px 15px;
    }

    /* Contrôles plus compacts */
    .controls-bar.centered {
        margin-bottom: 0px;
    }

    .toggle-group.no-border {
        font-size: 0.85rem;
    }
    
    /* === PAGE PRINCIPALE === */

    .ranking-wrapper {
        padding: 10px 5px;
        position: relative;
    }

    /* Cadre noir plus fin sur mobile */
    .phone-bezel {
        border-width: 6px;
        border-radius: 25px;
        padding: 15px 0 20px 0;
        width: 100%;
        max-width: 400px;
        height: auto;
        min-height: 500px;
    }
    
    /* IMPORTANT : Désactiver l'expansion tablette sur mobile */
    .phone-bezel.tablet-mode {
        width: 100% !important;
        max-width: 400px !important;
    }
    
    /* Forcer la grille smartphone même en mode "tablette" */
    .phone-bezel.tablet-mode .grid-layout {
        grid-template-columns: 30px minmax(0, 1fr) 50px 0fr 0fr 0fr 0fr 0fr !important;
        gap: 0px !important;
    }

    /* Grille mobile pour tous les modes */
    .grid-layout {
        grid-template-columns: 30px minmax(0, 1fr) 50px 0fr 0fr 0fr 0fr 0fr !important;
    }
    
    /* Garder les détails cachés sur mobile */
    .phone-bezel.tablet-mode .col-detail,
    .phone-bezel.tablet-mode .sortable:not(.header-note) {
        opacity: 0 !important;
        visibility: hidden !important;
    }
    
    /* Cacher la flèche d'expansion sur mobile */
    .expand-trigger {
        display: none;
    }
    
    .phone-screen {
        padding: 0 15px;
    }
    
    .scrollable-content {
        padding-right: 3px;
    }
    
    /* Lignes du tableau plus compactes */
    .phone-row {
        padding: 12px 0;
        font-size: 1rem;
    }
    
    .col-rank {
        font-size: 0.85rem;
    }
    
    .col-score {
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    /* Forcer le nom à ne pas dépasser */
    .col-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }

    /* Forcer la grille à respecter les colonnes */
    .phone-row.grid-layout {
        overflow: hidden;
    }

    /* Accordéon description plus compact */
    .phone-desc-content {
        margin: 0 -15px;
    }

    /* Forcer le lien et le texte à ne pas dépasser */
    .desc-link-area {
        overflow: hidden;
        min-width: 0;
        flex: 1;
    }

    .phone-desc-content.open {
        max-height: 200px;
    }

    .desc-inner {
        padding: 15px;
        gap: 12px;
    }

    .phone-mini-img {
        width: 60px;
        height: 60px;
        min-width: 60px;
        max-width: 60px;
        flex-shrink: 0;
    }
    
    .desc-title {
        font-size: 0.95rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    /* Empêcher le dépassement du contenu déplié */
    .desc-text {
        min-width: 0;
        overflow: hidden;
    }

    .desc-inner {
        overflow: hidden;
    }

    .read-more-link {
        font-size: 0.75rem;
    }
    
    /* === PAGE DÉTAILLÉE === */

    .detail-page-wrapper {
        padding: 10px 5px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Cadre noir plus fin sur mobile - sélecteurs très spécifiques */
    .detail-page-wrapper .phone-bezel.tablet-mode.detail-bezel,
    .phone-bezel.tablet-mode.detail-bezel,
    .detail-bezel {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        border-width: 6px !important;
        border-radius: 25px !important;
        padding: 20px 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    /* Désactiver l'indicateur de scroll sur mobile */
    .detail-bezel::after {
        display: none !important;
    }

    .detail-page-wrapper .phone-bezel.tablet-mode .phone-screen.detail-screen,
    .phone-bezel.tablet-mode .detail-screen,
    .detail-screen {
        padding: 0 15px !important;
        width: 100% !important;
        height: auto !important;
        overflow-y: visible !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* En-tête responsive */
    .detail-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .detail-phone-img {
        width: 150px !important;
        height: 150px !important;
        display: block !important;
        margin: 0 auto;
    }

    .detail-header-text {
        width: 100%;
        box-sizing: border-box;
    }

    .detail-title {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .detail-subtitle {
        font-size: 0.95rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Stats sur deux lignes si nécessaire */
    .detail-stats {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        width: 100%;
    }

    .detail-rank,
    .detail-global-score {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .rank-value,
    .score-value {
        font-size: 2rem;
    }

    /* Radar chart / Toile d'araignée mobile */
    .radar-chart-container {
        padding: 20px;
        width: 100% !important;
        box-sizing: border-box;
        overflow: hidden;
        margin-bottom: 30px;
    }

    .radar-chart-container canvas,
    #radarChart {
        width: 100% !important;
        max-width: 250px !important;
        height: auto !important;
        margin: 0 auto;
        display: block !important;
    }

    .radar-title {
        font-size: 1.2rem;
        text-align: center;
    }

    /* Synthèse */
    .detail-synthesis {
        width: 100%;
        box-sizing: border-box;
    }

    .detail-synthesis h2 {
        font-size: 1.3rem;
        word-wrap: break-word;
    }

    .detail-synthesis p {
        font-size: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Points forts/faibles sur une colonne */
    .detail-points-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
    }

    .points-box {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
    }

    .points-box li {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Tableau des prix */
    .price-table {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .price-table h3 {
        font-size: 1.3rem;
        word-wrap: break-word;
    }
    
    .price-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .price-row.best-price {
        padding: 12px;
    }
    
    .merchant-name {
        width: 100%;
        font-size: 1rem;
    }
    
    .best-badge {
        margin-left: 0;
        margin-top: 5px;
    }
    
    .price {
        flex: 1;
        font-size: 1.2rem;
    }
    
    .buy-btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    .price-unavailable {
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }
    
    /* Catégories sur une colonne */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
    }

    .cat-card {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .cat-title {
        font-size: 1.1rem;
        word-wrap: break-word;
    }

    .cat-subtitle {
        font-size: 0.95rem;
        word-wrap: break-word;
    }

    .cat-details {
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Lien retour */
    .back-link-container {
        margin-top: 20px;
    }
    
    .back-link {
        font-size: 0.9rem;
    }
    
    /* Page légale */
    .legal-page {
        padding: 0 15px;
    }
    
    .legal-page h1 {
        font-size: 1.6rem;
    }
    
    .legal-page h2 {
        font-size: 1.2rem;
    }
}

/* Responsive pour écrans desktop compacts (1920x1080 @ 150% = ~1280px CSS) */
@media (min-width: 769px) and (max-width: 1400px) {
    /* Phone bezel plus compact */
    .phone-bezel {
        width: 340px;
        height: 550px;
        border-width: 10px;
        border-radius: 40px;
        padding: 15px 0 0 0;
    }

    .phone-bezel.tablet-mode {
        width: 880px;
    }

    .phone-bezel.customize-mode {
        width: 620px;
    }

    .phone-bezel.tablet-mode.customize-mode {
        width: 1160px;
    }

    .phone-screen {
        width: 340px;
        padding: 0 20px;
    }

    .phone-bezel.tablet-mode .phone-screen {
        width: 880px;
    }

    /* Personnalisation plus compacte */
    .phone-bezel.customize-mode .customize-integrated {
        width: 280px;
    }

    .customize-content {
        width: 280px;
        padding: 30px 20px;
    }

    /* Grille plus compacte */
    .phone-bezel.tablet-mode .grid-layout {
        grid-template-columns: 35px 1.5fr 70px 1fr 1fr 1fr 1fr 1fr;
        gap: 10px;
    }

    /* Tailles de police réduites */
    .phone-row {
        padding: 12px 0;
        font-size: 1rem;
    }

    .col-score {
        font-size: 1.1rem;
    }

    .col-rank {
        font-size: 0.85rem;
    }

    .table-header {
        font-size: 0.75rem;
    }

    /* Flèche expansion */
    .expand-trigger {
        font-size: 3rem;
        margin-left: 20px;
    }

    /* Description dépliée */
    .phone-desc-content {
        margin: 0 -20px;
    }

    .phone-desc-content.open {
        max-height: 160px;
    }

    .desc-inner {
        padding: 15px 20px;
        gap: 15px;
    }

    .phone-mini-img {
        width: 70px;
        height: 70px;
    }

    .desc-title {
        font-size: 1rem;
    }

    /* Header */
    .header-container {
        padding: 25px 30px 15px 30px;
    }

    .logo-header {
        height: 40px;
    }

    .header-subtitle-desktop {
        font-size: 0.75rem;
    }

    .header-nav {
        gap: 18px;
        margin-right: 15px;
    }

    .header-nav-link {
        font-size: 0.85rem;
    }

    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    /* Section intro */
    .ranking-main-title {
        font-size: 2rem;
    }

    .ranking-subtitle {
        font-size: 1rem;
    }

    .title-plus-sub {
        gap: 15px;
    }

    /* Page détail */
    .detail-bezel {
        width: 880px !important;
        height: 550px !important;
        padding: 30px 0 !important;
    }

    .detail-screen {
        padding: 0 40px !important;
        padding-right: 25px !important;
    }

    .detail-header {
        gap: 30px;
        margin-bottom: 30px;
        padding-bottom: 25px;
    }

    .detail-phone-img {
        width: 160px;
        height: 160px;
    }

    .detail-title {
        font-size: 2rem;
    }

    .detail-subtitle {
        font-size: 1rem;
    }

    .rank-value,
    .score-value {
        font-size: 2.2rem;
    }

    .detail-stats {
        gap: 30px;
    }

    .categories-grid,
    .detail-points-grid {
        gap: 20px;
    }

    .cat-card,
    .points-box {
        padding: 20px;
    }

    .price-table {
        padding: 25px;
    }

    /* Radar chart */
    .radar-chart-container {
        padding: 25px;
    }
}

/* Responsive pour tablettes (écrans encore plus petits) */
@media (max-width: 1100px) and (min-width: 769px) {
    .detail-bezel {
        width: 95% !important;
        border-radius: 20px;
    }

    .categories-grid,
    .detail-points-grid {
        grid-template-columns: 1fr;
    }

    .detail-header {
        flex-direction: column;
        text-align: center;
    }
}

/* === TRÈS PETITS ÉCRANS (360px et moins) === */
@media (max-width: 400px) {
    /* FORCER tous les conteneurs à respecter la largeur */
    .phone-bezel {
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .phone-screen {
        padding: 0 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .scrollable-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Grille encore plus compacte */
    .grid-layout {
        grid-template-columns: 22px minmax(0, 1fr) 40px 0fr 0fr 0fr 0fr 0fr !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .phone-bezel.tablet-mode .grid-layout {
        grid-template-columns: 22px minmax(0, 1fr) 40px 0fr 0fr 0fr 0fr 0fr !important;
    }

    /* Forcer la grille à ne pas dépasser */
    .phone-row.grid-layout {
        overflow: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .phone-row-group {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* Réduire la taille du rang et de la note */
    .col-rank {
        font-size: 0.7rem !important;
    }

    .col-score {
        font-size: 0.95rem !important;
        flex-shrink: 0 !important;
    }

    /* Nom du téléphone plus compact - FORCER */
    .col-name {
        font-size: 0.85rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        min-width: 0 !important;
    }

    /* Cacher le chevron sur très petit écran pour gagner de la place */
    .toggle-desc-btn {
        display: none !important;
    }

    /* Accordéon description encore plus compact */
    .phone-desc-content {
        margin: 0 -8px !important;
        width: calc(100% + 16px) !important;
        max-width: calc(100% + 16px) !important;
        overflow: hidden !important;
    }

    .desc-inner {
        padding: 10px !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* Forcer le lien à prendre toute la largeur */
    .desc-link-area {
        overflow: hidden !important;
        min-width: 0 !important;
        flex: 1 1 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Garder la taille originale de la photo */
    .phone-mini-img {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        flex-shrink: 0 !important;
    }

    .desc-text {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .desc-title {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        max-width: 100% !important;
        word-break: break-word !important;
    }

    .read-more-link {
        font-size: 0.7rem !important;
    }

    /* Médailles plus petites */
    .medal {
        width: 18px !important;
        height: 18px !important;
        font-size: 0.6rem !important;
    }
}

        /* Overlay semi-transparent */
        .cookie-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 9998;
        }

        .cookie-overlay.active {
            display: block;
        }

        /* Banniere principale */
        .cookie-banner {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--bg-card);
            box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
            z-index: 9999;
            padding: 30px;
            max-height: 90vh;
            overflow-y: auto;
            border-top: 2px solid var(--border);
        }

        .cookie-banner.active {
            display: block;
        }

        .cookie-content {
            max-width: 1200px;
            margin: 0 auto;
        }

        .cookie-header {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 20px;
        }

        .cookie-icon {
            width: 32px;
            height: 32px;
            stroke: var(--text);
        }

        .cookie-btn-icon {
            width: 16px;
            height: 16px;
            stroke: var(--text);
            vertical-align: middle;
        }

        .cookie-manage-btn:hover .cookie-btn-icon {
            stroke: #fff;
        }

        .cookie-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--text);
        }

        .cookie-description {
            margin-bottom: 20px;
            color: var(--text);
            font-size: 0.95rem;
        }

        .cookie-description a {
            color: var(--accent);
            text-decoration: underline;
        }

        /* Boutons principaux */
        .cookie-buttons {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            margin-bottom: 15px;
        }

        .btn {
            padding: 12px 30px;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .btn-accept {
            background: var(--accent);
            color: #fff;
        }

        .btn-accept:hover {
            background: #c94a35;
        }

        .btn-refuse {
            background: var(--bg);
            color: var(--text);
            border: 2px solid var(--border);
        }

        .btn-refuse:hover {
            background: var(--bg-card);
        }

        .cookie-banner .btn-customize {
            background: var(--bg);
            color: var(--text);
            border: 2px solid var(--border);
        }

        .cookie-banner .btn-customize:hover {
            background: var(--bg-card);
        }

        /* Panel de personnalisation */
        .cookie-customize {
            display: none;
            margin-top: 25px;
            padding-top: 25px;
            border-top: 2px solid var(--border);
        }

        .cookie-customize.active {
            display: block;
        }

        .cookie-category {
            margin-bottom: 20px;
            padding: 20px;
            background: var(--bg);
            border-radius: 12px;
            border: 1px solid var(--border);
        }

        .category-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .category-title {
            font-weight: 700;
            font-size: 1.1rem;
            color: var(--text);
        }

        .category-required {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-style: italic;
        }

        .category-description {
            color: var(--text);
            font-size: 0.9rem;
            line-height: 1.5;
        }

        /* Toggle switch (cookie banner specific) */
        .cookie-banner .switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }

        .cookie-banner .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .cookie-banner .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--bg);
            border: 1px solid var(--border);
            transition: 0.4s;
            border-radius: 26px;
        }

        .cookie-banner .slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 3px;
            bottom: 2px;
            background-color: var(--text);
            transition: 0.4s;
            border-radius: 50%;
        }

        .cookie-banner input:checked + .slider {
            background-color: var(--accent);
            border-color: var(--accent);
        }

        .cookie-banner input:checked + .slider:before {
            transform: translateX(24px);
            background-color: #fff;
        }

        .cookie-banner input:disabled + .slider {
            background-color: var(--text-muted);
            cursor: not-allowed;
        }

        /* Bouton de gestion (petit bouton en bas de page) */
        .cookie-manage-btn {
            display: none;
            position: fixed;
            bottom: 20px;
            left: 20px;
            background: var(--bg-card);
            color: var(--text);
            border: 2px solid var(--border);
            padding: 10px 20px;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            z-index: 9997;
            font-size: 0.85rem;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }

        .cookie-manage-btn:hover {
            background: var(--accent);
            border-color: var(--accent);
            color: #fff;
        }

        .cookie-manage-btn.visible {
            display: block;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .cookie-banner {
                padding: 20px;
            }

            .cookie-title {
                font-size: 1.2rem;
            }

            .cookie-buttons {
                flex-direction: column;
            }

            .btn {
                width: 100%;
            }

            .cookie-manage-btn {
                bottom: 10px;
                left: 10px;
                right: 10px;
                width: calc(100% - 20px);
            }
        }

        /* Demo content */
        .demo-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 40px 20px;
        }

        .demo-content h1 {
            font-size: 2.5rem;
            margin-bottom: 20px;
        }

        .demo-content p {
            margin-bottom: 15px;
            color: #333;
        }

/* === PANEL DE PERSONNALISATION === */

/* Flèche gauche */
.expand-trigger-left {
    margin-right: 30px;
    margin-left: 0;
}

.expand-trigger-left.rotated {
    transform: rotate(180deg);
}

.customize-section {
    margin-bottom: 30px;
}

.customize-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
}

.importance-badge {
    background: var(--bg);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1px solid var(--border);
}

.price-display {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Curseurs */
.range-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--bg);
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
    border: 1px solid var(--border);
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text);
    cursor: pointer;
    transition: all 0.3s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--accent);
}

.range-slider::-webkit-slider-thumb:active {
    background: var(--accent);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text);
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--accent);
}

.range-slider::-moz-range-thumb:active {
    background: var(--accent);
}

/* Marqueurs de curseur */
.range-markers {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.importance-markers span {
    flex: 1;
    text-align: center;
}

/* Double curseur prix */
.dual-range-container {
    position: relative;
    padding-bottom: 25px;
}

.dual-range-container input[type="range"] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    top: 0;
}

.dual-range-container input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
}

.dual-range-container input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
}

#priceMin {
    z-index: 2;
    background: transparent;
}

#priceMax {
    z-index: 1;
}

.dual-range-container .range-markers {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    margin-top: 0;
}

/* Catégories */
.category-slider {
    margin-bottom: 20px;
}

.category-slider label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Boutons */
.customize-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--bg-card);
}

.btn-customize {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #c94a35;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg);
}

/* Toggle désactivé quand personnalisation active */
.toggle-group.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .expand-trigger-left {
        display: none; /* On cachera la flèche sur mobile */
    }

    .customize-integrated {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        height: 0;
        z-index: 1000;
        border-radius: 0;
        border: none;
        border-bottom: 4px solid var(--bezel);
        transition: height 0.4s ease;
        background: var(--bg);
    }

    .phone-bezel.customize-mode .customize-integrated {
        height: auto;
        max-height: 70vh;
        overflow-y: auto;
        width: 100% !important;
    }

    .phone-bezel.customize-mode .customize-content {
        width: 100%;
        padding: 20px;
    }

    /* Bouton mobile pour ouvrir la personnalisation */
    .customize-mobile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: -45px;
        left: 10px;
        width: 40px;
        height: 40px;
        background: var(--bg-card);
        border: 2px solid var(--border);
        border-radius: 50%;
        cursor: pointer;
        z-index: 10;
        padding: 0;
        transition: all 0.2s ease;
    }

    .customize-mobile-btn:hover {
        border-color: var(--accent);
    }

    .customize-mobile-btn svg {
        width: 20px;
        height: 20px;
        stroke: var(--text);
        transition: stroke 0.2s ease;
    }

    .customize-mobile-btn:hover svg {
        stroke: var(--accent);
    }
}

/* Desktop uniquement */
@media (min-width: 769px) {
    .customize-mobile-btn {
        display: none;
    }
}

/* === SECTION PRIX SIMPLIFIÉE === */

.price-section-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--bg-card);
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.best-price-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.price-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
}

.price-merchant {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.buy-btn-simple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.buy-btn-simple:hover {
    background: var(--accent-hover, #e06825);
    transform: translateY(-1px);
}

/* Responsive prix simplifié */
@media (max-width: 480px) {
    .price-section-simple {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px 20px;
    }

    .best-price-display {
        align-items: center;
    }

    .buy-btn-simple {
        width: 100%;
    }
}

/* === SECTION "A LA UNE" - ARTICLES DU BLOG === */

.featured-articles-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 0px 20px 15px 20px;
    background: var(--bg);
    margin-bottom: 0;
}

.featured-label {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    white-space: nowrap;
}

.featured-slider {
    position: relative;
    height: 24px;
    overflow: hidden;
    max-width: 600px;
    flex: 1;
}

.featured-track {
    display: flex;
    flex-direction: column;
    animation: slideUp 9s ease-in-out infinite;
}

.featured-article-link {
    height: 24px;
    line-height: 24px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.featured-article-link:hover {
    color: var(--accent);
}

@keyframes slideUp {
    0%, 25% {
        transform: translateY(0);
    }
    33%, 58% {
        transform: translateY(-24px);
    }
    66%, 91% {
        transform: translateY(-48px);
    }
    100% {
        transform: translateY(0);
    }
}

/* === TITRE ET INTRO DU CLASSEMENT === */

.ranking-intro {
    max-width: 1200px;
    margin: 20px auto 0px auto;
    padding: 20px 15px 20px 15px;
    text-align: center;
    
}

.title-plus-sub {
    display: flex;
    align-items: flex-end;  /* Aligne les éléments par le bas */
    justify-content: center;
    gap: 20px;
}

.ranking-main-title {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--text);
    margin: 0 0 0px 0;
    line-height: 0.7;
}

.ranking-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin: 0 0 0px 0;
    line-height: 0.7;
}

/* Accordéon "Comment ça marche ?" */
.how-it-works-accordion {
    max-width: 700px;
    margin: 0 auto;
}

.how-it-works-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    transition: color 0.2s ease;
    user-select: none;
}

.how-it-works-trigger:hover {
    color: var(--accent);
}

.how-it-works-trigger:hover .how-it-works-arrow {
    color: var(--accent);
}

.how-it-works-arrow {
    font-size: 1.2rem;
    font-weight: 400;
    transform: rotate(90deg);
    transition: transform 0.3s ease, color 0.2s ease;
    display: inline-block;
}

.how-it-works-accordion.open .how-it-works-arrow {
    transform: rotate(270deg);
}

.how-it-works-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    text-align: left;
    padding: 0 20px;
}

.how-it-works-accordion.open .how-it-works-content {
    max-height: 300px;
}

.how-it-works-content p {
    margin: 0 0 12px 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
}

.how-it-works-content p:last-child {
    margin-bottom: 15px;
}

.hiw-label {
    font-weight: 700;
    color: var(--text);
}

.hiw-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    stroke: var(--text);
}

/* Affichage desktop/mobile du contenu */
.how-it-works-mobile {
    display: none;
}

.how-it-works-desktop {
    display: block;
}

/* Responsive pour la section A la une et intro */
@media (max-width: 768px) {
    .featured-articles-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px 15px;
    }

    .featured-label {
        font-size: 0.8rem;
    }

    .featured-slider {
        max-width: 100%;
        width: 100%;
        text-align: center;
    }

    .featured-article-link {
        font-size: 0.85rem;
        text-align: center;
        display: block;
    }

    .ranking-intro {
        padding: 15px 15px 15px 15px;
    }

    .ranking-main-title {
        font-size: 1.8rem;
    }

    .ranking-subtitle {
        font-size: 1rem;
    }

    /* Titre + sous-titre sur deux lignes en mobile */
    .title-plus-sub {
        flex-direction: column;
        align-items: center;  /* Centre horizontalement */
        gap: 10px;
    }

    /* Accordéon mobile */
    .how-it-works-trigger {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .how-it-works-content {
        padding: 0 15px;
    }

    .how-it-works-content p {
        font-size: 0.85rem;
    }

    /* Inverser l'affichage desktop/mobile */
    .how-it-works-mobile {
        display: block;
    }

    .how-it-works-desktop {
        display: none;
    }
}

/* === TOILE D'ARAIGNÉE === */

.radar-chart-container {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border);
}

.radar-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 20px 0;
    color: var(--text);
}

#radarChart {
    max-width: 100%;
    height: auto;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .radar-chart-container {
        padding: 20px;
        width: 100%;
        overflow: hidden;
    }

    #radarChart {
        width: 100% !important;
        max-width: 280px !important;
        height: auto !important;
        margin: 0 auto;
        display: block;
    }

    .radar-title {
        font-size: 1.3rem;
    }
}