/* Composants partagés de l'interface : couleurs des marques, pastilles, boutons, champs, vignettes.
   Les couleurs des marques viennent de la base (marque.couleur, choisie dans l'outil d'administration) : le composant
   CouleursMarques les ajoute à la page ; celles d'ici ne servent qu'avant la lecture des référentiels. */

:root {
    --sony: #2457C5;
    --sony-clair: #D3DDF3;
    --sony-sombre: #86A8F2;
    --nintendo: #D3271B;
    --nintendo-clair: #F6D4D1;
    --nintendo-sombre: #FF8A80;
    --microsoft: #107C10;
    --microsoft-clair: #CFE5CF;
    --microsoft-sombre: #6CCB6C;
    --sega: #6A3FB5;
    --sega-clair: #E1D9F0;
    --sega-sombre: #B9A2F0;
    --autre: #6B6B6B;
    --autre-clair: #E1E1E1;
    --autre-sombre: #B5B5B5;

    --bordure: #E6E8EA;
    --bordure-champ: #D3D7DB;
    --vert-foret-fonce: #3A6B12;
    --vert-foret-clair: #EEF6E6;
    --ombre-carte: 0 1px 2px rgba(26, 26, 26, .05), 0 6px 18px rgba(26, 26, 26, .06);
    --ombre-survol: 0 2px 4px rgba(26, 26, 26, .06), 0 12px 28px rgba(26, 26, 26, .10);
    --rayon: 12px;
}

.marque-sony { --marque: var(--sony); --marque-clair: var(--sony-clair); --marque-sombre: var(--sony-sombre); }
.marque-nintendo { --marque: var(--nintendo); --marque-clair: var(--nintendo-clair); --marque-sombre: var(--nintendo-sombre); }
.marque-microsoft { --marque: var(--microsoft); --marque-clair: var(--microsoft-clair); --marque-sombre: var(--microsoft-sombre); }
.marque-sega { --marque: var(--sega); --marque-clair: var(--sega-clair); --marque-sombre: var(--sega-sombre); }
.marque-autre { --marque: var(--autre); --marque-clair: var(--autre-clair); --marque-sombre: var(--autre-sombre); }

/* Texte à la couleur de la marque : la couleur elle-même en thème clair, sa teinte lumineuse en thème sombre. */
[class*="marque-"] { --marque-texte: var(--marque); }

/* Thème sombre : bordures, ombres et fonds verts plus sombres ; les fonds pâles des marques deviennent des teintes sombres. */
:root[data-theme="sombre"] {
    --bordure: #2E2E2E;
    --bordure-champ: #3D3D3D;
    --vert-foret-clair: rgba(141, 198, 63, .14);
    --ombre-carte: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .35);
    --ombre-survol: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .5);
}
:root[data-theme="sombre"] [class*="marque-"] {
    --marque-texte: var(--marque-sombre);
    --marque-clair: color-mix(in srgb, var(--marque) 22%, #1C1C1C);
}

*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.chiffres { font-variant-numeric: tabular-nums; }
.icone { flex: none; vertical-align: middle; }
.masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Logotype : texte en Fredoka, « Watt » en Noir Armure et « Collection » en Vert Forêt. */
.logotype {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: "Fredoka", sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    color: var(--texte);
    white-space: nowrap;
}
.logotype .collection { color: var(--vert-texte); }
:is(.sombre, [data-theme="sombre"]) .logotype { color: #fff; }
:is(.sombre, [data-theme="sombre"]) .logotype .collection { color: var(--vert-feuille); }

/* Mascotte : l'image vient de wwwroot/images. Tant qu'elle manque, une pastille verte la remplace. */
.mascotte { display: inline-block; position: relative; flex: none; }
.mascotte img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Tête : image recadrée sur son contenu, 342 × 256 ; la hauteur est donnée par le composant. */
.mascotte.tete { aspect-ratio: 342 / 256; width: auto; }
.mascotte .substitut {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--vert-feuille);
    color: var(--texte);
}
.mascotte.en-pied .substitut { border-radius: 40% 40% 24px 24px; }
.mascotte.chargee .substitut { display: none; }
.mascotte:not(.chargee) img { opacity: 0; }

/* Pastille de plateforme, à la couleur de la marque. */
.pastille {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--texte);
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    background: var(--marque-clair);
    white-space: nowrap;
}
.pastille .point { width: 8px; height: 8px; border-radius: 50%; background: var(--marque); flex: none; }
.pastille.pleine { background: var(--marque); color: #fff; }
.pastille.pleine .point { background: rgba(255, 255, 255, .75); }
:is(.sombre, [data-theme="sombre"]) .pastille { background: rgba(255, 255, 255, .08); color: #fff; }
:is(.sombre, [data-theme="sombre"]) .pastille .point { background: var(--marque-sombre); }
:is(.sombre, [data-theme="sombre"]) .pastille.pleine { background: var(--marque); }
:is(.sombre, [data-theme="sombre"]) .pastille.pleine .point { background: rgba(255, 255, 255, .75); }

/* Puce d'état : vert pour le très bon état, gris pour l'usure normale, ambre puis rouge pour l'abîmé. */
.puce-etat {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}
.puce-etat[data-niveau="1"], .puce-etat[data-niveau="2"], .puce-etat[data-niveau="3"] { color: var(--vert-texte); background: var(--vert-foret-clair); }
.puce-etat[data-niveau="4"] { color: var(--texte-moyen); background: var(--fond-gris); }
.puce-etat[data-niveau="5"], .puce-etat[data-niveau="6"] { color: var(--ambre-texte); background: var(--ambre-fond); }
.puce-etat[data-niveau="7"] { color: var(--rouge-texte); background: var(--rouge-fond); }
.puce-etat[data-niveau="0"] { color: var(--gris-ardoise); background: transparent; border: 1px dashed var(--bordure-champ); }
:is(.sombre, [data-theme="sombre"]) .puce-etat[data-niveau="1"], :is(.sombre, [data-theme="sombre"]) .puce-etat[data-niveau="2"], :is(.sombre, [data-theme="sombre"]) .puce-etat[data-niveau="3"] { color: var(--vert-feuille); background: rgba(141, 198, 63, .14); }
:is(.sombre, [data-theme="sombre"]) .puce-etat[data-niveau="4"] { color: #D0D0D0; background: rgba(255, 255, 255, .08); }
:is(.sombre, [data-theme="sombre"]) .puce-etat[data-niveau="5"], :is(.sombre, [data-theme="sombre"]) .puce-etat[data-niveau="6"] { color: #FFC266; background: rgba(255, 170, 51, .14); }
:is(.sombre, [data-theme="sombre"]) .puce-etat[data-niveau="7"] { color: #FF8A80; background: rgba(255, 90, 78, .14); }

/* Badge d'un jeu dématérialisé, à la place des éléments physiques. */
.badge-demat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    color: var(--gris-ardoise);
    border: 1px dashed var(--bordure-champ);
}
:is(.sombre, [data-theme="sombre"]) .badge-demat { color: #A8A8A8; border-color: var(--texte-moyen); }

/* Jeu proposé pour le catalogue et refusé : il reste dans la collection, le motif est sur sa fiche. */
.non-retenu {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--ambre-fond);
    color: var(--ambre-texte);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

/* Vignette : la photo de l'utilisateur, ou un substitut à la couleur de la marque. */
.vignette {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--marque-clair);
    flex: none;
}
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette .substitut {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8%;
    text-align: center;
    color: var(--marque-texte);
    font-family: "Fredoka", sans-serif;
    font-weight: 600;
    line-height: 1.1;
}
:is(.sombre, [data-theme="sombre"]) .vignette { background: #2E2E2E; }
:is(.sombre, [data-theme="sombre"]) .vignette .substitut { color: var(--marque-sombre); }

/* Boutons */
.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.bouton.principal { background: var(--vert-foret); color: #fff; }
.bouton.principal:hover { background: var(--vert-foret-fonce); }
.bouton.secondaire { background: var(--fond-carte); border-color: var(--bordure-champ); color: var(--texte); }
.bouton.secondaire:hover { border-color: var(--gris-ardoise); }
.bouton.discret { background: transparent; color: var(--gris-ardoise); }
.bouton.discret:hover { background: var(--fond-doux); color: var(--texte); }
.bouton.soluce { background: var(--orange-soluces); color: #fff; }
.bouton.soluce:hover { background: #D9520F; }
.bouton.petit { min-height: 32px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.bouton:focus-visible, .segments button:focus-visible { outline: 2px solid var(--vert-neon); outline-offset: 2px; }

/* Champs de saisie */
.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ > label, .champ > .etiquette { font-size: 13px; font-weight: 700; color: var(--gris-ardoise); }
.saisie {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--bordure-champ);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--fond-carte);
    color: var(--texte);
}
.saisie:focus { outline: 2px solid var(--vert-neon); outline-offset: -1px; border-color: var(--vert-foret); }
textarea.saisie { padding: 10px 12px; resize: vertical; line-height: 1.45; }
input.saisie.chiffres { text-align: right; }

/* Contrôle segmenté (équivalent d'un sélecteur d'options WinDev) */
.segments { display: inline-flex; flex-wrap: wrap; background: var(--fond-gris); border-radius: 9px; padding: 3px; gap: 2px; }
.segments button {
    border: 0;
    background: transparent;
    padding: 6px 12px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gris-ardoise);
    cursor: pointer;
}
.segments button:hover { color: var(--texte); }
.segments button.actif { background: var(--segment-actif); color: var(--texte); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }

.message-page {
    margin: 40px auto;
    max-width: 640px;
    padding: 16px 20px;
    border-radius: var(--rayon);
    background: #FFF6E5;
    color: #6B4200;
}

.pied-watt { text-align: center; color: var(--gris-ardoise); font-size: 13px; padding: 32px 16px; }
:is(.sombre, [data-theme="sombre"]) .pied-watt { color: #9A9A9A; }

/* Pictogrammes des éléments dans les listes */
.puces-elements { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.puce-element {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: 1px solid transparent;
}
.puce-element.present { color: var(--texte); background: var(--fond-gris); }
.puce-element.present[data-niveau="1"], .puce-element.present[data-niveau="2"], .puce-element.present[data-niveau="3"] { color: var(--vert-texte); background: var(--vert-foret-clair); }
.puce-element.present[data-niveau="5"], .puce-element.present[data-niveau="6"] { color: var(--ambre-texte); background: var(--ambre-fond); }
.puce-element.present[data-niveau="7"] { color: var(--rouge-texte); background: var(--rouge-fond); }
.puce-element.generique { color: var(--texte); border: 1px dashed var(--gris-ardoise); }
.puce-element.absent { color: var(--texte-pale); background: transparent; border-color: var(--bordure); }
.puce-element.inconnu { color: var(--texte-pale); border: 1px dashed var(--bordure); }
:is(.sombre, [data-theme="sombre"]) .puce-element.present { color: #E6E6E6; background: rgba(255, 255, 255, .08); }
:is(.sombre, [data-theme="sombre"]) .puce-element.present[data-niveau="1"], :is(.sombre, [data-theme="sombre"]) .puce-element.present[data-niveau="2"], :is(.sombre, [data-theme="sombre"]) .puce-element.present[data-niveau="3"] { color: var(--vert-feuille); background: rgba(141, 198, 63, .14); }
:is(.sombre, [data-theme="sombre"]) .puce-element.present[data-niveau="5"], :is(.sombre, [data-theme="sombre"]) .puce-element.present[data-niveau="6"] { color: #FFC266; background: rgba(255, 170, 51, .14); }
:is(.sombre, [data-theme="sombre"]) .puce-element.present[data-niveau="7"] { color: #FF8A80; background: rgba(255, 90, 78, .14); }
:is(.sombre, [data-theme="sombre"]) .puce-element.generique { color: #E6E6E6; border-color: #6A6A6A; }
:is(.sombre, [data-theme="sombre"]) .puce-element.absent { color: var(--texte-moyen); border-color: #2E2E2E; }
:is(.sombre, [data-theme="sombre"]) .puce-element.inconnu { color: var(--texte-moyen); border-color: #333; }

/* Légende des pictogrammes */
.legende-elements { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--gris-ardoise); }
.legende-elements > span { display: inline-flex; align-items: center; gap: 6px; }

/* Substitut de vignette qui affiche le titre du jeu */
.vignette .titre-substitut {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.15;
    color: var(--texte);
}
:is(.sombre, [data-theme="sombre"]) .vignette .titre-substitut { color: #F2F2F2; }

/* Dans un champ, le contrôle segmenté garde sa largeur naturelle. */
.champ > .segments { align-self: flex-start; }

.pied-watt a { color: inherit; }
.pied-watt .separateur { margin: 0 6px; }

/* Message temporaire en bas de l'écran */
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 12px 12px 12px 16px;
    border-radius: 12px;
    background: var(--noir-armure);
    color: #fff;
    font-weight: 700;
    box-shadow: var(--ombre-survol);
}
:root[data-theme="sombre"] .toast { background: #2A2A2A; border: 1px solid #3A3A3A; }
.toast button {
    display: grid;
    place-items: center;
    border: 0;
    background: transparent;
    color: #A8A8A8;
    cursor: pointer;
}

/* Fil d'Ariane */
.fil {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gris-ardoise);
}
.fil a { color: var(--vert-texte); text-decoration: none; }
.fil a:hover { text-decoration: underline; }

/* Case à cocher avec libellé */
.case {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.case input { width: 16px; height: 16px; accent-color: var(--vert-foret); }

/* Pages de compte : connexion et création */
.page-compte {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 64px - 90px);
    padding: 32px 16px;
    background: var(--vert-foret-clair);
}
.carte-compte {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 420px;
    padding: 32px 32px 28px;
    border-radius: 20px;
    background: var(--fond-carte);
    box-shadow: var(--ombre-carte);
}
.carte-compte .mascotte { align-self: center; }

/* Connexion et création : la mascotte en grand à gauche du formulaire, avec sa bulle (composant PageCompte). */
.page-compte.avec-mascotte {
    grid-template-columns: auto minmax(0, 420px);
    justify-content: center;
    align-items: center;
    gap: 24px 56px;
}
.cote-mascotte { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cote-mascotte .bulle {
    position: relative;
    max-width: 260px;
    margin: 0 0 14px;
    padding: 12px 18px;
    border-radius: 18px;
    background: var(--fond-carte);
    box-shadow: var(--ombre-carte);
    color: var(--texte);
    font-family: "Fredoka", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}
/* Pointe de la bulle, vers la mascotte. */
.cote-mascotte .bulle::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -9px;
    width: 18px;
    height: 18px;
    background: inherit;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 0 0 4px 0;
}
@media (max-width: 760px) {
    /* Sur un téléphone : la mascotte au-dessus du formulaire, plus petite, la bulle à sa droite. */
    .page-compte.avec-mascotte { grid-template-columns: minmax(0, 420px); gap: 12px; padding-top: 20px; }
    .cote-mascotte { flex-direction: row-reverse; justify-content: center; gap: 6px; }
    .cote-mascotte .mascotte { width: 120px !important; height: 120px !important; }
    .cote-mascotte .bulle { max-width: 200px; margin: 0; font-size: 17px; }
    .cote-mascotte .bulle::after { left: -7px; top: 50%; bottom: auto; transform: translateY(-50%) rotate(45deg); border-radius: 0 0 0 4px; }
}
.carte-compte h1 { margin: 0; text-align: center; font-size: 28px; }
.carte-compte .intro { margin: -10px 0 4px; text-align: center; color: var(--gris-ardoise); }
.carte-compte .aide { font-size: 12px; color: var(--gris-ardoise); }
.carte-compte .bouton { min-height: 46px; font-size: 16px; }
.carte-compte .bouton:disabled { opacity: .6; cursor: wait; }
.carte-compte .erreur { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--rouge-fond); color: var(--rouge-texte-fonce); font-weight: 600; font-size: 14px; }
.carte-compte ul.erreur { padding-left: 30px; }
.carte-compte div.erreur ul { margin: 4px 0 0; padding-left: 20px; font-weight: 600; }
.carte-compte .champ .erreur { margin-top: 2px; font-weight: 700; }
/* « Rester connecté » et « Mot de passe oublié ? » sur la même ligne, sous le mot de passe. */
.carte-compte .ligne-rester { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-top: -6px; font-size: 14px; }
.carte-compte .case-rester { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.carte-compte .case-rester input { width: 18px; height: 18px; margin: 0; accent-color: var(--vert-foret); }
.carte-compte .aide-bloc { margin: 0; font-size: 14px; color: var(--gris-ardoise); text-align: center; }
.carte-compte a.bouton { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* Montant en euros (composant ChampMontant) : le symbole € est posé dans le champ, à droite. */
.avec-unite { position: relative; }
.avec-unite .saisie { width: 100%; padding-right: 30px; }
.avec-unite span {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gris-ardoise);
    font-weight: 700;
    pointer-events: none;
}

/* Prix d'achat, valeur estimée et date d'achat sur une ligne, en trois parts égales sur toute la largeur
   (ajout et modification) ; à la ligne si la place manque. */
.ligne-achat { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.ligne-achat > .champ { min-width: 0; }

/* Mot de passe avec son œil (composant ChampMotDePasse) : le bouton est posé dans le champ, à droite. */
.champ-mot-de-passe { position: relative; }
.champ-mot-de-passe .saisie { width: 100%; padding-right: 48px; }
.champ-mot-de-passe .oeil {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--gris-ardoise);
    cursor: pointer;
}
.champ-mot-de-passe .oeil:hover { color: var(--texte); background: color-mix(in srgb, var(--texte) 8%, transparent); }
.champ-mot-de-passe .oeil:focus-visible { outline: 2px solid var(--vert-neon); outline-offset: 1px; }
.carte-compte .lien-autre { margin: 0; text-align: center; font-size: 14px; color: var(--gris-ardoise); }
.carte-compte .lien-autre a { font-weight: 700; }
.chargement { padding: 48px 16px; text-align: center; color: var(--gris-ardoise); }

/* Bandeau de la démo, sous l'en-tête : la collection est une copie temporaire. */
.bandeau-demo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 10px 24px;
    background: var(--ambre-fond);
    border-bottom: 1px solid var(--bordure);
    color: var(--texte);
    font-size: 14px;
}
.bandeau-demo .texte { flex: 1; min-width: 220px; }
.etiquette-demo {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ambre-texte);
    color: var(--fond);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Barre d'attente indéterminée (préparation de la démo) */
.barre-attente { position: relative; height: 6px; border-radius: 3px; overflow: hidden; background: var(--vert-foret-clair); }
.barre-attente span { position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: 3px; background: var(--vert-foret); animation: barre-attente 1.2s ease-in-out infinite; }
@keyframes barre-attente { from { left: -40%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .barre-attente span { animation: none; width: 100%; } }

/* Bandeau « Hors ligne » de l'application mobile : la collection gardée sur le téléphone, faute de réseau. */
.bandeau-hors-ligne {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--fond-gris);
    border-bottom: 1px solid var(--bordure);
    color: var(--texte);
    font-size: 14px;
}
.bandeau-hors-ligne .icone { color: var(--gris-ardoise); }

/* Statistiques et doublons (pages /statistiques et /collection/doublons, 17 novembre 2026).
   Dans la feuille commune : les barres et les vignettes sont des composants à part. */
.statistiques {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: calc(1040px + 48px);
    padding: 32px 24px 48px;
}
.statistiques .titre-page h1 { margin: 0 0 4px; font-size: 30px; }
.statistiques .intro { margin: 0; color: var(--gris-ardoise); }
.statistiques .leger { margin: 0; color: var(--gris-ardoise); font-size: 14px; }
.statistiques .positif { color: var(--vert-texte); }
.statistiques .negatif { color: var(--rouge-texte); }
.statistiques .bloc {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 22px;
    border-radius: 16px;
    background: var(--fond-carte);
    border: 1px solid var(--bordure);
    min-width: 0;
}
.statistiques .bloc h2 { margin: 0; font-size: 19px; }
.statistiques .bloc > .bouton { align-self: flex-start; }

.statistiques .cles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 0;
}
.statistiques .cles div {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--fond-doux);
    border: 1px solid var(--bordure);
}
.statistiques .cles dt {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--gris-ardoise);
}
.statistiques .cles dd {
    margin: 4px 0 0;
    font-family: "Fredoka", sans-serif;
    font-weight: 600;
    font-size: 24px;
    white-space: nowrap;
}

.statistiques .grille {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}
.statistiques .grille .large { grid-column: 1 / -1; }
@media (max-width: 760px) {
    .statistiques { padding: 20px 16px 40px; }
    .statistiques .grille { grid-template-columns: minmax(0, 1fr); }
}

.lien-doublons {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--bordure);
    background: var(--fond-carte);
    color: var(--vert-texte);
    font-weight: 700;
    text-decoration: none;
}
.lien-doublons span { flex: 1; }
.lien-doublons:hover { background: var(--fond-survol-vert); }

/* Barres d'une répartition : libellé, barre, nombre, montant. */
.barres {
    display: grid;
    grid-template-columns: minmax(80px, max-content) minmax(60px, 1fr) auto auto;
    align-items: center;
    gap: 8px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.barres.sans-montant { grid-template-columns: minmax(80px, max-content) minmax(60px, 1fr) auto; }
.barres li { display: contents; }
.barres .libelle {
    overflow: hidden;
    max-width: 200px;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--texte);
    font-size: 14px;
    font-weight: 600;
}
.barres a.libelle { color: var(--vert-texte); text-decoration: none; }
.barres a.libelle:hover { text-decoration: underline; }
.barres .piste {
    height: 12px;
    border-radius: 6px;
    background: var(--fond-gris);
    overflow: hidden;
}
.barres .barre { display: block; height: 100%; border-radius: 6px; background: var(--vert-foret); }
.barres li[class*="marque-"] .barre { background: var(--marque); }
.barres .nombre { text-align: right; font-weight: 700; font-size: 14px; }
.barres .montant { text-align: right; color: var(--gris-ardoise); font-size: 13px; white-space: nowrap; }
@media (max-width: 480px) {
    .barres, .barres.sans-montant { grid-template-columns: minmax(70px, max-content) minmax(40px, 1fr) auto; }
    .barres .montant { display: none; }
    .barres .libelle { max-width: 120px; }
}

/* Listes de jeux : les plus chers, les exemplaires d'un doublon. */
.plus-chers, .doublons, .doublons .exemplaires {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.doublons { gap: 14px; }
.doublons h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.plus-chers a, .doublons .exemplaires a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 10px;
    color: var(--texte);
    text-decoration: none;
}
.plus-chers a:hover, .doublons .exemplaires a:hover { background: var(--fond-doux); }
.plus-chers .titre-jeu, .doublons .titre-jeu {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    font-weight: 600;
}
.plus-chers .titre-jeu .leger, .doublons .titre-jeu .leger { font-weight: 400; font-size: 13px; }
.plus-chers .valeur, .doublons .valeur { font-weight: 700; white-space: nowrap; }

/* Jeux recherchés (page /souhaits, 18 novembre 2026) : mêmes blocs que les statistiques. */
.souhaits .entete-souhaits {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.souhaits .entete-souhaits > div { flex: 1 1 360px; }
.souhaits .etiquette { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.souhaits .recherche-catalogue .saisie { width: 100%; }
.resultats-souhait {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 320px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}
.resultats-souhait button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--texte);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.resultats-souhait button:hover { background: var(--fond-doux); }
.resultats-souhait button.choisi { border-color: var(--vert-foret); background: var(--fond-survol-vert); }
.souhaits .titre-jeu { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; font-weight: 600; }
.souhaits .titre-jeu .leger { font-weight: 400; font-size: 13px; }
.souhaits .lien-catalogue { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--vert-texte); font-weight: 700; font-size: 14px; }
.champs-souhait {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px 16px;
}
.champs-souhait .champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champs-souhait .champ label { font-weight: 700; font-size: 14px; }
.champs-souhait .champ.large { grid-column: 1 / -1; }
.champs-souhait .saisie { width: 100%; }
.actions-souhait { display: flex; flex-wrap: wrap; gap: 10px; }

.liste-souhaits { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.liste-souhaits > li { flex-direction: row !important; align-items: center; gap: 14px !important; padding: 14px 16px !important; }
.liste-souhaits .titre { font-size: 16px; }
.liste-souhaits .details { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 400; }
.liste-souhaits .note { font-style: italic; }
.liste-souhaits .valeur { font-weight: 700; white-space: nowrap; }
.etiquette-possede {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--fond-survol-vert);
    color: var(--vert-texte);
    font-size: 12px;
    font-weight: 700;
}
.actions-ligne { display: flex; align-items: center; gap: 4px; }
.actions-ligne .bouton-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--gris-ardoise);
    cursor: pointer;
}
.actions-ligne .bouton-icone:hover { background: var(--fond-doux); color: var(--texte); }
.souhaits .bouton.danger { background: var(--rouge-texte); color: #fff; }
@media (max-width: 560px) {
    .liste-souhaits > li { flex-wrap: wrap; }
    .liste-souhaits .titre-jeu { flex-basis: 100%; }
    .liste-souhaits .actions-ligne { margin-left: auto; }
}

/* Collection partagée (page publique /partage/{jeton}, 18 novembre 2026). */
.filtres-partage { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filtres-partage .segments { flex-wrap: wrap; }
.recherche-partage { position: relative; display: flex; align-items: center; flex: 1 1 240px; max-width: 420px; }
.recherche-partage > svg { position: absolute; left: 12px; color: var(--gris-ardoise); pointer-events: none; }
.recherche-partage .saisie { width: 100%; padding-left: 40px; }
.cartes-partage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.cartes-partage > li { flex-direction: row !important; align-items: flex-start; gap: 14px !important; padding: 14px !important; }
.cartes-partage > li > a { flex: none; line-height: 0; }
.partage .titre-jeu { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; font-weight: 600; }
.partage .titre-jeu .titre { overflow-wrap: anywhere; }
.partage .details { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 400; }
.partage .details .leger, .souhaits-partage .leger { font-size: 13px; }
.partage .valeur { font-weight: 700; }
.souhaits-partage { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.souhaits-partage li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.appel-partage { flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 16px !important; }
.appel-partage > div { flex: 1 1 260px; }
.appel-partage h2 { margin: 0 0 4px; }
@media (max-width: 480px) {
    .cartes-partage { grid-template-columns: minmax(0, 1fr); }
}
