/* =========================================================
   Legufrulabelofolie — feuille de style
   Direction : l'univers coloré des étiquettes de fruits.
   Signature : badges "sticker" arrondis, comme de vrais
   autocollants de fruits, pour les chiffres et compteurs.
   ========================================================= */

:root {
    /* Palette gaie inspirée des fruits */
    --c-cream:   #FFFDF7;
    --c-paper:   #FFFFFF;
    --c-ink:     #2B2A26;
    --c-ink-soft:#6B675E;

    --c-orange:  #FF7A1A;  /* agrume      → étiquettes   */
    --c-pink:    #FF4D8D;  /* framboise   → papiers       */
    --c-yellow:  #FFC53D;  /* soleil      → cartonnettes  */
    --c-blue:    #4C8DFF;  /* myrtille    → plastiques    */
    --c-green:   #2EB872;  /* feuille     → cageots       */
    --c-plum:    #7C5CFF;

    --line:      #ECE6D8;
    --shadow:    0 12px 30px -12px rgba(43, 42, 38, .25);
    --shadow-sm: 0 6px 16px -10px rgba(43, 42, 38, .35);

    --radius:    18px;
    --radius-lg: 28px;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

    --maxw: 1340px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Dégradé de fond uniforme : calque fixe à la taille de l'écran
   (indépendant de la hauteur de la page, donc identique partout). */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: var(--c-cream);
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255,197,61,.18), transparent 40%),
        radial-gradient(circle at 88% 8%, rgba(255,77,141,.14), transparent 38%),
        radial-gradient(circle at 70% 90%, rgba(76,141,255,.12), transparent 42%);
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--c-ink);
    background: var(--c-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--c-orange); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 100;
    background: var(--c-ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--c-blue); outline-offset: 2px; border-radius: 6px; }

/* ---------------- Boutons ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: .5rem; font-family: var(--font-body); font-weight: 600;
    font-size: .98rem; padding: .8rem 1.4rem; border-radius: 999px;
    border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--c-orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #ff6a00; }
.btn-ghost { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn-ghost:hover { background: var(--c-ink); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }

/* ================= EN-TÊTE / MENU ================= */
html, body { overflow-x: clip; }

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,253,247,.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    max-width: var(--maxw); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: .7rem 1.25rem;
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark svg { display: block; filter: drop-shadow(0 3px 6px rgba(255,122,26,.35)); }
.brand-mark img { display: block; height: 48px; width: auto; filter: drop-shadow(0 3px 6px rgba(255,122,26,.30)); }
.brand-text { font-family: var(--font-display); font-size: 1.5rem; color: var(--c-ink); letter-spacing: -.01em; }
.brand-text em { font-style: normal; color: var(--c-orange); }
/* Titre tricolore bleu-blanc-rouge : Legufru / Labelo / Folie */
.bt1 { color: #0055A4; }
.bt2 { color: #ffffff; text-shadow: -1px 0 #b8b2a6, 1px 0 #b8b2a6, 0 -1px #b8b2a6, 0 1px #b8b2a6; }
.bt3 { color: #EF4135; }

.main-nav .nav-list {
    list-style: none; display: flex; align-items: center; gap: .35rem; margin: 0; padding: 0;
}
.nav-link {
    font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: var(--c-ink);
    background: none; border: 0; cursor: pointer; padding: .55rem .9rem; border-radius: 999px;
    display: inline-flex; align-items: center; gap: .4rem; transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: rgba(255,122,26,.12); color: var(--c-orange); text-decoration: none; }
.caret { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-1px); transition: transform .2s ease; }

.nav-cta { background: var(--c-green); color: #fff; }
.nav-cta:hover { background: #25a464; color: #fff; }

.has-sub { position: relative; }
.sub-menu {
    list-style: none; margin: 0; padding: .4rem;
    position: absolute; top: calc(100% + .4rem); left: 0; min-width: 240px;
    background: var(--c-paper); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s; z-index: 60;
}
.sub-menu li a {
    display: block; padding: .6rem .8rem; border-radius: 10px; color: var(--c-ink); font-weight: 500;
}
.sub-menu li a:hover { background: rgba(46,184,114,.12); color: var(--c-green); text-decoration: none; }

/* Ouverture au survol (souris) et via .open (clavier / clic) */
.has-sub:hover > .sub-menu,
.has-sub.open > .sub-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.has-sub:hover > .nav-link .caret,
.has-sub.open > .nav-link .caret { transform: rotate(-135deg) translateY(2px); }

.nav-account { display: flex; align-items: center; gap: .7rem; margin-left: .5rem; padding-left: .7rem; border-left: 1px solid var(--line); }
.nav-hello { font-weight: 600; font-size: .92rem; color: var(--c-ink-soft); }

.nav-toggle {
    display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; border-radius: 12px;
}
.burger, .burger::before, .burger::after {
    content: ""; display: block; width: 24px; height: 2.5px; background: var(--c-ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; margin: 0 auto;
}
.burger::before { transform: translateY(-7px); }
.burger::after { transform: translateY(4.5px); }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { transform: rotate(-45deg) translateY(-1.5px); }

/* ================= HERO ================= */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 1.25rem 1rem; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.eyebrow {
    display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--c-green); margin: 0 0 .6rem;
}
.hero-title {
    font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 4.2vw, 3rem);
    line-height: 1.04; letter-spacing: -.02em; margin: 0 0 1rem; color: var(--c-ink);
}
.hero-lede { font-size: 1.08rem; color: var(--c-ink-soft); max-width: 52ch; margin: 0 0 1.6rem; }
.hero-lede p { margin: 0 0 .9rem; }
.hero-lede p:last-child { margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---- Cartes ---- */
.card {
    background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1.8rem; box-shadow: var(--shadow);
}
.card-title { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; margin: 0 0 1.2rem; }

/* ---- Connexion ---- */
.login-card { max-width: 420px; margin-left: auto; }
.field { display: block; margin-bottom: 1rem; }
.field-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--c-ink); }
.field input, .field textarea, .field select {
    width: 100%; padding: .8rem 1rem; font-size: 1rem; font-family: var(--font-body);
    border: 1.5px solid var(--line); border-radius: 12px; background: var(--c-cream); color: var(--c-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea {
    min-height: 110px; line-height: 1.55; resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 4px rgba(255,122,26,.15); }
.login-foot { margin: 1rem 0 0; font-size: .92rem; color: var(--c-ink-soft); }
.form-alert {
    background: #ffe5ec; border: 1.5px solid #f3a9bf; border-left: 5px solid #d6204a;
    color: #9c1336; font-weight: 600;
    padding: .8rem 1rem .8rem 2.4rem; border-radius: 12px; font-size: .95rem; margin: 0 0 1rem;
    position: relative;
}
.form-alert::before {
    content: "!"; position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; border-radius: 50%; background: #d6204a; color: #fff;
    font-weight: 800; font-size: .82rem; line-height: 20px; text-align: center;
}

/* ---- Tableau de bord ---- */
.dashboard { background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,.92)); }
.dash-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.2rem; }
.dash-tile {
    position: relative; display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,122,26,.10), rgba(255,197,61,.16));
    border: 1px solid var(--line); color: var(--c-ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dash-tile:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c-orange) 35%, var(--line)); }
.dash-tile-vote { background: linear-gradient(135deg, rgba(124,92,255,.10), rgba(76,141,255,.16)); }
.dash-tile-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--c-orange); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.dash-tile-vote .dash-tile-ico { color: #6a4bff; }
.dash-tile-body { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.dash-tile-arrow { margin-left: auto; font-size: 1.5rem; color: var(--c-ink-soft); line-height: 1; transition: transform .15s ease; }
.dash-tile:hover .dash-tile-arrow { transform: translateX(3px); color: var(--c-orange); }
.dash-num { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; }
.dash-label { font-size: .82rem; font-weight: 600; color: var(--c-ink-soft); }
/* Mise en avant quand il y a des actions en attente */
.dash-tile.is-alert { border-color: color-mix(in srgb, var(--c-orange) 45%, var(--line)); }
.dash-tile.is-alert .dash-num { color: var(--c-orange); }
.dash-tile-vote.is-alert { border-color: color-mix(in srgb, #6a4bff 45%, var(--line)); }
.dash-tile-vote.is-alert .dash-num { color: #6a4bff; }
.dash-tile.is-alert .dash-tile-ico::after {
    content: ""; position: absolute; top: -4px; left: 34px; width: 10px; height: 10px; border-radius: 50%;
    background: var(--c-pink); box-shadow: 0 0 0 3px #fff;
}

.dash-collection { border-top: 1px dashed var(--line); padding-top: 1.1rem; }
.dash-collection-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .9rem; }
.dash-collection-title { font-weight: 700; }
.dash-collection-total { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; color: var(--c-orange); }
.dash-breakdown { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.dash-breakdown li { display: flex; flex-direction: column; gap: .3rem; }
.dash-breakdown .bd-top { display: flex; align-items: center; gap: .55rem; font-size: .92rem; }
.dash-breakdown .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--sticker); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sticker) 22%, transparent); }
.dash-breakdown .bd-label { flex: 1; color: var(--c-ink); }
.dash-breakdown .bd-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-breakdown .bd-bar { display: block; height: 7px; border-radius: 999px; background: color-mix(in srgb, var(--sticker) 14%, transparent); overflow: hidden; }
.dash-breakdown .bd-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--sticker); transition: width .4s ease; }

/* ================= GALERIE ================= */
.gallery { max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 1.25rem; }
.section-head { text-align: center; margin-bottom: 2rem; }
.section-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .4rem; }
.section-sub { color: var(--c-ink-soft); margin: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.shot {
    margin: 0; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s ease;
}
.shot:hover { transform: translateY(-4px) rotate(-.6deg); }
.shot img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.shot figcaption { padding: .85rem 1rem; font-weight: 600; font-size: .95rem; }

/* ================= PIED DE PAGE ================= */
.site-footer { background: var(--c-ink); color: #efe9dc; margin-top: 2rem; }
.footer-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.25rem 2rem;
    display: grid; grid-template-columns: 1fr 1.3fr; gap: 2.5rem;
}
.footer-title { font-family: var(--font-display); font-size: 1.8rem; margin: 0 0 .4rem; color: #fff; }
.footer-title em { font-style: normal; color: var(--c-yellow); }
.footer-tag { color: #b8b2a6; max-width: 34ch; margin: 0 0 1.2rem; }
.footer-contact { font-size: .95rem; line-height: 1.7; color: #d8d2c6; }
.footer-contact a { color: var(--c-yellow); }
.footer-admin { color: #b8b2a6; font-style: italic; }

.footer-stats-title { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: #b8b2a6; margin: 0 0 1rem; }
.stat-stickers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem; }
/* La signature : chaque compteur est un autocollant de fruit */
.stat-sticker {
    position: relative; min-width: 120px; flex: 1 1 120px;
    background: var(--sticker); color: #fff; border-radius: 999px / 60px;
    padding: 1rem 1.2rem; text-align: center;
    box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--sticker) 70%, black);
}
.stat-sticker::after { /* reflet "papier glacé" */
    content: ""; position: absolute; inset: 4px 4px auto 4px; height: 36%;
    border-radius: 999px / 30px; background: linear-gradient(rgba(255,255,255,.45), transparent);
    pointer-events: none;
}
.stat-sticker-num { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; line-height: 1; }
.stat-sticker-label { display: block; font-size: .78rem; font-weight: 600; margin-top: .25rem; opacity: .95; }
.stat-sticker.is-featured { flex: 1 1 100%; min-width: 100%; padding: 1.4rem 1.6rem; box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--sticker) 70%, black); }
.stat-sticker.is-featured .stat-sticker-num { font-size: 2.8rem; }
.stat-sticker.is-featured .stat-sticker-label { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin-top: .35rem; }
.footer-fb { display: inline-flex; align-items: center; gap: .5rem; margin-top: .9rem; color: #e9e4d8; text-decoration: none; font-weight: 600; font-size: .9rem; }
.footer-fb svg { color: #1877F2; background: #fff; border-radius: 50%; padding: 1px; transition: transform .12s ease; }
.footer-fb:hover { color: #fff; }
.footer-fb:hover svg { transform: scale(1.08); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom p { max-width: var(--maxw); margin: 0 auto; padding: 1.1rem 1.25rem; font-size: .85rem; color: #9c968a; text-align: center; }

/* ================= PAGES INTERNES ================= */
.page { max-width: 980px; margin: 0 auto; padding: 3.5rem 1.25rem; }
.page h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem,4vw,2.8rem); margin: 0 0 1rem; }
.page p { color: var(--c-ink-soft); font-size: 1.05rem; }
.page-badge { display: inline-block; background: var(--c-yellow); color: var(--c-ink); font-weight: 700; font-size: .8rem; padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1rem; }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .login-card { margin-left: 0; }
    .footer-inner { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .nav-toggle { display: block; }
    /* backdrop-filter créerait un bloc conteneur pour le menu en position fixe :
       on le désactive sur mobile pour que le panneau se cale sur l'écran entier. */
    .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--c-paper); }
    .header-inner { padding: .6rem .9rem; gap: .5rem; }
    .brand-text { font-size: 1.15rem; }
    .brand-mark img { height: 38px; }
    .main-nav {
        position: fixed; top: 0; right: 0; bottom: 0; left: auto;
        height: 100vh; height: 100dvh; width: min(340px, 86vw); max-width: 100vw;
        background: var(--c-paper); box-shadow: var(--shadow); padding: 5rem 1.2rem 2rem;
        transform: translateX(100%); transition: transform .25s ease;
        overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 70;
    }
    .main-nav.open { transform: translateX(0); }
    .nav-list { flex-direction: column; align-items: stretch; gap: .2rem; }
    .nav-link { width: 100%; justify-content: space-between; font-size: 1.05rem; }
    .sub-menu {
        position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
        border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: .2rem 0 .4rem .8rem;
        max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 .4rem;
    }
    .has-sub.open > .sub-menu { max-height: 420px; padding: .2rem .4rem; }
    .nav-account { flex-direction: column; align-items: stretch; border-left: 0; border-top: 1px solid var(--line); margin: .6rem 0 0; padding: .8rem 0 0; }
    .nav-cta { text-align: center; }
    /* Le bouton du menu doit rester cliquable au-dessus du panneau ouvert */
    .nav-toggle { position: relative; z-index: 80; }
    /* Les info-bulles de survol n'ont pas de sens au toucher et débordaient de l'écran */
    .result-popup { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto; }
}

/* ================= MESSAGES FLASH ================= */
.flash {
    max-width: var(--maxw); margin: 1.25rem auto -.5rem; padding: .9rem 1.2rem;
    border-radius: 14px; font-weight: 600; font-size: .95rem;
    display: flex; align-items: center; gap: .6rem;
}
.flash::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.flash-error   { background: rgba(255,77,141,.12); border: 1px solid rgba(255,77,141,.4); color: #c5275f; }
.flash-error::before { background: var(--c-pink); }
.flash-success { background: rgba(46,184,114,.12); border: 1px solid rgba(46,184,114,.4); color: #1c7d4f; }
.flash-success::before { background: var(--c-green); }
.flash-info    { background: rgba(76,141,255,.12); border: 1px solid rgba(76,141,255,.4); color: #2f63c0; }
.flash-info::before { background: var(--c-blue); }

/* ================= BADGE DE NIVEAU ================= */
.level-badge {
    display: inline-block; margin-left: .35rem; padding: .12rem .55rem;
    border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
    color: #fff; vertical-align: middle;
}
.level-0 { background: #9c968a; }                 /* en attente */
.level-1 { background: var(--c-green); }           /* membre */
.level-2 { background: var(--c-blue); }            /* contributeur */
.level-3 { background: var(--c-green, #2e9e5b); }  /* contributeur avancé */

/* Encart d'information sur le compte (tableau de bord) */
.account-note {
    margin: 0 0 1.1rem; padding: .8rem 1rem; border-radius: 12px;
    background: rgba(255,197,61,.18); border: 1px solid rgba(255,197,61,.5);
    font-size: .9rem; color: #7a5a00;
}

/* ================= FORMULAIRE D'INSCRIPTION ================= */
.page-intro { font-size: 1.05rem; color: var(--c-ink-soft); margin: 0 0 1.6rem; max-width: 60ch; }
.signup-form { max-width: 640px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field-error {
    display: block; margin-top: .4rem; color: #9c1336; font-size: .85rem; font-weight: 700;
    background: #ffe5ec; border: 1px solid #f3a9bf; border-radius: 8px;
    padding: .4rem .6rem .4rem 1.8rem; position: relative;
}
.field-error::before {
    content: "⚠"; position: absolute; left: .55rem; top: 50%; transform: translateY(-50%);
    color: #d6204a; font-size: .9rem; line-height: 1;
}
.field input[aria-invalid="true"] { border-color: var(--c-pink); }
/* Met en évidence le champ qui contient une erreur */
.field:has(.field-error) input,
.field:has(.field-error) textarea,
.field:has(.field-error) select {
    border-color: #d6204a; background: #fff5f8; box-shadow: 0 0 0 3px rgba(214,32,74,.12);
}

/* Harmonise les <select> avec les <input> + chevron SVG net */
.field select {
    width: 100%; padding: .8rem 2.8rem .8rem 1rem; font-size: 1rem; font-family: var(--font-body);
    border: 1.5px solid var(--line); border-radius: 12px; background-color: var(--c-cream); color: var(--c-ink);
    line-height: 1.4; appearance: none; -webkit-appearance: none; cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23FF7A1A'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='6%209%2012%2015%2018%209'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 1rem center;
}
.field select:hover { border-color: #d8cfba; background-color: #fff; }
.field select:focus { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 4px rgba(255,122,26,.15); }
.field select:invalid { color: var(--c-ink-soft); }            /* libellé « — Choisir — » grisé */
.field select option { color: var(--c-ink); }
.field select option:first-child { color: var(--c-ink-soft); }

.signup-foot { margin: 1rem 0 0; font-size: .92rem; color: var(--c-ink-soft); text-align: center; }

/* Carte de succès */
.signup-success { max-width: 640px; text-align: center; }
.success-mark {
    width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
    background: var(--c-green); color: #fff; font-size: 2rem; line-height: 64px;
    box-shadow: 0 10px 22px -10px rgba(46,184,114,.8);
}
.signup-success .card-title { text-align: center; }

@media (max-width: 560px) {
    .form-grid { grid-template-columns: 1fr; }
}

/* ================= PAGE « MON COMPTE » ================= */
.account-summary {
    display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 1.6rem;
    background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm);
}
.summary-item { display: flex; flex-direction: column; gap: .3rem; min-width: 140px; }
.summary-item + .summary-item { padding-left: 1rem; border-left: 1px solid var(--line); }
.summary-label { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-soft); font-weight: 700; }
.summary-value { font-weight: 600; }
.summary-item .level-badge { align-self: flex-start; }
.summary-item-badge { justify-content: center; }
.acefla-badge {
    align-self: center; display: inline-block; padding: .35rem .9rem; border-radius: 999px;
    font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: #fff; white-space: nowrap;
    background: linear-gradient(135deg, var(--c-yellow), var(--c-orange));
    box-shadow: 0 6px 14px -8px var(--c-orange);
}

.card-title-sep { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); }
.field-hint { font-size: .88rem; color: var(--c-ink-soft); margin: -.4rem 0 1rem; }

.checkfield { display: flex; align-items: center; gap: .6rem; margin: .2rem 0 .4rem; cursor: pointer; font-weight: 500; }
.checkfield input { width: 20px; height: 20px; accent-color: var(--c-orange); cursor: pointer; flex: none; }

@media (max-width: 560px) {
    .summary-item + .summary-item { padding-left: 0; border-left: 0; }
}

/* ================= PAGE ADMINISTRATION ================= */
.page-wide { max-width: 1260px; }

.admin-table-wrap {
    margin: 0 0 2rem; border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); background: var(--c-paper); overflow: hidden;
}
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; }
.admin-table thead th {
    background: linear-gradient(var(--c-cream), #fff);
    padding: .9rem 1.1rem; text-align: left; font-size: .72rem; letter-spacing: .08em;
    text-transform: uppercase; color: var(--c-ink-soft); font-weight: 700;
    border-bottom: 1px solid var(--line); white-space: nowrap;
}
.admin-table tbody td { padding: .75rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr { transition: background .12s ease; }
.admin-table tbody tr:hover { background: rgba(255,197,61,.08); }
.admin-table tr.is-editing { background: rgba(255,122,26,.10); box-shadow: inset 4px 0 0 var(--c-orange); }
.admin-table tr.is-editing:hover { background: rgba(255,122,26,.14); }
.admin-table .th-action { text-align: right; }
.admin-table .muted { color: var(--c-ink-soft); }

/* Cellule utilisateur : avatar + nom + sous-ligne */
.user-cell { display: flex; align-items: center; gap: .75rem; }
.avatar {
    width: 38px; height: 38px; flex: none; border-radius: 50%; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; letter-spacing: .02em;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-name { font-weight: 700; }
.user-sub { font-size: .82rem; color: var(--c-ink-soft); overflow: hidden; text-overflow: ellipsis; max-width: 320px; }

/* Pastilles de statut */
.pill {
    display: inline-block; padding: .25rem .7rem; border-radius: 999px;
    font-size: .76rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.pill-on     { background: rgba(46,184,114,.15);  color: #1c7d4f; }
.pill-off    { background: rgba(156,150,138,.18); color: #6b675e; }
.pill-acefla { background: linear-gradient(135deg, var(--c-yellow), var(--c-orange)); color: #fff; }

.self-tag {
    display: inline-block; margin-left: .5rem; padding: .1rem .5rem; border-radius: 999px;
    font-size: .7rem; font-weight: 700; background: var(--c-plum); color: #fff; vertical-align: middle;
}
.checkfield-inline { margin: 0; padding: .65rem 0; }

@media (max-width: 620px) {
    .admin-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
    .admin-table tr { border-bottom: 1px solid var(--line); padding: .4rem 0; }
    .admin-table tbody td { border-bottom: 0; padding: .35rem 1.1rem; white-space: normal; }
    .admin-table .th-action { text-align: left; }
    .user-sub { max-width: none; }
}

/* ================= ZONE DE DANGER (suppression) ================= */
.btn-danger { background: var(--c-pink); color: #fff; box-shadow: var(--shadow-sm); }
.btn-danger:hover { background: #e83b7c; color: #fff; }

.danger-zone {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    margin-top: 1.5rem; padding: 1.1rem 1.3rem; border-radius: var(--radius);
    background: rgba(255,77,141,.06); border: 1px solid rgba(255,77,141,.35);
}
.danger-zone h3 { margin: 0 0 .15rem; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: #c5275f; }
.danger-zone p { margin: 0; font-size: .9rem; color: var(--c-ink-soft); }
.danger-self { font-weight: 600; color: var(--c-ink-soft); }

/* ================= AJOUT D'ARTICLE ================= */
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid-numleg { grid-template-columns: 130px 1fr; }
@media (max-width: 620px) { .form-grid-numleg { grid-template-columns: 1fr; } }
.field-label .opt { font-weight: 400; color: var(--c-ink-soft); font-size: .82rem; }

.file-input {
    width: 100%; padding: .7rem 1rem; font-family: var(--font-body); font-size: .95rem;
    border: 1.5px dashed var(--line); border-radius: 12px; background: var(--c-cream); color: var(--c-ink-soft);
    cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.file-input:hover { border-color: var(--c-orange); background: #fff; }
.file-input::file-selector-button {
    margin-right: .8rem; padding: .5rem 1rem; border: 0; border-radius: 999px;
    background: var(--c-orange); color: #fff; font-weight: 600; font-family: var(--font-body); cursor: pointer;
}
.file-input::file-selector-button:hover { background: #ff6a00; }

.added-card { text-align: center; margin-bottom: 1.8rem; }
.added-preview {
    max-width: 280px; width: 100%; height: auto; margin: 0 auto 1.2rem;
    border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}

@media (max-width: 620px) { .form-grid-3 { grid-template-columns: 1fr; } }

/* ===== Ajout d'article : image à taille réelle + saisie élargie ===== */
.page-ajout { max-width: 1300px; }
.page-ajout .signup-form, .page-ajout .ajout-form { max-width: none; }

.ajout-preview-box {
    margin: 0 0 .6rem; padding: 1rem; text-align: center;
    background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: auto; max-height: 78vh;
}
.real-preview { display: inline-block; max-width: none; height: auto; border-radius: 6px; }
.preview-note { margin-bottom: 1.4rem; }
.added-image-frame {
    margin: 0 auto 1.2rem; padding: .8rem; overflow: auto; max-height: 70vh; text-align: center;
    background: var(--c-cream); border: 1px solid var(--line); border-radius: var(--radius);
}

/* ================= CARROUSEL D'ARTICLES (accueil) ================= */
.carousel-section { max-width: var(--maxw); margin: 0 auto; padding: 3.5rem 1.25rem; }
.carousel-empty { text-align: center; color: var(--c-ink-soft); }

.carousel { display: flex; align-items: center; gap: .6rem; }
.carousel-viewport { overflow: hidden; flex: 1; }
.carousel-track {
    list-style: none; margin: 0; padding: .4rem; display: flex; gap: 16px;
    transition: transform .45s cubic-bezier(.22,.61,.36,1); will-change: transform;
}
.carousel-card {
    position: relative; flex: 0 0 220px; height: 210px; border-radius: var(--radius);
    overflow: hidden; background: var(--c-paper); border: 1px solid var(--line);
    box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.carousel-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.carousel-card img { width: 100%; height: 100%; object-fit: contain; padding: .6rem; background: var(--c-cream); }

/* Popup au survol */
.card-popup {
    position: absolute; left: 0; right: 0; bottom: 0; padding: .85rem .9rem .8rem;
    background: linear-gradient(to top, rgba(43,42,38,.92), rgba(43,42,38,.74) 70%, transparent);
    color: #fff; transform: translateY(101%); transition: transform .28s ease;
    display: flex; flex-direction: column; gap: .45rem;
}
.carousel-card:hover .card-popup,
.carousel-card:focus-within .card-popup { transform: translateY(0); }
.cp-legend { font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.2; }
.cp-meta { display: flex; flex-wrap: wrap; gap: .35rem; }
.cp-chip { font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; color: #fff; }
.cp-cat   { background: var(--c-orange); }
.cp-fruit { background: var(--c-green); }

.carousel-nav {
    flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
    background: var(--c-paper); color: var(--c-ink); font-size: 1.5rem; line-height: 1; cursor: pointer;
    box-shadow: var(--shadow-sm); transition: background .15s ease, transform .15s ease, color .15s ease;
}
.carousel-nav:hover { background: var(--c-orange); color: #fff; transform: scale(1.06); }
.carousel-nav[hidden] { display: none; }

@media (max-width: 480px) {
    .carousel-card { flex-basis: 160px; height: 170px; }
}

/* ===== Aperçu recto / verso (ajout d'article) ===== */
.verso-field[hidden] { display: none; }
.preview-pair { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; align-items: flex-start; }
.preview-fig { margin: 0; text-align: center; }
.preview-fig figcaption { margin-top: .4rem; font-weight: 700; font-size: .78rem; color: var(--c-ink-soft); text-transform: uppercase; letter-spacing: .05em; }

/* ================= RECHERCHE D'ARTICLES ================= */
.search-form { max-width: none; }
.legend-search { display: flex; gap: .4rem; }
.legend-search .legend-op { flex: none; width: auto; }
.legend-search input { flex: 1; min-width: 0; }
.search-actions { display: flex; gap: .8rem; align-items: center; }
.search-count { margin: 1.4rem 0 1rem; font-weight: 600; color: var(--c-ink-soft); }
.search-empty { color: var(--c-ink-soft); }

.results-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.4rem 1rem; align-items: stretch;
}
.result-card {
    position: relative; width: 100%; max-width: 200px; margin: 0 auto;
    display: flex; flex-direction: column;
    background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, transform .15s ease;
}
.result-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); z-index: 20; }
.result-thumb {
    position: relative; flex: 1 1 auto; background: var(--c-cream); border-radius: var(--radius) var(--radius) 0 0;
    display: flex; align-items: center; justify-content: center; min-height: 70px;
}
/* Image à sa taille réelle, mais plafonnée à 200px pour des colonnes homogènes */
.result-thumb img { display: block; width: auto; height: auto; max-width: min(200px, 100%); border-radius: var(--radius) var(--radius) 0 0; }
.result-noimg { color: var(--c-ink-soft); font-size: .85rem; font-style: italic; padding: 1.5rem 1rem; }
.result-id {
    position: absolute; top: .5rem; right: .5rem; background: rgba(43,42,38,.7); color: #fff;
    font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px;
}
.result-caption { padding: .55rem .7rem; text-align: center; }
.result-fruit { font-size: .9rem; font-weight: 600; color: var(--c-ink); }
.result-actions { display: flex; gap: .4rem; justify-content: center; padding: 0 .6rem .6rem; }
.result-actions form { margin: 0; }
.ra-btn {
    width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid var(--line); background: var(--c-cream); color: var(--c-ink);
    cursor: pointer; text-decoration: none; padding: 0;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.ra-btn svg { display: block; }
.ra-add { color: var(--c-green); }
.ra-add:hover { background: var(--c-green); color: #fff; border-color: var(--c-green); }
.ra-remove { color: var(--c-orange); }
.ra-remove:hover { background: var(--c-orange); color: #fff; border-color: var(--c-orange); }
.ra-edit:hover { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }
.ra-del { color: var(--c-pink); }
.ra-del:hover { background: var(--c-pink); color: #fff; border-color: var(--c-pink); }
.owned-band {
    margin-top: 0; background: var(--c-blue); color: #fff; text-align: center;
    font-size: .78rem; font-weight: 700; letter-spacing: .02em; padding: .35rem .5rem;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Popup détaillé au survol : s'ouvre juste sous l'image, sans la recouvrir */
.result-popup {
    position: absolute; top: 55%; left: 50%; transform: translateX(calc(-50% + var(--rp-shift, 0px))) translateY(-4px);
    width: max-content; max-width: calc(100vw - 16px); z-index: 30;
    display: flex; gap: .9rem; align-items: flex-start;
    background: #fff; color: var(--c-ink); padding: .85rem 1rem; border-radius: var(--radius);
    border: 1px solid var(--line); border-top: 3px solid var(--c-orange);
    box-shadow: 0 14px 34px rgba(43,42,38,.20);
    opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility .18s;
    pointer-events: none;
}
.result-thumb .result-popup img.rp-img { display: block; flex: none; width: auto; height: auto; max-width: 100%; max-height: none; border-radius: 6px; background: #fff; }
.rp-info { flex: none; width: 230px; }
.result-thumb:hover .result-popup {
    opacity: 1; visibility: visible; transform: translateX(calc(-50% + var(--rp-shift, 0px))) translateY(0);
}
.rp-legend { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1rem; margin-bottom: .45rem; line-height: 1.2; }
.result-popup ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-size: .82rem; }
.result-popup li span { color: var(--c-ink-soft); font-weight: 600; margin-right: .35rem; }

@media (max-width: 1024px) { .results-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px)  { .results-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 460px)  { .results-grid { grid-template-columns: repeat(2, 1fr); } }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 2rem 0 0; }
.pager-info { font-weight: 600; color: var(--c-ink-soft); }

/* ===== Fenêtre de confirmation + toast ===== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
    background: rgba(43,42,38,.55); padding: 1rem;
}
.modal-box {
    background: var(--c-paper); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.4rem 1.5rem; max-width: 420px; width: 100%; border: 1px solid var(--line);
}
.modal-msg { margin: 0 0 1.2rem; font-size: 1.02rem; color: var(--c-ink); }
.modal-actions { display: flex; gap: .7rem; justify-content: flex-end; }

.app-toast {
    position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(1.5rem);
    background: var(--c-ink); color: #fff; padding: .7rem 1.1rem; border-radius: 999px;
    font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); z-index: 1100;
    opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; max-width: 90vw; text-align: center;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Lien image (vers la fiche) ===== */
.result-link { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; text-decoration: none; }

/* ===== Fiche détail d'un article ===== */
.detail-back { margin-bottom: 1rem; }
.detail-back a { font-weight: 600; text-decoration: none; color: var(--c-ink-soft); }
.detail-back a:hover { color: var(--c-orange); }
.detail-grid { display: block; }
.detail-media { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; margin-bottom: 1.6rem; }
.detail-info { width: 100%; max-width: 820px; margin: 0 auto; }
.detail-fig { margin: 0; text-align: center; background: var(--c-cream); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; }
.detail-fig img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.detail-fig figcaption { margin-top: .5rem; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-ink-soft); }
.detail-noimg { background: var(--c-cream); border: 1px dashed var(--line); border-radius: var(--radius); padding: 3rem 2rem; color: var(--c-ink-soft); font-style: italic; }
.detail-title { margin: 0 0 .2rem; }
.detail-id { margin: 0 0 1.2rem; color: var(--c-ink-soft); font-weight: 600; }
.info-card { background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1rem; margin-bottom: 1.2rem; box-shadow: var(--shadow-sm); }
.info-row { display: flex; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: none; }
.info-label { flex: none; width: 160px; font-weight: 700; color: var(--c-ink-soft); }
.info-value { flex: 1; color: var(--c-ink); }
.detail-actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.detail-actions form { margin: 0; }
@media (max-width: 760px) { .detail-grid { grid-template-columns: 1fr; } }

/* En-tête de la page de résultats */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.results-head h1 { margin: 0; }

/* ===== Journal des actions (historique) ===== */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: top; }
.data-table th { background: var(--c-cream); font-weight: 700; color: var(--c-ink-soft); white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.data-table td:first-child { white-space: nowrap; color: var(--c-ink-soft); }
.action-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; color: #fff; background: var(--c-ink-soft, #7a6e65); white-space: nowrap; }
.action-ajout { background: var(--c-green); }
.action-modification { background: var(--c-orange); }
.action-suppression { background: var(--c-pink); }
.detail-history { margin-top: 1.2rem; }
.detail-history a { font-weight: 600; text-decoration: none; color: var(--c-ink-soft); }
.detail-history a:hover { color: var(--c-orange); }
.action-collection_ajout { background: var(--c-blue); }
.action-collection_retrait { background: var(--c-plum, #7c5cff); }

/* ===== Photo de profil (Mon compte) ===== */
.avatar-field { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1.2rem; }
.avatar-preview { flex: none; width: 90px; height: 90px; border-radius: 50%; overflow: hidden; background: var(--c-cream); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-input { flex: 1; margin: 0; }
.avatar-placeholder { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--c-ink-soft); }

/* ===== Liste des partenaires ===== */
.partners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.partner-card { background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.1rem 1.2rem; }
.partner-head { display: flex; gap: .9rem; align-items: center; margin-bottom: .9rem; }
.partner-avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--c-cream); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.partner-avatar img { width: 100%; height: 100%; object-fit: cover; }
.partner-avatar .avatar-placeholder { font-size: 1.6rem; }
.partner-identity { min-width: 0; }
.partner-name { font-family: var(--font-display); font-size: 1.1rem; margin: 0 0 .3rem; line-height: 1.2; }
.partner-info { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .88rem; }
.partner-info li { display: flex; gap: .5rem; }
.partner-info li span { flex: none; width: 130px; color: var(--c-ink-soft); font-weight: 600; }
.partner-info li a { color: var(--c-ink); text-decoration: none; word-break: break-all; }
.partner-info li a:hover { color: var(--c-orange); }

/* ===== Tableau des partenaires ===== */
.partners-table .cell-avatar { width: 52px; }
.table-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--c-cream); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.table-avatar img { width: 100%; height: 100%; object-fit: cover; }
.table-avatar .avatar-placeholder { font-size: 1.1rem; }
.partners-table td a { color: var(--c-ink); text-decoration: none; word-break: break-word; }
.partners-table td a:hover { color: var(--c-orange); }
.sort-link { color: var(--c-ink-soft); text-decoration: none; white-space: nowrap; }
.sort-link:hover { color: var(--c-orange); }

/* ===== Doubles à échanger ===== */
.muted-note { font-size: .82rem; color: var(--c-ink-soft); }
.dbl-cats { display: flex; flex-direction: column; gap: .5rem; }
.dbl-cat {
    display: flex; align-items: center; justify-content: space-between; gap: .8rem;
    padding: .55rem .8rem; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--c-cream); text-decoration: none; color: var(--c-ink);
    transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.dbl-cat:hover { background: #fff; border-color: var(--c-orange); transform: translateX(2px); }
.dbl-cat-name { font-weight: 600; }
.dbl-cat-nb { flex: none; font-size: .78rem; font-weight: 700; color: #fff; background: var(--c-orange); padding: .15rem .6rem; border-radius: 999px; }
.table-avatar-sq { border-radius: 8px; }
.table-avatar-sq img { object-fit: contain; }
.qty-input { width: 80px; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; }

/* ===== Doubles d'un collectionneur (cartes) ===== */
.dbl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }
.dbl-card { display: flex; flex-direction: column; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.dbl-card-img { background: var(--c-cream); display: flex; align-items: center; justify-content: center; padding: .8rem; min-height: 120px; }
.dbl-card-img img { display: block; width: auto; height: auto; max-width: min(420px, 100%); border-radius: 6px; }
.dbl-noimg { color: var(--c-ink-soft); font-size: .85rem; }
.dbl-add { margin-top: auto; }
.dbl-add .btn { width: 100%; }
.dbl-card-body { padding: .8rem .9rem 1rem; display: flex; flex-direction: column; gap: .7rem; }
.dbl-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-size: .85rem; }
.dbl-meta li { display: flex; gap: .5rem; }
.dbl-meta li span { flex: none; width: 84px; color: var(--c-ink-soft); font-weight: 600; }
.dbl-incart { text-align: center; font-weight: 700; font-size: .85rem; color: var(--c-green); }

/* ===== Panier ===== */
.cart-block { margin-bottom: 1.6rem; }
.cart-recipient { font-size: 1.15rem; margin: 0 0 .6rem; }

/* ===== Panier : boutons ===== */
.btn-iconlink { background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; padding: .3rem .55rem; font-size: 1rem; line-height: 1; color: var(--c-ink-soft); }
.btn-iconlink:hover { border-color: var(--c-pink); color: var(--c-pink); }
.btn-del:hover { color: var(--c-pink); }
.btn-danger-ghost { color: var(--c-pink); }
.btn-danger-ghost:hover { background: var(--c-pink); color: #fff; }
.action-echange { background: var(--c-orange); }

/* ===== Gestion des échanges ===== */
.xc-section { margin-top: 1.8rem; }
.xc-section-head { display: flex; align-items: center; gap: .8rem; }
.xc-title { font-family: var(--font-display); margin: 0; }
.xc-pending { font-size: .78rem; font-weight: 700; color: #fff; background: var(--c-orange); padding: .15rem .7rem; border-radius: 999px; }
.xc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.1rem; margin-top: .6rem; }
.xc-card { display: flex; flex-direction: column; gap: .7rem; min-width: 0; background: var(--c-paper); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1rem 1.1rem; }
.xc-card-en_attente { border-left-color: var(--c-orange); }
.xc-card-acceptee { border-left-color: var(--c-green); }
.xc-card-refusee { border-left-color: var(--c-pink); }
.xc-card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.xc-num { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.xc-status { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; color: #fff; }
.xc-en_attente { background: var(--c-orange); }
.xc-acceptee { background: var(--c-green); }
.xc-refusee { background: var(--c-pink); }
.xc-party { font-size: .9rem; line-height: 1.35; }
.xc-party-label { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-soft); }
.xc-mail { display: block; font-size: .82rem; color: var(--c-ink-soft); text-decoration: none; word-break: break-all; }
.xc-mail:hover { color: var(--c-orange); }
.xc-items-wrap { padding: .6rem 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.xc-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.xc-items-extra { margin-top: .35rem; animation: xc-slide .18s ease; }
@keyframes xc-slide { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.xc-more { margin-top: .4rem; }
.xc-more-toggle { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; color: var(--c-orange); }
.xc-more-toggle::-webkit-details-marker { display: none; }
.xc-more-plus { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--c-orange); color: #fff; font-weight: 700; line-height: 1; transition: transform .18s ease; }
.xc-more[open] .xc-more-plus { transform: rotate(45deg); }
.xc-more .lbl-less { display: none; }
.xc-more[open] .lbl-more { display: none; }
.xc-more[open] .lbl-less { display: inline; }
.xc-items li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: .9rem; min-width: 0; }
.xc-item-main { display: flex; align-items: center; gap: .55rem; min-width: 0; flex: 1; }
.xc-thumb { flex: none; width: 38px; height: 38px; border-radius: 8px; overflow: hidden; background: var(--c-cream); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.xc-thumb img { width: 100%; height: 100%; object-fit: contain; }
.xc-thumb-empty { color: var(--c-ink-soft); font-size: .9rem; }
.xc-items a { color: var(--c-ink); text-decoration: none; flex: 1; min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xc-items a:hover { color: var(--c-orange); }
.xc-qty { flex: none; font-size: .76rem; font-weight: 700; color: var(--c-ink-soft); background: var(--c-cream); padding: .1rem .5rem; border-radius: 999px; }
.xc-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; }

/* ===== Tableau de bord : alerte échanges en attente ===== */
.dash-alert { display: flex; align-items: center; gap: .9rem; margin: 0 0 1rem; padding: .8rem 1rem; border-radius: var(--radius); background: #fff4e6; border: 1px solid #f3c98b; border-left: 4px solid var(--c-orange); text-decoration: none; color: var(--c-ink); transition: background .12s ease; }
.dash-alert:hover { background: #ffeacf; }
.dash-alert-icon { font-size: 1.5rem; flex: none; }
.dash-alert-text { line-height: 1.4; }
.dash-alert-cta { display: inline-block; margin-left: .4rem; font-weight: 700; color: var(--c-orange); white-space: nowrap; }
.action-double_ajout { background: var(--c-green); }
.action-double_modif { background: var(--c-blue); }
.action-double_retrait { background: var(--c-plum, #7c5cff); }

/* ===== Derniers ajouts ===== */
.da-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; padding: 1rem 1.1rem; margin-bottom: 1.4rem; }
.da-filter-label { font-weight: 700; }
.da-cats { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1; }
.da-cat { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .85rem; background: var(--c-cream); transition: background .12s ease, border-color .12s ease; }
.da-cat:hover { border-color: var(--c-orange); }
.da-cat input { accent-color: var(--c-orange); }
.da-cat:has(input:checked) { background: #fff; border-color: var(--c-orange); font-weight: 600; }
.da-day { margin-bottom: 1.8rem; }
.da-day-title { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .8rem; padding-bottom: .4rem; border-bottom: 2px solid var(--c-orange); display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.da-day-count { font-family: var(--font-body, inherit); font-size: .8rem; font-weight: 600; color: var(--c-ink-soft); }
#da-grid.is-loading { opacity: .5; pointer-events: none; transition: opacity .12s ease; }

/* ===== Charte de mise en ligne ===== */
.charte { max-width: 820px; }
.charte p { line-height: 1.6; margin: .5rem 0; }
.charte-intro { background: var(--c-cream); border: 1px solid var(--line); border-left: 4px solid var(--c-blue); border-radius: var(--radius); padding: 1rem 1.1rem; line-height: 1.6; }
.charte-section { font-family: var(--font-display); font-size: 1.35rem; margin: 2rem 0 .6rem; padding-bottom: .4rem; border-bottom: 2px solid var(--c-orange); }
.charte-sub { font-family: var(--font-display); font-size: 1.05rem; margin: 1.3rem 0 .3rem; padding-left: 1.4rem; position: relative; }
.charte-sub::before { content: "▸"; position: absolute; left: 0; color: var(--c-orange); }
.charte-list { margin: .4rem 0 .8rem; padding-left: 1.3rem; line-height: 1.6; }
.charte-list li { margin: .2rem 0; }
.charte-ex { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; gap: .4rem; }
.charte-ex li { display: flex; gap: .5rem; align-items: baseline; line-height: 1.5; background: var(--c-paper); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; }
.v-ok, .v-no { flex: none; font-weight: 700; }
.v-ok { color: var(--c-green); }
.v-no { color: var(--c-pink); }
.charte code { background: var(--c-cream); border: 1px solid var(--line); border-radius: 5px; padding: .05rem .35rem; font-size: .9em; }
.charte-back { margin-top: 2rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* ===== Comparer 2 articles / dédoublonnage ===== */
.action-dedoublonnage { background: var(--c-plum, #7c5cff); }
.cmp-pick { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .8rem 1rem; margin-bottom: 1.4rem; }
.cmp-pick .field { margin: 0; }
.cmp-vs { font-family: var(--font-display); font-weight: 700; color: var(--c-ink-soft); padding-bottom: .55rem; }
.cmp { margin: 1.2rem 0; }
.cmp-heads { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.cmp-head { background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; text-align: center; }
.cmp-id { display: block; font-family: var(--font-display); font-weight: 700; margin-bottom: .6rem; }
.cmp-imgs { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.cmp-imgs img { max-width: min(280px, 100%); height: auto; border-radius: 8px; border: 1px solid var(--line); }
.cmp-noimg { color: var(--c-ink-soft); font-size: .85rem; }
.cmp-table { width: 100%; border-collapse: collapse; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cmp-table th, .cmp-table td { padding: .55rem .8rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: .92rem; }
.cmp-table th { width: 130px; color: var(--c-ink-soft); font-weight: 600; background: var(--c-cream); }
.cmp-table td { width: calc((100% - 130px) / 2); }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: none; }
.cmp-table tr.is-diff th { color: #9c1336; font-weight: 700; }
.cmp-table tr.is-diff th::before { content: "≠ "; color: #d6204a; font-weight: 800; }
.cmp-table tr.is-diff td {
    background: #ffe9ef; font-weight: 700; color: #9c1336;
    box-shadow: inset 0 0 0 2px #d6204a; border-radius: 6px;
}
.cmp-dedup, .vote-form, .vote-meta { margin-top: 1.4rem; }
.vote-justif span { color: var(--c-ink-soft); font-weight: 600; }
.vote-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.vote-list { display: grid; gap: 1rem; }
.vote-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--c-paper); border: 1px solid var(--line); border-left: 4px solid var(--c-plum, #7c5cff); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1rem 1.1rem; }
.vote-card-num { font-family: var(--font-display); font-weight: 700; }
.vote-card-pair { margin: .3rem 0; display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; }
.vote-card-pair a { color: var(--c-ink); text-decoration: none; }
.vote-card-pair a:hover { color: var(--c-orange); }
.vote-card-vs { color: var(--c-plum, #7c5cff); font-weight: 700; }
.vote-card-justif { font-size: .9rem; color: var(--c-ink); margin: .3rem 0; }
@media (max-width: 560px) { .cmp-heads { grid-template-columns: 1fr; } }
.field-count { display: block; text-align: right; font-size: .78rem; color: var(--c-ink-soft); margin-top: .3rem; }
.cmp-dedup { max-width: 720px; }

/* ===== Vote : décompte et détail ===== */
.vote-tally { margin-top: 1.2rem; }
.tally-bar { display: flex; height: 38px; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.tally-oui, .tally-non { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .85rem; min-width: 54px; }
.tally-oui { background: var(--c-green); }
.tally-non { background: var(--c-pink); }
.vote-note { background: var(--c-cream); border: 1px solid var(--line); border-left: 4px solid var(--c-orange); border-radius: var(--radius); padding: .8rem 1rem; margin-top: 1.2rem; }
.vote-detail { margin-top: 1.2rem; }
.vote-detail-title { font-family: var(--font-display); margin: 0 0 .7rem; }
.vote-detail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.vote-detail-list li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.vd-badge { flex: none; font-size: .72rem; font-weight: 700; color: #fff; padding: .12rem .55rem; border-radius: 999px; text-transform: uppercase; }
.vd-oui { background: var(--c-green); }
.vd-non { background: var(--c-pink); }
.vd-comment { color: var(--c-ink-soft); }
.vd-requester { opacity: .9; }

/* ===== Historique des dédoublonnages ===== */
.dedup-pair { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
.dedup-pair a { color: var(--c-ink); text-decoration: none; }
.dedup-pair a:hover { color: var(--c-orange); }
.dedup-item { display: inline-flex; flex-direction: column; align-items: center; gap: .25rem; }
.dedup-thumb { width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: var(--c-cream); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.dedup-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dedup-thumb-empty { color: var(--c-ink-soft); font-size: 1rem; }
.dedup-no { font-size: .8rem; font-weight: 600; }
.dedup-vs { color: var(--c-plum, #7c5cff); font-weight: 700; }
.dedup-result { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; color: #fff; white-space: nowrap; }
.dr-merged { background: var(--c-green); }
.dr-kept { background: var(--c-ink-soft, #8a8275); }
.dr-open { background: var(--c-orange); }
.dedup-hist .vd-badge { min-width: 26px; text-align: center; }

/* ===== Tri des résultats ===== */
.results-sort { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 1.2rem; }
.results-sort-label { font-weight: 600; color: var(--c-ink-soft); font-size: .9rem; }
.sort-chip { padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--c-cream); color: var(--c-ink); text-decoration: none; font-size: .85rem; font-weight: 600; transition: background .12s ease, border-color .12s ease, color .12s ease; }
.sort-chip:hover { border-color: var(--c-orange); color: var(--c-orange); }
.sort-chip.is-active { background: var(--c-orange); border-color: var(--c-orange); color: #fff; }
.cmp-already { margin-top: 1.4rem; border-left: 4px solid var(--c-orange); }

/* ===== Recherche rapide (live) ===== */
.qs-box { position: relative; max-width: 620px; margin: .5rem 0 1.4rem; }
.qs-input { width: 100%; padding: .95rem 2.6rem .95rem 1.1rem; font-size: 1.15rem; font-family: var(--font-body); border: 1.5px solid var(--line); border-radius: 14px; background: var(--c-cream); color: var(--c-ink); transition: border-color .15s ease, box-shadow .15s ease; }
.qs-input:focus { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 4px rgba(255,122,26,.15); }
.qs-spinner { position: absolute; right: 1rem; top: 50%; width: 18px; height: 18px; margin-top: -9px; border: 2px solid var(--line); border-top-color: var(--c-orange); border-radius: 50%; animation: qs-spin .7s linear infinite; }
@keyframes qs-spin { to { transform: rotate(360deg); } }
.qs-hint { color: var(--c-ink-soft); }
.qs-count { color: var(--c-ink-soft); font-size: .88rem; margin: 0 0 .8rem; }
.qs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }
.qs-card { display: flex; align-items: center; gap: .8rem; padding: .6rem .7rem; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--c-ink); transition: border-color .12s ease, transform .12s ease, box-shadow .12s ease; min-width: 0; }
.qs-card:hover { border-color: var(--c-orange); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.qs-thumb { flex: none; width: 54px; height: 54px; border-radius: 8px; overflow: hidden; background: var(--c-cream); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.qs-thumb img { width: 100%; height: 100%; object-fit: contain; }
.qs-noimg { color: var(--c-ink-soft); }
.qs-info { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.qs-legend { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-legend mark { background: #ffe08a; color: inherit; padding: 0 1px; border-radius: 2px; }
.qs-meta { font-size: .82rem; color: var(--c-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qs-id { color: var(--c-ink-soft); }

/* ===== Partenaires : e-mail en icône ===== */
.partners-table th:nth-child(4), .partners-table .cell-mail { text-align: center; width: 48px; }
.mail-link { display: inline-flex; align-items: center; justify-content: center; color: var(--c-ink-soft); width: 34px; height: 34px; border-radius: 8px; transition: color .12s ease, background .12s ease; }
.mail-link:hover { color: var(--c-orange); background: var(--c-cream); }
.partners-table .cell-mail a { word-break: normal; }

/* ===== Page « Qui sommes-nous ? » ===== */
.about .about-welcome { color: var(--c-orange); margin-top: 0; }
.about-lead { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.6rem; align-items: center; margin-bottom: 1.5rem; }
.about-lead-reverse { grid-template-columns: 1fr 1.3fr; }
.about-lead-reverse .about-figure { order: -1; }
.about-figure { margin: 0; }
.about-figure img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: block; }
.about-section { margin: 2rem 0; }
.about-section > h2 { border-bottom: 2px solid var(--c-cream); padding-bottom: .4rem; }
.about-stats { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.about-stats li { background: var(--c-paper); border: 1px solid var(--line); border-left: 4px solid var(--c-orange); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .25rem; }
.about-stat-num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--c-ink); line-height: 1; }
.about-stat-label { font-size: .88rem; color: var(--c-ink-soft); }
@media (max-width: 640px) {
    .about-lead, .about-lead-reverse { grid-template-columns: 1fr; }
    .about-lead-reverse .about-figure { order: 0; }
}

/* « Mon compte » : zone d'infos à la même largeur que le résumé du dessus */
.account-form { max-width: none; }

/* Mémo perso (article) */
.memo-card { border-left: 4px solid var(--c-yellow); }
.memo-head { font-weight: 700; font-family: var(--font-display); margin-bottom: .4rem; display: flex; align-items: center; gap: .4rem; }
.memo-text { margin: 0; color: var(--c-ink); white-space: pre-line; }

/* ===== Fiche partenaire ===== */
.partner-link { color: var(--c-ink); text-decoration: none; }
.partner-link:hover { color: var(--c-orange); text-decoration: underline; }
.table-avatar-link { display: inline-block; }
.partner-card { max-width: 620px; }
.partner-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.2rem; }
.partner-avatar { flex: none; width: 90px; height: 90px; border-radius: 50%; overflow: hidden; background: var(--c-cream); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; }
.partner-avatar img { width: 100%; height: 100%; object-fit: cover; }
.partner-avatar .avatar-placeholder { font-size: 2rem; font-weight: 700; color: var(--c-orange); }
.partner-name { font-family: var(--font-display); margin: 0 0 .35rem; font-size: 1.7rem; }
.partner-info { margin: 0; display: grid; gap: 0; }
.pinfo-row { display: grid; grid-template-columns: 180px 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.pinfo-row:last-child { border-bottom: none; }
.pinfo-row dt { color: var(--c-ink-soft); font-weight: 600; margin: 0; }
.pinfo-row dd { margin: 0; color: var(--c-ink); word-break: break-word; }
@media (max-width: 480px) { .pinfo-row { grid-template-columns: 1fr; gap: .15rem; } }
.cart-message { margin-top: 1rem; max-width: 640px; }

/* ===== Sélecteur de langue (drapeaux) ===== */
.lang-switch { display: inline-flex; align-items: center; gap: .35rem; margin-left: auto; }
.lang-globe { display: inline-flex; color: var(--c-ink-soft); flex: none; }
.lang-select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    max-width: 150px; padding: .35rem 1.7rem .35rem .6rem;
    border: 1.5px solid var(--line); border-radius: 999px;
    background-color: var(--c-paper); color: var(--c-ink);
    font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; line-height: 1.2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e65c00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .55rem center;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.lang-select:hover { border-color: color-mix(in srgb, var(--c-orange) 45%, var(--line)); }
.lang-select:focus-visible { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-orange) 22%, transparent); }
@media (max-width: 880px) { .lang-switch { margin-right: .4rem; } .lang-select { max-width: 120px; } }
@media (max-width: 520px) { .lang-globe { display: none; } .lang-select { max-width: 108px; font-size: .8rem; } }

/* Masquer la barre/bandeau injecté par Google Traduction */
.goog-te-banner-frame.skiptranslate, .goog-te-gadget-icon { display: none !important; }
.skiptranslate iframe { visibility: hidden !important; height: 0 !important; }
body { top: 0 !important; }
#goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
.cmp-legend { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--c-ink-soft); margin: 0 0 .7rem; }
.cmp-legend-box { display: inline-block; width: 16px; height: 16px; border-radius: 4px; background: #ffe9ef; box-shadow: inset 0 0 0 2px #d6204a; flex: none; }


/* ===== Page « Nous rejoindre » (ACEFLA) ===== */
.join-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.8rem 0; }
.join-tier { position: relative; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.4rem 1.5rem; display: flex; flex-direction: column; }
.join-tier > p { color: var(--c-ink-soft); }
.join-tier .btn-block { margin-top: auto; }
.join-tier-featured { border-color: color-mix(in srgb, var(--c-orange) 55%, var(--line)); box-shadow: 0 10px 30px rgba(255,122,26,.12); background: linear-gradient(180deg, rgba(255,197,61,.10), var(--c-paper) 60%); }
.join-ribbon { position: absolute; top: -11px; right: 16px; background: var(--c-orange); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .25rem .6rem; border-radius: 999px; box-shadow: 0 3px 8px rgba(255,122,26,.35); }
.join-tier-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.join-tier-head h2 { margin: 0; font-size: 1.35rem; }
.join-price { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; color: var(--c-orange); white-space: nowrap; }
.join-price-free { color: var(--c-green); }
.join-per { font-size: .9rem; font-weight: 600; color: var(--c-ink-soft); }
.join-perks { list-style: none; margin: .2rem 0 1.2rem; padding: 0; display: grid; gap: .55rem; }
.join-perks li { position: relative; padding-left: 1.6rem; color: var(--c-ink); }
.join-perks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--c-orange); font-weight: 800; }

.join-heritage { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; align-items: center; margin: 2rem 0 1.5rem; }
.join-heritage .about-figure { margin: 0; }
.join-heritage-text h2 { margin-top: 0; }
.join-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }

.join-note { background: #fff9f0; border: 1px solid color-mix(in srgb, var(--c-yellow) 40%, var(--line)); border-radius: var(--radius); padding: 1rem 1.2rem; color: var(--c-ink); font-size: 1rem; }

@media (max-width: 760px) {
    .join-tiers { grid-template-columns: 1fr; }
    .join-heritage { grid-template-columns: 1fr; }
    .join-heritage .about-figure { max-width: 320px; margin: 0 auto; }
}

/* Offre de réinitialisation du mot de passe (sous la connexion) */
.reset-offer { background: #fff7ef; border: 1px solid var(--line); border-left: 4px solid var(--c-orange); border-radius: 10px; padding: .8rem .9rem; margin-bottom: 1rem; }
.reset-offer p { margin: 0 0 .55rem; font-size: .9rem; color: var(--c-ink-soft); }
.reset-offer-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.reset-offer-form input[type="email"] { flex: 1; min-width: 180px; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; }

/* Message de succès de formulaire */
.form-success { background: #eafaf0; border: 1px solid #b7e6c9; color: #1c7a45; border-radius: 10px; padding: .7rem .9rem; margin: 0 0 1rem; font-size: .95rem; }

/* ---- Cartes "Doubles à échanger" : améliorations ---- */
.partners-grid .partner-card { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.partners-grid .partner-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c-orange) 30%, var(--line)); }
.partners-grid .partner-head { gap: .7rem; margin-bottom: .8rem; }
.partners-grid .partner-avatar { width: 50px; height: 50px; }
.partners-grid .partner-avatar .avatar-placeholder { font-size: 1.05rem; font-weight: 700; color: var(--c-orange); }
.partners-grid .partner-name { font-family: var(--font-body); font-size: .95rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 .2rem; }
.partners-grid .muted-note { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }

/* Pastille façon "admin" (cercle teinté + initiales) sur doubles & partenaires */
.partner-avatar > .avatar, .table-avatar > .avatar { width: 100%; height: 100%; border-radius: 50%; }
.partners-grid .partner-avatar > .avatar { font-size: 1.05rem; }
.table-avatar > .avatar { font-size: .9rem; }

/* Barre de filtres de la page des doubles */
.doubles-filters { display: flex; flex-wrap: nowrap; align-items: center; gap: .8rem 1.2rem; margin: 0 0 1.2rem; }
.doubles-filters .results-sort { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.doubles-filters .doubles-fruit { margin-left: auto; }
.doubles-filters > .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 880px) {
    .doubles-filters { flex-wrap: wrap; }
    .doubles-filters .doubles-fruit { margin-left: 0; }
}
.doubles-fruit { display: inline-flex; align-items: center; gap: .5rem; }
.doubles-fruit .results-sort-label { color: var(--c-ink-soft); font-weight: 600; }
.doubles-fruit select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    padding: .5rem 2.2rem .5rem .9rem;
    border: 1.5px solid var(--line); border-radius: 999px;
    background-color: var(--c-paper); color: var(--c-ink);
    font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e65c00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .8rem center;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.doubles-fruit select:hover { border-color: color-mix(in srgb, var(--c-orange) 45%, var(--line)); }
.doubles-fruit select:focus-visible { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-orange) 22%, transparent); }
.doubles-fruit select option { color: var(--c-ink); font-weight: 500; }

/* 4e icône de carte : ajouter des doubles */
.ra-btn.ra-double:hover { color: #0d9488; border-color: color-mix(in srgb, #0d9488 40%, var(--line)); background: color-mix(in srgb, #0d9488 10%, transparent); }
/* Champ de saisie dans le modal (quantité de doubles) */
.modal-input { width: 100%; margin: 0 0 1rem; padding: .6rem .8rem; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; text-align: center; font-size: 1.2rem; font-weight: 700; }
.modal-input:focus-visible { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-orange) 22%, transparent); }

/* Réduction de l'image "Chiquita Kids" sur la page ACEFLA */
.about-figure-sm img { max-width: 280px; width: 100%; margin: 0 auto; }

/* Doubles : consultation de ses propres doubles (lecture seule) */
.dbl-own { font-size: .82rem; font-weight: 700; color: var(--c-ink-soft); }

/* Date de la demande d'échange sur les cartes */
.xc-date { margin: -.3rem 0 .6rem; font-size: .82rem; color: var(--c-ink-soft); }

/* Graphique d'évolution de la collection (tableau de bord) */
.dash-chart { border-top: 1px dashed var(--line); padding-top: 1.1rem; margin-top: 1.1rem; }
.dash-chart-sub { font-size: .78rem; color: var(--c-ink-soft); }
.dash-chart-svg { display: block; width: 100%; height: auto; margin-top: .4rem; }
.dc-axis { stroke: var(--line); stroke-width: 1; }
.dc-area { fill: color-mix(in srgb, var(--c-orange) 14%, transparent); }
.dc-line { stroke: var(--c-orange); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.dc-dot { fill: var(--c-orange); stroke: #fff; stroke-width: 1.5; }
.dc-lbl { fill: var(--c-ink-soft); font-size: 9px; font-weight: 600; }
.dash-chart-empty { font-size: .88rem; color: var(--c-ink-soft); margin: .5rem 0 0; }

/* ===== Page vote de dédoublonnage — refonte ===== */
.vote-head { }
.vote-head-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .5rem; }
.vote-head-num { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.vote-state { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .22rem .6rem; border-radius: 999px; background: #eee; color: #777; }
.vote-state.is-open { background: color-mix(in srgb, var(--c-green, #2e9e5b) 16%, transparent); color: #1c7a45; }
.vote-head-meta { margin: 0 0 .9rem; color: var(--c-ink-soft); font-size: .95rem; }

.vote-quote { margin: 0; padding: .9rem 1rem; background: #fff9f5; border-left: 4px solid var(--c-orange); border-radius: 0 10px 10px 0; }
.vote-quote-label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-orange); margin-bottom: .3rem; }
.vote-quote p { margin: 0; line-height: 1.5; }

.vote-opinions { margin-top: 1.1rem; border-top: 1px dashed var(--line); padding-top: 1rem; }
.vote-opinions-title { margin: 0 0 .7rem; font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.vote-opinions-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--c-cream); color: var(--c-ink-soft); font-size: .8rem; font-weight: 700; }
.vote-opinions-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.vote-op { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--c-paper); }
.vote-op.is-oui { border-left: 3px solid #2e9e5b; }
.vote-op.is-non { border-left: 3px solid #d6204a; }
.vote-op-body { min-width: 0; }
.vote-op-name { font-weight: 700; font-size: .92rem; }
.vote-op-req { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--c-orange); background: color-mix(in srgb, var(--c-orange) 12%, transparent); padding: .1rem .4rem; border-radius: 999px; margin-left: .3rem; }
.vote-op-comment { margin: .25rem 0 0; color: var(--c-ink); font-size: .9rem; line-height: 1.45; }

.tally-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .5rem; }
.tally-title { font-weight: 700; }
.tally-total { font-size: .85rem; color: var(--c-ink-soft); }

.vote-card { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.vote-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--c-orange) 30%, var(--line)); }

/* OCR sur la page d'ajout */
.ocr-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: -.4rem 0 1rem; }
.ocr-status { font-size: .85rem; color: var(--c-ink-soft); }

/* Liste "Possédé par" en colonne avec petit avatar */
.owner-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.owner-item { display: flex; align-items: center; gap: .5rem; }
.owner-av { width: 22px; height: 22px; flex: none; border-radius: 50%; overflow: hidden; display: inline-flex; }
.owner-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.owner-av .avatar { width: 100%; height: 100%; font-size: .58rem; }
.owner-name { font-size: .92rem; }

/* "Doubles" en colonne (réutilise .owner-list) */
.doubles-total { display: block; font-weight: 700; margin-bottom: .35rem; }
.owner-qty { color: var(--c-ink-soft); font-weight: 600; }

/* Bouton "pré-enregistrer" (pré-collection) sur les cartes de résultats */
.ra-btn.ra-pre:hover { color: #0d9488; border-color: color-mix(in srgb, #0d9488 40%, var(--line)); background: color-mix(in srgb, #0d9488 10%, transparent); }
.ra-btn.ra-pre.is-on { color: #0d9488; border-color: color-mix(in srgb, #0d9488 45%, var(--line)); background: color-mix(in srgb, #0d9488 12%, transparent); }
.ra-btn.ra-pre.is-on svg { fill: currentColor; }

/* Popup de confirmation en bas de page (collection / pré-collection) */
.bottom-confirm {
    position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 130%);
    z-index: 1000; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
    background: var(--c-paper); border: 1px solid var(--line); border-bottom: none;
    border-radius: 16px 16px 0 0; box-shadow: 0 -8px 28px rgba(0,0,0,.14);
    padding: 1rem 1.3rem; max-width: min(92vw, 520px);
    transition: transform .25s ease;
}
.bottom-confirm.show { transform: translate(-50%, 0); }
.bottom-confirm .bc-msg { font-size: .95rem; font-weight: 600; }
.bottom-confirm .bc-actions { display: flex; gap: .5rem; margin-left: auto; }

/* ===== Page "Ma pré-collection" ===== */
.precol-toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 0 0 1.2rem; }
.precol-count { font-weight: 700; color: var(--c-ink-soft); }
.precol-toolbar .btn { margin-left: auto; }
.precol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.precol-card { display: flex; flex-direction: column; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.precol-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c-orange) 30%, var(--line)); }
.precol-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: var(--c-cream); overflow: hidden; }
.precol-thumb img { width: 100%; height: 100%; object-fit: contain; }
.precol-thumb:hover { text-decoration: none; }
.precol-body { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .7rem; flex: 1; }
.precol-fruit { font-size: .78rem; color: var(--c-ink-soft); font-weight: 700; }
.precol-legend { font-size: .9rem; line-height: 1.3; }
.precol-date { font-size: .75rem; color: var(--c-ink-soft); margin-top: .1rem; }
.precol-actions { display: flex; gap: .4rem; padding: 0 .7rem .7rem; }
.precol-actions form { flex: 1; margin: 0; }
.precol-actions .btn { width: 100%; }

/* ===== Page Statistiques ===== */
.stats-section { margin: 0 0 2.4rem; }
.stats-title { font-size: 1.3rem; margin: 0 0 .5rem; }
.stats-chart-wrap { overflow-x: auto; }
.stats-chart { display: block; width: 100%; min-width: 520px; height: auto; }
.sc-grid { stroke: var(--line); stroke-width: 1; }
.sc-axis-left { fill: var(--c-ink-soft); font-size: 10px; }
.sc-axis-right { fill: var(--c-orange); font-size: 10px; font-weight: 700; }
.sc-xlabel { fill: var(--c-ink-soft); font-size: 10px; }
.sc-axis-title { fill: var(--c-ink-soft); font-size: 10px; font-weight: 600; }
.sc-line-title { fill: var(--c-orange); }
.sc-line { stroke: var(--c-orange); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.sc-dot { fill: var(--c-orange); stroke: #fff; stroke-width: 1.2; }
.stats-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; padding: 0; margin: .8rem 0 0; font-size: .85rem; color: var(--c-ink); }
.stats-legend li { display: flex; align-items: center; gap: .4rem; }
.legend-swatch { width: 13px; height: 13px; border-radius: 3px; flex: none; }
.legend-line { width: 20px; height: 0; border-top: 3px solid var(--c-orange); border-radius: 3px; flex: none; }

.stats-rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.1rem; }
.stats-rank-card { background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stats-rank-cat { font-size: 1.02rem; margin: 0 0 .6rem; display: flex; align-items: center; gap: .5rem; }
.stats-rank-nb { display: inline-flex; align-items: center; justify-content: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--c-cream); color: var(--c-ink-soft); font-size: .78rem; font-weight: 700; }
.stats-rank-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.stats-rank-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--c-ink-soft); border-bottom: 1px solid var(--line); padding: .3rem .4rem; }
.stats-rank-table td { padding: .32rem .4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.stats-rank-table tr:last-child td { border-bottom: none; }
.stats-rank-table .ta-r { text-align: right; }
.stats-rank-table .rank-pos { color: var(--c-ink-soft); font-weight: 700; width: 2rem; }
.rank-user { display: flex; align-items: center; gap: .5rem; }
.rank-user .owner-av { width: 24px; height: 24px; }

/* ===== Journal des connexions (admin) ===== */
.login-stats { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 1.2rem; }
.login-stat { display: flex; align-items: center; gap: .7rem; padding: .8rem 1.1rem; background: var(--c-paper); border: 1px solid var(--line); border-radius: 14px; }
.login-stat .ls-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--c-green, #2e9e5b); line-height: 1; }
.login-stat.is-ko .ls-num { color: #d6204a; }
.login-stat .ls-lbl { font-size: .82rem; color: var(--c-ink-soft); font-weight: 600; line-height: 1.25; }
.login-stat small { font-weight: 500; opacity: .8; }
.login-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .8rem 1rem; margin-bottom: 1.2rem; }
.login-filters .field { margin: 0; flex: 1 1 170px; }
.login-filters-actions { display: flex; gap: .5rem; margin-left: auto; }

/* Votants sous chaque ligne de l'historique des dédoublonnages */
.dedup-voters-row td { background: color-mix(in srgb, var(--c-cream) 60%, transparent); padding-top: .4rem !important; padding-bottom: .6rem !important; }
.dedup-voters { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.dedup-voter { display: flex; align-items: baseline; gap: .35rem; font-size: .78rem; }
.dedup-voter .vd-badge { font-size: .66rem; padding: .05rem .35rem; }
.dv-name { font-weight: 700; }
.dv-req { font-size: .64rem; font-weight: 700; text-transform: uppercase; color: var(--c-orange); }
.dv-comment { color: var(--c-ink-soft); font-style: italic; }

/* Séparation nette entre chaque demande de dédoublonnage */
.dedup-hist tbody .dedup-sep > td {
    padding: 0 !important;
    border: none !important;
    height: 3px;
    background: color-mix(in srgb, var(--c-orange) 45%, var(--line));
}
.dedup-hist tbody .dedup-main-row > td {
    border-top: none;
    border-bottom: none;
    padding-top: .85rem !important;
    background: color-mix(in srgb, var(--c-orange) 4%, transparent);
}
.dedup-hist tbody .dedup-main-row > td:first-child { font-weight: 700; }
.dedup-hist tbody .dedup-voters-row > td { border-bottom: none; }
.dedup-hist tbody tr:last-child > td { padding-bottom: .9rem !important; }

/* Bouton "Mon panier" sur la page des doubles d'un collectionneur */
.detail-back-cart { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.btn-cart { display: inline-flex; align-items: center; gap: .5rem; margin-left: auto; padding: .55rem 1.1rem; box-shadow: 0 3px 10px rgba(230,92,0,.28); }
.btn-cart:hover { text-decoration: none; transform: translateY(-1px); }
.btn-cart .cart-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.45rem; height: 1.45rem; padding: 0 .4rem; border-radius: 999px;
    background: #fff; color: var(--c-orange); font-size: .82rem; font-weight: 800; line-height: 1;
}

/* ===== Legufrufolies : liste des rencontres ===== */
.lf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }
.lf-card { display: flex; flex-direction: column; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--c-ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.lf-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c-orange) 35%, var(--line)); }
.lf-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-cream); padding: .35rem; }
.lf-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .3s ease; }
.lf-card:hover .lf-thumb img { transform: scale(1.05); }
.lf-thumb-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--c-orange), var(--c-yellow, #ffc53d)); }
.lf-body { display: flex; flex-direction: column; gap: .1rem; padding: .8rem .9rem 1rem; }
.lf-year { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--c-orange); line-height: 1; }
.lf-title { font-weight: 700; font-size: .95rem; }
.lf-lieu { font-size: .82rem; color: var(--c-ink-soft); }

/* ===== Legufrufolies : page d'une rencontre ===== */
.lf-head { margin-bottom: 1.2rem; }
.lf-head-year { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: #fff; background: var(--c-orange); padding: .18rem .7rem; border-radius: 999px; }
.lf-head h1 { margin: .4rem 0 .2rem; }
.lf-head-lieu { margin: 0; color: var(--c-ink-soft); font-size: 1rem; }
.lf-cover { margin: 0 0 1.4rem; }
.lf-cover img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.lf-intro { font-size: 1.05rem; color: var(--c-ink-soft); margin: 0 0 1.6rem; }
.lf-section { margin: 0 0 2rem; }
.lf-section-title { font-size: 1.2rem; margin: 0 0 .6rem; }
.lf-text { line-height: 1.65; }
.lf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-top: 1rem; }
.lf-gallery { align-items: start; }
.lf-photo { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.lf-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 380px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); display: block; cursor: zoom-in; transition: transform .18s ease, box-shadow .18s ease; }
.lf-photo img:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lf-photo figcaption { font-size: .8rem; color: var(--c-ink-soft); margin-top: .4rem; line-height: 1.35; overflow-wrap: anywhere; }
.lf-nav { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }

/* Visionneuse plein écran (photos des Legufrufolies) */
.lb-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(20, 16, 12, .88);
    display: flex; align-items: center; justify-content: center;
    padding: 24px; opacity: 0; transition: opacity .18s ease; cursor: zoom-out;
}
.lb-overlay.show { opacity: 1; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.lb-figure img { max-width: calc(100vw - 48px); max-height: calc(100vh - 110px); width: auto; height: auto; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; }
.lb-figure figcaption { color: #f3ece5; font-size: .9rem; text-align: center; }
.lb-close {
    position: absolute; top: 14px; right: 18px; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.14); color: #fff; border: none; border-radius: 50%;
    font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.lb-close:hover { background: rgba(255,255,255,.26); }

/* Commentaire de pré-collection */
.precol-comment { font-size: .78rem; color: var(--c-orange); font-weight: 700; margin-top: .15rem; overflow-wrap: anywhere; }
/* Champ texte des fenêtres modales */
.modal-hint { font-size: .84rem; color: var(--c-ink-soft); margin: -.4rem 0 .6rem; }
.modal-input-text { text-align: left; font-size: 1rem; font-weight: 500; }

/* Filtre par commentaire (page Ma pré-collection) */
.precol-filter { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
.precol-filter select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    padding: .5rem 2.2rem .5rem .9rem;
    border: 1.5px solid var(--line); border-radius: 999px;
    background-color: var(--c-paper); color: var(--c-ink);
    font: inherit; font-weight: 600; cursor: pointer; line-height: 1.2; max-width: 320px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23e65c00' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .8rem center;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.precol-filter select:hover { border-color: color-mix(in srgb, var(--c-orange) 45%, var(--line)); }
.precol-filter select:focus-visible { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-orange) 22%, transparent); }
.precol-transfer-all { margin: 0 0 0 auto; }

/* 2e rangée d'icônes : recherches par légende (administrateurs) */
.result-actions-admin { border-top: 1px dashed var(--line); padding-top: .35rem; margin-top: .1rem; }
.result-actions-admin .ra-btn { position: relative; }
.result-actions-admin .ra-num {
    position: absolute; right: 1px; bottom: 0;
    font-size: .58rem; font-weight: 800; line-height: 1;
    background: var(--c-paper); color: var(--c-orange);
    border-radius: 3px; padding: 0 1px;
}
.result-actions-admin .ra-btn:hover { color: #6d28d9; border-color: color-mix(in srgb, #6d28d9 40%, var(--line)); background: color-mix(in srgb, #6d28d9 10%, transparent); }

/* ===== Page Codes PLU ===== */
.plu-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .8rem 1rem; margin-bottom: 1.4rem; }
.plu-search .field { margin: 0; flex: 1 1 320px; }
.plu-search-actions { display: flex; gap: .5rem; }
.plu-table td { vertical-align: middle; }
.plu-code { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; color: var(--c-orange); letter-spacing: .02em; }
.plu-help { margin-top: 1.8rem; }
.plu-help-list { margin: .4rem 0 .6rem; padding-left: 1.1rem; line-height: 1.7; }

/* Fenêtre d'information (ex. doubles devenus indisponibles) */
.popup-info .modal-box { max-width: 540px; text-align: left; }
.popup-title { font-size: 1.1rem; margin: 0 0 .7rem; color: var(--c-orange); }
.popup-lines { margin: 0 0 1.1rem; padding-left: 1.1rem; font-size: .92rem; line-height: 1.55; display: grid; gap: .4rem; }
.popup-info .modal-actions { justify-content: flex-end; }

/* Niveau 4 — administrateur */
.level-4 { background: var(--c-plum); }

/* Bouton « + » d'ajout d'une valeur de référence (marque, fruit, variété, série, famille) */
.ref-row { display: flex; align-items: stretch; gap: .4rem; }
.ref-row select { flex: 1; min-width: 0; }
.ref-add {
    flex: none; width: 40px; border: 1.5px solid var(--line); border-radius: 10px;
    background: var(--c-paper); color: var(--c-orange);
    font-size: 1.25rem; font-weight: 700; line-height: 1; cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.ref-add:hover { border-color: var(--c-orange); background: color-mix(in srgb, var(--c-orange) 12%, transparent); }
.ref-add:focus-visible { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-orange) 22%, transparent); }

/* Champ numérique court (ex. nombre d'articles par échange) */
.field-narrow input { max-width: 160px; }

/* Limite d'articles par échange (panier) */
.cart-limit { font-size: .8rem; font-weight: 700; color: var(--c-ink-soft); background: var(--c-cream); border-radius: 999px; padding: .18rem .6rem; margin-left: .5rem; vertical-align: middle; }
.cart-limit.is-over { background: color-mix(in srgb, #d6204a 14%, transparent); color: #d6204a; }

/* Rappel de la limite d'articles par échange (page des doubles d'un collectionneur) */
.dbl-limit { font-size: .88rem; color: var(--c-ink-soft); background: var(--c-cream); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; margin: -.4rem 0 1.1rem; }
.dbl-limit.is-over { background: color-mix(in srgb, #d6204a 10%, transparent); border-color: color-mix(in srgb, #d6204a 35%, var(--line)); color: #a3163a; }
.dbl-limit-count { display: inline-block; margin-left: .5rem; font-weight: 700; }

/* Badges des actions restantes du journal */
.action-suppression_dedoublonnage { background: var(--c-pink); }
.action-precollection_ajout { background: #0d9488; }
.action-precollection_retrait { background: #b45309; }
.action-precollection_transfert { background: var(--c-blue); }

/* Aperçu au survol des articles d'un échange */
.xc-thumb-wrap { position: relative; flex: none; display: inline-flex; }
.xc-thumb-wrap:hover { z-index: 40; }
.xc-thumb-wrap:hover .xc-popup,
.xc-thumb-wrap:focus-within .xc-popup {
    opacity: 1; visibility: visible;
    transform: translateX(calc(-50% + var(--rp-shift, 0px))) translateY(0);
}
.xc-popup { flex-direction: column; gap: .4rem; }
.xc-popup img.rp-img { display: block; width: auto; height: auto; max-width: 100%; border-radius: 6px; background: #fff; }
.xc-popup-legend { font-size: .82rem; font-weight: 700; color: var(--c-ink); }

/* ===== Page Collectors ===== */
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.3rem; }
.col-card { display: flex; flex-direction: column; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.col-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c-orange) 35%, var(--line)); }
.col-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--c-cream); overflow: hidden; padding: .4rem; display: flex; align-items: center; justify-content: center; }
.col-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.col-thumb-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--c-orange), var(--c-yellow, #ffc53d)); }
.col-year { position: absolute; top: .55rem; right: .55rem; font-family: var(--font-display); font-weight: 700; font-size: .82rem; color: #fff; background: rgba(20,16,12,.6); padding: .12rem .55rem; border-radius: 999px; }
.col-body { display: flex; flex-direction: column; gap: .3rem; padding: .9rem 1rem 1.1rem; flex: 1; }
.col-brand { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--c-orange); }
.col-series { font-size: 1.05rem; margin: 0; line-height: 1.25; }
.col-note { font-size: .85rem; color: var(--c-ink-soft); margin: .1rem 0 0; line-height: 1.4; }
.col-dl { align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center; gap: .45rem; }
.col-nodl { margin-top: auto; font-size: .82rem; color: var(--c-ink-soft); font-style: italic; }

/* Lien de la série sur les cartes Collectors */
.col-series a { color: inherit; }
.col-series a:hover { color: var(--c-orange); text-decoration: underline; }

/* Bloc de remplacement d'image (modification d'article, admin) */
.img-edit { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 1.1rem; margin: 0 0 1.4rem; }
.img-edit legend { font-weight: 700; padding: 0 .4rem; font-size: .95rem; }
.img-edit input[type="file"] { font: inherit; }
.checkbox-line { display: flex; align-items: center; gap: .5rem; font-size: .9rem; margin: .3rem 0 .2rem; }

/* Utilisateurs en ligne (bandeau d'en-tête, page d'accueil) */
.brand-col { display: flex; flex-direction: column; gap: .35rem; }
.online-users { display: flex; flex-direction: column; gap: .25rem; }
.online-dot-label { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; color: var(--c-ink-soft); }
.online-live { width: 8px; height: 8px; border-radius: 50%; background: #2e9e5b; box-shadow: 0 0 0 0 rgba(46,158,91,.6); animation: onlinePulse 2s infinite; flex: none; }
@keyframes onlinePulse {
    0%   { box-shadow: 0 0 0 0 rgba(46,158,91,.5); }
    70%  { box-shadow: 0 0 0 6px rgba(46,158,91,0); }
    100% { box-shadow: 0 0 0 0 rgba(46,158,91,0); }
}
.online-avatars { display: flex; align-items: center; }
.online-av { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; margin-left: -6px; border: 2px solid var(--c-paper); background: var(--c-cream); flex: none; }
.online-av:first-child { margin-left: 0; }
.online-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.online-av .avatar { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: .66rem; font-weight: 700; color: #fff; }
.online-more { display: flex; align-items: center; justify-content: center; font-size: .66rem; font-weight: 800; color: var(--c-ink-soft); background: var(--c-cream); }
@media (max-width: 760px) {
    .online-dot-label { font-size: .68rem; }
    .online-av { width: 22px; height: 22px; }
}

/* ===== Ajout d'article : formulaire à gauche, image collante à droite ===== */
.ajout-layout { display: grid; grid-template-columns: 1fr 220px; gap: 1.5rem; align-items: start; }
.ajout-layout .ajout-main { grid-column: 1; grid-row: 1; margin: 0; }   /* formulaire : grande colonne de gauche */
.ajout-aside { grid-column: 2; grid-row: 1; position: sticky; top: 84px; align-self: start; }  /* image : colonne étroite de droite */
.ajout-aside .ajout-preview-box { margin: 0; overflow: visible; max-height: none; }
.ajout-aside .preview-note { margin: .6rem 0 0; }
/* L'image d'aperçu s'adapte à la colonne tout en restant lisible */
.ajout-aside .real-preview { max-width: 100%; height: auto; margin: 0 auto; }
.ajout-aside .preview-pair { display: grid; grid-template-columns: 1fr; gap: .8rem; }

@media (max-width: 900px) {
    .ajout-layout { grid-template-columns: 1fr; }
    /* Sur mobile : une seule colonne, image au-dessus du formulaire, sans collage */
    .ajout-layout .ajout-main { grid-column: auto; grid-row: auto; }
    .ajout-aside { grid-column: auto; grid-row: auto; position: static; }
    .ajout-aside .real-preview { max-width: 320px; }
}

/* Aperçu au survol (taille réelle) — pages d'ajout / modification */
.zoom-thumb { position: relative; display: inline-block; cursor: zoom-in; }
.zoom-thumb:hover { z-index: 40; }
.zoom-thumb:hover .result-popup,
.zoom-thumb:focus-within .result-popup {
    opacity: 1; visibility: visible;
    transform: translateX(calc(-50% + var(--rp-shift, 0px))) translateY(0);
}
.zoom-thumb .result-popup img.rp-img {
    display: block; width: auto; height: auto; max-width: 100%; max-height: none;
    border-radius: 6px; background: #fff;
}
/* L'aperçu étant collé au bord droit, la popup s'ouvre vers la GAUCHE
   et l'image est bornée à l'écran pour rester entièrement visible. */
.ajout-aside .zoom-thumb .result-popup {
    left: auto; right: 100%; top: 0; margin-right: .6rem;
    transform: translateX(8px);
}
.ajout-aside .zoom-thumb:hover .result-popup,
.ajout-aside .zoom-thumb:focus-within .result-popup {
    transform: translateX(0);
}
.ajout-aside .zoom-thumb .result-popup img.rp-img {
    max-width: min(calc(100vw - 280px), 900px);
    max-height: 84vh;
}

/* ===== Page Tutoriels vidéo ===== */
.tuto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.tuto-card { position: relative; display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; background: var(--c-paper); border: 1px solid var(--line); border-radius: var(--radius); color: var(--c-ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
a.tuto-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c-orange) 40%, var(--line)); }
.tuto-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--c-cream); color: var(--c-ink-soft); font-weight: 800; font-size: .82rem; display: flex; align-items: center; justify-content: center; }
.tuto-play { flex: none; color: var(--c-orange); display: inline-flex; }
.tuto-body { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.tuto-title { font-weight: 700; font-size: .98rem; }
.tuto-desc { font-size: .82rem; color: var(--c-ink-soft); line-height: 1.35; }
.tuto-cta { flex: none; font-size: .78rem; font-weight: 700; color: var(--c-orange); white-space: nowrap; }
.tuto-card.is-soon { opacity: .72; }
.tuto-card.is-soon .tuto-play { color: var(--c-ink-soft); }
.tuto-card.is-soon .tuto-cta { color: var(--c-ink-soft); font-style: italic; }
@media (max-width: 520px) { .tuto-cta { display: none; } }

/* Aperçu au survol dans le panier */
.cart-thumb-wrap { display: inline-flex; }
.cart-thumb-wrap .table-avatar { cursor: zoom-in; }

/* Panier : laisser la popup d'aperçu déborder du tableau (écrans larges) */
@media (min-width: 761px) {
    .cart-table-wrap { overflow: visible; }
    .cart-table-wrap .data-table { overflow: visible; }
}
