/* css/theme.css */

/* ===== BASE (global) ===== */
*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }
body{
  background:var(--bg);
  color:var(--text);
  font-family:"Lisu Bosa",serif;
}

/* Thème par défaut = dark (si le boot-script ne trouve rien) */
:root {
  /* Palette dark */
  --bg: #151829;
  --text: #EDEBF4;
  --gold: #BD9840;
  --line: #ffffff30;
  --surface: rgba(255,255,255,.03);

  /* Header */
  --header-bg: linear-gradient(to bottom,
    rgba(21,24,41,.96),
    rgba(21,24,41,.75) 70%,
    transparent);
  --header-border: rgba(255,255,255,.10);

  /* Bottom nav / ombres */
  --nav-bg: rgba(255,255,255,.05);
  --nav-border: rgba(255,255,255,.12);
  --nav-hover: rgba(255,255,255,.06);
  --nav-active-bg: rgba(170,147,92,.14);
  --nav-active-shadow: 0 0 0 1px rgba(170,145,86,.35) inset;
  --shadow: 0 10px 26px rgba(0,0,0,.25);

  /* Drawer */
  --overlay: rgba(0,0,0,.45);
  --drawer-bg: #121423;
  --drawer-border: rgba(255,255,255,.12);

  /* Bannière */
  --banner-bg: rgba(189,152,64,.12);
  --banner-border: rgba(189,152,64,.45);

  /* Danger */
  --danger: #E5484D;
  --danger-hover: #D13D42;
  --danger-active: #B8373C;
  --on-danger: #ffffff;

  /* Accessoires */
  --muted: #CFC8E2;
  --on-gold: #151829;
  --ring-gold: rgba(189,152,64,.45);

  /* UI dérivées */
  --search-bg: var(--surface);
  --search-icon: var(--muted);
  --gold-veil: rgba(189,152,64,.08);

  /* Dropdown / suggestions */
  --dropdown-bg: rgba(18,20,35,.98);
  --dropdown-shadow: 0 10px 24px rgba(0,0,0,.35);

  /* Footer CTA */
  --footer-cta-bg: linear-gradient(180deg,
    rgba(21,24,41,0) 0%,
    rgba(21,24,41,.85) 30%,
    rgba(21,24,41,1) 100%
  );

  /* Badges / popover */
  --badge-bg:#1B1B2F;
  --badge-veil: linear-gradient(180deg, transparent, rgba(0,0,0,.25));
  --popover-bg:#1B1B2F;
  --popover-border: var(--line);
  --popover-shadow: 0 10px 30px rgba(0,0,0,.35);

  /* Hints */
  --hint-bg: rgba(255,255,255,.06);
  --hint-border: rgba(255,255,255,.12);
  --hint-shadow: 0 6px 16px rgba(0,0,0,.18);

  /* panneau et liste */
  --panel-bg: var(--surface);
  --list-bg: color-mix(in oklab, var(--surface), transparent 15%);
  --list-row: color-mix(in oklab, var(--surface), white 4%);
  --cta-up: linear-gradient(to top, var(--bg), transparent);

  /* Fades/gradients */
  --fade-top: linear-gradient(to bottom, var(--bg), transparent);
  --fade-bottom: linear-gradient(to top, var(--bg), transparent);
  --actions-fade-up: linear-gradient(to top, var(--bg), transparent);

  /* Info popover */
  --tip-bg: var(--gold);
  --tip-fg: var(--on-gold);
  --tip-shadow: 0 10px 24px rgba(0,0,0,.35);

  /* media review edit */
  --thumb-bg: #0f1120;

  /* modal review edit */
  --modal-bg: #121423;
  --modal-border: var(--line);
  --modal-backdrop: rgba(0,0,0,.55);
  --modal-shadow: 0 20px 60px rgba(0,0,0,.45);

  /* boutons */
  --btn-ghost-bg: rgba(255,255,255,.03);
  --btn-ghost-bg-hover: rgba(255,255,255,.07);
  --btn-primary-shadow: 0 0 18px rgba(189,152,64,.25);
  --btn-danger-border: #ff8b8b99;
  --btn-danger-text: #ffb4b4;

  /* vignettes review edit */
  --chip-bg: rgba(255,255,255,.06);
  --caption-bg: rgba(0,0,0,.35);
  --caption-border: #ffffff30;
  --del-bg: rgba(0,0,0,.45);
  --del-border: #ffffff33;
  --header-fade: linear-gradient(to bottom, rgba(21,24,41,.96), rgba(21,24,41,.7) 70%, transparent);

  /* register */
  --card-bg: var(--surface);
  --focus-ring: 0 0 0 2px color-mix(in oklab, var(--gold), transparent 40%);

  --ranking-top3-bg: rgba(189, 151, 64, 0.158);
  --ranking-top3-border: var(--ring-gold);
  --feed-card-bg: color-mix(in oklab, var(--surface), #1839a56c 14%);

  /* Filtre feed (variables, pas style composant) */
  --feed-filter-bg: rgb(14, 31, 56);
  --feed-filter-fg: var(--muted);

}

/* ///////////////////////////////////////////////////// Thème clair ////////////////////////////////////////////// */
html[data-theme="light"]{
  --bg: #f1f1e7;
  --text: #1b1b61;
  --gold: #BD9840;
  --line: #00000022;
  --surface: #ffffff;

  --header-bg: linear-gradient(to bottom,
    rgba(151, 148, 104, 0.11),
    rgba(110, 110, 107, 0) 100%,
    transparent);
  --header-border: #ffffffc5;

  --nav-bg: rgba(0, 0, 0, 0.048);
  --nav-border: rgba(0, 0, 0, 0.13);
  --nav-hover: rgba(0,0,0,.05);
  --nav-active-bg: rgba(189,152,64,.16);
  --nav-active-shadow: 0 0 0 1px rgba(189,152,64,.28) inset;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.288);

  --overlay: rgba(0,0,0,.35);
  --drawer-bg: #f1f1e7;
  --drawer-border: rgba(0,0,0,.08);

  --banner-bg: rgb(236, 227, 204);
  --banner-border: rgba(255, 255, 255, 0.747);

  --muted: #5E6280;
  --on-gold: #151829;
  --ring-gold: rgba(189,152,64,.35);

  --dropdown-bg: #fff;
  --dropdown-shadow: 0 10px 24px rgba(0,0,0,.18);

  --footer-cta-bg: linear-gradient(180deg,
    rgba(241,241,231,0) 0%,
    rgba(241,241,231,.85) 35%,
    rgba(241,241,231,1) 100%
  );

  --badge-bg:#F4F4EC;
  --badge-veil: linear-gradient(180deg, transparent, rgba(226, 225, 152, 0.247));
  --popover-bg:#ffffff;
  --popover-shadow: 0 10px 26px rgba(0,0,0,.18);

  --hint-bg: rgba(240, 240, 240, 0.596);
  --hint-border: rgba(0,0,0,.12);
  --hint-shadow: 0 6px 16px rgba(0,0,0,.10);

  --list-bg: color-mix(in oklab, var(--surface), transparent 8%);
  --list-row: color-mix(in oklab, var(--surface), black 2%);
  --tip-shadow: 0 10px 22px rgba(0,0,0,.18);

  --thumb-bg:#ECEBE4;
  --modal-bg:#fff;
  --modal-shadow: 0 18px 44px rgba(0,0,0,.18);
  --btn-ghost-bg: rgba(0,0,0,.03);
  --btn-ghost-bg-hover: rgba(0,0,0,.06);

  --ranking-top3-bg: rgba(211, 200, 46, 0.068);
  --ranking-top3-border: rgba(189,152,64,0.6);

  --feed-card-bg: color-mix(in oklab, var(--surface), #d1d1d1 6%);
  --feed-filter-bg: rgba(243, 226, 128, 0.192);
  --feed-filter-fg: var(--muted);

}

/* (Optionnel) forcer la compat UA */
@media (prefers-color-scheme: dark){ :root{ color-scheme: dark; } }
@media (prefers-color-scheme: light){ html[data-theme="light"]{ color-scheme: light; } }

/* ===== Thème : transition douce au switch ===== */
html.nn-theme-anim, html.nn-theme-anim *{
  transition:
    background-color .22s ease,
    color .22s ease,
    border-color .22s ease,
    box-shadow .22s ease,
    fill .22s ease,
    stroke .22s ease !important;
}
@media (prefers-reduced-motion: reduce){
  html.nn-theme-anim, html.nn-theme-anim *{ transition:none !important; }
}

/* ===== Badge vérifié : taille / anim ===== */
.badge-verified svg,
.v-badge svg{
  width:20px;
  height:20px;
  display:block;
  filter: drop-shadow(0 2px 4px rgba(189, 152, 64, 0.4));
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), filter .3s ease;
  transform: rotate(15deg);
}


/* Checkmark réduit globalement */
.badge-check {
  stroke: #ffffff;
  transform: scale(0.75);
  transform-origin: center;
  transition: stroke .22s ease;
}
/* Row pseudo */
.pseudo-row, .username-row{
  display:flex;
  align-items:center;
  gap:3px;
}

/* Hover badge */
.pseudo-row:hover .v-badge svg,
.pseudo-row:hover .badge-verified svg,
.username-row:hover .v-badge svg,
.username-row:hover .badge-verified svg,
.suggestion:hover .v-badge svg{
  transform: scale(1.2) rotate(15deg);
  filter: drop-shadow(0 4px 12px rgba(189, 152, 64, 1))
          drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}

/* Checkmark adaptatif selon thème */
.badge-check{
  stroke:#ffffff;
  transition: stroke .22s ease;
}
html[data-theme="light"] .badge-check{
  stroke:#f2f4ff;
}
/* ===== Badge Premium : plume dorée ===== */
.badge-premium,
.p-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.badge-premium svg,
.p-badge svg {
  width: 16px;
  height: 16px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(189, 152, 64, 0.5));
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), filter .3s ease;
}
.p-badge[hidden] {
  display: none !important;
}
/* Hover badge premium */
.pseudo-row:hover .p-badge svg,
.pseudo-row:hover .badge-premium svg,
.username-row:hover .p-badge svg,
.username-row:hover .badge-premium svg,
.suggestion:hover .p-badge svg {
  transform: scale(1.15) rotate(-5deg);
  filter: drop-shadow(0 4px 12px rgba(189, 152, 64, 1))
          drop-shadow(0 0 20px rgba(255, 215, 0, 0.6));
}
/* ===== HEADER (global) ===== */
header, .header{
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(3px);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.brand img.wordmark{
  height:24px;
  width:auto;
  display:block;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.35));
}

/* ===== AVATAR BUTTON (global) ===== */
.avatar-btn{
  width:35px;height:35px;border-radius:70%;
  border:1px solid rgba(189,152,64,.55);
  display:flex;align-items:center;justify-content:center;
  background:transparent;color:var(--gold);
  cursor:pointer;
  box-shadow: 0 0 10px rgba(189,152,64,.15) inset;
  overflow:hidden;padding:0;line-height:0;
  -webkit-appearance:none;appearance:none;
  transition: opacity 0.9s ease;
}
.avatar-btn img{ width:100%; height:100%; object-fit:cover; display:block; object-position:center;border-radius:50%; }
.avatar-bg{ background-position:center; background-size:cover; background-repeat:no-repeat; overflow:hidden; }
.avatar-bg img{ display:none; }
.avatar-btn.skeleton {  opacity: 0;}
.avatar-btn:not(.skeleton) {  opacity: 1;}

/* ===== BOTTOM NAV (global) ===== */
.bottom-nav{
  position: fixed;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 25;
  display:flex;
  justify-content:center;
  pointer-events:none;
}
.nav-wrap{
  pointer-events:auto;
  display:flex;gap:8px;
  justify-content:space-between;
  align-items:center;
  width:min(92%,560px);
  padding:10px 12px;
  background:var(--nav-bg);
  border:1px solid var(--nav-border);
  border-radius:18px;
  box-shadow:var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow:hidden;
}
.nav-item{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  color:var(--muted);
  text-decoration:none;
  font-size:11px;
  font-weight:700;
  padding:6px 0;
  border-radius:10px;
  transition: filter .15s, background .15s;
}
.nav-item:hover{ filter:brightness(1.1); background:var(--nav-hover); }
.nav-item.active{
  color:var(--gold);
  background:var(--nav-active-bg);
  box-shadow:var(--nav-active-shadow);
}
.nav-item svg{ width:32px;height:32px;stroke:currentColor; }
.nav-item.active:hover{ filter:brightness(1.06); }

/* ===== DRAWER (global) ===== */
.drawer{ position:fixed; inset:0; z-index:40; pointer-events:none; }
.drawer.open{ pointer-events:auto; }
.drawer .overlay{ position:absolute; inset:0; background:var(--overlay); opacity:0; transition: opacity .3s ease; }
.drawer.open .overlay{ opacity:1; }
.drawer .panel{
  position:absolute; top:0; right:0; bottom:0; left:auto;
  width:60%; max-width:360px;
  padding:16px;
  background:var(--drawer-bg);
  border-left:1px solid var(--drawer-border);
  transform: translateX(100%);
  transition: transform 1.2s cubic-bezier(0.25,1,0.3,1);
  color:var(--text);
}
.drawer.open .panel{ transform: translateX(0); }

/* Drawer - Profile */
.panel .profile{ display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.pfp{
  width:40px;height:40px;border-radius:50%;
  border:1px solid rgba(189, 152, 64, .55);
  overflow:hidden;display:flex;align-items:center;justify-content:center;
  background:var(--surface);
}
.pfp img{ width:100%; height:100%; object-fit:cover; }
.pfp .i{ font-weight:800; color:var(--gold); }
.pseudo{ font-weight:800; color:var(--gold); font-size:18px; }
.muted{ opacity:.7; font-size:12px; margin-top:2px; }

/* ===== SEARCH BAR (drawer) ===== */
.search{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  margin:8px 0 14px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 10px;
  background:var(--surface);
}
.search input{
  flex:1 1 auto;
  min-width:0;
  background:transparent;
  border:0;
  outline:none;
  color:var(--text);
  font-family:inherit;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:14px;
}
.search svg{
  width:18px;height:18px;flex:0 0 18px;min-width:18px;
  stroke:var(--muted);
}

/* ===== SUGGESTIONS (dropdown) ===== */
.suggestions{
  position:absolute;
  top: calc(100% + 6px);
  left:0; right:0;
  background:var(--drawer-bg);
  border:1px solid var(--drawer-border);
  border-radius:10px;
  max-height:260px;
  overflow:auto;
  padding:6px;
  box-shadow:var(--shadow);
  z-index:60;
  color:var(--text);
}
.suggestion{
  display:flex;
  align-items:center;
  gap:0px;
  padding:8px;
  border-radius:8px;
  cursor:pointer;
}
.suggestion:hover{ background:var(--nav-hover); }
/* espace uniquement entre la pp et le contenu texte */
.suggestion .pfp-xxs{
  margin-right:5px;    /* ✅ ajuste ici (8-12px selon ton goût) */
}

/* pseudo + badge collés comme avant */
.suggestion > span{
  margin: 1px;;
}
.pfp-xxs{
  width:24px;height:24px;border-radius:50%;
  overflow:hidden;display:flex;align-items:center;justify-content:center;
  background:var(--surface);
}
.pfp-xxs img{ width:100%; height:100%; object-fit:cover; display:block; }

/* ===== MENU (drawer) ===== */
.menu{ display:flex; flex-direction:column; gap:6px; margin-top:6px; }
.menu a{
  display:flex; align-items:center; gap:10px;
  color:var(--text);
  text-decoration:none;
  padding:10px 8px;
  border-radius:10px;
}
.menu a:hover{ background:var(--nav-hover); }
.menu svg{ width:18px;height:18px; stroke:var(--muted); }

/* ===== LOGOUT (drawer) ===== */
.logout{
  margin-top:18px;
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:0;
  font-weight:800;
  font-size:16px;
  cursor:pointer;
  font-family:inherit;
  background:var(--gold);
  color:var(--on-gold);
}
.logout:hover{ filter:brightness(1.08); box-shadow:0 0 8px rgba(189,152,64,.45); }
.logout:active{ transform:scale(.98); }

/* ===== BOUTONS STANDARDS (global) ===== */
.btn{
  appearance:none;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--text);
  padding:8px 14px;
  border-radius:12px;
  cursor:pointer;
  font-family:inherit;
  font-weight:700;
  font-size:14px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  transition: background .15s ease, border-color .15s ease, filter .15s ease, transform .08s ease;
}
.btn:hover{ background:var(--nav-hover); border-color: rgba(189,152,64,.55); }
.btn:active{ transform:scale(.98); }
.btn:focus-visible{ outline:2px solid rgba(189,152,64,.55); outline-offset:2px; }

.btn-primary{
  background:var(--gold);
  color:var(--on-gold);
  border-color: rgba(189,152,64,.55);
  box-shadow: var(--btn-primary-shadow, 0 0 18px rgba(189,152,64,.25));
}
.btn-primary:hover{ filter:brightness(1.07); background:var(--gold); }

.btn-ghost{
  background: var(--btn-ghost-bg);
}
.btn-ghost:hover{
  background: var(--btn-ghost-bg-hover);
  border-color: color-mix(in oklab, var(--gold), var(--line) 65%);
}

.btn-danger{
  background: var(--danger);
  color: var(--on-danger);
  border-color: color-mix(in oklab, var(--danger), white 25%);
}
.btn-danger:hover{ background: var(--danger-hover); }
.btn-danger:active{ background: var(--danger-active); }

.btn-sm{ padding:6px 10px; font-size:12px; border-radius:10px; }
.btn-lg{ padding:12px 16px; font-size:16px; border-radius:14px; }

/* Bouton "View on globe" plus compact */
.btn-globe{
  appearance:none;
  border:1px solid rgba(189,152,64,.40);
  background:var(--surface);
  color:var(--text);
  padding:3px 6px;
  border-radius:999px;
  cursor:pointer;
  font-family:"Lisu Bosa",serif;
  font-weight:700;
  font-size:12px;
  line-height:1;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top: 8px;
}

.btn-globe:hover{
  background:var(--nav-hover);
  border-color: rgba(189,152,64,.55);
}

.btn-globe:active{
  transform: scale(.98);
}

.btn-globe:focus-visible{
  outline: 1px solid rgba(189,152,64,.45);
  outline-offset: 2px;
}
/* ===== SELECT (global) ===== */
.select{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--text);
  font-family:inherit;
  outline:none;
}
.select:focus-visible{
  border-color: color-mix(in oklab, var(--gold), var(--line) 55%);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--gold), transparent 85%);
}
.select--pill{
  width:auto;
  border-radius:999px;
  padding:2px 22px 2px 8px;
  font-size:10px;
  opacity:.9;
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background-image:
    linear-gradient(45deg, var(--muted) 50%, transparent 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%;
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
}
.select--sm{ font-size:10px; }

/* ===== CARDS (global) ===== */
.card{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 14px;
  margin:10px 0;
}
.card .title{ color:var(--gold); font-weight:800; font-size:18px; margin:0 0 6px; }
.card .meta{ opacity:.75; font-size:12px; margin-bottom:6px; }
.card p{ margin:0; opacity:.9; }

/* feed card */
.card.feed-card{
  position:relative;
  background: var(--feed-card-bg);
}

/* tag type sur feed card */
.feed-type{
  position:absolute;
  top:10px;
  right:12px;
  font-size:12px;
  padding:3px 8px;
  border-radius:10px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--muted);
  opacity:.9;
  white-space:nowrap;
  pointer-events:none;
}

/* top3 ranking */
.ranking-top3{
  background: var(--ranking-top3-bg);
  border-color: var(--ranking-top3-border, var(--line));
}

/* ===== UTILITIES (global) ===== */
.hidden{ display:none !important; }
.nn-hidden{ display:none !important; }
.v-badge[hidden]{ display:none !important; }

/* A11y focus */
a:focus-visible,
button:focus-visible,
input:focus-visible{
  outline:2px solid rgba(189,152,64,.55);
  outline-offset:2px;
}

/* ===== BANNIÈRE (global) ===== */
.nn-banner{
  background:var(--banner-bg);
  border:1px solid var(--banner-border);
  color:var(--text);
  border-radius:16px;
  padding:14px 16px;
  margin:12px auto 18px;
  max-width:820px;
  box-shadow:var(--shadow);
}
.nn-banner__title{
  font-family:"EB Garamond", serif;
  color:var(--gold);
  font-size:20px;
  margin-bottom:6px;
}
.nn-banner__text{ line-height:1.45; opacity:.95; }

/* ===== MODAL SIGNALER (global) ===== */
.foot-actions{ display:flex; justify-content:flex-end; margin-top:10px; }
.report{
  font-size:10px;
  display:inline-flex;
  align-items:center;
  gap:2px;
  padding:6px 8px;
  color:var(--gold);
  text-decoration:none;
}
.report:hover{ text-decoration:underline; }
.report:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:2px;
  border-radius:6px;
}
.report .ico{ width:11px; height:11px; display:block; }

.report-modal{
  position:fixed;
  inset:0;
  display:none;
  z-index:1000;
  align-items:center;
  justify-content:center;
}
.report-modal.open{ display:flex; }
.report-backdrop{
  position:absolute;
  inset:0;
  background: var(--modal-backdrop, rgba(0,0,0,.55));
  backdrop-filter: blur(2px);
}
.report-panel{
  position:relative;
  width:min(560px, 92%);
  max-height:min(90vh, 680px);
  overflow:auto;
  background: var(--modal-bg, #121423);
  border:1px solid var(--modal-border, var(--line));
  border-radius:12px;
  padding:14px 16px;
  box-shadow: var(--modal-shadow, 0 20px 60px rgba(0,0,0,.45));
}
body.modal-open{ overflow:hidden; }

.report-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:8px;
}
.report-close{
  background:transparent;
  border:0;
  color:var(--text);
  font-size:22px;
  cursor:pointer;
}

.report-form .label{
  font-size:12px;
  opacity:.8;
  display:block;
  margin-bottom:4px;
}
.report-form .input{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--text);
  font-family:inherit;
  outline:none;
}
.report-form .input::placeholder{
  color: color-mix(in oklab, var(--muted), transparent 10%);
}
.report-form .input:focus-visible{
  border-color: color-mix(in oklab, var(--gold), var(--line) 55%);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--gold), transparent 85%);
}
.report-form textarea.input{
  min-height:90px;
  resize:vertical;
}

.report-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:12px;
}

/* select interne modal report */
.report-form select.input{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  padding-right:38px;
  cursor:pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    100% 0;
  background-size: 6px 6px, 6px 6px, 2.6em 2.6em;
  background-repeat:no-repeat;
}
.report-form select.input option{
  background: var(--surface);
  color: var(--text);
}

/* ===== SKELETON LOADING (global) ===== */
.skeleton{
  background: linear-gradient(
    90deg,
    rgba(189, 152, 64, 0.05) 0%,
    rgba(189, 152, 64, 0.15) 50%,
    rgba(189, 152, 64, 0.05) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.8s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position:-200% 0; }
}
.avatar-btn.skeleton{
  background: linear-gradient(
    135deg,
    rgba(189, 152, 64, 0.08) 0%,
    rgba(189, 152, 64, 0.18) 50%,
    rgba(189, 152, 64, 0.08) 100%
  );
  background-size: 200% 200%;
  animation: skeleton-shimmer 2s ease-in-out infinite;
  border-radius: 50%; 
}

/* ===== Validation inputs ===== */
.input-error{
  border-color:#ef4444 !important;
  box-shadow:0 0 0 2px rgba(239,68,68,.2) !important;
}
.validation-error{
  color:#ffb4b4;
  font-size:13px;
  margin-top:4px;
  margin-bottom:8px;
  display:block;
  animation: slideDown .2s ease;
}
@keyframes slideDown{
  from{ opacity:0; transform: translateY(-4px); }
  to{ opacity:1; transform: translateY(0); }
}

/* ===== Error Handler - Toasts ===== */
.nn-toast-container{
  position:fixed;
  top:20px;
  right:20px;
  z-index:9999;
  display:flex;
  flex-direction:column;
  gap:12px;
  max-width:400px;
  pointer-events:none;
}
.nn-toast{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px 16px;
  border-radius:12px;
  box-shadow:0 8px 24px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.15);
  backdrop-filter: blur(8px);
  opacity:0;
  transform: translateX(400px);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  pointer-events:auto;
  max-width:100%;
}
.nn-toast--show{ opacity:1; transform: translateX(0); }
.nn-toast--hide{ opacity:0; transform: translateX(400px); }

.nn-toast--critical{
  background: linear-gradient(135deg, rgba(239,68,68,.95) 0%, rgba(220,38,38,.95) 100%);
  border:1px solid rgba(254,202,202,.3);
  color:#fff;
}
.nn-toast--warning{
  background: linear-gradient(135deg, rgba(245,158,11,.95) 0%, rgba(217,119,6,.95) 100%);
  border:1px solid rgba(254,243,199,.3);
  color:#fff;
}
.nn-toast--info{
  background: linear-gradient(135deg, rgba(34,197,94,.95) 0%, rgba(22,163,74,.95) 100%);
  border:1px solid rgba(187,247,208,.3);
  color:#fff;
}
.nn-toast__icon{
  flex-shrink:0;
  width:24px;height:24px;
  display:flex;align-items:center;justify-content:center;
}
.nn-toast__icon svg{ width:100%; height:100%; stroke: currentColor; }
.nn-toast__message{ flex:1; font-size:14px; line-height:1.5; font-weight:500; }
.nn-toast__close{
  flex-shrink:0;
  width:24px;height:24px;
  padding:0;border:none;
  background:transparent;
  color:inherit;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  opacity:.7;
  transition: opacity .2s;
  border-radius:4px;
}
.nn-toast__close:hover{ opacity:1; background: rgba(255,255,255,.1); }

/* Mobile toast */
@media (max-width:640px){
  .nn-toast-container{
    top:auto;
    bottom:20px;
    left:16px;
    right:16px;
    max-width:none;
  }
  .nn-toast{ transform: translateY(400px); }
  .nn-toast--show{ transform: translateY(0); }
  .nn-toast--hide{ transform: translateY(400px); }
}

/* SVG insta */
#linkInsta svg,
#linkInsta svg *{
  fill:none !important;
  stroke: currentColor;
}
/* =========================
   COMMON UI (rank/tabs/chips/badges/drawer)
   ========================= */

/* Helpers */
.hidden{display:none!important}

/* Tabs */
.tabs{display:flex;gap:6px;justify-content:center;margin:16px 0 8px}
.tab{
  font-family:"Lisu Bosa",serif;
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:800;
  border:1px solid rgba(189,152,64,.45);
  color:var(--gold);
  background:transparent;
}
.tab.active{background:var(--nav-active-bg);box-shadow:var(--nav-active-shadow)}

/* Panels */
.panel{
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  padding:12px 14px;
}

/* Rank list */
.rank-list{display:flex;flex-direction:column;gap:6px}
.rank-row{
  display:grid;
  grid-template-columns:minmax(80px,15%) 36px 1fr 72px;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:12px;
  text-decoration:none;
  color:inherit;
}
.rank-row:hover{background:var(--nav-hover)}
.rank-row:focus-within{ outline:1px solid rgba(189,152,64,.45); outline-offset:2px; border-radius:12px; }
.rank-row[aria-disabled="true"]{pointer-events:none;opacity:.6}
.rank-pos{
  width:40px;height:40px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  font-weight:800;color:var(--gold);
  border:1px solid rgba(189,152,64,.45);
  background:rgba(189,152,64,.08);
}
.rank-flag{display:flex;align-items:center;justify-content:center;width:36px;height:36px}
.flag-wrap{width:28px;height:28px;border-radius:50%;background-size:cover;background-position:center;display:block}
.rank-country{font-family:"Marko One",serif;font-weight:200;color:var(--text)}
.rank-points{text-align:right;font-variant-numeric:tabular-nums;opacity:.9;color:var(--text)}

/* Criteria bar + chips */
.criteria-bar{
  justify-content:flex-start;
  display:flex;
  gap:8px;
  padding:0 2px 6px;
  overflow-x:auto;
  overflow-y:hidden;
  flex-wrap:nowrap;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x proximity;
}
.criteria-bar::-webkit-scrollbar{height:6px}
.criteria-bar::-webkit-scrollbar-thumb{background:#ffffff30;border-radius:999px}
@media (min-width: 550px){
  .criteria-bar{justify-content:center;overflow-x:visible}
}

.chip{
  flex:0 0 auto;
  padding:8px 12px;
  font-size:10px;
  border-radius:999px;
  border:1px solid rgba(189,152,64,.35);
  color:var(--gold);
  background:var(--surface);
  cursor:pointer;
  font-weight:700;
  letter-spacing:.2px;
  white-space:nowrap;
  scroll-snap-align:center;
  transition:background .15s ease, box-shadow .15s ease, transform .05s ease;
}
.chip:active{transform:scale(.98)}
.chip:hover{background:var(--nav-hover);box-shadow:0 0 0 1px rgba(189,152,64,.25) inset}
.chip.active{background:var(--nav-active-bg);box-shadow:var(--nav-active-shadow)}

/* Titles + badges grid */
.section-title{
  font-family:"EB Garamond",serif;
  color:var(--gold);
  font-weight:700;
  font-size:24px;
  margin:18px 0 8px;
  text-align:center;
}
.badges{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
.featured-badges{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:6px;
}
.featured-badges .item{
  width:100px;height:100px;
  border-radius:14px;
  background:var(--surface);
  border:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.featured-badges .item img{max-width:88%;max-height:88%;display:block}
.featured-badges .empty{opacity:.8;font-style:italic;padding:8px 4px;width:100%;text-align:center}

/* Drawer relations – et surtout l'espace PP -> pseudo SANS toucher pseudo -> badge */
.rel-item{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:0; /* important : pas d'espace global */
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
  background:var(--surface);
  text-decoration:none;
  color:inherit;
  cursor:pointer;
}
.rel-ava{
  width:38px;height:38px;border-radius:50%;
  overflow:hidden;border:1px solid var(--line);
  background:var(--thumb-bg,#0f1120);
  margin-right:12px; /* ✅ espace PP -> pseudo */
}
.rel-name-row{display:inline-flex;align-items:center;gap:3px;font-weight:700} /* ✅ pseudo -> badge reste serré */
/* =========================
   COMMON: link + relations drawer (modal)
   ========================= */

/* Lien "See all ... badges" */
.link{
  display:block;
  margin-top:8px;
  text-align:right;
  color:var(--gold);
  text-decoration:none;
  margin-bottom: 30px;
}
.link:hover{ text-decoration:underline; }
.link:focus{ outline:1px solid rgba(189,152,64,.45); outline-offset:2px; border-radius:10px; }

/* Drawer relations */
.rel-drawer{
  position:fixed;
  inset:0;
  display:none;
  z-index:40;
  align-items:center;
  justify-content:center;
}
.rel-drawer.open{ display:flex; }

.rel-backdrop{
  position:absolute;
  inset:0;
  background:var(--overlay, rgba(0,0,0,.55));
  backdrop-filter: blur(2px);
}

.rel-panel{
  position:relative;
  margin:auto;
  width:min(580px,92%);
  max-height:80vh;
  overflow:auto;
  background:var(--drawer-bg, var(--surface));
  border:1px solid var(--line);
  border-radius:12px;
  padding:14px;
  box-shadow: var(--shadow, 0 20px 60px rgba(0,0,0,.45));
  color:var(--text);
}

.rel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:8px;
}

.rel-title{
  font-family:"EB Garamond",serif;
  color:var(--gold);
  font-size:22px;
  margin:0;
}

.rel-close{
  background:transparent;
  border:0;
  color:var(--text);
  font-size:22px;
  cursor:pointer;
}

.rel-list{
  display:grid;
  gap:8px;
  max-height:65vh;
  overflow:auto;
  margin-top:8px;
}

.rel-search{
  display:flex;
  align-items:center;
  gap:8px;
  margin:6px 0 4px;
}

.rel-input{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--text);
  font-family:inherit;
  outline:none;
}

.rel-input::placeholder{
  opacity:.7;
  color:var(--text);
}

/* Verified dans le drawer */
.rel-verified{
  display:inline-flex;
  align-items:center;
  height:1em;
  color:var(--gold);
}
.rel-verified svg{
  width:16px;
  height:16px;
  display:block;
  transform: rotate(15deg);
}
.badge-check {
  stroke: #1a1f35;
}
/* (rappel) espace PP -> pseudo sans toucher pseudo -> badge */
.rel-ava{ margin-right:12px; }
.rel-name-row{ gap:3px; }


.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
  color: var(--gold);
}

.icon-btn:hover {
  border-color: rgba(189,152,64,.55);
  filter: brightness(1.06);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* ===== CUSTOM SELECT (partagé) ===== */
.custom-select-wrapper {
  position: relative;
}
.custom-select {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 8px 30px 8px 10px;
  background-color: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
}
.custom-select:hover {
  border-color: rgba(189,152,64,.35);
}
.custom-select:focus-visible {
  outline: 2px solid rgba(189,152,64,.55);
  outline-offset: 2px;
}
.custom-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: transform 0.2s ease;
}
.custom-select-wrapper.open .custom-select-arrow {
  transform: translateY(-50%) rotate(180deg);
}
.custom-select-arrow svg {
  width: 14px;
  height: 14px;
  stroke: var(--text);
  opacity: 0.7;
}
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}
.custom-select-wrapper.open .custom-select-dropdown {
  display: block;
}
.custom-select-option {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.custom-select-option:first-child { border-radius: 11px 11px 0 0; }
.custom-select-option:last-child  { border-radius: 0 0 11px 11px; }
.custom-select-option:hover {
  background: var(--nav-hover, rgba(189,152,64,.12));
}
.custom-select-option.selected {
  background: var(--nav-active-bg, rgba(189,152,64,.18));
  color: var(--gold);
  font-weight: 600;
}

/* ===== BADGE UNLOCK TOAST (partagé) ===== */
.badge-unlock-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background:
    linear-gradient(45deg, transparent 30%, rgba(255,255,255,.1) 50%, transparent 70%),
    linear-gradient(135deg, var(--gold) 0%, #d4a574 100%);
  background-size: 200% 100%, 100% 100%;
  color: #1a1f35;
  border: 3px solid #f4e4c1;
  box-shadow: 0 12px 32px rgba(189,152,64,.6), inset 0 1px 0 rgba(255,255,255,.5);
  padding: 20px 24px;
  border-radius: 16px;
  z-index: 99999;
  min-width: 300px;
  max-width: 90vw;
  animation: scale-fade 0.9s cubic-bezier(0.34,1.56,0.64,1), shimmer 3s infinite 0.9s;
}
@keyframes shimmer {
  0%, 100% { background-position: -200% 0, 0 0; }
  50% { background-position: 200% 0, 0 0; }
}
@keyframes scale-fade {
  0% { transform: scale(0.7) translateY(-20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.badge-unlock-content { display: flex; align-items: center; gap: 16px; }
.badge-unlock-icon {
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  animation: bounce 0.6s ease infinite alternate;
  flex-shrink: 0;
}
.badge-unlock-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.3)); }
.badge-unlock-placeholder { font-size: 48px; }
@keyframes bounce {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-10px) scale(1.1); }
}
.badge-unlock-text { flex: 1; }
.badge-unlock-text strong { display: block; font-size: 18px; font-weight: 800; margin-bottom: 6px; text-shadow: 0 2px 4px rgba(0,0,0,.2); color: #1a1f35; }
.badge-description { font-size: 14px; opacity: .9; line-height: 1.4; margin-top: 4px; color: #1a1f35; text-shadow: 0 1px 2px rgba(255,255,255,.5); }
.badge-unlock-close {
  position: absolute; top: 8px; right: 8px;
  background: rgba(255,255,255,.2); border: none; color: #1a1f35;
  width: 28px; height: 28px; border-radius: 50%; font-size: 20px;
  line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.badge-unlock-close:hover { background: rgba(255,255,255,.3); }
.badge-unlock-multiple { min-width: 350px; max-width: 450px; max-height: 80vh; overflow-y: auto; padding: 24px; }
.badge-unlock-header { font-size: 18px; font-weight: 800; margin-bottom: 16px; text-align: center; color: #1a1f35; }
.badge-unlock-list { display: flex; flex-direction: column; gap: 12px; }
.badge-unlock-item { display: flex; align-items: center; gap: 12px; padding: 10px; background: rgba(255,255,255,.15); border-radius: 10px; border: 1px solid rgba(255,255,255,.25); }
.badge-unlock-img-small { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); flex-shrink: 0; }
.badge-unlock-item strong { display: block; font-size: 15px; font-weight: 700; color: #1a1f35; margin-bottom: 2px; }
.badge-desc-small { font-size: 13px; opacity: .85; line-height: 1.3; color: #1a1f35; margin-top: 2px; }
.badge-desc-main { font-weight: 600; margin-top: 2px; }
.badge-desc-sub { font-size: .85em; opacity: .7; font-style: italic; }
.badge-unlock-item-text { display: flex; flex-direction: column; }
@media (max-width: 550px) {
  .badge-unlock-toast { right: 12px; left: 12px; min-width: auto; }
  .badge-unlock-icon { width: 64px; height: 64px; }
  .badge-unlock-text strong { font-size: 16px; }
  .badge-description { font-size: 13px; }
  .badge-unlock-multiple { min-width: auto; max-width: none; padding: 16px; }
  .badge-unlock-img-small { width: 40px; height: 40px; }
}

/* ===== REVIEW HIGHLIGHTS (Pros/Cons) - VERSION ÉPURÉE ===== */
.review-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 10px auto;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  font-size: 11px;
  max-width: 100%;
}

.highlights-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  align-items: stretch; /* ✅ Étire les items à la largeur de la colonne */
}

.highlight-item {
  padding: 6px 8px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--line);
  line-height: 1.3;
  box-sizing: border-box;
  word-wrap: break-word;
  width: 100%; /* ✅ Prend toute la largeur de la colonne */
}

.highlight-item.pro {
  color: #6b8e6b;
  border-left: 3px solid #6b8e6b;
}

.highlight-item.con {
  color: #c17a6b;
  border-left: 3px solid #c17a6b;
}

@media (max-width: 400px) {
  .review-highlights {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ===== BOUTON INFO (réutilisable) ===== */
.info {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--ring-gold);
  color: var(--gold);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: opacity 0.2s, transform 0.2s;
  vertical-align: middle;
  flex-shrink: 0;
}
.info::before {
  content: "i";
  font-weight: 800;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, serif;
  font-size: 14px;
}
.info:focus-visible { outline: 2px solid var(--ring-gold); outline-offset: 2px; }
