/*!
 * my2eurocoins — feuille de style principale (au-dessus de Bootstrap 5.3).
 */

/* ======== Police Montserrat (variable, auto-hébergée) ======== */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ======== Thèmes ======== */
:root {
  --bs-font-sans-serif: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --m2-gold: #c9a24f;
  --m2-gold-strong: #b08a38;
  --m2-gold-soft: rgba(201, 162, 79, .18);
  --m2-owned: #16a34a;
  --m2-owned-bg: rgba(22, 163, 74, .12);
  --m2-missing: #dc2626;
  --m2-missing-bg: rgba(220, 38, 38, .10);
  --m2-radius: 1rem;
  --m2-nav-h: 64px;
}

[data-bs-theme="dark"] {
  color-scheme: dark;
  --bs-body-bg: #10151d;
  --bs-body-color: #f1ede3;
  --bs-secondary-color: #a9b4c1;
  --bs-border-color: #334254;
  --bs-tertiary-bg: #1a2431;
  --bs-secondary-bg: #202d3b;
  --m2-gold: #d8b66a;
  --m2-gold-strong: #e6c67c;
  --m2-owned: #22c55e;
  --m2-owned-bg: rgba(34, 197, 94, .14);
  --m2-missing: #f87171; /* contraste AA (≥ 4,5:1) sur les cartes sombres */
  --m2-missing-bg: rgba(239, 68, 68, .14);
  --m2-panel: linear-gradient(160deg, #202d3b, #1a2431);
  --m2-hero: radial-gradient(ellipse at top, #34465b 0, transparent 65%);
  --m2-page: linear-gradient(145deg, #10151d, #172434);
  --m2-photo: radial-gradient(circle, #344253, #17212d 70%);
  --m2-glass: rgba(17, 25, 35, .88);
}

[data-bs-theme="light"] {
  /* Mode clair : contrastes WCAG AA (texte ≥ 4,5:1), cartes blanches détachées du fond. */
  color-scheme: light;
  --bs-body-bg: #f4f1ea;
  --bs-body-color: #1a202c;
  --bs-emphasis-color: #111827;
  --bs-secondary-color: #4b5563;
  --bs-border-color: #cfc3a8;
  --bs-tertiary-bg: #ffffff;
  --bs-secondary-bg: #ece6d8;
  --m2-gold: #7a5a12;
  --m2-gold-strong: #5f450b;
  --m2-gold-soft: rgba(122, 90, 18, .12);
  --m2-owned: #166534;
  --m2-owned-bg: #e7f5ec;
  --m2-missing: #b91c1c;
  --m2-missing-bg: #fdecec;
  --m2-panel: #ffffff;
  --m2-hero: radial-gradient(ellipse at top, #e6d7b2 0, transparent 65%);
  --m2-page: #f4f1ea;
  --m2-photo: radial-gradient(circle, #ffffff 30%, #e9e2d1 80%);
  --m2-glass: rgba(255, 255, 255, .94);
}

/* Ajustements propres au mode clair (le mode sombre n'est pas modifié). */
[data-bs-theme="light"] .btn-gold { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-disabled-color: #fff; }
[data-bs-theme="light"] .btn-outline-gold { --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; }
[data-bs-theme="light"] .theme-fab,
[data-bs-theme="light"] .theme-fab:hover,
[data-bs-theme="light"] .theme-fab.show { color: #fff; }
[data-bs-theme="light"] .dropdown-item.active,
[data-bs-theme="light"] .dropdown-item:active { color: #fff; }
[data-bs-theme="light"] .dropdown-item.active .country-count { color: #fff; }
[data-bs-theme="light"] .btn-outline-secondary { --bs-btn-color: #374151; --bs-btn-border-color: #a8a08c; --bs-btn-hover-bg: #374151; --bs-btn-hover-border-color: #374151; }
[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select { background-color: #fff; border-color: #b9ab8c; color: #1a202c; }
[data-bs-theme="light"] .form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231a202c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
[data-bs-theme="light"] .toolbar,
[data-bs-theme="light"] .stat,
[data-bs-theme="light"] .card { border-color: #d8ccb1; box-shadow: 0 1px 2px rgba(60, 45, 10, .06), 0 4px 14px rgba(60, 45, 10, .07); }
[data-bs-theme="light"] .coin-card.neutral,
[data-bs-theme="light"] .country-card { border-color: #d8ccb1; box-shadow: 0 1px 2px rgba(60, 45, 10, .06), 0 6px 18px rgba(60, 45, 10, .09); }
[data-bs-theme="light"] .coin-card.neutral:hover,
[data-bs-theme="light"] .country-card:hover { border-color: var(--m2-gold); }
[data-bs-theme="light"] .coin-media { border-bottom: 1px solid #ece4d2; }
[data-bs-theme="light"] .coin-type { color: #374151; border-color: #b9ab8c; }
[data-bs-theme="light"] .coin-type.commune { color: #3b5bdb; border-color: #3b5bdb; }
[data-bs-theme="light"] .app-navbar { background: rgba(255, 255, 255, .96); border-bottom-color: #d8ccb1; }
[data-bs-theme="light"] .app-navbar .nav-link { color: #1f2937; }
[data-bs-theme="light"] .app-navbar .nav-link:hover { color: var(--m2-gold); }
[data-bs-theme="light"] .app-navbar .nav-link.active { color: var(--m2-gold); }
[data-bs-theme="light"] .filter-pill { background: #fff; border-color: #b9ab8c; }
[data-bs-theme="light"] mark { background: #f6dc8c; }
[data-bs-theme="light"] .app-footer { background: #fff; }

/* ======== Base ======== */
body {
  font-family: var(--bs-font-sans-serif);
  background: var(--m2-page) fixed;
  font-feature-settings: "tnum" 1;
}
h1, h2, h3, .h1, .h2, .h3, .display-title { font-weight: 800; letter-spacing: -.01em; }
a { color: var(--m2-gold); }
a:hover { color: var(--m2-gold-strong); }
:focus-visible { outline: 2px solid var(--m2-gold); outline-offset: 2px; }
.skip-link { position: absolute; z-index: 1100; top: .5rem; left: .5rem; padding: .5rem 1rem; background: var(--m2-gold); color: #111; border-radius: .5rem; }
.text-gold { color: var(--m2-gold) !important; }
.text-owned { color: var(--m2-owned) !important; }
/* Compteur « acquises » (x / n) des séries et pays : coche toujours en vert, même si tout n'est pas acquis. */
.issue-own .bi-check2-circle { color: var(--m2-owned); }
.text-missing { color: var(--m2-missing) !important; }
mark { background: rgba(216, 182, 106, .4); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Boutons or */
.btn-gold {
  --bs-btn-color: #17120a; --bs-btn-bg: var(--m2-gold); --bs-btn-border-color: var(--m2-gold);
  --bs-btn-hover-color: #17120a; --bs-btn-hover-bg: var(--m2-gold-strong); --bs-btn-hover-border-color: var(--m2-gold-strong);
  --bs-btn-active-bg: var(--m2-gold-strong); --bs-btn-disabled-bg: var(--m2-gold); --bs-btn-disabled-border-color: var(--m2-gold);
  font-weight: 700;
}
.btn-outline-gold {
  --bs-btn-color: var(--m2-gold); --bs-btn-border-color: var(--m2-gold);
  --bs-btn-hover-color: #17120a; --bs-btn-hover-bg: var(--m2-gold); --bs-btn-hover-border-color: var(--m2-gold);
  --bs-btn-active-color: #17120a; --bs-btn-active-bg: var(--m2-gold-strong);
  font-weight: 600;
}
.btn { font-weight: 600; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--m2-gold); box-shadow: 0 0 0 .2rem var(--m2-gold-soft);
}

/* ======== Navigation ======== */
.app-navbar {
  min-height: var(--m2-nav-h);
  background: var(--m2-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bs-border-color);
}
.brand-logo { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.env-badge { background: #2563eb; color: #fff; font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.brand-text { font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; }
/* Logo : « my » + pièce de 2 € + « coins », comme le copyright du pied de page. */
.brand-text { display: inline-flex; align-items: center; white-space: nowrap; line-height: 1; }
.brand-coin { width: 48px; height: 48px; margin: 0 .2em; flex: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
/* Logo plus grand : pièce de 48 px sur ordinateur, réduite sur tablette et mobile. */
.app-navbar .navbar-brand { padding-top: .25rem; padding-bottom: .25rem; }
@media (max-width: 991.98px) { .brand-text { font-size: 1.4rem; } .brand-coin { width: 42px; height: 42px; } }
.app-navbar .nav-link { font-weight: 600; }
.app-navbar .nav-link.active { color: var(--m2-gold); }
.nav-icon {
  display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 0; background: transparent; color: var(--bs-body-color); font-size: 1.2rem; text-decoration: none;
  transition: background-color .15s, color .15s;
}
.nav-icon:hover, .nav-icon:focus-visible, .nav-icon.show { background: var(--m2-gold-soft); color: var(--m2-gold); }
.nav-icon.is-auth { color: var(--m2-gold); }
.app-navbar { flex-wrap: wrap; }
/* Recherche : barre pleine largeur par-dessus l'en-tête (logo à gauche), suggestions en dessous. */
.app-navbar { position: sticky; }
.search-panel { position: absolute; inset: 0; z-index: 1050; display: flex; align-items: center; background: var(--bs-body-bg); opacity: 0; transition: opacity .15s; }
.search-panel.open { opacity: 1; }
.search-bar { display: flex; align-items: center; gap: 1.5rem; }
.search-box { position: relative; flex: 1; min-width: 0; }
.search-form { display: flex; align-items: center; gap: .6rem; height: 2.9rem; padding: 0 .5rem 0 1rem; border: 1px solid var(--bs-border-color); border-radius: 999px; background: var(--bs-tertiary-bg); }
.search-form:focus-within { border-color: var(--m2-gold); box-shadow: 0 0 0 .2rem var(--m2-gold-soft); }
.search-form-icon { font-size: 1.1rem; color: var(--bs-secondary-color); }
.search-form-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--bs-body-color); font: inherit; font-size: 1rem; outline: none; }
.search-form-input::placeholder { color: var(--bs-secondary-color); }
.search-form-input::-webkit-search-cancel-button { display: none; }
.search-close { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 0; background: none; color: var(--bs-body-color); display: grid; place-items: center; font-size: 1rem; }
.search-close:hover, .search-close:focus-visible { background: var(--m2-gold-soft); color: var(--m2-gold); outline: none; }
.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + .7rem); z-index: 1; max-height: min(70vh, 34rem); overflow-y: auto;
  padding: .9rem 1rem .6rem; border-radius: 1rem; border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg); box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}
.search-suggest-title { margin: 0 0 .4rem; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bs-secondary-color); }
.suggest-item { display: flex; align-items: center; gap: .75rem; padding: .55rem .6rem; border-radius: .6rem; color: var(--bs-body-color); text-decoration: none; }
.suggest-item:hover, .suggest-item.active { background: var(--m2-gold-soft); color: var(--bs-body-color); }
.suggest-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.suggest-cat { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6ea8fe; }
[data-bs-theme="light"] .suggest-cat { color: #1d5fd6; }
.suggest-label { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-label mark { padding: 0; background: none; color: var(--m2-gold); }
.suggest-thumb { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; font-size: 1.05rem; color: var(--bs-secondary-color); }
.suggest-thumb img { width: 100%; height: 100%; object-fit: contain; }
.suggest-thumb.flag-thumb { box-shadow: 0 0 0 1px rgba(127, 127, 127, .35); }
.suggest-thumb.flag-thumb img { object-fit: cover; }
.suggest-empty { padding: .4rem .6rem .6rem; color: var(--bs-secondary-color); font-size: .9rem; }
@media (max-width: 575.98px) {
  .search-bar { gap: .5rem; }
  .search-suggest { position: fixed; left: .5rem; right: .5rem; top: calc(var(--m2-nav-h) + .4rem); }
}
@media (prefers-reduced-motion: reduce) { .search-panel { transition: none; } }
.dropdown-item.active, .dropdown-item:active { background: var(--m2-gold); color: #17120a; }

/* ======== En-tête de page ======== */
.hero { padding: 2.5rem 0 1.75rem; background: var(--m2-hero); }
.eyebrow { color: var(--m2-gold); letter-spacing: .18em; text-transform: uppercase; font-size: .78rem; font-weight: 700; }
.display-title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: .5rem; }
.intro { max-width: 820px; color: var(--bs-secondary-color); font-size: 1.05rem; }
@media (min-width: 992px) {
  /* Phrase d'introduction sur une seule ligne à partir des écrans de bureau. */
  .intro { max-width: none; white-space: nowrap; font-size: clamp(.95rem, 1.05vw, 1.05rem); }
}
/* Phrase plus longue (À propos) : retour à la ligne équilibré, jamais de débordement horizontal. */
.intro.intro-wrap { white-space: normal; max-width: 980px; text-wrap: balance; }
.hero-left { text-align: left; }
.hero-left .intro.intro-wrap { text-wrap: pretty; margin-left: 0; }
.stats { max-width: 1000px; }
.stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%;
  padding: .85rem .75rem; border: 1px solid var(--bs-border-color); border-radius: var(--m2-radius);
  background: var(--m2-glass);
}
.stat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--bs-secondary-color); font-weight: 600; }
.stat-val { font-size: 1.35rem; font-weight: 800; margin-top: .15rem; }
.stat-scope { font-size: 1rem; }

/* ======== Barre d'outils ======== */
.alert-readonly { background: var(--m2-gold-soft); border: 1px solid var(--m2-gold); color: var(--bs-body-color); border-radius: .75rem; }
.toolbar {
  position: sticky; top: calc(var(--m2-nav-h) + .5rem); z-index: 1010;
  background: var(--m2-glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--m2-radius); border-color: var(--bs-border-color);
}
.toolbar-actions .btn-label { margin-left: .35rem; }
@media (min-width: 992px) and (max-width: 1599.98px) {
  /* Boutons en icônes seules pour garder la barre sur une ligne (libellé lu par les lecteurs d'écran). */
  .toolbar-actions .btn-label { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
}
.toolbar .form-select { text-overflow: ellipsis; }
.kbd-hint kbd { font-size: .7rem; background: var(--bs-secondary-bg); color: var(--bs-secondary-color); border: 1px solid var(--bs-border-color); }

.flag { width: 22px; height: 16px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }

/* Sélecteur de pays (menu Bootstrap avec drapeaux) */
.country-btn { overflow: hidden; white-space: nowrap; }
#country-current { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.country-btn .country-name { overflow: hidden; text-overflow: ellipsis; }
.country-btn .country-count { margin-left: auto; color: var(--bs-secondary-color); font-size: .8rem; font-weight: 600; padding-right: .25rem; }
.country-menu { max-height: min(70vh, 32rem); overflow-y: auto; min-width: 17rem; width: 100%; }
.country-item { display: flex; align-items: center; gap: .6rem; }
.country-item .country-count { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--bs-secondary-color); }
.country-item .country-count.has-owned { color: var(--m2-owned); }
.country-item.active .country-count { color: inherit; }
.eu-round { width: 1.35em; height: 1.35em; flex: none; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 1px rgba(127, 127, 127, .35), 0 1px 2px rgba(0, 0, 0, .25); }
.country-globe { font-size: 1.05rem; width: 22px; text-align: center; color: var(--m2-gold); }
.dropdown-item.active .country-globe { color: inherit; }

/* Ligne de résultats */
.result-line { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; color: var(--bs-secondary-color); font-size: .9rem; }
.filter-pill {
  display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .3rem .1rem .7rem; border-radius: 999px;
  background: var(--bs-secondary-bg); border: 1px solid var(--bs-border-color); color: var(--bs-body-color); font-size: .8rem;
}
.filter-pill button { background: none; border: 0; color: var(--bs-secondary-color); padding: 0 .2rem; line-height: 1; }
.filter-pill button:hover { color: var(--m2-missing); }

/* ======== Groupes et grille ======== */
.coin-group { margin-top: 1.75rem; }
.group-title { display: flex; align-items: center; gap: .6rem; font-size: 1.3rem; color: var(--m2-gold); margin-bottom: 1rem; }
.group-title .flag { width: 30px; height: 22px; }
.group-title .sub { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--bs-secondary-color); }
.coin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 225px), 1fr)); gap: 1rem; }

/* ======== Carte pièce ======== */
.coin-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--m2-panel); border: 3px solid var(--m2-missing); border-radius: var(--m2-radius);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--m2-missing) 15%, transparent);
  transition: border-color .25s, box-shadow .25s, transform .2s;
  content-visibility: auto; contain-intrinsic-size: auto 430px;
}
.coin-card.neutral { border: 1px solid var(--bs-border-color); box-shadow: 0 4px 16px rgba(0, 0, 0, .18); }
.coin-card.neutral:hover { border-color: var(--m2-gold); }
.coin-country .flag { width: 18px; height: 13px; vertical-align: -1px; margin-right: .2rem; }
.stats-public { max-width: 520px; }
.coin-card.owned { border-color: var(--m2-owned); box-shadow: 0 4px 18px color-mix(in srgb, var(--m2-owned) 18%, transparent); }
.coin-card:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .coin-card, .coin-photo img { transition: none; } .coin-card:hover { transform: none; } }

.card-check { display: flex; align-items: center; padding: .5rem .75rem; background: var(--m2-missing-bg); border-bottom: 1px solid color-mix(in srgb, var(--m2-missing) 25%, transparent); }
.coin-card.owned .card-check { background: var(--m2-owned-bg); border-bottom-color: color-mix(in srgb, var(--m2-owned) 25%, transparent); }
.check-label { display: flex; align-items: center; gap: .5rem; width: 100%; margin: 0; font-size: .8rem; font-weight: 700; color: var(--m2-missing); user-select: none; }
label.check-label { cursor: pointer; }
.coin-card.owned .check-label { color: var(--m2-owned); }
.check-label .form-check-input { width: 1.15rem; height: 1.15rem; margin: 0; cursor: pointer; border-color: currentColor; }
.check-label .form-check-input:checked { background-color: var(--m2-owned); border-color: var(--m2-owned); }

.coin-media { position: relative; height: 185px; display: grid; place-items: center; background: var(--m2-photo); }
.coin-photo { border: 0; padding: 0; background: none; display: grid; place-items: center; width: 100%; height: 100%; cursor: pointer; }
.coin-photo img { width: 160px; height: 160px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .45)); transition: transform .2s; }
.coin-photo:hover img { transform: scale(1.06); }
.coin-variants { position: absolute; bottom: .4rem; inset-inline: 0; display: flex; gap: .25rem; justify-content: center; }
.variant-btn { font-size: .62rem; font-weight: 800; padding: .1rem .55rem; border-radius: 999px; border: 1px solid var(--m2-gold); background: rgba(20, 20, 20, .78); color: #f3dfa8; }
.variant-btn:hover { background: var(--m2-gold); color: #1a1a1a; }
.coin-fallback {
  width: 150px; height: 150px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 14px; color: #1e293b;
  background: radial-gradient(circle at 35% 35%, #f3d78b 0%, #c69c46 62%, #9a7426 63%, #e2e8f0 64%, #94a3b8 100%);
  border: 4px solid #cbd5e1; box-shadow: inset 0 0 12px rgba(0, 0, 0, .45), 0 6px 12px rgba(0, 0, 0, .5);
}
.fb-code { font-weight: 900; font-size: .66rem; letter-spacing: .1em; opacity: .85; }
.fb-year { font-weight: 900; font-size: 1.1rem; margin: 2px 0; }
.fb-title { font-size: .62rem; font-weight: 700; line-height: 1.15; max-width: 105px; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.coin-info { display: flex; flex-direction: column; gap: .3rem; flex: 1; padding: .75rem .9rem .9rem; }
.coin-year { color: var(--m2-gold); font-weight: 800; font-size: .9rem; letter-spacing: .05em; }
.coin-type { font-size: .66rem; font-weight: 600; border: 1px solid var(--bs-border-color); border-radius: 999px; padding: .1rem .5rem; color: var(--bs-secondary-color); white-space: nowrap; }
.coin-type.commune { border-color: #4c6ef5; color: #748ffc; }
.coin-country { font-size: .75rem; font-weight: 600; color: var(--bs-secondary-color); }
.coin-title { font-size: .95rem; line-height: 1.3; margin: .1rem 0; font-weight: 700; }
.coin-note { font-size: .8rem; color: var(--bs-secondary-color); margin: 0; }
.coin-value { margin-top: auto; padding-top: .55rem; border-top: 1px dashed var(--bs-border-color); }
.grades-head { display: flex; align-items: center; gap: .3rem; font-size: .84rem; font-weight: 700; color: var(--m2-gold); margin-bottom: .2rem; }
.grade-info { border: 0; background: none; padding: 0 .15rem; line-height: 1; color: var(--bs-secondary-color); font-size: .9rem; }
.grade-info:hover, .grade-info:focus-visible { color: var(--m2-gold); }
.grades { list-style: none; margin: 0; padding: 0; font-size: .78rem; }
.grades li { display: flex; justify-content: space-between; gap: .5rem; padding: .08rem 0; }
.grade-name { color: var(--bs-secondary-color); white-space: nowrap; }
.grade-val { font-weight: 700; text-align: right; color: var(--bs-body-color); }
.grades li.is-empty .grade-val { color: var(--bs-secondary-color); font-weight: 400; }
.grade-note { font-size: .7rem; color: var(--bs-secondary-color); margin: .25rem 0 0; }
.grades-popover { --bs-popover-max-width: 340px; --bs-popover-font-size: .8rem; }
.grades-help dt { color: var(--m2-gold); font-weight: 700; }
.grades-help dd { margin-bottom: .45rem; }
.value-main { display: flex; justify-content: space-between; gap: .5rem; font-size: .84rem; font-weight: 700; color: var(--m2-gold); }
.value-detail { font-size: .72rem; color: var(--bs-secondary-color); }

.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 1rem; margin-top: 1rem; }
.country-card {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 1.25rem 1rem 1rem; text-align: center;
  background: var(--m2-panel); border: 1px solid var(--bs-border-color); border-radius: var(--m2-radius);
  color: var(--bs-body-color); text-decoration: none; box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.country-card:hover, .country-card:focus-visible { border-color: var(--m2-gold); color: var(--bs-body-color); transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.country-card-flag { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 4px 10px rgba(0, 0, 0, .25); margin-bottom: .4rem; }
.country-card-name { font-weight: 800; font-size: 1.05rem; }
.country-card-count { font-size: .82rem; color: var(--m2-gold); font-weight: 600; }
.country-card-progress { width: 100%; margin-top: .4rem; }
.country-card-progress .progress { height: 6px; background: var(--bs-secondary-bg); }
.bg-owned { background-color: var(--m2-owned) !important; }
@media (prefers-reduced-motion: reduce) { .country-card { transition: none; } .country-card:hover { transform: none; } }
.empty-state { text-align: center; color: var(--bs-secondary-color); padding: 3rem 1rem; border: 1px dashed var(--bs-border-color); border-radius: var(--m2-radius); margin-top: 1.25rem; }

/* ======== Visionneuse, cartes, divers ======== */
.card { --bs-card-bg: var(--bs-tertiary-bg); --bs-card-border-color: var(--bs-border-color); border-radius: var(--m2-radius); }
.login-card { background: var(--m2-panel); }
/* Connexion, mot de passe oublié, nouveau mot de passe : carte étroite, centrée. */
.auth-col { max-width: 420px; }
/* Code à 6 chiffres : six cases */
.otp { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .35rem; }
.otp .otp-cell { width: 3rem; height: 3.5rem; padding: 0; text-align: center; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; border-radius: .6rem; caret-color: var(--m2-gold); }
.otp .otp-cell:focus { border-color: var(--m2-gold); box-shadow: 0 0 0 .2rem var(--m2-gold-soft); }
.otp.is-invalid .otp-cell { border-color: var(--bs-form-invalid-border-color); }
.otp.is-invalid .otp-cell:focus { box-shadow: 0 0 0 .2rem rgba(var(--bs-danger-rgb), .25); }
.otp-error { color: var(--bs-form-invalid-color); min-height: 1.2rem; margin-bottom: .75rem; }
@media (max-width: 380px) { .otp { gap: .3rem; } .otp .otp-cell { width: 2.6rem; height: 3.1rem; font-size: 1.35rem; } }

/* Connexion en deux étapes (« Qui va là ? » puis « Ravis de vous revoir ! ») */
.login-title { font-weight: 800; font-size: 1.9rem; text-align: left; margin-bottom: 1.25rem; }
.login-title-2 + .login-step-sub { text-align: left; margin-top: -.75rem; margin-bottom: 1.25rem; }
.login-step + .login-step { margin-top: 1.5rem; }
.login-steps.js-steps .login-step + .login-step { margin-top: 0; }
.login-steps.js-steps[data-step="1"] [data-step-panel="2"],
.login-steps.js-steps[data-step="2"] [data-step-panel="1"] { display: none; }
.login-step-sub { color: var(--bs-secondary-color); font-size: .9rem; margin-bottom: .75rem; }
.login-step .login-card { border-radius: 1rem; }
.login-step .card-body { padding: 1.4rem; }
.login-email-field > .form-control, .login-email-field > .form-control.is-invalid { padding-right: 3rem; background-image: none; }
.login-email-icon, .login-email-clear { position: absolute; top: 0; right: 0; height: calc(3.5rem + 2px); width: 3rem; display: grid; place-items: center; color: var(--bs-secondary-color); font-size: 1.15rem; z-index: 5; }
.login-email-icon { pointer-events: none; }
.login-email-icon[hidden], .login-email-clear[hidden] { display: none; }
.login-email-clear { background: none; border: 0; padding: 0; color: var(--bs-body-color); border-radius: .5rem; }
.login-email-clear:hover { color: var(--m2-missing); }
.login-email-clear:focus-visible { outline: 2px solid var(--m2-gold); outline-offset: -4px; }
.login-who .login-back { font-size: .85rem; color: var(--bs-secondary-color); text-decoration: underline; }
.login-who .login-back:hover, .login-who .login-back:focus-visible { color: var(--m2-gold); }
.login-or { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; color: var(--bs-secondary-color); font-size: .9rem; }
.login-or::before, .login-or::after { content: ""; flex: 1; border-top: 1px solid var(--bs-border-color); }
.login-social { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .6rem 1rem; font-weight: 600; }
.login-social + .login-social { margin-top: .6rem; }
.login-social svg { width: 1.2rem; height: 1.2rem; flex: none; }
.login-social:disabled { opacity: .6; cursor: not-allowed; pointer-events: auto; }
.login-social:disabled svg { filter: grayscale(1); }
.login-social.is-busy { cursor: progress; opacity: .8; }
.login-social.is-busy svg { filter: none; }
.login-social { white-space: nowrap; }
@media (max-width: 575.98px) { .login-soon-tag { display: none; } }
.login-soon-tag { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: .05rem .45rem; border-radius: 1rem; border: 1px solid currentColor; opacity: .85; }

@media (min-width: 576px) { .p-sm-4-5 { padding: 2rem !important; } }
.remember-check { text-align: left; }
.remember-check .form-check-input { cursor: pointer; }
.remember-check .form-check-input:checked { background-color: var(--m2-gold); border-color: var(--m2-gold); }
.remember-check .form-check-input:focus { border-color: var(--m2-gold); box-shadow: 0 0 0 .25rem var(--m2-gold-soft); }
.remember-check .form-check-label { cursor: pointer; }
.remember-check .form-text { margin-top: .1rem; }
.app-footer { border-top: 1px solid var(--bs-border-color); color: var(--bs-secondary-color); background: var(--m2-glass); }
.footer-link { color: var(--m2-gold); font-weight: 600; text-decoration: none; }
.footer-link:hover { text-decoration: underline; }
.footer-brand { white-space: nowrap; }
.footer-coin { width: 1.25em; height: 1.25em; margin: 0 .18em; vertical-align: -.3em; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); }
.theme-switcher { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1040; }
.theme-fab {
  width: 3rem; height: 3rem; border-radius: 50%; padding: 0; display: grid; place-items: center;
  font-size: 1.2rem; color: #17120a; background: var(--m2-gold); border: 1px solid var(--m2-gold-strong);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: transform .15s, background-color .15s;
}
.theme-fab:hover, .theme-fab:focus-visible, .theme-fab.show { background: var(--m2-gold-strong); color: #17120a; transform: translateY(-2px); }
.theme-switcher .dropdown-menu { margin-bottom: .5rem !important; }
/* Annonces (toasts) : au centre de la fenêtre (X et Y), sans bloquer la page ; apparition douce, disparition automatique. */
.toasts-center { pointer-events: none; width: min(28rem, calc(100vw - 1rem)); display: flex; flex-direction: column; align-items: stretch; }
.toasts-center .toast { pointer-events: auto; width: 100%; box-shadow: 0 .75rem 2.5rem rgba(0, 0, 0, .35); border-top: 1px solid var(--bs-border-color) !important; border-right: 1px solid var(--bs-border-color) !important; border-bottom: 1px solid var(--bs-border-color) !important; }
.toasts-center .toast.showing, .toasts-center .toast.show { animation: toast-in .25s ease-out; }
@keyframes toast-in { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toasts-center .toast.showing, .toasts-center .toast.show { animation: none; } }
@media print { .theme-switcher { display: none !important; } }
.toast { --bs-toast-bg: var(--bs-tertiary-bg); }
.toast-success { border-left: 4px solid var(--m2-owned) !important; }
.toast-danger { border-left: 4px solid var(--m2-missing) !important; }
.toast-info { border-left: 4px solid var(--m2-gold) !important; }
.table { --bs-table-bg: transparent; }

/* ======== Responsive ======== */
@media (max-width: 991.98px) {
  .toolbar { position: static; }
}
@media (max-width: 575.98px) {
  .hero { padding-top: 1.5rem; }
  .stat-val { font-size: 1.1rem; }
  .country-btn .country-count { display: none; }
  .coin-media { height: 170px; }
  .coin-photo img { width: 145px; height: 145px; }
  .group-title { flex-wrap: wrap; }
  .group-title .sub { margin-left: 0; width: 100%; }
}

@media print {
  .app-navbar, .toolbar, .app-footer, .alert-readonly, .toast-container { display: none !important; }
  body { background: #fff; }
  .coin-card { break-inside: avoid; box-shadow: none; }
}

/* Comptes : menu, administration */
.account-id { min-width: 15rem; line-height: 1.35; }
.users-table { --bs-table-bg: transparent; }
.users-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); font-weight: 600; }
.temp-secret { display: grid; gap: .35rem; padding: .75rem 1rem; border-radius: .5rem; background: rgba(0, 0, 0, .15); }
[data-bs-theme="light"] .temp-secret { background: rgba(255, 255, 255, .6); }
.temp-secret code { color: inherit; font-weight: 600; }

/* ======== Pastille drapeau, badge couleur, série ======== */
.flag-pastille {
  position: absolute; top: .55rem; left: .55rem; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 2px 6px rgba(0, 0, 0, .35);
}
.flag-pastille .flag { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: none; }
.coin-variants { inset-inline: auto .5rem; right: .5rem; justify-content: flex-end; }
.variant-btn { display: inline-flex; align-items: center; gap: .3rem; font-size: .66rem; padding: .18rem .6rem .18rem .45rem; }
.variant-btn .bi { font-size: .85rem; line-height: 1; }
.palette-multi {
  background: conic-gradient(from 0deg, #e63946, #f4a261, #ffd166, #06d6a0, #118ab2, #8338ec, #e63946);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.variant-btn:hover .palette-multi { filter: saturate(1.3) brightness(.9); }
.coin-series {
  display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start; margin: .35rem 0 .1rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .02em; padding: .15rem .55rem; border-radius: 999px;
  color: #1a1a1a; background: var(--m2-gold);
}
.coin-series .bi { font-size: .75rem; }

/* ======== Émissions communes : carte dépliable ======== */
.issue-list { display: grid; gap: .85rem; margin-top: 1rem; }
.issue { border: 1px solid var(--bs-border-color); border-radius: var(--m2-radius); background: var(--m2-panel); overflow: hidden; transition: border-color .2s; }
.issue:hover, .issue.open { border-color: var(--m2-gold); }
.issue-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem; width: 100%;
  padding: .85rem 1rem; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
}
.issue-card:focus-visible { outline: 2px solid var(--m2-gold); outline-offset: -2px; }
.issue-media { position: relative; width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%; background: var(--m2-photo); }
.issue-media > img { width: 104px; height: 104px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4)); }
.issue-media .flag-pastille { top: -2px; left: -2px; }
.issue-media .small-fb { width: 100px; height: 100px; }
.issue-info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.issue-year { font-weight: 800; color: var(--m2-gold); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.issue-title { font-weight: 700; font-size: 1.08rem; }
.issue-note { font-size: .85rem; color: var(--bs-secondary-color); }
.issue-flags { display: flex; flex-wrap: wrap; gap: .2rem; margin-top: .25rem; }
.mini-flag { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
.mini-more { font-size: .72rem; color: var(--bs-secondary-color); align-self: center; margin-left: .15rem; }
.issue-side { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; font-size: .85rem; white-space: nowrap; }
.issue-count { font-weight: 700; }
.issue-range { color: var(--bs-secondary-color); }
.issue-chevron { font-size: 1.1rem; color: var(--m2-gold); transition: transform .2s; }
.issue.open .issue-chevron { transform: rotate(180deg); }
.issue-body { padding: 0 1rem 1rem; border-top: 1px dashed var(--bs-border-color); padding-top: 1rem; }
@media (max-width: 575.98px) {
  .issue-card { grid-template-columns: auto 1fr; }
  .issue-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; width: 100%; }
  .issue-media { width: 84px; height: 84px; } .issue-media > img { width: 78px; height: 78px; }
}
@media (prefers-reduced-motion: reduce) { .issue-chevron { transition: none; } }
.variant-btn.variant-icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 50%; }
.variant-btn.variant-icon .bi { font-size: 1.05rem; }
.variant-btn.variant-icon:hover { background: rgba(20, 20, 20, .92); transform: scale(1.08); }
.footer-heart { color: #e63946; font-size: .85em; margin: 0 .1rem; vertical-align: -.05em; }
.app-footer .container-xxl { padding-right: 5rem; } /* laisse la place au bouton de thème flottant */
[data-bs-theme="light"] .coin-series { color: #fff; background: #7a5a12; } /* contraste AA (6,5:1) en mode clair */

/* Filtre pays actif et titres de groupe : {Drapeau} {Pays} {nombre} */
.filter-pill { display: inline-flex; align-items: center; gap: .35rem; }
.filter-pill .pill-flag { width: 18px; height: 13px; }
.pill-count, .group-count {
  display: inline-grid; place-items: center; min-width: 1.6em; padding: .05em .45em; border-radius: 999px;
  font-weight: 800; font-size: .78em; line-height: 1.5; color: #1a1a1a; background: var(--m2-gold);
}
.group-count { font-size: .6em; vertical-align: middle; }
[data-bs-theme="light"] .pill-count, [data-bs-theme="light"] .group-count { color: #fff; background: #7a5a12; }
.pill-count { font-size: .75rem; min-width: 1.5rem; padding: .05rem .4rem; }
.group-count { font-size: .7em; padding: .1em .55em; }

/* Mode sombre : boutons principaux = même or que le bouton de thème, texte noir (contraste élevé),
   y compris désactivés (juste un peu atténués). */
[data-bs-theme="dark"] .btn-gold {
  --bs-btn-color: #17120a; --bs-btn-bg: var(--m2-gold); --bs-btn-border-color: var(--m2-gold-strong);
  --bs-btn-hover-color: #000; --bs-btn-active-color: #000;
  --bs-btn-disabled-color: #17120a; --bs-btn-disabled-bg: var(--m2-gold); --bs-btn-disabled-border-color: var(--m2-gold-strong);
  --bs-btn-disabled-opacity: .8;
}
[data-bs-theme="dark"] .btn-gold:disabled, [data-bs-theme="dark"] .btn-gold.disabled { cursor: not-allowed; filter: saturate(.85); }
/* {Drapeau} {Pays} - {nombre} : nombre en texte simple, sans fond */
.pill-count, .group-count,
[data-bs-theme="light"] .pill-count, [data-bs-theme="light"] .group-count {
  display: inline; min-width: 0; padding: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit;
}

/* ======== Cartes pays : drapeau dans une pièce de 2 € ========
   Proportions d'une vraie pièce : Ø 25,75 mm, cœur Ø 18,75 mm (73 %). Anneau argenté (cupronickel) à tranche
   cannelée et 12 étoiles, fin sillon, cœur doré (laiton nickelé) portant le drapeau, reflets métalliques. */
.flag-coin {
  position: relative; display: grid; place-items: center; width: 104px; height: 104px; margin-bottom: .5rem; border-radius: 50%;
  background:
    conic-gradient(from 200deg, rgba(255, 255, 255, 0) 0deg, rgba(255, 255, 255, .55) 40deg, rgba(255, 255, 255, 0) 90deg, rgba(255, 255, 255, 0) 200deg, rgba(255, 255, 255, .35) 240deg, rgba(255, 255, 255, 0) 290deg),
    radial-gradient(circle at 32% 28%, #ffffff 0%, #e8eaee 20%, #c3c7cd 52%, #969ba3 78%, #b9bdc3 92%, #8a9098 100%);
  box-shadow: inset 0 0 0 1px rgba(70, 76, 84, .55), inset 0 -3px 6px rgba(0, 0, 0, .22), 0 6px 14px rgba(0, 0, 0, .32);
}
.flag-coin-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.flag-coin-stars { fill: #8c929b; stroke: #6c727b; stroke-width: .3; filter: drop-shadow(0 .45px 0 rgba(255, 255, 255, .8)); }
.flag-coin-core {
  position: relative; width: 73%; height: 73%; border-radius: 50%; overflow: hidden;
  /* cœur doré : liseré en laiton autour du drapeau, sillon sombre avec l'anneau */
  padding: 3px; background: radial-gradient(circle at 35% 30%, #fbecbc 0%, #e3c57a 35%, #c09a48 70%, #8d6a26 100%);
  box-shadow: 0 0 0 1.2px rgba(60, 45, 15, .55), 0 0 0 2.2px rgba(255, 255, 255, .45), inset 0 1px 2px rgba(255, 255, 255, .7), inset 0 -1px 2px rgba(80, 55, 10, .5);
}
.flag-coin-core img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; box-shadow: inset 0 0 6px rgba(0, 0, 0, .35); }
/* reflet métallique sur le cœur */
.flag-coin-core::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, .12) 32%, rgba(255, 255, 255, 0) 55%),
              radial-gradient(circle at 70% 85%, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, 0) 45%);
}
.flag-coin { transition: transform .25s; }
/* Cartes pays : au survol, la pièce tourne comme une toupie sur la table (axe vertical), ombre au sol. */
.coin-stage { position: relative; display: inline-block; perspective: 600px; margin-bottom: .5rem; }
.coin-stage::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 70%; height: 8px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .28), transparent); opacity: 0; transition: opacity .25s; pointer-events: none; }
.coin-stage .flag-coin { margin-bottom: 0; }
/* Pièce en volume : face avant, revers et tranche (épaisseur ≈ 8 % du diamètre, comme une vraie 2 €). */
.coin-3d { --coin-r: 52px; --coin-t: 8px; position: relative; display: block; width: 104px; height: 104px; transform-style: preserve-3d; }
.coin-3d > .flag-coin { position: absolute; inset: 0; transform: translateZ(calc(var(--coin-t) / 2)); backface-visibility: hidden; }
.coin-3d > .coin-back { position: absolute; inset: 0; transform: rotateY(180deg) translateZ(calc(var(--coin-t) / 2)); backface-visibility: hidden; }
.coin-3d > .coin-back .flag-coin { margin: 0; }
.coin-edge { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; pointer-events: none; }
.coin-edge > span {
  position: absolute; left: calc(var(--coin-r) * -.0825); top: calc(var(--coin-t) / -2);
  width: calc(var(--coin-r) * .165); height: var(--coin-t); backface-visibility: hidden;
  /* Fines cannelures de la tranche (argent) */
  background: repeating-linear-gradient(90deg, #eef0f3 0 1px, #a3aab3 1px 2px), #c9ced5;
}
.country-card:hover .coin-3d, .country-card:focus-visible .coin-3d { animation: coin-spin 1.6s linear infinite; }
.country-card:hover .coin-stage::after, .country-card:focus-visible .coin-stage::after { opacity: 1; animation: coin-shadow 1.6s linear infinite; }
@keyframes coin-spin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
/* Ombre au sol : la plus étroite quand la pièce est vue par la tranche (90° et 270°). */
@keyframes coin-shadow { 0%, 50%, 100% { width: 70%; } 25%, 75% { width: 16%; } }
@media (prefers-reduced-motion: reduce) {
  .flag-coin { transition: none; }
  .country-card:hover .coin-3d, .country-card:focus-visible .coin-3d, .country-card:hover .coin-stage::after, .country-card:focus-visible .coin-stage::after { animation: none; }
}
/* Carte d'une variante (couleur / dorée) : simple marqueur, non cliquable */
.variant-mark { cursor: default; }
.variant-mark:hover { transform: none; }

/* ======== Anneaux olympiques (série JO Paris 2024) ======== */
.olympic-rings { width: 1.9em; height: .9em; flex: none; vertical-align: -.1em; overflow: visible; }
.olympic-rings .ring { fill: none; stroke: currentColor; stroke-width: 2.6; }
/* Mode clair : les cinq couleurs officielles */
[data-bs-theme="light"] .olympic-rings .r-blue { stroke: #0081c8; }
[data-bs-theme="light"] .olympic-rings .r-yellow { stroke: #fcb131; }
[data-bs-theme="light"] .olympic-rings .r-black { stroke: #000; }
[data-bs-theme="light"] .olympic-rings .r-green { stroke: #00a651; }
[data-bs-theme="light"] .olympic-rings .r-red { stroke: #ee334e; }
/* Badge de série en mode clair : fond clair pour que les couleurs ressortent */
[data-bs-theme="light"] .coin-series { color: #3d2c06; background: #f6ecd2; box-shadow: inset 0 0 0 1px #c9a24f; }
.filter-pill .olympic-rings { margin-right: .1rem; }
.type-select { position: relative; }
.type-select-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); display: flex; pointer-events: none; z-index: 2; color: var(--bs-body-color); }
.type-select-icon[hidden] { display: none; }
.type-select-icon .olympic-rings { width: 2.1rem; height: 1rem; }
#type.has-icon { padding-left: 3.3rem; }

/* ===== Titre des visionneuses : {drapeau} année · titre ===== */
.coin-caption { display: flex; align-items: center; gap: .55rem; line-height: 1.3; }
.coin-caption .caption-flag .flag { width: 28px; height: 20px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.15); flex: none; }
.coin-caption .caption-version { color: var(--bs-secondary-color); font-weight: 500; }

/* ===== Carte cliquable → fiche détaillée ===== */
.coin-card[aria-haspopup] { cursor: pointer; }
.coin-card[aria-haspopup]:focus-visible { outline: 3px solid var(--m2-gold); outline-offset: 2px; }
.coin-card .card-check, .coin-card .coin-photo, .coin-card .grade-info { cursor: auto; }
.coin-card .coin-photo { cursor: pointer; }

.detail-content { border-radius: var(--m2-radius); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.75rem; align-items: start; }
.detail-media { position: relative; background: var(--m2-photo); border-radius: var(--m2-radius); padding: 1.25rem; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.detail-media .detail-img { width: 100%; height: 100%; object-fit: contain; }
.detail-media .flag-pastille { position: absolute; top: .75rem; left: .75rem; }
.detail-fb { width: 80%; aspect-ratio: 1; }
.detail-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.detail-variant { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; background: var(--m2-gold-soft); }
.detail-own { display: inline-flex; align-items: center; gap: .4rem; margin-left: auto; font-size: .85rem; font-weight: 600; padding: .25rem .7rem; border-radius: 999px; cursor: pointer; }
.detail-own .form-check-input { margin: 0; }
.detail-own.owned { color: var(--m2-owned); background: var(--m2-owned-bg); }
.detail-own.missing { color: var(--m2-missing); background: var(--m2-missing-bg); }
.detail-desc { font-size: 1rem; line-height: 1.6; margin-bottom: 1rem; }
.detail-facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin-bottom: 1.1rem; font-size: .92rem; }
.detail-facts dt { font-weight: 600; color: var(--bs-secondary-color); }
.detail-facts dd { margin: 0; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.detail-facts .flag { width: 22px; height: 16px; border-radius: 2px; object-fit: cover; }
.detail-facts .olympic-rings { width: 2.1rem; height: auto; }
.detail-h { font-size: 1rem; font-weight: 700; color: var(--m2-gold); margin-bottom: .4rem; }
.detail-date { font-weight: 500; font-size: .85rem; color: var(--bs-secondary-color); }
.detail-table { --bs-table-bg: transparent; }
.detail-table th { font-weight: 500; width: 40%; }
.detail-table td { font-weight: 700; text-align: right; }
.detail-table tr.is-empty td { color: var(--bs-secondary-color); font-weight: 400; }
@media (max-width: 767.98px) {
  .detail-grid { grid-template-columns: 1fr; gap: 1rem; }
  .detail-media { max-width: 320px; margin: 0 auto; width: 100%; }
  .detail-own { margin-left: 0; }
}

/* ===== Menu mobile : bouton « ☰ MENU » arrondi + panneau qui glisse depuis la gauche ===== */
.app-navbar > .container-xxl { flex-wrap: nowrap; gap: .25rem; }
.menu-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 3.4rem; height: 3.1rem; margin-left: .35rem; border-radius: .8rem;
  border: 1.5px solid var(--m2-gold); background: transparent; color: var(--m2-gold);
  font-size: 1.45rem; line-height: 1; transition: color .15s, border-color .15s, box-shadow .15s;
}
.menu-btn span { font-size: .58rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.menu-btn:hover, .menu-btn:focus-visible { color: var(--m2-gold-strong); border-color: var(--m2-gold-strong); box-shadow: 0 0 0 .2rem var(--m2-gold-soft); outline: none; }
.menu-btn[aria-expanded="true"] .bi-x-lg { font-size: 1.15rem; margin: .1rem 0 .12rem; }
/* Icônes de la barre (recherche, compte) : même taille et même épaisseur visuelle. */
.app-navbar .nav-icon { font-size: 1.3rem; }
.app-navbar .nav-icon .bi-search { -webkit-text-stroke: .4px currentColor; }
@media (max-width: 991.98px) {
  /* backdrop-filter piégerait le panneau fixe dans la barre : fond opaque sur mobile. */
  .app-navbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bs-body-bg); }
  .app-navbar.menu-open, .app-navbar:has(.app-menu.show, .app-menu.showing) { z-index: 1046; }
  /* Menu plein écran : toute la largeur, sous la barre (qui reste visible), glisse depuis la gauche. */
  .app-menu.offcanvas-lg { --bs-offcanvas-width: 100vw; background: var(--bs-body-bg); top: var(--m2-nav-h); height: auto; bottom: 0; border-right: 0 !important; border-top: 1px solid var(--bs-border-color); }
  .app-menu .offcanvas-body { overflow-y: auto; }
  .app-menu .offcanvas-header { min-height: var(--m2-nav-h); border-bottom: 1px solid var(--bs-border-color); padding: .6rem 1.25rem; }
  .app-menu .offcanvas-body { padding: .75rem 0 2rem; }
  .app-menu .app-menu-list .nav-link, .app-menu .app-menu-list .menu-toggle {
    display: flex; align-items: center; justify-content: flex-start; gap: .25rem; width: 100%;
    padding: 1.05rem 1.6rem; font-size: 1.12rem; font-weight: 700; color: var(--bs-body-color);
    background: none; border: 0; text-align: left;
  }
  .app-menu .app-menu-list .menu-toggle { justify-content: space-between; }
  .app-menu-list .nav-link i:first-child, .app-menu-list .menu-toggle span i { color: var(--m2-gold); width: 1.6rem; display: inline-block; }
  .app-menu-list .nav-link.active { color: var(--m2-gold); background: var(--m2-gold-soft); }
  .app-menu-list .nav-link:hover, .app-menu-list .menu-toggle:hover { background: var(--m2-gold-soft); }
  .menu-chevron { font-size: .95rem; transition: transform .2s; }
  .menu-toggle:not(.collapsed) .menu-chevron { transform: rotate(180deg); }
  .menu-sub { margin: 0 0 .5rem; padding: 0 1.6rem 0 3.2rem; }
  .menu-sub li a, .menu-sub li button { display: block; width: 100%; padding: .7rem 0; color: var(--bs-body-color); text-decoration: none; font-weight: 600; background: none; border: 0; text-align: left; }
  .menu-sub li a:hover, .menu-sub li button:hover { color: var(--m2-gold); }
  .menu-sub-id { display: flex; flex-direction: column; padding: .25rem 0 .5rem; font-size: .85rem; }
  .menu-sub-id span { color: var(--bs-secondary-color); overflow-wrap: anywhere; }
}
@media (max-width: 400px) {
  .brand-text { font-size: 1.22rem; }
  .brand-coin { width: 36px; height: 36px; }
  .app-navbar .env-badge { display: none; }
}

/* ===== Responsive ===== */
/* Cibles tactiles confortables (≥ 32 px) sur les petits boutons. */
.grade-info { min-width: 32px; min-height: 28px; display: inline-flex; align-items: center; justify-content: center; margin: -6px -8px -6px 0; }
.footer-link { display: inline-block; padding: .3rem 0; }
.check-label { min-height: 32px; }

/* Utilisateurs (admin) : une fiche par compte sous 992 px, plus de tableau à faire défiler. */
@media (max-width: 991.98px) {
  .users-table thead { display: none; }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
  .users-table tr { padding: .75rem 1rem; border-bottom: 1px solid var(--bs-border-color); }
  .users-table td { border: 0; padding: .3rem 0; text-align: left !important; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .users-table td::before { content: attr(data-label); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); font-weight: 600; flex: none; }
  .users-table td[data-label="Compte"] { display: block; padding-bottom: .5rem; }
  .users-table td[data-label="Compte"]::before { content: none; }
  .users-table .users-actions { flex-wrap: wrap; justify-content: flex-end; white-space: normal !important; }
  .users-table .users-actions::before { margin-right: auto; }
  .users-table .users-actions .btn { min-width: 40px; min-height: 36px; }
}

/* Téléphones : marges, titres et barre de filtres plus compacts. */
@media (max-width: 575.98px) {
  .display-title { font-size: clamp(1.7rem, 8vw, 2.3rem); }
  .navbar .nav-link { padding: .65rem .25rem; }
  .modal-fullscreen-md-down .detail-img { max-height: 70vh; }
}
@media (max-width: 767.98px) {
  .modal-fullscreen-md-down .modal-content { border-radius: 0; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* Pied de page mobile : deux lignes centrées, « Tous droits réservés » insécable,
   et une marge basse pour que le bouton de thème flottant ne recouvre jamais le texte. */
@media (max-width: 767.98px) {
  .app-footer { padding-bottom: 5.5rem !important; }
  .app-footer .container-xxl { padding-right: var(--bs-gutter-x, .75rem); align-items: center !important; text-align: center; gap: .35rem !important; }
  .app-footer .footer-copy { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: .3rem; }
  .app-footer .footer-sep { display: none; }
}
@media (max-width: 575.98px) {
  .about-table td:last-child { overflow-wrap: anywhere; min-width: 8rem; }
  .about-table th, .about-table td { padding-left: .25rem; padding-right: .25rem; }
  .card-body { padding: 1rem .85rem; }
}
@media (max-width: 575.98px) {
  .about-table { table-layout: fixed; width: 100%; }
  .about-table th:nth-child(1) { width: 42%; }
  .about-table th:nth-child(2) { width: 18%; }
  .about-table td:first-child { white-space: normal !important; }
  .about-table td:last-child { min-width: 0; }
}

/* ===== Liens utiles (menu) ===== */
.useful-menu { min-width: 20rem; padding: .4rem; }
.useful-link { display: flex !important; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: .6rem; white-space: normal; }
.useful-link > span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.useful-link small { color: var(--bs-secondary-color); font-size: .78rem; }
.link-logo { width: 28px; height: 28px; flex: none; border-radius: 6px; object-fit: contain; background: #fff; padding: 2px; }
.link-logo-icon { display: inline-grid; place-items: center; background: var(--m2-gold-soft); color: var(--m2-gold); font-size: 1rem; padding: 0; }
.app-navbar .dropdown-toggle.nav-link { background: none; border: 0; }
@media (max-width: 991.98px) {
  .menu-links { padding-left: 1.6rem; }
  .menu-links .useful-link { padding: .65rem 0; color: var(--bs-body-color); text-decoration: none; }
  .menu-links .useful-link:hover strong { color: var(--m2-gold); }
}

/* ===== Pages d'erreur (400, 403, 404, 419, 429, 500, 503…) ===== */
.error-page { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 56rem; margin-inline: auto; }
/* Pièce de 2 € en SVG (partials/error-coin.php), dans le style du logo, avec le code d'erreur au centre. */
.error-coin {
  width: 190px; height: 190px; margin-bottom: 1.75rem; overflow: visible;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .3));
  animation: error-coin-in .7s cubic-bezier(.2, .9, .3, 1.25) both;
}
.error-title { font-size: clamp(1.6rem, 4.5vw, 2.3rem); font-weight: 800; margin-bottom: .75rem; }
.error-lead { font-size: 1.05rem; color: var(--bs-secondary-color); margin-bottom: 1.25rem; text-wrap: balance; }
@media (min-width: 992px) { .error-lead { white-space: nowrap; } } /* une seule ligne sur ordinateur */
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .5rem; }
.error-admin { margin-top: 1.5rem; font-size: .82rem; }
.error-admin a { color: var(--bs-secondary-color); }
.error-static-main { flex: 1; display: flex; align-items: center; }
@keyframes error-coin-in { from { opacity: 0; transform: rotateY(90deg) scale(.85); } to { opacity: 1; transform: none; } }
@media (max-width: 575.98px) {
  .error-coin { width: 150px; height: 150px; margin-bottom: 1.25rem; }
  .error-actions { flex-direction: column; align-self: stretch; }
}
@media (prefers-reduced-motion: reduce) { .error-coin { animation: none; } }

/* ===== Menu du compte (avatar, « Bonjour », entrées selon le rôle) ===== */
.account-avatar {
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  font-weight: 800; font-size: 1rem; letter-spacing: .02em; color: #2b2210;
  background: radial-gradient(circle at 35% 30%, #f6dd95 0%, #d3a94f 55%, #a57c2b 100%);
  border: 2px solid #cdd5df; box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
}
.account-avatar.is-admin { color: #f3dfa8; background: radial-gradient(circle at 35% 30%, #4b5563 0%, #273141 70%, #18202c 100%); border-color: var(--m2-gold); }
.account-avatar-sm { width: 32px; height: 32px; font-size: .72rem; border-width: 1.5px; }
.account-avatar-lg { width: 72px; height: 72px; font-size: 1.6rem; border-width: 3px; }
.nav-icon.account-btn { padding: 0; }
.nav-icon.account-btn:hover .account-avatar, .nav-icon.account-btn.show .account-avatar { box-shadow: 0 0 0 3px var(--m2-gold-soft), inset 0 0 6px rgba(0, 0, 0, .3); }
.account-menu { min-width: 17rem; padding: .4rem; border-radius: .9rem; }
.account-head { display: flex; align-items: center; gap: .85rem; padding: .7rem .75rem .6rem; }
.account-hello { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.account-hello small { color: var(--bs-secondary-color); font-size: .8rem; }
.account-hello strong { font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; }
.account-role { margin-top: .2rem; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--m2-gold); }
.account-link { display: flex !important; align-items: center; gap: .8rem; padding: .62rem .75rem; border-radius: .55rem; font-weight: 600; }
.account-link .bi { font-size: 1.1rem; width: 1.2rem; text-align: center; color: var(--bs-secondary-color); }
.account-link:hover .bi, .account-link.active .bi { color: var(--m2-gold); }
.account-menu .account-link.active { background: var(--m2-gold-soft); color: var(--bs-body-color); }
.account-menu .account-logout { background: rgba(127, 127, 127, .12); }
.account-menu .account-logout:hover { background: rgba(127, 127, 127, .2); }
@media (max-width: 991.98px) {
  /* Menu plein écran : bloc du compte en tête, comme sur ordinateur. */
  .app-menu-list .menu-account { order: -1; margin: 0 1.25rem 1rem; padding: .35rem; border: 1px solid var(--bs-border-color); border-radius: 1rem; background: var(--m2-panel, var(--bs-tertiary-bg)); }
  .menu-account .account-head { padding: .75rem .85rem; border-bottom: 1px solid var(--bs-border-color); margin-bottom: .3rem; }
  .account-list { margin: 0; }
  .account-list .account-link { width: 100%; padding: .85rem .85rem; color: var(--bs-body-color); text-decoration: none; font-size: 1.05rem; background: none; border: 0; text-align: left; }
  .account-list .account-link.active { background: var(--m2-gold-soft); }
  .account-list .account-link:hover { background: var(--m2-gold-soft); }
  .account-list .account-logout { background: rgba(127, 127, 127, .12); }
  .account-sep { height: 1px; background: var(--bs-border-color); margin: .3rem .5rem; }
}

/* ===== Page Paramètres ===== */
.settings-page { max-width: 64rem; }
.settings-head { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.75rem; }
.settings-hello { margin: 0; color: var(--bs-secondary-color); font-size: .95rem; }
.settings-name { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.settings-meta { margin: .35rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .88rem; color: var(--bs-secondary-color); overflow-wrap: anywhere; }
.badge-member { background: var(--m2-gold-soft); color: var(--m2-gold); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.25rem; align-items: start; }
.settings-card .card-body { padding: 1.4rem 1.5rem; }
.settings-card { scroll-margin-top: calc(var(--m2-nav-h, 64px) + 1rem); }
.settings-title { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; font-weight: 800; margin-bottom: 1rem; }
.settings-title .bi { color: var(--m2-gold); }
.settings-facts { display: grid; gap: .5rem; margin-bottom: 1.1rem; }
.settings-facts div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--bs-border-color); }
.settings-facts dt { font-weight: 500; color: var(--bs-secondary-color); }
.settings-facts dd { margin: 0; font-weight: 700; }
.settings-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1.1rem; }
.settings-stats div { display: flex; flex-direction: column; padding: .7rem .8rem; border-radius: .7rem; background: var(--m2-gold-soft); }
.settings-stats strong { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.settings-stats span { font-size: .78rem; color: var(--bs-secondary-color); }
.theme-choice { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; }
.theme-choice .btn { display: inline-flex; align-items: center; gap: .45rem; }
.theme-choice .btn-check:checked + .btn { background: var(--m2-gold-soft); border-color: var(--m2-gold); color: var(--bs-body-color); }
@media (max-width: 575.98px) {
  .settings-head { gap: .85rem; }
  .account-avatar-lg { width: 58px; height: 58px; font-size: 1.3rem; }
  .settings-stats strong { font-size: 1.05rem; }
  .settings-card .card-body { padding: 1.15rem; }
}

/* ===== Page pays : lignes dépliables par catégorie (À venir, Courantes, Commémoratives…) ===== */
.cat-icon {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f8e3a6 0%, #d9b05a 55%, #a8812f 100%);
  color: #3a2c0c; font-size: 1.7rem; box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
}
.cat-euro { font-weight: 900; font-size: 1.15rem; letter-spacing: -.02em; }
.cat-icon .olympic-rings { width: 44px; height: auto; }
.cat-avenir .cat-icon { background: radial-gradient(circle at 35% 30%, #e8ecf1 0%, #b9c2cd 60%, #8a95a4 100%); color: #2a3442; }
.cat-commune .cat-icon { background: radial-gradient(circle at 35% 30%, #5a7be0 0%, #1f3fa8 60%, #142a73 100%); color: #ffd84d; }
.cat-series .cat-icon:has(.olympic-rings) { background: radial-gradient(circle at 35% 30%, #ffffff 0%, #eef0f3 60%, #cfd5dc 100%); }
.cat-icon .olympic-rings .r-blue { stroke: #0081c8; }
.cat-icon .olympic-rings .r-yellow { stroke: #fcb131; }
.cat-icon .olympic-rings .r-black { stroke: #000; }
.cat-icon .olympic-rings .r-green { stroke: #00a651; }
.cat-icon .olympic-rings .r-red { stroke: #ee334e; }
.cat-list { margin-top: .5rem; }
.cat-row .issue-media .flag-coin { width: 100px; height: 100px; margin: 0; }
.cat-pastille { position: absolute; top: -2px; left: -2px; z-index: 1; width: 30px; height: 30px; border-radius: 50%; padding: 2px; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.cat-pastille .cat-icon { font-size: .85rem; }
.cat-pastille .cat-euro { font-size: .55rem; }
.cat-pastille .olympic-rings { width: 20px; }
.mini-coin { width: 22px; height: 22px; border-radius: 50%; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
@media (max-width: 575.98px) {
  .cat-row .issue-media .flag-coin { width: 76px; height: 76px; }
  .cat-row .cat-icon { font-size: 1.2rem; }
}

/* ===== Filtre « type » : menu avec « Séries spéciales » dépliable ===== */
#type-current { display: flex; align-items: center; gap: .5rem; min-width: 0; }
#type-current .olympic-rings { width: 2rem; height: 1rem; }
.type-menu { min-width: 16rem; }
.type-series-row { display: flex; align-items: stretch; }
.type-series-row .type-item { flex: 1; min-width: 0; }
.type-series-toggle { flex: none; width: 2.6rem; border: 0; background: none; color: var(--m2-gold); border-radius: .4rem; }
.type-series-toggle:hover, .type-series-toggle:focus-visible { background: var(--m2-gold-soft); outline: none; }
.type-series-toggle .bi { display: inline-block; transition: transform .2s; }
.type-series.open .type-series-toggle .bi { transform: rotate(180deg); }
.type-series-list { margin: 0; padding: 0 0 .25rem; }
.type-series-list .type-item { padding-left: 2rem; font-size: .92rem; }
.type-series-list .olympic-rings { width: 1.7rem; height: .85rem; flex: none; }
.type-series-icon { color: var(--m2-gold); }
@media (prefers-reduced-motion: reduce) { .type-series-toggle .bi { transition: none; } }

/* ===== Page pays : lignes de section (lien vers /pays/fr/commemoratives…) et page de section ===== */
a.issue-card.cat-link { text-decoration: none; color: inherit; }
.cat-link:hover .issue-title { color: var(--m2-gold); }
.cat-link .issue-chevron { transition: transform .2s; }
.cat-link:hover .issue-chevron { transform: translateX(3px); }
.section-back { display: inline-flex; align-items: center; gap: .35rem; margin: .25rem 0 .75rem; font-weight: 600; font-size: .9rem; color: var(--m2-gold); text-decoration: none; }
.section-back:hover { text-decoration: underline; }

/* Sections d'un pays en cartes : 3 colonnes (ordinateur), 2 (tablette), 1 (mobile). */
.cat-list { grid-template-columns: 1fr; }
.cat-list .cat-row { display: flex; }
.cat-list .issue-card { grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; align-items: start; gap: .5rem .9rem; height: 100%; }
.cat-list .issue-media { width: 92px; height: 92px; }
.cat-list .issue-media > img { width: 86px; height: 86px; }
.cat-list .issue-media .flag-coin { width: 86px; height: 86px; }
.cat-list .issue-side { grid-column: 1 / -1; align-self: end; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: .25rem .9rem; width: 100%; padding-top: .55rem; border-top: 1px dashed var(--bs-border-color); }
.cat-list .issue-chevron { margin-left: auto; }
.cat-list .issue-note { font-size: .82rem; }
@media (min-width: 768px) { .cat-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .cat-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ======== Pied de page : liens légaux ======== */
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1rem; }
.footer-legal-link, .footer-legal-link.btn { color: var(--bs-secondary-color); font: inherit; line-height: inherit; text-decoration: none; white-space: nowrap; border: 0; background: none; vertical-align: baseline; }
.footer-legal-link:hover, .footer-legal-link:focus-visible, .footer-legal-link.active { color: var(--m2-gold); text-decoration: underline; }

/* ======== Bandeau cookies ======== */
.cookie-banner {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 1065; width: min(40rem, calc(100vw - 6.5rem));
  padding: 1.1rem 1.25rem; border: 1px solid var(--m2-gold-strong); border-radius: 1rem;
  background: var(--bs-body-bg); box-shadow: 0 18px 45px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(1rem); transition: opacity .2s, transform .2s;
}
.cookie-banner.show { opacity: 1; transform: none; }
.cookie-title { display: flex; align-items: center; gap: .5rem; margin: 0 0 .45rem; font-size: 1.05rem; font-weight: 700; color: var(--m2-gold); }
.cookie-text { margin: 0 0 .85rem; font-size: .9rem; color: var(--bs-body-color); }
.cookie-text a { color: var(--m2-gold); }
.cookie-options { display: grid; gap: .6rem; margin: 0 0 .9rem; padding: .75rem .85rem; border-radius: .75rem; background: var(--m2-gold-soft); font-size: .88rem; }
.cookie-options .form-check { margin: 0; }
.cookie-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.cookie-actions .btn { min-width: 8.5rem; }
@media (prefers-reduced-motion: reduce) { .cookie-banner { transition: none; } }
@media (max-width: 575.98px) {
  .cookie-banner { left: .5rem; right: .5rem; bottom: .5rem; width: auto; padding: 1rem; }
  .cookie-actions .btn { flex: 1 1 calc(50% - .5rem); min-width: 0; }
}

/* ======== Pages légales ======== */
.legal { max-width: 52rem; margin: 0 auto; }
.legal h2 { margin: 2rem 0 .6rem; font-size: 1.2rem; color: var(--m2-gold); }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { line-height: 1.65; }
.legal-table th { white-space: nowrap; }
.legal-note { font-size: .88rem; color: var(--bs-secondary-color); }

/* ======== Icônes de l'en-tête : survol façon Wagen Motors ========
   Rond gris translucide derrière l'icône + infobulle sombre arrondie dessous (data-tip),
   au survol de la souris et au focus clavier. */
.app-navbar .nav-icon { position: relative; }
.app-navbar .nav-icon:hover, .app-navbar .nav-icon:focus-visible, .app-navbar .nav-icon.show {
  background: rgba(255, 255, 255, .14); color: var(--bs-body-color);
}
[data-bs-theme="light"] .app-navbar .nav-icon:hover,
[data-bs-theme="light"] .app-navbar .nav-icon:focus-visible,
[data-bs-theme="light"] .app-navbar .nav-icon.show { background: rgba(0, 0, 0, .08); }
.app-navbar .nav-icon.is-auth:hover, .app-navbar .nav-icon.is-auth:focus-visible { color: var(--m2-gold); }
.app-navbar .nav-icon:focus-visible { outline: 2px solid var(--m2-gold); outline-offset: 2px; }
.nav-icon[data-tip]::after {
  content: attr(data-tip); position: absolute; top: calc(100% + .45rem); left: 50%; z-index: 1080;
  padding: .4rem .75rem; border-radius: .6rem; background: #1c1f24; color: #fff;
  font-size: .85rem; font-weight: 600; line-height: 1.2; white-space: nowrap; pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3); opacity: 0; transform: translate(-50%, -.25rem);
  transition: opacity .15s, transform .15s; visibility: hidden;
}
[data-bs-theme="dark"] .nav-icon[data-tip]::after { background: #0b0d10; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 18px rgba(0, 0, 0, .5); }
.nav-icon[data-tip]:focus-visible::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
@media (hover: hover) {
  .nav-icon[data-tip]:hover::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: .25s; }
}
/* Menu ouvert ou recherche ouverte : pas d'infobulle par-dessus. */
.nav-icon[data-tip][aria-expanded="true"]::after { display: none; }
/* Dernière icône près du bord droit : l'infobulle reste dans l'écran. */
.nav-icons > :last-child .nav-icon[data-tip]::after, .nav-icons > .nav-icon[data-tip]:last-child::after { left: auto; right: 0; transform: translate(0, -.25rem); }
.nav-icons > :last-child .nav-icon[data-tip]:focus-visible::after, .nav-icons > .nav-icon[data-tip]:last-child:focus-visible::after { transform: none; }
@media (hover: hover) {
  .nav-icons > :last-child .nav-icon[data-tip]:hover::after, .nav-icons > .nav-icon[data-tip]:last-child:hover::after { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .nav-icon[data-tip]::after { transition: none; } }

/* ======== Règles du mot de passe (vérifiées en direct) ======== */
.password-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .25rem .75rem; color: var(--bs-secondary-color); }
.password-rules li, .password-match { display: flex; align-items: center; gap: .4rem; }
/* Vert « succès » / rouge « alerte », contraste AA en clair comme en sombre. */
.password-rules .ok, .password-match.ok { color: #157347; font-weight: 600; }
.password-rules .ko, .password-match.ko { color: #c62a3a; font-weight: 600; }
[data-bs-theme="dark"] .password-rules .ok, [data-bs-theme="dark"] .password-match.ok { color: #5fd08f; }
[data-bs-theme="dark"] .password-rules .ko, [data-bs-theme="dark"] .password-match.ko { color: #ff7b86; }
.password-match { margin: 0 0 1.25rem; }

/* ======== Bouton « œil » des champs mot de passe ======== */
.pw-field { position: relative; }
.pw-field > .form-control.has-pw-toggle { padding-right: 3rem; }
.pw-toggle {
  position: absolute; top: 50%; right: .5rem; transform: translateY(-50%); z-index: 5;
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--bs-secondary-color); font-size: 1.15rem;
}
.pw-toggle:hover { background: rgba(127, 127, 127, .15); color: var(--bs-body-color); }
.pw-toggle:focus-visible { outline: 2px solid var(--m2-gold); outline-offset: 1px; color: var(--bs-body-color); }
.pw-toggle[aria-pressed="true"] { color: var(--m2-gold); }

/* Anti-spam : champ piège du formulaire de connexion, hors écran (pas display:none, que certains robots détectent). */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* Bouton « œil » : décalé quand Bootstrap affiche l'icône de validation. */
.was-validated .pw-field > .form-control.has-pw-toggle { padding-right: 4.75rem; background-position: right 3rem center; }

/* Titre « Eric, choisissez votre mot de passe » : toujours sur une ligne. */
.pw-title { font-size: clamp(1rem, 3.9vw, 1.45rem); font-weight: 800; white-space: nowrap; }

/* Appel à l'action de l'accueil */
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 1.25rem 0 .5rem; }
.hero-cta .btn { min-width: 15rem; }
@media (max-width: 575.98px) { .hero-cta { flex-direction: column; align-items: stretch; } .hero-cta .btn { min-width: 0; } }

/* ===== Prénom / NOM, invités et collections partagées ===== */
/* Champ NOM : affiché en majuscules pendant la saisie (le serveur l'enregistre aussi en majuscules). */
.text-uppercase-input { text-transform: uppercase; }
.text-uppercase-input::placeholder { text-transform: none; }
/* Formulaire « Ajouter un compte » : bouton à la hauteur des champs à libellé flottant. */
.add-account .btn { min-height: calc(3.5rem + 2px); }
/* Collection d'un autre membre (lecture seule) */
.viewonly-note { margin: -.25rem 0 .75rem; color: var(--bs-secondary-color); }
.viewonly-note .badge { font-size: .78rem; vertical-align: .1em; }
.check-label.is-readonly .bi { font-size: 1.05rem; line-height: 1; }
.detail-own.is-readonly { cursor: default; }
/* Page Invités et partages */
.shares-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.25rem; align-items: start; }
.shares-wide { grid-column: 1 / -1; }
.share-list { list-style: none; margin: 0; padding: 0; }
.shares-stack { display: flex; flex-direction: column; gap: 1.25rem; }
.share-list li { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--bs-border-color); }
.share-list .share-when { white-space: nowrap; }
.share-list li > form, .share-list li > .btn { flex-shrink: 0; }
.share-list li:first-child { border-top: 0; padding-top: 0; }
.share-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.share-who small { overflow-wrap: anywhere; }
@media (min-width: 768px) { .shares-stack .share-who { flex-direction: row; align-items: baseline; gap: 1rem; } .shares-stack .share-who strong { min-width: 14rem; } .shares-stack .share-who small { overflow-wrap: normal; word-break: normal; } }
a.share-link { color: inherit; text-decoration: none; }
a.share-link:hover strong, a.share-link:focus-visible strong { color: var(--m2-gold); text-decoration: underline; }
.become-member { border-color: var(--m2-gold); }
/* Page « Configuration locale manquante » */
.config-steps { max-width: 44rem; margin-top: 1.5rem; }
.config-steps li + li { margin-top: .5rem; }
.config-steps code { overflow-wrap: anywhere; }
/* ===== Mot de passe oublié ===== */
.link-gold { color: var(--m2-gold); font-weight: 600; text-decoration: none; }
.link-gold:hover, .link-gold:focus-visible { text-decoration: underline; color: var(--m2-gold); }
.reset-steps { display: flex; justify-content: center; gap: .4rem; list-style: none; padding: 0; margin: .75rem 0 0; counter-reset: step; font-size: .78rem; }
.reset-steps li { counter-increment: step; color: var(--bs-secondary-color); display: flex; align-items: center; gap: .3rem; }
.reset-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 1px solid var(--bs-border-color); font-weight: 700; font-size: .72rem; }
.reset-steps li + li::after { content: none; }
.reset-steps li:not(:last-child) { padding-right: .4rem; border-right: 1px solid var(--bs-border-color); }
.reset-steps li.is-current { color: var(--bs-body-color); font-weight: 700; }
.reset-steps li.is-current::before { background: var(--m2-gold); border-color: var(--m2-gold); color: #fff; }
.code-input { font-size: 1.6rem !important; letter-spacing: .5em; font-variant-numeric: tabular-nums; text-align: center; }

/* ======== Administration : onglets, messages e-mail ======== */
.admin-nav .nav-link { color: var(--bs-body-color); border: 1px solid var(--bs-border-color); }
.admin-nav .nav-link:hover { color: var(--m2-gold); }
.admin-nav .nav-link.active { background: var(--m2-gold); border-color: var(--m2-gold); color: #10151d; }
.mail-list .list-group-item.active { background: var(--m2-gold-soft); border-color: var(--m2-gold); color: var(--bs-body-color); }
.mail-list .list-group-item.active small { color: var(--m2-gold) !important; }
.mail-body { min-height: 380px; }
.mail-form.has-editor .tox-tinymce { border-radius: var(--bs-border-radius); }
.mail-var { display: inline-flex; align-items: baseline; gap: .4rem; text-align: left; }
.mail-var code { color: inherit; font-size: .85em; }
.mail-var-desc { font-size: .8em; opacity: .8; }
.mail-preview {
  max-width: 560px;
  padding: 28px 26px;
  border: 1px solid #e6dcc6;
  border-radius: 12px;
  background: #fff;
  color: #1d2433;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
.mail-preview p { margin: 0 0 14px; }
.mail-preview h1 { margin: 0 0 16px; font-size: 24px; color: #1d2433; }
.mail-preview h2 { margin: 8px 0 20px; font-size: 30px; letter-spacing: 6px; color: #9a7417; }
.mail-preview h3 { margin: 0 0 12px; font-size: 18px; color: #1d2433; }
.mail-preview a { color: #9a7417; }
.mail-preview-text { white-space: pre-wrap; padding: 12px; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); }

/* Ma collection : lien vers le catalogue complet (et retour), collection vide. */
.mine-switch { margin-left: .75rem; font-weight: 600; color: var(--m2-gold); text-decoration: none; vertical-align: baseline; font-size: inherit; }
.mine-switch:hover, .mine-switch:focus-visible { color: var(--m2-gold-strong); text-decoration: underline; }
.mine-empty { padding: 2.5rem 1rem; }
.mine-empty-icon { display: block; font-size: 2.5rem; color: var(--m2-gold); margin-bottom: .75rem; }

/* Fenêtre « Modifier les coordonnées » : case dorée comme « Se souvenir de moi ». */
#identity-modal .form-check-input:checked { background-color: var(--m2-gold); border-color: var(--m2-gold); }
#identity-modal .form-check-input:focus { border-color: var(--m2-gold); box-shadow: 0 0 0 .25rem var(--m2-gold-soft); }
#identity-modal .modal-content { background: var(--m2-panel); }

/* ===== Administration > Catalogue ===== */
.catalogue-table td, .catalogue-table th { vertical-align: middle; }
.catalogue-table tr.is-hidden-coin td { opacity: .6; }
.catalogue-table tr.is-hidden-coin td:last-child { opacity: 1; }
.badge-noimg { background: var(--m2-gold-soft); color: var(--m2-gold); font-weight: 600; }
.badge-upcoming { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); font-weight: 600; }
.catalogue-history li { padding: .35rem 0; border-bottom: 1px dashed var(--bs-border-color); }
.catalogue-history li:last-child { border-bottom: 0; }
.coin-form textarea.coin-desc { min-height: 9rem; }
.coin-form textarea#f-gradeNote { min-height: 5rem; }
.coin-preview { display: grid; place-items: center; aspect-ratio: 1; max-width: 260px; margin: 0 auto; border-radius: 1rem;
  background: radial-gradient(circle at 50% 40%, var(--m2-gold-soft), transparent 70%); }
.coin-preview img { width: 85%; height: 85%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35)); }
.participant-row .input-group-text { min-width: 12rem; background: var(--bs-tertiary-bg); }
.participant-row .flag { width: 20px; height: 15px; }

/* ===== Mes doubles ===== */
.doubles-stats { max-width: 640px; }
.doubles-table .sort-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; }
.doubles-table .sort-btn::after { content: ' ↕'; opacity: .35; font-size: .8em; }
.doubles-table th[aria-sort="ascending"] .sort-btn::after { content: ' ↑'; opacity: 1; }
.doubles-table th[aria-sort="descending"] .sort-btn::after { content: ' ↓'; opacity: 1; }
.purpose-badge { display: inline-block; padding: .2rem .55rem; border-radius: 1rem; font-size: .8rem; font-weight: 700; white-space: nowrap; border: 1px solid currentColor; }
.purpose-vente { color: #b45309; }
.purpose-echange { color: #2563eb; }
.purpose-garde { color: var(--bs-secondary-color); }
.purpose-achat { color: #7c3aed; }
[data-bs-theme="dark"] .purpose-vente { color: #fbbf24; }
[data-bs-theme="dark"] .purpose-echange { color: #93c5fd; }
[data-bs-theme="dark"] .purpose-achat { color: #c4b5fd; }
.detail-doubles { margin-top: 1rem; padding-top: .75rem; border-top: 1px dashed var(--bs-border-color); }
.detail-doubles .dbl-line { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; flex-wrap: wrap; }
.detail-doubles .dbl-grade { width: auto; min-width: 7.5rem; }
.detail-doubles .dbl-qty { display: inline-flex; align-items: center; gap: .25rem; margin-left: auto; }
.detail-doubles .dbl-qty button { width: 2rem; height: 2rem; padding: 0; }
/* Mes doubles : face de la pièce en début de ligne */
.doubles-table .col-face { width: 3.6rem; padding-right: 0; }
.dbl-face { width: 44px; height: 44px; object-fit: contain; display: block; border-radius: 50%; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
@media (max-width: 575.98px) { .doubles-table .col-face { width: 2.9rem; } .dbl-face { width: 36px; height: 36px; } }
@media print {
  .hero { padding: 0 0 1rem; background: none; }
  .doubles-table { font-size: 10pt; }
  .card { border: 0; box-shadow: none; }
  /* Mes doubles en PDF : face des pièces, sans Objectif / Prix / Cote, lignes jamais coupées, noir et blanc lisible */
  @page { size: A4; margin: 12mm; }
  .doubles-table .col-purpose, .doubles-table .col-price, .doubles-table .col-cote, .doubles-stats, .hero .intro { display: none !important; }
  .doubles-table tr { break-inside: avoid; page-break-inside: avoid; }
  .doubles-table thead { display: table-header-group; }
  .doubles-table tfoot { display: table-row-group; }
  .doubles-table th, .doubles-table td { color: #111 !important; background: #fff !important; border-color: #bbb !important; }
  .doubles-table a { color: #111 !important; text-decoration: none; }
  .doubles-table .sort-btn { color: #111 !important; padding: 0; }
  .doubles-table .sort-btn::after { display: none !important; }
  .doubles-table .col-face { width: 18mm; padding: 1mm 2mm 1mm 0; }
  .dbl-face { width: 16mm; height: 16mm; object-fit: contain; display: block; filter: none; }
  .print-date { color: #444; margin: -.25rem 0 0; }
  .table-responsive { overflow: visible !important; }
  .doubles-table thead th { vertical-align: middle; line-height: 1.5; }
  .doubles-table thead .sort-btn { line-height: 1.5; vertical-align: baseline; }
  .card:has(.doubles-table) { box-shadow: none !important; }
}

/* ===== Album imprimable (A4) ===== */
.album { max-width: 1000px; margin: 0 auto 3rem; padding: 0 1rem; }
.album-cover { text-align: center; padding: 3rem 1rem 2.5rem; border: 1px solid var(--bs-border-color); border-radius: var(--m2-radius); background: var(--m2-hero); margin-bottom: 1.5rem; }
.album-cover h1 { font-weight: 800; font-size: 2.4rem; margin: 1rem 0 .5rem; }
.album-cover-coin { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.album-member { font-size: 1.4rem; font-weight: 700; color: var(--m2-gold); margin-bottom: .25rem; }
.album-date, .album-note { color: var(--bs-secondary-color); }
.album-stats { display: flex; justify-content: center; gap: 2.5rem; margin: 1.5rem 0 1rem; flex-wrap: wrap; }
.album-stats dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--bs-secondary-color); }
.album-stats dd { font-size: 1.6rem; font-weight: 800; margin: 0; }
.album-toc { border: 1px solid var(--bs-border-color); border-radius: var(--m2-radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.album-toc h2, .album-country h2 { font-weight: 800; font-size: 1.4rem; }
.album-toc ol { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.album-toc li a { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; color: inherit; text-decoration: none; break-inside: avoid; }
.album-toc .toc-dots { flex: 1; border-bottom: 1px dotted var(--bs-border-color); margin: 0 .25rem; }
.album-toc .toc-n { font-weight: 700; color: var(--m2-gold); }
.album-country { margin-bottom: 2rem; }
.album-country h2 { display: flex; align-items: center; gap: .6rem; border-bottom: 2px solid var(--m2-gold); padding-bottom: .4rem; }
.album-country h2 small { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--bs-secondary-color); }
.album-country h2 .flag { width: 34px; height: 25px; }
.album-back { display: inline-flex; align-items: center; gap: .15rem; font-size: .8rem; font-weight: 600; color: var(--m2-gold); text-decoration: none; margin-bottom: .25rem; }
.album-back:hover, .album-back:focus-visible { text-decoration: underline; }
.album-toc li a:hover span:nth-child(2), .album-toc li a:focus-visible span:nth-child(2) { text-decoration: underline; }
.album-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-top: 1rem; }
.album-coin { margin: 0; border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: .6rem; break-inside: avoid; page-break-inside: avoid; border-top: 4px solid #16a34a; }
.album-coin.is-missing { border-top-color: #dc2626; }
.album-img { display: grid; place-items: center; aspect-ratio: 1; }
.album-img img { width: 88%; height: 88%; object-fit: contain; }
.album-coin.is-missing .album-img img { opacity: .55; filter: grayscale(.4); }
.album-fb { display: grid; place-items: center; text-align: center; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #e9cf86 55%, #c7ccd3 56%); color: #4a3610; font-size: .8rem; line-height: 1.2; }
.album-coin figcaption { display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; }
.album-year { font-weight: 800; color: var(--m2-gold); }
.album-title { font-weight: 700; line-height: 1.25; }
.album-type { color: var(--bs-secondary-color); font-size: .72rem; }
.album-meta { display: flex; justify-content: space-between; gap: .3rem; margin-top: .2rem; font-size: .72rem; }
.album-state { font-weight: 700; color: #16a34a; }
.album-coin.is-missing .album-state { color: #dc2626; }
@media (max-width: 767.98px) { .album-grid { grid-template-columns: repeat(2, 1fr); } .album-toc ol { columns: 1; } }
@page { size: A4; margin: 14mm 12mm 16mm; @bottom-center { content: "my2eurocoins · page " counter(page) " / " counter(pages); font-size: 9pt; color: #6b7280; } }
@media print {
  html[data-bs-theme] body { background: #fff !important; color: #111 !important; }
  .album { max-width: none; padding: 0; }
  .album-cover { border: 0; background: none; min-height: 240mm; display: flex; flex-direction: column; justify-content: center; page-break-after: always; break-after: page; }
  .album-toc { border: 0; page-break-after: always; break-after: page; }
  .album-country { page-break-before: always; break-before: page; }
  .album-country:first-of-type { page-break-before: auto; break-before: auto; }
  .album-grid { grid-template-columns: repeat(4, 1fr); }
  .album-coin, .album-cover, .album-toc { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .album-toc a, .album-toc .toc-n { color: #111; }
  .skip-link, .cookie-banner, .theme-fab { display: none !important; }
}

/* ======== Identifier une pièce (reconnaissance par photo) ======== */
.idf-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.idf-card { position: relative; }
.idf-illustration { font-size: 3rem; color: var(--m2-gold); line-height: 1; margin: .5rem 0 1.25rem; }
.idf-stage { position: relative; aspect-ratio: 3 / 4; max-height: 70vh; margin: 0 auto; border-radius: var(--m2-radius); overflow: hidden; background: #000; }
@media (min-width: 768px) { .idf-stage { aspect-ratio: 4 / 3; } }
.idf-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.idf-mask { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.idf-ring {
  --p: 0;
  position: relative; width: 72%; aspect-ratio: 1; max-height: 72%; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .45);
  transition: border-color .2s;
}
@media (min-width: 768px) { .idf-ring { width: auto; height: 72%; } }
.idf-ring.is-ok { border-color: #22c55e; }
.idf-progress { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); }
.idf-progress circle { fill: none; stroke: #22c55e; stroke-width: 3; stroke-dasharray: calc(var(--p) * 1) 100; stroke-linecap: round; }
.idf-hint {
  position: absolute; left: 50%; bottom: .75rem; transform: translateX(-50%); margin: 0; max-width: 92%;
  padding: .35rem .8rem; border-radius: 2rem; background: rgba(0, 0, 0, .65); color: #fff; font-size: .9rem; text-align: center;
}
.idf-meters { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 0; }
.idf-meters li {
  display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 2rem; font-size: .8rem;
  background: var(--m2-missing-bg); color: var(--m2-missing);
}
.idf-meters li.is-ok { background: var(--m2-owned-bg); color: var(--m2-owned); }
.idf-busy { padding: 1rem 0; }
.idf-shot { width: min(260px, 70vw); aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid var(--m2-gold); }
.idf-result-head { display: flex; gap: .9rem; align-items: center; margin-bottom: .75rem; }
.idf-mini { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; border: 2px solid var(--m2-gold); flex: none; }
.idf-cands { display: grid; gap: .6rem; margin: 0 0 1rem; }
.idf-cand {
  display: grid; grid-template-columns: 72px 1fr auto; gap: .8rem; align-items: center;
  padding: .6rem .75rem; border: 1px solid var(--bs-border-color); border-radius: .8rem; background: var(--bs-body-bg);
}
.idf-cand.is-best { border-color: var(--m2-gold); box-shadow: 0 0 0 2px var(--m2-gold-soft); }
.idf-cand-img { width: 72px; height: 72px; object-fit: contain; }
@media (max-width: 480px) {
  .idf-cand { grid-template-columns: 56px 1fr; }
  .idf-cand-img { width: 56px; height: 56px; }
  .idf-cand-go { grid-column: 1 / -1; }
}
.idf-level { font-weight: 600; }
.idf-level-forte { background: var(--m2-owned-bg); color: var(--m2-owned); }
.idf-level-moyenne { background: var(--m2-gold-soft); color: var(--m2-gold-strong); }
.idf-level-faible { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.idf-own { background: var(--m2-owned); }
.idf-miss { background: var(--m2-missing); }
.idf-tips { padding-left: 1.1rem; }
.idf-tips li { margin-bottom: .35rem; }
.idf-advice ul { padding-left: 1.1rem; }

/* Bandeau d'accueil du membre : « Explorer ma collection » (vert) et « Afficher les manquantes » (rouge) */
.btn-owned, .btn-missing { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-font-weight: 600; }
.btn-owned { --bs-btn-bg: #15803d; --bs-btn-border-color: #15803d; --bs-btn-hover-bg: #166534; --bs-btn-hover-border-color: #166534; --bs-btn-active-bg: #14532d; --bs-btn-active-border-color: #14532d; --bs-btn-focus-shadow-rgb: 22, 163, 74; }
.btn-missing { --bs-btn-bg: #b91c1c; --bs-btn-border-color: #b91c1c; --bs-btn-hover-bg: #991b1b; --bs-btn-hover-border-color: #991b1b; --bs-btn-active-bg: #7f1d1d; --bs-btn-active-border-color: #7f1d1d; --bs-btn-focus-shadow-rgb: 220, 38, 38; }

/* Mes doubles : intitulé avec recherche par mot-clé */
.dbl-combo { position: relative; }
.dbl-list {
  position: absolute; z-index: 1060; left: 0; right: 0; top: calc(100% + 2px); max-height: 18rem; overflow-y: auto; margin: 0; padding: .25rem 0;
  background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .6rem; box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .15);
}
.dbl-list li { padding: .45rem .8rem; cursor: pointer; font-size: .92rem; }
.dbl-list li[aria-selected="true"], .dbl-list li[data-i]:hover { background: var(--m2-gold-soft); }
.dbl-list li.is-chosen { font-weight: 600; }
.dbl-list li.dbl-none { cursor: default; color: var(--bs-secondary-color); }
.stats-3 { max-width: 780px; }
.stats-4 { max-width: 1040px; }
/* Cartes de statistiques cliquables (filtre) */
button.stat { font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, background-color .15s; }
@media (hover: hover) and (pointer: fine) { button.stat:hover { border-color: var(--m2-gold); } }
button.stat:focus-visible { outline: 2px solid var(--m2-gold); outline-offset: 2px; }
button.stat.is-active { border-color: var(--m2-gold); border-width: 2px; padding: calc(.85rem - 1px) calc(.75rem - 1px); box-shadow: 0 0 0 3px var(--m2-gold-soft); }
/* Mes doubles : ligne cliquable → fiche de la pièce */
tr.dbl-row-link { cursor: pointer; }
tr.dbl-row-link:hover > td { background-color: var(--m2-gold-soft); }
.dbl-open { text-decoration: none; }
.dbl-open:hover, .dbl-open:focus-visible { text-decoration: underline; }
/* Icône « i » à côté d'un état de conservation */
.grade-tip { border: 0; background: none; padding: 0 .2rem; line-height: 1; color: var(--bs-secondary-color); font-size: .85rem; min-width: 28px; min-height: 28px; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.grade-tip:hover, .grade-tip:focus-visible { color: var(--m2-gold); }
.grade-tip-corner { position: absolute; top: .3rem; right: .3rem; z-index: 3; }
.detail-table th .grade-tip { margin: -6px 0; }

/* Accueil : prochaines émissions (pièces annoncées sans image, absentes du reste du site) */
.upcoming-item { display: flex; align-items: center; gap: .75rem; height: 100%; padding: .65rem .85rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); }
.upcoming-flags { display: inline-flex; align-items: center; gap: .2rem; flex-shrink: 0; }
.upcoming-flags .flag { border-radius: 2px; }
.upcoming-text { display: flex; flex-direction: column; min-width: 0; }
.upcoming-meta { font-size: .8rem; color: var(--bs-secondary-color); }
.upcoming-name { font-weight: 600; line-height: 1.3; }

/* Fenêtre « Exporter » */
.export-formats { display: flex; gap: .5rem; }
.export-formats .btn { flex: 1; }

/* Liens utiles : cartes « pièce » avec le logo du site au cœur */
.link-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); max-width: 980px; }
.link-card .country-card-name { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(.92rem, 2.4vw, 1.05rem); }
.link-coin-core { background: #fff; }
.link-coin-core .link-coin-logo { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; padding: 9%; background: #fff; box-shadow: inset 0 0 6px rgba(0, 0, 0, .25); }
.link-coin-icon { display: grid !important; place-items: center; color: var(--m2-gold); font-size: 2rem; }
.link-card-go { margin-top: auto; padding-top: .35rem; font-size: .8rem; font-weight: 600; color: var(--m2-gold); }

/* Barre alphabétique (Mes invités) : Tous, A…Z ; lettres sans entrée grisées */
.alpha-bar { display: flex; flex-wrap: wrap; gap: .15rem; padding: .35rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; background: var(--bs-body-bg); }
.alpha-btn { min-width: 2rem; padding: .3rem .45rem; border: 1px solid transparent; border-radius: .5rem; background: none; color: var(--bs-body-color); font-weight: 700; font-size: .85rem; line-height: 1.2; }
.alpha-btn:hover:not(:disabled), .alpha-btn:focus-visible { color: var(--m2-gold); outline: none; border-color: var(--m2-gold-soft); }
.alpha-btn.active { color: var(--m2-gold); border-color: var(--m2-gold); }
.alpha-btn:disabled { color: var(--bs-secondary-color); opacity: .45; cursor: default; }
.share-list li[hidden] { display: none !important; }

/* Bouton « Modifier » (Mes invités) : couleur d'alerte Bootstrap (warning), lisible en clair comme en sombre */
.btn-edit.btn-outline-warning { --bs-btn-color: var(--bs-warning-text-emphasis); --bs-btn-border-color: var(--bs-warning); --bs-btn-hover-color: #000; --bs-btn-hover-bg: var(--bs-warning); --bs-btn-hover-border-color: var(--bs-warning); --bs-btn-active-color: #000; --bs-btn-active-bg: var(--bs-warning); --bs-btn-active-border-color: var(--bs-warning); }
[data-bs-theme="dark"] .btn-edit.btn-outline-warning { --bs-btn-color: var(--bs-warning); }
/* Mes invités : ligne cliquable (ouvre la fiche), effet au survol */

/* Mes doubles : sous la liste, bouton « + Un double » et carte de partage (détails en fenêtre) */
.dbl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 4rem; }
.dbl-share-card { flex: 0 1 26rem; }
.dbl-share-card .min-w-0 { min-width: 0; }
@media (max-width: 575.98px) { .dbl-actions > .btn { width: 100%; } .dbl-share-card { flex-basis: 100%; } }

/* Tableaux défilants : les textes masqués (visually-hidden, en absolu) restent dans le cadre défilant,
   sinon ils élargissent toute la page sur mobile (défilement horizontal parasite). */
.table-responsive { position: relative; }

/* Logo complet (« my » + pièce + « coins ») en tête des pages de connexion et de mot de passe */
.brand-text.brand-auth { display: inline-flex; font-size: 2.3rem; }
.brand-text.brand-auth .brand-coin { width: 68px; height: 68px; }
@media (max-width: 400px) { .brand-text.brand-auth { font-size: 1.9rem; } .brand-text.brand-auth .brand-coin { width: 56px; height: 56px; } }

/* Barre de navigation : bouton « Se connecter » plein (couleurs .btn-gold du site), icône utilisateur simple */
.btn-login { display: inline-flex; align-items: center; gap: .45rem; padding: .42rem 1rem; border-radius: .6rem; font-weight: 700; white-space: nowrap; }
.btn-login .bi { font-size: 1.15rem; line-height: 1; } /* icône simple, sans cercle */
/* Petit écran : icône seule (le texte reste lu par les lecteurs d'écran) */
@media (max-width: 459.98px) {
  .btn-login { padding: .4rem; border-radius: 50%; }
  .btn-login-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Modales : « Annuler » rouge (contour), validation bleue (contour, remplie au survol) ; focus bien visible, clair et sombre. */
.modal-footer .btn-modal-cancel, .modal-footer .btn-modal-ok { font-weight: 600; transition: background-color .15s, color .15s, box-shadow .15s; }
.modal-footer .btn-modal-cancel:focus-visible { box-shadow: 0 0 0 .25rem rgba(var(--bs-danger-rgb), .4); }
.modal-footer .btn-modal-ok:focus-visible { box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .4); }
[data-bs-theme="dark"] .modal-footer .btn-modal-ok { --bs-btn-color: #6ea8fe; --bs-btn-border-color: #6ea8fe; --bs-btn-hover-bg: #6ea8fe; --bs-btn-hover-border-color: #6ea8fe; --bs-btn-hover-color: #0b1220; --bs-btn-active-bg: #8bb9fe; --bs-btn-active-color: #0b1220; }
[data-bs-theme="dark"] .modal-footer .btn-modal-cancel { --bs-btn-color: #ea868f; --bs-btn-border-color: #ea868f; --bs-btn-hover-bg: #ea868f; --bs-btn-hover-border-color: #ea868f; --bs-btn-hover-color: #1a0b0d; --bs-btn-active-bg: #f0a3aa; --bs-btn-active-color: #1a0b0d; }

/* Mes invités : lien (famille, ami, collectionneur…) en pastille, filtre par lien. */
.share-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; min-width: 0; }
.relation-badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.4; white-space: nowrap; border: 1px solid currentColor; }
.relation-famille { color: #b02a5b; background: rgba(176, 42, 91, .08); }
.relation-entourage { color: #1d7a5a; background: rgba(29, 122, 90, .08); }
.relation-numismatique { color: var(--m2-gold); background: var(--m2-gold-soft); }
.relation-autre { color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); }
[data-bs-theme="dark"] .relation-famille { color: #f08cb3; background: rgba(240, 140, 179, .12); }
[data-bs-theme="dark"] .relation-entourage { color: #6fd3ab; background: rgba(111, 211, 171, .12); }
.relation-filter { display: flex; flex-wrap: wrap; gap: .35rem; }
.relation-btn { padding: .25rem .7rem; border: 1px solid var(--bs-border-color); border-radius: 999px; background: none; color: var(--bs-body-color); font-size: .85rem; font-weight: 600; }
.relation-btn:hover, .relation-btn:focus-visible { border-color: var(--m2-gold); color: var(--m2-gold); outline: none; }
.relation-btn.active { background: var(--m2-gold); border-color: var(--m2-gold); color: #fff; }
.relation-field [hidden] { display: none !important; }
.identity-fields[hidden] { display: none !important; }
.is-leaving body { opacity: 0; transition: opacity .1s; }
.settings-pw-link { color: var(--m2-gold); text-decoration: none; font-weight: 600; } .settings-pw-link:hover, .settings-pw-link:focus-visible { text-decoration: underline; color: var(--m2-gold); }

/* Mes invités : tableau NOM | Prénom | Lien | E-mail | Invité le | actions ; empilé sous 700 px. */
.guest-table { --bs-table-bg: transparent; --bs-table-hover-bg: var(--m2-gold-soft); }
.guest-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--bs-secondary-color); white-space: nowrap; }
.guest-table .sort-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.guest-table .sort-btn:hover, .guest-table .sort-btn:focus-visible { color: var(--m2-gold); outline: none; text-decoration: underline; }
.guest-table th[aria-sort="ascending"] .sort-btn::after { content: " ▲"; font-size: .7em; }
.guest-table th[aria-sort="descending"] .sort-btn::after { content: " ▼"; font-size: .7em; }
.guest-table tr.share-row-link, .guest-table tr.shared-row-link { cursor: pointer; }
.guest-table tr.shared-row-link:hover > td { background: var(--m2-gold-soft); }
.guest-table tr.shared-row-link:hover .g-nom strong, .guest-table tr.shared-row-link:hover .g-prenom { color: var(--m2-gold); }
.shared-table .shared-open { color: inherit; text-decoration: none; }
.shared-table .shared-open:focus-visible { outline: 2px solid var(--m2-gold); outline-offset: 2px; border-radius: .25rem; }
.shared-table .g-rel { color: var(--bs-secondary-color); font-size: .9rem; }
/* Survol : même largeur pour toutes les lignes (celle du tableau), coins arrondis réguliers, marges intérieures identiques. */
.guest-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.guest-table > tbody > tr > td { transition: background-color .15s; }
.guest-table > :not(caption) > tr > :first-child { padding-left: .75rem; }
.guest-table > :not(caption) > tr > :last-child { padding-right: .75rem; }
.guest-table tr.share-row-link:hover > td { background: var(--m2-gold-soft); }
.guest-table tr.share-row-link:hover .g-nom strong, .guest-table tr.share-row-link:hover .g-prenom { color: var(--m2-gold); }
.guest-table tr[hidden] { display: none !important; }
.guest-table .g-nom, .guest-table .g-prenom { white-space: nowrap; }
.guest-table .g-mail { width: 100%; max-width: 0; }
.guest-table .g-mail span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bs-secondary-color); font-size: .9rem; }
.guest-table .g-date { color: var(--bs-secondary-color); font-size: .9rem; }
.guest-table .g-date-label { display: none; }
.guest-table .relation-badge { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
@media (max-width: 991.98px) { .guest-table > :not(caption) > * > * { padding: .5rem .3rem; } }
.guest-table .g-act { white-space: nowrap; width: 1%; }
@media (max-width: 699.98px) {
  .guest-table thead { display: none; }
  .guest-table, .guest-table tbody { display: block; }
  .guest-table tr.share-row-link:hover, .guest-table tr.shared-row-link:hover { background: var(--m2-gold-soft); border-radius: 0; }
  .guest-table tr.share-row-link:hover > td, .guest-table tr.shared-row-link:hover > td { background: none; border-radius: 0; }
  .guest-table > :not(caption) > tr > td, .guest-table > :not(caption) > tr > td:first-child, .guest-table > :not(caption) > tr > td:last-child { padding: 0; }
  .guest-table tr { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "nom pre act" "rel rel act" "mail mail mail" "date date date"; column-gap: .35rem; row-gap: .2rem; padding: .7rem .75rem; border-top: 1px solid var(--bs-border-color); }
  .guest-table tr:first-child { border-top: 0; }
  .guest-table td { display: block; padding: 0; border: 0; background: none; }
  .guest-table .g-nom { grid-area: nom; } .guest-table .g-prenom { grid-area: pre; font-weight: 600; }
  .guest-table .g-rel { grid-area: rel; } .guest-table .g-rel > .text-body-secondary { display: none; }
  .guest-table .g-mail { grid-area: mail; width: auto; max-width: none; } .guest-table .g-mail span { white-space: normal; overflow-wrap: anywhere; }
  .guest-table .g-date { grid-area: date; } .guest-table .g-date-label { display: inline; }
  .guest-table .g-act { grid-area: act; width: auto; align-self: start; }
}

/* Boutons de section (Invités et partages) : pastilles, défilement doux sous la barre de navigation collante. */
.section-anchor { scroll-margin-top: 5.5rem; }
.section-nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.section-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border: 1px solid var(--bs-border-color); border-radius: 999px; background: var(--m2-panel); color: var(--bs-body-color); font-weight: 600; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.section-pill i { color: var(--m2-gold); }
.section-pill:hover, .section-pill:focus-visible { border-color: var(--m2-gold); color: var(--m2-gold); outline: none; }
.section-pill:focus-visible { box-shadow: 0 0 0 .2rem var(--m2-gold-soft); }
.section-pill.active { background: var(--m2-gold); border-color: var(--m2-gold); color: #fff; }
.section-pill.active i { color: inherit; }
[data-bs-theme="dark"] .section-pill.active { color: #1a1406; }
.section-pill-count { min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--bs-secondary-bg); color: var(--bs-body-color); font-size: .75rem; line-height: 1.4rem; text-align: center; }
.section-pill.active .section-pill-count { background: rgba(255, 255, 255, .25); color: inherit; }
@media (max-width: 575.98px) { .section-pill { flex: 1 1 0; justify-content: center; padding: .45rem .6rem; font-size: .9rem; } }
.settings-stack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.theme-actions[hidden] { display: none !important; }
.theme-actions .btn { font-weight: 600; transition: background-color .15s, color .15s, box-shadow .15s; }
.theme-actions .btn-theme-ok:focus-visible { box-shadow: 0 0 0 .25rem rgba(var(--bs-success-rgb), .4); }
.theme-actions .btn-theme-cancel:focus-visible { box-shadow: 0 0 0 .25rem rgba(var(--bs-danger-rgb), .4); }
[data-bs-theme="dark"] .theme-actions .btn-theme-ok { --bs-btn-color: #75b798; --bs-btn-border-color: #75b798; --bs-btn-hover-bg: #75b798; --bs-btn-hover-border-color: #75b798; --bs-btn-hover-color: #0b1a12; --bs-btn-active-bg: #8fcaae; --bs-btn-active-color: #0b1a12; }
[data-bs-theme="dark"] .theme-actions .btn-theme-cancel { --bs-btn-color: #ea868f; --bs-btn-border-color: #ea868f; --bs-btn-hover-bg: #ea868f; --bs-btn-hover-border-color: #ea868f; --bs-btn-hover-color: #1a0b0d; --bs-btn-active-bg: #f0a3aa; --bs-btn-active-color: #1a0b0d; }
/* Paramètres > Mes invités : aperçu des premiers invités. */
.settings-guests { list-style: none; margin: 0 0 .75rem; padding: 0; }
.settings-guests li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-top: 1px solid var(--bs-border-color); min-width: 0; font-weight: 600; }
.settings-guests li:first-child { border-top: 0; padding-top: 0; }
/* Icône « Télécharger » (flèche vers le bas sur un plateau) : trait un peu renforcé, net à petite taille, aligné sur le texte. */
.icon-dl::before { -webkit-text-stroke: .45px currentColor; vertical-align: -.14em; }
.toolbar-intro { text-align: left; color: var(--bs-secondary-color); font-size: 1.05rem; margin-top: .25rem; }

/* Comparer : bouton discret sur la carte, barre flottante, tableau côte à côte. */
.coin-compare { position: absolute; top: .55rem; right: .55rem; z-index: 3; width: 2rem; height: 2rem; display: grid; place-items: center; padding: 0; border: 1px solid var(--bs-border-color); border-radius: .5rem; background: var(--m2-panel); color: var(--bs-secondary-color); opacity: .85; transition: opacity .15s, color .15s, border-color .15s, background-color .15s; }
.coin-card:hover .coin-compare, .coin-compare:focus-visible { opacity: 1; }
.coin-compare:hover, .coin-compare:focus-visible { color: var(--m2-gold); border-color: var(--m2-gold); outline: none; }
.coin-compare.is-on { opacity: 1; background: var(--m2-gold); border-color: var(--m2-gold); color: #fff; }
[data-bs-theme="dark"] .coin-compare.is-on { color: #1a1406; }
.compare-bar { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1050; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem .75rem; max-width: calc(100vw - 6rem); padding: .55rem .9rem; border: 1px solid var(--m2-gold); border-radius: 999px; background: var(--m2-panel); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25); }
.compare-bar[hidden] { display: none; }
.compare-count { font-weight: 600; font-size: .9rem; }
.compare-table { min-width: 36rem; }
.compare-table th[scope="row"] { width: 9rem; color: var(--bs-secondary-color); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.compare-table .compare-col { text-align: center; vertical-align: top; min-width: 12rem; }
.compare-media { position: relative; display: inline-block; }
.compare-media img, .compare-media .coin-fallback { width: 150px; height: 150px; object-fit: contain; border-radius: 50%; }
.compare-media .flag-pastille { position: absolute; top: 0; left: 0; }
.compare-name { font-weight: 700; margin-top: .35rem; }
.compare-missing { color: var(--m2-missing); }
@media (max-width: 575.98px) { .compare-bar { bottom: .75rem; border-radius: 1rem; max-width: calc(100vw - 5.5rem); left: calc(50% - 1.5rem); } .compare-media img, .compare-media .coin-fallback { width: 110px; height: 110px; } }
@media print { .compare-bar, .coin-compare { display: none !important; } }
.compare-remove { color: var(--m2-gold); text-decoration: none; font-weight: 600; }
.compare-remove:hover, .compare-remove:focus-visible { color: var(--m2-gold); text-decoration: underline; }
@media (max-width: 575.98px) { .compare-bar { flex-wrap: nowrap; border-radius: 999px; padding: .45rem .6rem; gap: .4rem; } .compare-table th[scope="row"] { width: 6.5rem; white-space: normal; } }
.compare-bar .btn { white-space: nowrap; }

/* Survol inversé pour tous les boutons (souris uniquement : pas de survol « collant » au toucher).
   Plein (brun/or) → contour sur fond clair, texte brun. Contour → rempli de sa couleur, texte clair.
   Les contours colorés (vert, rouge, bleu, jaune) se remplissent déjà de leur couleur (Bootstrap). */
.btn { transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
@media (hover: hover) and (pointer: fine) {
  .btn-gold,
  [data-bs-theme="light"] .btn-gold,
  [data-bs-theme="dark"] .btn-gold {
    --bs-btn-hover-bg: transparent; --bs-btn-hover-color: var(--m2-gold); --bs-btn-hover-border-color: var(--m2-gold);
  }
  /* Menu déroulant ouvert (« Ajouter une pièce ») ou bouton enfoncé : on garde le fond or (sinon texte blanc sur blanc). */
  [data-bs-theme="light"] .btn-gold:hover:not(.show):not(:active) { background-color: #fff; }
  .btn-outline-gold,
  [data-bs-theme="light"] .btn-outline-secondary,
  [data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-hover-bg: var(--m2-gold); --bs-btn-hover-border-color: var(--m2-gold);
    --bs-btn-active-bg: var(--m2-gold-strong); --bs-btn-active-border-color: var(--m2-gold-strong);
  }
  [data-bs-theme="light"] .btn-outline-gold,
  [data-bs-theme="light"] .btn-outline-secondary { --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; }
  [data-bs-theme="dark"] .btn-outline-gold,
  [data-bs-theme="dark"] .btn-outline-secondary { --bs-btn-hover-color: #17120a; --bs-btn-active-color: #17120a; }
  .btn-owned:hover { background-color: transparent; color: #15803d; border-color: #15803d; }
  .btn-missing:hover { background-color: transparent; color: #b91c1c; border-color: #b91c1c; }
  [data-bs-theme="dark"] .btn-owned:hover { color: #75b798; border-color: #75b798; }
  [data-bs-theme="dark"] .btn-missing:hover { color: #ea868f; border-color: #ea868f; }
}
/* Focus clavier bien visible sur tous les boutons */
.btn:focus-visible { outline: 2px solid var(--m2-gold); outline-offset: 2px; }

/* Message d'accueil après la connexion : bulle sous l'avatar, fondu à l'apparition et à la disparition */
.greet-bubble { position: fixed; z-index: 1085; max-width: min(320px, calc(100vw - 16px)); padding: .6rem .9rem; border-radius: .75rem; background: var(--m2-panel); color: var(--bs-body-color); border: 1px solid var(--m2-gold); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: .9rem; font-weight: 600; opacity: 0; transform: translateY(-4px); transition: opacity .35s ease, transform .35s ease; cursor: pointer; }
.greet-bubble.show { opacity: 1; transform: none; }
.greet-bubble::before { content: ""; position: absolute; top: -7px; left: calc(var(--arrow-x, 50%) - 6px); width: 12px; height: 12px; background: var(--m2-panel); border-left: 1px solid var(--m2-gold); border-top: 1px solid var(--m2-gold); transform: rotate(45deg); }
.greet-bubble .bi { color: var(--m2-gold); }
@media (prefers-reduced-motion: reduce) { .greet-bubble { transition: none; } }

/* Doubles disponibles, dans l'en-tête vert / rouge des cartes (membre et invité) */
.card-check .card-dbl { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 1rem; font-size: .75rem; font-weight: 700; white-space: nowrap; background: var(--m2-gold); color: #fff; }
[data-bs-theme="dark"] .card-check .card-dbl { color: #17120a; }
.shared-hint a { font-weight: 600; }

/* Collectionneurs : une carte par collection (initiales dans une pièce, pastille du pays, lieu, acquises / à trouver) */
.collector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.collector-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; height: 100%; padding: 1.25rem 1rem 1.1rem; border: 1px solid var(--bs-border-color); border-radius: var(--m2-radius); background: var(--m2-glass); color: inherit; text-decoration: none; text-align: center; transition: border-color .15s, box-shadow .15s, transform .15s; }
@media (hover: hover) and (pointer: fine) { .collector-card:hover { border-color: var(--m2-gold); box-shadow: 0 6px 20px rgba(0, 0, 0, .1); transform: translateY(-2px); } }
.collector-card:focus-visible { outline: 2px solid var(--m2-gold); outline-offset: 2px; }
/* Pièce de 2€ : couronne argentée, cœur doré */
.collector-coin { position: relative; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f4f4f4, #b9bcc2 60%, #8d9097); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5), 0 3px 8px rgba(0, 0, 0, .18); }
.collector-coin::before { content: ""; position: absolute; inset: 15px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f6e3a1, #d4af37 55%, #a8842a); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.collector-initials { position: relative; font-weight: 800; font-size: 1.45rem; letter-spacing: .02em; color: #3b2c06; }
.collector-flag { position: absolute; top: -2px; left: -2px; z-index: 1; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bs-body-bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.collector-me { position: absolute; top: .6rem; right: .6rem; padding: .05rem .5rem; border-radius: 1rem; font-size: .7rem; font-weight: 700; background: var(--m2-gold-soft); color: var(--m2-gold); }
.collector-place { font-size: .92rem; color: var(--bs-secondary-color); }
.collector-card.is-private { cursor: default; }
@media (hover: hover) and (pointer: fine) { .collector-card.is-private:hover { border-color: var(--bs-border-color); box-shadow: none; transform: none; } }
.collector-lock { font-size: .75rem; color: var(--bs-secondary-color); }
.collector-counts { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .8rem; font-size: .9rem; font-weight: 700; }
/* Version couleur : icône palette à la place du mot « Couleur » dans l'intitulé */
.coin-color { font-size: .95em; vertical-align: -.05em; }
@media print { .coin-color { background: none; color: #8338ec; -webkit-text-fill-color: #8338ec; } }

/* Barre de filtres collée sous le menu (défilement) : bande pleine largeur, sans coins arrondis, ombre en bas.
   Le contenu garde la largeur de la page ; la bande est dessinée par ::before (100vw). */
html { overflow-x: clip; }
[data-bs-theme] .toolbar.is-stuck {
  top: var(--m2-nav-real, var(--m2-nav-h)); border-radius: 0; border-color: transparent; box-shadow: none;
  background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.toolbar.is-stuck::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw; z-index: -1;
  background: var(--m2-glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bs-border-color); box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}
[data-bs-theme="light"] .toolbar.is-stuck::before { background: rgba(255, 255, 255, .96); border-bottom-color: #d8ccb1; }
[data-bs-theme="dark"] .toolbar.is-stuck::before { box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
