/* ============================================================
   NationalityLife — Design System v4
   Vintage Editorial · Refined & Cohesive
   Palette : papier crème / encre bleu-nuit / bordeaux passeport / or vieilli / forêt
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Serif+Display&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* === Couleurs === */
  --paper:        #f5efe1;
  --paper-light:  #fbf7ee;
  --paper-warm:   #ede2c8;
  --paper-shadow: #d8ccae;
  --ink:          #1a2332;
  --ink-soft:     #3a475e;
  --ink-mute:     #6c7688;
  --ink-light:    #a8b0be;
  --wine:         #8b1e2d;
  --wine-dark:    #5f0f1c;
  --wine-light:   #b6394a;
  --wine-tint:    rgba(139,30,45,0.08);
  --gold:         #c9a961;
  --gold-dark:    #9c7f3d;
  --gold-light:   #e8ce8f;
  --gold-tint:    rgba(201,169,97,0.12);
  --forest:       #4a7c59;
  --forest-dark:  #305a3d;
  --forest-tint:  rgba(74,124,89,0.10);
  --danger:       #b91c1c;
  --success:      #4a7c59;

  /* === Typo === */
  --serif:        'Playfair Display', 'Georgia', serif;
  --serif-alt:    'DM Serif Display', 'Georgia', serif;
  --sans:         'Inter', -apple-system, sans-serif;
  --mono:         'JetBrains Mono', monospace;

  /* === Spacing scale === */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* === Radius === */
  --r-xs: 3px;
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;

  /* === Elevation === */
  --el-1: 0 1px 2px rgba(29,20,15,0.04), 0 1px 3px rgba(29,20,15,0.06);
  --el-2: 0 2px 4px rgba(29,20,15,0.06), 0 4px 12px rgba(29,20,15,0.08);
  --el-3: 0 6px 12px rgba(29,20,15,0.08), 0 12px 32px rgba(29,20,15,0.10);
  --el-4: 0 12px 24px rgba(29,20,15,0.12), 0 24px 56px rgba(29,20,15,0.16);
  --el-focus: 0 0 0 3px rgba(139,30,45,0.18);
  --el-focus-forest: 0 0 0 3px rgba(74,124,89,0.20);

  /* === Motion === */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 120ms;
  --t-base: 180ms;
  --t-slow: 320ms;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  background-image:
    radial-gradient(at 15% 20%, rgba(201,169,97,0.10) 0px, transparent 40%),
    radial-gradient(at 85% 80%, rgba(139,30,45,0.06) 0px, transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.7' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.15 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* === Sélection texte === */
::selection { background: var(--wine); color: var(--paper-light); }
::-moz-selection { background: var(--wine); color: var(--paper-light); }

/* === Scrollbars custom === */
* { scrollbar-width: thin; scrollbar-color: var(--paper-shadow) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--paper-warm);
  border-radius: 5px;
  border: 2px solid var(--paper);
}
::-webkit-scrollbar-thumb:hover { background: var(--paper-shadow); }

/* === Focus visible cohérent === */
:focus { outline: none; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--el-focus);
  border-color: var(--wine) !important;
}

/* === Accessibilité motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a {
  color: var(--wine);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
a:hover { color: var(--wine-dark); }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
h1 { font-size: 40px; }
h2 { font-size: 26px; }
h3 {
  font-size: 12px;
  font-family: var(--sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--paper-warm);
  margin-bottom: 12px;
}

/* ============ BOUTONS ============ */
button {
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
  font-size: 14px;
  letter-spacing: 0.01em;
  background: transparent;
  color: inherit;
  position: relative;
  overflow: hidden;
  user-select: none;
}
button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Ripple subtile au clic (par défaut sur tous les boutons) */
button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.4) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-out);
}
button:active:not(:disabled)::after { opacity: 0.5; }

/* États du bouton "Passer 1 mois" */
.btn-primary.btn-exhausted {
  background: var(--paper-warm) !important;
  color: var(--wine-dark) !important;
  border: 1px dashed var(--wine) !important;
  box-shadow: none !important;
  font-weight: 600;
}
.btn-primary.btn-waiting {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border: 1px solid var(--ink-mute) !important;
  box-shadow: none !important;
  font-variant-numeric: tabular-nums;
}

.btn-primary {
  background: var(--wine);
  color: var(--paper-light);
  border-color: var(--wine);
  box-shadow: 0 2px 0 var(--wine-dark);
}
.btn-primary:hover:not(:disabled) {
  background: var(--wine-dark);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--wine-dark), 0 6px 20px rgba(139,30,45,0.20);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 0 0 var(--wine-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 2px 0 rgba(29,35,50,0.15);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper-light);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 rgba(29,35,50,0.20);
}
.btn-secondary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-danger {
  background: var(--wine-dark);
  color: white;
  border-color: var(--wine-dark);
  box-shadow: 0 2px 0 rgba(0,0,0,0.15);
}
.btn-danger:hover:not(:disabled) {
  background: #4a0a15;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 rgba(0,0,0,0.20);
}
.btn-danger:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }

.btn-success {
  background: var(--forest);
  color: white;
  border-color: var(--forest);
  box-shadow: 0 2px 0 var(--forest-dark);
}
.btn-success:hover:not(:disabled) {
  background: var(--forest-dark);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--forest-dark), 0 6px 20px rgba(74,124,89,0.20);
}
.btn-success:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 0 0 var(--forest-dark); }

/* Bouton doré (call-to-action premium) */
.btn-gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--ink);
  border-color: var(--gold-dark);
  box-shadow: 0 2px 0 var(--gold-dark);
  font-weight: 700;
}
.btn-gold:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--gold-dark), 0 6px 20px rgba(201,169,97,0.30);
}
.btn-gold:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 0 0 var(--gold-dark); }

/* ============ LAYOUT & CARDS ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6);
  animation: page-in var(--t-slow) var(--ease-out);
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--paper-light);
  border: 1px solid var(--paper-warm);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: var(--sp-5);
  box-shadow: var(--el-2);
  position: relative;
  transition: box-shadow var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out);
  animation: card-in var(--t-slow) var(--ease-out) both;
}
.card::before {
  content: '';
  position: absolute; top: -1px; left: 20px; right: 20px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
  transition: opacity var(--t-base) var(--ease-out);
}
.card:hover::before { opacity: 0.75; }

/* Stagger animation — chaque card entre avec un léger décalage */
.card:nth-of-type(1) { animation-delay: 0ms; }
.card:nth-of-type(2) { animation-delay: 60ms; }
.card:nth-of-type(3) { animation-delay: 120ms; }
.card:nth-of-type(4) { animation-delay: 180ms; }
.card:nth-of-type(5) { animation-delay: 240ms; }
.card:nth-of-type(n+6) { animation-delay: 300ms; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ HEADER ============ */
.header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 40px;
  background: rgba(251, 247, 238, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--paper-warm);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow var(--t-base) var(--ease-out);
}
.header::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 8px, transparent 8px 16px);
  opacity: 0.4;
  pointer-events: none;
}
body.scrolled .header { box-shadow: 0 4px 20px rgba(29,20,15,0.08); }

.header .brand {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
  transition: transform var(--t-fast) var(--ease-out);
}
.header .brand:hover { transform: scale(1.02); }
.header .brand .accent { color: var(--wine); font-style: italic; }

.header nav { display: flex; gap: 2px; align-items: stretch; }
.header nav a {
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  height: 100%;
  position: relative;
  transition: color var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
}
.header nav a:hover { color: var(--ink); background: var(--paper-warm); }
.header nav a.active { color: var(--wine); border-bottom-color: var(--wine); }
.header nav .nav-spacer { flex: 1 1 auto; min-width: 20px; }
.header nav a.admin-link {
  background: var(--wine); color: var(--paper-light);
  padding: 10px 16px;
  margin-left: 4px;
  border-bottom: 2px solid transparent;
  box-sizing: border-box;
  box-shadow: 0 2px 0 var(--wine-dark);
}
.header nav a.admin-link:hover {
  background: var(--wine-dark);
  color: var(--paper-light);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--wine-dark);
}
.header nav a.admin-link:active { transform: translateY(1px); box-shadow: none; }

/* ============ INPUTS ============ */
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  background: white;
  border: 1px solid var(--paper-shadow);
  color: var(--ink);
  border-radius: var(--r-sm);
  outline: none;
  font-family: inherit;
  transition: border-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
}
input:hover, select:hover, textarea:hover {
  border-color: var(--paper-shadow);
  background: #fefdf9;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--wine);
  box-shadow: var(--el-focus);
  background: white;
}
input::placeholder, textarea::placeholder {
  color: var(--ink-light);
  transition: opacity var(--t-fast) var(--ease-out);
}
input:focus::placeholder, textarea:focus::placeholder { opacity: 0.5; }

/* Fix des dropdowns options — texte sombre sur fond clair partout */
select { color: var(--ink) !important; background: white !important; }
select option {
  background: white !important;
  color: var(--ink) !important;
  padding: 8px !important;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.form-group { margin-bottom: 18px; }

/* ============ STATS GRID ============ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat {
  background: white;
  border: 1px solid var(--paper-warm);
  padding: 16px 18px;
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out);
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--el-2);
  border-color: var(--paper-shadow);
}
.stat::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; width: 4px;
  background: var(--gold);
  transition: width var(--t-base) var(--ease-out);
}
.stat:hover::before { width: 6px; }
.stat.coins::before { background: var(--gold); }
.stat.happy::before { background: #d94a8c; }
.stat.smart::before { background: #6b4dc7; }
.stat.health::before { background: var(--wine); }

.stat .label {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.stat .value {
  font-size: 30px;
  font-weight: 900;
  margin-top: 6px;
  font-family: var(--serif);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
/* Animation quand la valeur change (JS peut ajouter/retirer .bump) */
.stat .value.bump { animation: value-bump 500ms var(--ease-bounce); }
@keyframes value-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); color: var(--wine); }
  100% { transform: scale(1); }
}

.progress-bar { height: 5px; background: var(--paper-warm); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.progress-fill { height: 100%; transition: width 0.4s; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
@media (max-width: 780px) { .grid-2 { grid-template-columns: 1fr; } }

/* ============ COUNTRY CARDS - postcard style ============ */
.country-card {
  background: white;
  border: 1px solid var(--paper-warm);
  padding: 16px;
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
  position: relative;
  box-shadow: var(--el-1);
  overflow: hidden;
}
.country-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
}
.country-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: var(--el-3);
}
.country-card:hover::before { opacity: 1; }
.country-card:hover .flag { transform: scale(1.1) rotate(-3deg); }
.country-card.owned {
  background: linear-gradient(180deg, rgba(74,124,89,0.06), white);
  border-color: var(--forest);
}
.country-card.owned::after {
  content: '✓ OBTENUE';
  position: absolute; top: 14px; right: 14px;
  font-family: var(--serif); font-size: 10px; font-weight: 900;
  color: var(--forest); border: 2px solid var(--forest);
  padding: 3px 9px; border-radius: 3px;
  transform: rotate(-4deg);
  letter-spacing: 0.05em;
  background: var(--paper-light);
}
.country-card.current { border-left: 4px solid var(--gold); }

.country-card .flag {
  font-size: 36px; line-height: 1;
  transition: transform var(--t-base) var(--ease-bounce);
}
.country-card .name { font-weight: 900; font-size: 18px; font-family: var(--serif); color: var(--ink); }
.country-card .desc { font-size: 12.5px; color: var(--ink-mute); line-height: 1.5; }
.country-card .req-block {
  background: var(--paper);
  border: 1px solid var(--paper-warm);
  padding: 10px 12px; border-radius: 4px; font-size: 11px;
  color: var(--ink-mute); font-family: var(--mono);
}
.country-card .req-block .req-ok { color: var(--forest); }
.country-card .req-block .req-ko { color: var(--wine); }
.country-card .req-block > div { margin-bottom: 4px; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-diff { border: 1.5px solid; background: var(--paper-light); }
.diff-1 { color: var(--forest); border-color: var(--forest); }
.diff-2 { color: #7a8f3c; border-color: #7a8f3c; }
.diff-3 { color: var(--gold-dark); border-color: var(--gold-dark); }
.diff-4 { color: #b45f2c; border-color: #b45f2c; }
.diff-5 { color: var(--wine); border-color: var(--wine); }

/* ============ EVENTS LOG ============ */
.events { max-height: 340px; overflow-y: auto; padding-right: 4px; }
.events::-webkit-scrollbar { width: 6px; }
.events::-webkit-scrollbar-thumb { background: var(--paper-warm); border-radius: 3px; }
.event {
  padding: 10px 14px;
  border-left: 3px solid var(--gold);
  margin-bottom: 6px;
  font-size: 13px;
  background: white;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--ink);
  line-height: 1.5;
  box-shadow: var(--el-1);
  transition: transform var(--t-fast) var(--ease-out),
              border-left-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out);
}
.event:hover {
  transform: translateX(3px);
  border-left-color: var(--wine);
  box-shadow: var(--el-2);
}
/* Nouveau event (JS peut ajouter .new) : mise en valeur temporaire */
.event.new { animation: event-new 900ms var(--ease-out); }
@keyframes event-new {
  0%   { background: var(--gold-tint); transform: translateX(20px); opacity: 0; }
  30%  { transform: translateX(0); opacity: 1; }
  100% { background: white; }
}

/* ============ MODAL ============ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(26,35,50,0.55);
  z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: backdrop-in var(--t-base) var(--ease-out);
}
@keyframes backdrop-in {
  from { opacity: 0; backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); }
  to   { opacity: 1; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
}
.modal {
  background: var(--paper-light);
  border: 1px solid var(--paper-shadow);
  border-radius: var(--r-lg);
  padding: 32px;
  max-width: 500px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--el-4);
  animation: modal-in var(--t-slow) var(--ease-bounce);
  position: relative;
}
.modal::before {
  content: '';
  position: absolute; top: -1px; left: 24px; right: 24px; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============ TABS ============ */
.tabs {
  display: flex; gap: 4px; margin-bottom: var(--sp-6);
  border-bottom: 2px solid var(--paper-warm);
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--ink-mute);
  font-size: 13px;
  font-weight: 700;
  transition: color var(--t-fast) var(--ease-out),
              border-color var(--t-base) var(--ease-out),
              background var(--t-fast) var(--ease-out);
  margin-bottom: -2px;
  letter-spacing: 0.02em;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  white-space: nowrap;
  position: relative;
}
.tab:hover { color: var(--ink); background: var(--paper); }
.tab.active { color: var(--wine); border-bottom-color: var(--wine); }
.tab.active::before {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0; height: 2px;
  background: var(--wine);
  animation: tab-underline var(--t-slow) var(--ease-out);
}
@keyframes tab-underline {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--paper-warm); }
th {
  color: var(--ink-mute);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 700;
  background: var(--paper);
}
tr:hover td { background: var(--paper); }
td.mono { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

/* ============ TOASTS ============ */
.toast {
  position: fixed; top: 20px; right: 20px;
  background: var(--paper-light);
  border: 1px solid var(--paper-warm);
  border-left: 4px solid var(--gold);
  padding: 14px 20px;
  border-radius: var(--r-md);
  box-shadow: var(--el-3);
  z-index: 200;
  max-width: 380px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
  animation: toast-in var(--t-slow) var(--ease-bounce);
}
.toast.success { border-left-color: var(--forest); }
.toast.error { border-left-color: var(--wine); }
.toast.leaving { animation: toast-out var(--t-base) var(--ease-in-out) forwards; }

/* Stack les toasts multiples */
.toast + .toast { top: 84px; }
.toast + .toast + .toast { top: 148px; }

@keyframes toast-in {
  from { transform: translateX(400px) scale(0.9); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes toast-out {
  to { transform: translateX(400px) scale(0.9); opacity: 0; }
}
/* Kept for backward compatibility with existing JS animation refs */
@keyframes slideIn { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ============ SHOP PACKS ============ */
.pack {
  background: white;
  border: 1px solid var(--paper-warm);
  padding: 28px 20px;
  border-radius: var(--r-lg);
  text-align: center;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
  position: relative;
  box-shadow: var(--el-1);
  overflow: hidden;
}
.pack::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--gold-tint), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
  pointer-events: none;
}
.pack:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: var(--el-3);
}
.pack:hover::after { opacity: 1; }
.pack:hover .amount { color: var(--wine-dark); transform: scale(1.05); }
.pack .amount {
  font-size: 36px; font-weight: 900; font-family: var(--serif); color: var(--wine);
  transition: color var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
  position: relative; z-index: 1;
  font-variant-numeric: tabular-nums;
}
.pack .price {
  font-size: 20px; color: var(--ink); margin-top: 10px; font-weight: 700;
  position: relative; z-index: 1;
}
.pack.best {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(201,169,97,0.10), white);
  animation: pack-glow 3s ease-in-out infinite;
}
@keyframes pack-glow {
  0%, 100% { box-shadow: var(--el-1); }
  50%      { box-shadow: 0 0 24px rgba(201,169,97,0.35), var(--el-2); }
}
.pack.best::before {
  content: 'MEILLEURE OFFRE';
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold);
  color: white;
  font-size: 9px;
  padding: 4px 12px;
  border-radius: var(--r-xs);
  font-weight: 900;
  letter-spacing: 0.1em;
  box-shadow: 0 2px 6px rgba(201,169,97,0.4);
  z-index: 2;
}

.fake-notice {
  background: rgba(201,169,97,0.10);
  border: 1px dashed var(--gold-dark);
  padding: 14px 16px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--gold-dark);
  margin-top: 12px;
  line-height: 1.55;
}

/* Language skills display */
.lang-list { display: flex; flex-direction: column; gap: 6px; }
.lang-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--paper-warm);
  border-radius: 4px;
}
.lang-row .name { flex: 1; font-weight: 600; color: var(--ink); }
.lang-row .level {
  color: var(--wine);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
}
.lang-row button { padding: 5px 10px; font-size: 11px; }

.dots { display: inline-flex; gap: 3px; }
.dot { width: 8px; height: 8px; background: var(--paper-warm); border-radius: 50%; }
.dot.filled { background: var(--gold); }

/* Character header */
.char-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--paper-warm);
  margin-bottom: 22px;
  position: relative;
}
.char-header::after {
  content: ''; position: absolute; bottom: -1px; left: 40%; right: 40%; height: 1px;
  background: var(--gold);
}
.char-header .info h1 { font-size: 34px; }
.char-header .info p { color: var(--ink-mute); margin-top: 4px; font-size: 14px; }
.char-header .flags { text-align: right; }
.char-header .flags .label { font-size: 10px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; }
.char-header .flags .icons { font-size: 36px; margin-top: 8px; letter-spacing: 4px; }

.banned-banner {
  background: var(--wine);
  color: white;
  padding: 16px 24px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: 700;
  text-align: center;
}

/* Stripe-style payment */
.checkout-container {
  max-width: 480px; margin: 0 auto; padding: 36px;
  background: white; color: #1a1a1a; border-radius: 10px;
  font-family: var(--sans);
}
.checkout-container h1, .checkout-container h2 {
  color: #1a1a1a; font-family: var(--sans); font-weight: 700;
}
.checkout-container label { color: #6b7280; }
.checkout-container input { background: white; border: 1px solid #d1d5db; color: #1a1a1a; }
.checkout-container input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.15); }
.checkout-container .btn-primary { background: #6366f1; color: white; border-color: #6366f1; box-shadow: none; }
.checkout-container .btn-primary:hover:not(:disabled) { background: #4f46e5; }
.checkout-error {
  background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626;
  padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-top: 12px;
}
.stripe-badge {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; color: #6b7280; font-size: 11px; margin-top: 16px;
}

/* Quick actions in admin — REDESIGN */
.actions-menu {
  position: relative; display: inline-block;
}
.actions-menu > button.actions-trigger {
  background: var(--ink); color: white; border: none;
  padding: 8px 16px; border-radius: 6px; font-size: 12px;
  font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.actions-menu > button.actions-trigger:hover { background: var(--wine); }
.actions-dropdown {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: white; border: 1px solid var(--paper-warm);
  border-radius: 8px; padding: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  z-index: 50; min-width: 200px; display: none;
}
.actions-menu.open .actions-dropdown { display: block; }
.actions-dropdown button {
  display: block; width: 100%; text-align: left;
  padding: 8px 12px; background: transparent;
  border: none; color: var(--ink); font-size: 13px;
  cursor: pointer; border-radius: 4px;
  font-weight: 500;
}
.actions-dropdown button:hover { background: var(--paper); }
.actions-dropdown button.danger { color: var(--wine); }
.actions-dropdown button.danger:hover { background: rgba(139,30,45,0.08); }
.actions-dropdown hr { border: none; border-top: 1px solid var(--paper-warm); margin: 4px 0; }

/* Search bar */
.search-bar { display: flex; gap: 10px; margin-bottom: 18px; align-items: center; }
.search-bar input { flex: 1; }

/* ==================== PASSEPORTS (image réelle) ==================== */
.passport-photo {
  width: 100%; aspect-ratio: 88/125;
  border-radius: 6px; overflow: hidden;
  position: relative;
  background: var(--passport-color, #710518);
  box-shadow: 0 8px 20px rgba(60,50,30,0.25), 0 2px 4px rgba(60,50,30,0.15);
  border: 1px solid rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
}
.passport-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.passport-photo::after {
  content: ''; position: absolute; inset: 0;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.15);
  pointer-events: none;
}

/* ==================== CARTES D'IDENTITÉ ==================== */
.id-card {
  width: 100%; aspect-ratio: 8.56/5.4;
  border-radius: 6px; overflow: hidden;
  font-family: 'Inter', sans-serif;
  font-size: 8px; position: relative;
  box-shadow: 0 4px 12px rgba(60,50,30,0.18);
  border: 1px solid rgba(0,0,0,0.2);
  color: #1a1a1a;
}
.id-card .portrait {
  background: linear-gradient(180deg, #c5b8a0, #9e8e70);
  display: flex; align-items: center; justify-content: center;
  color: #5a4d38; border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.25);
}
.id-card .chip {
  background: linear-gradient(135deg, #d4af37, #a88a20);
  border-radius: 2px;
}
.id-card .field-lbl { font-size: 5.5px; text-transform: uppercase; letter-spacing: 0.04em; color: #556; font-weight: 700; }
.id-card .field-val { font-size: 8px; font-weight: 600; color: #1a1a1a; }
.id-fields { display: flex; flex-direction: column; gap: 2px; }
.id-fields > div { line-height: 1.15; }

.id-FR { background: linear-gradient(135deg, #eef2fa, #dde5f0); padding: 6px 8px; overflow: hidden; min-width: 0; }
.id-FR::before { content:''; position:absolute; inset:3px; border:1px solid #6a7a9c; border-radius:3px; pointer-events:none; }
.id-FR .head { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; gap:4px; position:relative; z-index:1; }
.id-FR .head > div { flex:1; text-align:center; min-width:0; overflow:hidden; }
.id-FR .rf-emblem { background:#1f2f6e; color:white; font-size:8px; padding:2px 4px; border-radius:2px; font-family:var(--serif); font-weight:900; flex-shrink:0; }
.id-FR .title { font-family:var(--serif); font-weight:900; font-size:9px; color:#1f2f6e; line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.id-FR .subtitle { font-size:5px; color:#333; letter-spacing:0.02em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px; }
.id-FR .eu-fr { background:#003399; color:#ffcc00; font-size:5.5px; padding:2px 4px; border-radius:2px; font-weight:700; flex-shrink:0; }
.id-FR .body { display:grid; grid-template-columns: 44px 1fr; gap:6px; margin-top:3px; position:relative; z-index:1; }
.id-FR .portrait { width:44px; height:56px; position:relative; background:linear-gradient(180deg, #c5b8a0, #9e8e70); border-radius:2px; border:1px solid rgba(0,0,0,0.25); overflow:hidden; display:flex; align-items:center; justify-content:center; }
.id-FR .portrait::after { content:'RF'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:rgba(88,140,88,0.55); font-family:var(--serif); font-size:18px; font-weight:900; pointer-events:none; }
.id-FR .id-fields { min-width:0; font-size:7px; overflow:hidden; }
.id-FR .id-fields > div { overflow:hidden; margin-bottom:2px; }
.id-FR .id-fields .field-lbl { font-size:5px; color:#666; text-transform:uppercase; letter-spacing:0.04em; font-weight:700; display:block; }
.id-FR .id-fields .field-val { font-size:7.5px; font-weight:700; color:#1a2340; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:0; }

.id-BE { background: linear-gradient(180deg, #e8ede2, #d5dcc9); padding: 6px 10px; }
.id-BE .head { display:flex; gap:8px; font-size:6.5px; font-weight:700; color:#333; margin-bottom:2px; }
.id-BE .head span { border-right:1px solid #666; padding-right:6px; }
.id-BE .head span:last-child { border:none; }
.id-BE .subtitle { font-size:6px; color:#555; margin-bottom:4px; letter-spacing:0.03em; }
.id-BE .body { display:grid; grid-template-columns:44px 1fr; gap:8px; margin-top:2px; position:relative; }
.id-BE .portrait { width:44px; height:56px; }
.id-BE .testcard { position:absolute; right:0; top:0; bottom:0; width:12px; writing-mode:vertical-rl; text-orientation:mixed; font-size:8px; font-weight:800; color:#333; letter-spacing:0.15em; display:flex; align-items:center; justify-content:center; }

.id-LU { background: linear-gradient(180deg, #dde5f0, #ccd6e5); padding: 6px 10px; color:#1a2340; }
.id-LU .head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:2px; }
.id-LU .head-langs { display:flex; gap:4px; font-size:5.5px; }
.id-LU .head-langs > div { line-height:1.2; }
.id-LU .head-langs .grand { font-weight:700; color:#1a2340; }
.id-LU .head-langs .sub { color:#555; }
.id-LU .letzebuerg { font-family:var(--serif); font-weight:900; font-size:8px; color:#1a2340; }
.id-LU .specimen-wm { position:absolute; left:8px; top:26px; font-family:var(--serif); font-weight:900; color:rgba(26,35,64,0.15); font-size:16px; letter-spacing:0.1em; }
.id-LU .body { display:grid; grid-template-columns:44px 1fr 20px; gap:6px; margin-top:2px; }
.id-LU .portrait { width:44px; height:56px; }
.id-LU .lion-wm { align-self:flex-end; justify-self:end; font-size:16px; line-height:1; filter:sepia(1) hue-rotate(-20deg) brightness(0.9); }

.id-DE { background: linear-gradient(135deg, #dfe4d0, #c6ceb2); padding: 6px 10px; color:#1a1a1a; }
.id-DE .head { display:flex; align-items:center; gap:6px; margin-bottom:2px; }
.id-DE .eu-de { background:#003399; color:#ffcc00; font-size:6px; font-weight:800; padding:2px 4px; border-radius:2px; letter-spacing:0.05em; }
.id-DE .title-de { font-family:var(--serif); font-weight:900; font-size:9px; color:#1f2f6e; letter-spacing:0.02em; }
.id-DE .subtitle-de { font-size:5.5px; color:#333; }
.id-DE .personalausweis { font-family:var(--serif); font-weight:700; font-size:8px; color:#1f2f6e; margin-top:1px; }
.id-DE .body { display:grid; grid-template-columns:44px 1fr; gap:8px; margin-top:2px; }
.id-DE .portrait { width:44px; height:56px; }
.id-DE .field-val { color:#0d7a3a; font-weight:700; }
.id-DE .muster-wm { position:absolute; right:8px; top:20px; font-family:sans-serif; color:rgba(31,47,110,0.2); font-weight:900; font-size:14px; transform:rotate(-15deg); letter-spacing:0.15em; }

.id-PT { background: linear-gradient(135deg, #f4f2e6, #e2dcc2); padding: 6px 10px; }
.id-PT::after { content:'☀️'; position:absolute; right:35%; top:30%; font-size:32px; opacity:0.2; filter:sepia(0.6); }
.id-PT .head { display:flex; align-items:center; gap:6px; margin-bottom:2px; }
.id-PT .portugal { font-family:var(--serif); font-weight:900; color:#1f4b8f; font-size:11px; }
.id-PT .subtitle-pt { font-size:5.5px; color:#333; letter-spacing:0.03em; }
.id-PT .eu-pt { background:#003399; color:#ffcc00; font-size:6px; font-weight:800; padding:2px 4px; border-radius:2px; }
.id-PT .small-portrait { width:18px; height:22px; background:linear-gradient(180deg, #a7a29a, #7a756c); border-radius:2px; }
.id-PT .body { display:grid; grid-template-columns:46px 1fr; gap:8px; margin-top:2px; }
.id-PT .portrait { width:46px; height:56px; filter:grayscale(0.6); }

.id-ES { background: linear-gradient(135deg, #f6f0d8, #e6d9a8); padding: 6px 10px; }
.id-ES .head { display:flex; align-items:center; gap:6px; margin-bottom:2px; }
.id-ES .flag-es { width:16px; height:10px; background: linear-gradient(180deg, #c60b1e 0 30%, #ffc400 30% 70%, #c60b1e 70%); border:1px solid #333; border-radius:1px; }
.id-ES .reino { font-family:var(--serif); font-weight:900; color:#003366; font-size:9px; }
.id-ES .dni-title { font-size:6px; color:#333; font-weight:700; letter-spacing:0.05em; }
.id-ES .especimen-wm { position:absolute; right:14px; top:30px; font-family:var(--serif); color:rgba(198,11,30,0.25); font-weight:900; font-size:12px; letter-spacing:0.1em; transform:rotate(-8deg); }
.id-ES .body { display:grid; grid-template-columns:44px 1fr; gap:8px; margin-top:2px; }
.id-ES .portrait { width:44px; height:56px; }

.id-IT { background: linear-gradient(135deg, #f0f4ea, #d8e2c9); padding: 6px 10px; }
.id-IT::before { content:''; position:absolute; top:0; left:0; right:0; height:4px; background: linear-gradient(90deg, #009246 0 33%, #ffffff 33% 66%, #ce2b37 66%); }
.id-IT .head { margin-top:3px; margin-bottom:2px; }
.id-IT .repub { font-family:var(--serif); font-weight:900; color:#0c3d68; font-size:10px; }
.id-IT .subtitle-it { font-size:6px; color:#333; letter-spacing:0.04em; }
.id-IT .body { display:grid; grid-template-columns:44px 1fr; gap:8px; margin-top:2px; }
.id-IT .portrait { width:44px; height:56px; }

.id-CH { background: linear-gradient(135deg, #f2f0eb, #e6e0d0); padding: 6px 10px; }
.id-CH .head { display:flex; justify-content:space-between; align-items:center; margin-bottom:2px; }
.id-CH .langs-ch { font-family:var(--serif); font-size:8px; color:#8b1e2d; letter-spacing:0.03em; font-weight:700; }
.id-CH .cross { width:12px; height:12px; background:#e30613; position:relative; border-radius:1px; }
.id-CH .cross::before, .id-CH .cross::after { content:''; position:absolute; background:white; }
.id-CH .cross::before { top:1.5px; bottom:1.5px; left:5px; right:5px; }
.id-CH .cross::after { left:1.5px; right:1.5px; top:5px; bottom:5px; }
.id-CH .id-title { font-size:6px; color:#333; letter-spacing:0.06em; font-weight:600; margin-bottom:3px; }
.id-CH .body { display:grid; grid-template-columns:44px 1fr; gap:8px; margin-top:2px; }
.id-CH .portrait { width:44px; height:56px; }
.id-CH::after { content:'⛰️'; position:absolute; right:12%; bottom:20%; font-size:24px; opacity:0.15; }

.id-CA { background: linear-gradient(135deg, #f5e8e8, #ecd7d7); padding: 6px 10px; }
.id-CA .head { display:flex; align-items:center; gap:6px; margin-bottom:2px; }
.id-CA .maple { font-size:14px; }
.id-CA .gov-ca { font-size:6.5px; color:#333; line-height:1.2; font-weight:600; }
.id-CA .card-title { font-family:var(--serif); font-weight:900; color:#1f4b8f; font-size:8px; margin-left:auto; text-align:right; letter-spacing:0.03em; }
.id-CA .body { display:grid; grid-template-columns:48px 1fr; gap:8px; margin-top:2px; position:relative; }
.id-CA .portrait { width:48px; height:60px; }
.id-CA .canada-mark { position:absolute; bottom:4px; right:8px; font-family:var(--serif); font-weight:900; color:#c0392b; font-size:11px; }
.id-CA::after { content:'🍁'; position:absolute; right:14%; top:38%; font-size:26px; opacity:0.2; }

.id-US { background: linear-gradient(180deg, #f0f0f0, #e0e5ec); padding: 0; overflow:hidden; }
.id-US .top-band { background: linear-gradient(90deg, #002868, #7d1f1f); color:white; padding:3px 8px; font-family:var(--serif); font-weight:900; font-size:9px; letter-spacing:0.1em; text-align:center; border-bottom:1px solid #b22234; }
.id-US .middle { padding:6px 10px; display:grid; grid-template-columns:44px 1fr; gap:8px; }
.id-US .portrait { width:44px; height:56px; }
.id-US .bottom-band { background: linear-gradient(90deg, #002868, #7d1f1f); color:white; padding:2px 8px; font-size:6.5px; letter-spacing:0.08em; text-align:center; font-weight:600; position:absolute; bottom:0; left:0; right:0; }
.id-US::before { content:'🦅'; position:absolute; right:10%; top:35%; font-size:32px; opacity:0.12; }

.id-JP { background: linear-gradient(135deg, #ffffff, #f5f0f0); padding: 8px 10px; border: 2px solid #bc002d; }
.id-JP .head { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.id-JP .title-jp { font-family:var(--serif); font-weight:900; font-size:9px; color:#1a1a1a; }
.id-JP .subtitle-jp { font-size:5.5px; color:#666; }
.id-JP .kiku { width:14px; height:14px; background:#bc002d; border-radius:50%; position:relative; box-shadow: 0 0 0 2px white, 0 0 0 3px #bc002d; }
.id-JP .body { display:grid; grid-template-columns:44px 1fr; gap:8px; margin-top:2px; }
.id-JP .portrait { width:44px; height:56px; }
.id-JP::after { content:'🌸'; position:absolute; right:14%; top:40%; font-size:22px; opacity:0.15; }

.id-AR { background: linear-gradient(135deg, #d8e6f0, #a8c7dd); padding: 6px 10px; }
.id-AR .head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:3px; }
.id-AR .rep-arg { font-size:6px; color:#003366; font-weight:700; line-height:1.2; }
.id-AR .doc-title { font-family:var(--serif); color:#003366; font-weight:900; font-size:8px; letter-spacing:0.05em; text-align:center; }
.id-AR .body { display:grid; grid-template-columns:44px 1fr 22px; gap:6px; margin-top:2px; }
.id-AR .portrait { width:44px; height:56px; filter:sepia(0.15); }
.id-AR .small-photos { display:flex; flex-direction:column; gap:2px; align-self:start; }
.id-AR .small-photo { width:20px; height:16px; background:linear-gradient(180deg, #7a90a8, #4e6580); border-radius:1px; }
.id-AR::after { content:'☀️'; position:absolute; right:20%; top:35%; font-size:24px; opacity:0.25; }

.id-BR { background: linear-gradient(135deg, #e8f2e0, #d5e3c3); padding: 6px 10px; }
.id-BR::before { content:''; position:absolute; top:0; right:0; width:32px; height:32px; background: linear-gradient(135deg, #ffdf00 30%, #009c3b 30%); clip-path: polygon(0 0, 100% 0, 100% 100%); opacity: 0.5; }
.id-BR .head { margin-bottom:3px; }
.id-BR .rep-br { font-family:var(--serif); font-weight:900; color:#005c2e; font-size:9px; letter-spacing:0.02em; }
.id-BR .subtitle-br { font-size:5.5px; color:#333; font-weight:600; }
.id-BR .body { display:grid; grid-template-columns:44px 1fr; gap:8px; margin-top:2px; }
.id-BR .portrait { width:44px; height:56px; }

.id-MT { background: linear-gradient(135deg, #f8f0f0, #ecd5d5); padding: 6px 10px; }
.id-MT .head { display:flex; align-items:center; gap:6px; margin-bottom:3px; }
.id-MT .maltese-cross { color:#c8102e; font-size:14px; }
.id-MT .rep-mt { font-family:var(--serif); font-weight:900; color:#7C1425; font-size:9px; }
.id-MT .subtitle-mt { font-size:6px; color:#333; letter-spacing:0.05em; }
.id-MT .body { display:grid; grid-template-columns:44px 1fr; gap:8px; margin-top:2px; }
.id-MT .portrait { width:44px; height:56px; }

.id-IE { background: linear-gradient(135deg, #e5f0e8, #c8dccc); padding: 6px 10px; }
.id-IE .head { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:3px; }
.id-IE .title-ie { font-family:var(--serif); color:#0d5a3a; font-weight:900; font-size:8px; line-height:1.15; }
.id-IE .subtitle-ie { font-size:5.5px; color:#333; line-height:1.15; }
.id-IE .body { display:grid; grid-template-columns:16px 1fr 40px; gap:6px; margin-top:2px; align-items:start; }
.id-IE .chip { width:12px; height:10px; margin-top:6px; }
.id-IE .portrait { width:40px; height:52px; }

/* Friends system */
.friend-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--paper-warm);
  border-radius: 6px;
  margin-bottom: 8px;
}
.friend-item .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--wine), var(--wine-dark));
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: white; font-family: var(--serif); font-size: 20px;
  flex-shrink: 0;
}
.friend-item .info { flex: 1; min-width: 0; }
.friend-item .info .name { font-weight: 700; font-size: 14px; color: var(--ink); }
.friend-item .info .meta { font-size: 11px; color: var(--ink-mute); }
.friend-item .actions { display: flex; gap: 4px; }
.friend-item .actions button { font-size: 11px; padding: 6px 10px; }

/* Documents doc-slot */
.doc-slot {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
  background: white;
  border: 1px solid var(--paper-warm);
  border-radius: 6px;
}
.doc-slot h4 {
  font-family: var(--serif); font-weight: 700; font-size: 16px;
  display: flex; align-items: center; gap: 8px; color: var(--ink);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--paper-warm);
}

/* ============ LANDING PAGE ============ */
.landing {
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.landing-nav {
  padding: 24px 40px;
  display: flex; justify-content: space-between; align-items: center;
}
.landing-nav .brand {
  font-family: var(--serif); font-size: 26px; font-weight: 900;
  color: var(--ink); letter-spacing: -0.02em;
}
.landing-nav .brand .accent { color: var(--wine); font-style: italic; }
.landing-hero {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 60px 24px 40px;
  position: relative;
}
.landing-eyebrow {
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.25em; font-weight: 700;
  color: var(--wine); margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.landing-eyebrow::before, .landing-eyebrow::after {
  content: ''; width: 28px; height: 1px; background: var(--wine);
}
.landing-title {
  font-family: var(--serif-alt); font-size: clamp(48px, 8vw, 88px);
  color: var(--ink); line-height: 1; letter-spacing: -0.03em;
  max-width: 900px; margin-bottom: 24px;
}
.landing-title .accent { color: var(--wine); font-style: italic; }
.landing-sub {
  font-size: 18px; color: var(--ink-soft);
  max-width: 620px; margin-bottom: 40px; line-height: 1.6;
}
.landing-cta {
  display: flex; gap: 14px; margin-bottom: 40px; flex-wrap: wrap; justify-content: center;
}
.landing-cta .btn-primary {
  font-size: 15px; padding: 14px 32px;
  box-shadow: 0 4px 0 var(--wine-dark), 0 8px 24px rgba(139,30,45,0.25);
}
.landing-decoration {
  font-size: 64px; margin-bottom: 30px;
  letter-spacing: 12px;
  filter: drop-shadow(0 4px 12px rgba(60,50,30,0.15));
}
.landing-features {
  background: white; padding: 80px 24px;
  border-top: 1px solid var(--paper-warm);
  border-bottom: 1px solid var(--paper-warm);
}
.landing-features-inner { max-width: 1100px; margin: 0 auto; }
.landing-features h2 {
  font-family: var(--serif); text-align: center;
  font-size: 40px; margin-bottom: 60px;
  color: var(--ink);
}
.landing-features-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.feature {
  text-align: center; padding: 0 12px;
}
.feature-icon {
  font-size: 44px; margin-bottom: 16px;
  display: inline-block;
  padding: 20px; background: var(--paper);
  border-radius: 50%; border: 2px solid var(--paper-warm);
}
.feature h3 {
  font-family: var(--serif); font-size: 20px; color: var(--ink);
  text-transform: none; letter-spacing: 0; padding: 0; border: none;
  font-weight: 700;
}
.feature p {
  color: var(--ink-mute); font-size: 14px; margin-top: 8px;
  line-height: 1.6;
}

.landing-footer {
  padding: 32px 24px; text-align: center;
  color: var(--ink-light); font-size: 12px;
}
.landing-footer .divider {
  color: var(--gold); letter-spacing: 8px;
  margin: 8px 0;
}

/* ============ VRAIS DRAPEAUX EN IMAGE ============ */
.flag-inline {
  display: inline-block;
  vertical-align: -3px;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  margin: 0 2px;
}

/* ============ NIVEAU / XP ============ */
.level-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, var(--wine), var(--wine-dark));
  color: white; border-radius: 12px;
  font-size: 12px; font-weight: 700;
  font-family: var(--serif);
}
.level-badge .lvl-num {
  background: white; color: var(--wine);
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900;
}
.xp-bar {
  height: 6px; background: var(--paper-warm);
  border-radius: 3px; overflow: hidden;
  margin-top: 4px;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  transition: width 0.6s ease;
}
.xp-info {
  font-size: 10px; color: var(--ink-mute);
  margin-top: 3px; display: flex; justify-content: space-between;
}

/* ============ ANIMATION AVION ============ */
.plane-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(180deg, #87ceeb 0%, #b7ddec 60%, #d4e8f0 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  animation: fade-in 0.3s;
}
@keyframes fade-in { from { opacity:0; } to { opacity:1; } }
.plane-overlay::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, white 0px, transparent 40px),
    radial-gradient(circle at 60% 20%, white 0px, transparent 30px),
    radial-gradient(circle at 85% 40%, white 0px, transparent 50px),
    radial-gradient(circle at 30% 60%, white 0px, transparent 35px),
    radial-gradient(circle at 75% 70%, white 0px, transparent 45px);
  opacity: 0.4;
  animation: clouds 15s linear infinite;
}
@keyframes clouds { from { background-position: 0 0; } to { background-position: -400px 0; } }
.plane {
  font-size: 80px;
  animation: fly 2.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  transform: translateX(-120vw);
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
  position: relative; z-index: 10;
}
@keyframes fly {
  0%   { transform: translateX(-120vw) translateY(20px) rotate(-2deg); }
  50%  { transform: translateX(0) translateY(-10px) rotate(0deg); }
  100% { transform: translateX(120vw) translateY(-30px) rotate(3deg); }
}
.plane-info {
  position: absolute; top: 30%; left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #1a2340; font-family: var(--serif);
  z-index: 20;
  background: rgba(255,255,255,0.9);
  padding: 20px 40px; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: bounce-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bounce-in { 0% { transform:translateX(-50%) scale(0); } 100% { transform:translateX(-50%) scale(1); } }
.plane-info .from { font-size: 12px; color: var(--ink-mute); }
.plane-info .arrow { font-size: 20px; color: var(--wine); margin: 4px 0; }
.plane-info .to { font-size: 28px; font-weight: 900; color: var(--ink); }
.plane-info .action { font-size: 14px; color: var(--ink-mute); margin-top: 8px; }

/* ============ BOARDING PASS ============ */
.boarding-pass {
  width: 100%;
  aspect-ratio: 3.2 / 1.2;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  display: flex;
  overflow: hidden;
  position: relative;
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
  min-height: 130px;
}
.bp-stub-left {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 14px 6px;
  border-right: 2px dashed #b0b0b0;
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 10px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}
.bp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}
.bp-band {
  background: var(--airline-color, #2563eb);
  color: white;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.bp-content {
  padding: 10px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bp-routes {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.bp-city {
  flex: 1;
  min-width: 0;
}
.bp-city .code {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 26px;
  color: #1a1a1a;
  line-height: 1;
}
.bp-city .name {
  font-size: 9px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bp-plane-sep {
  font-size: 22px;
  color: var(--airline-color, #2563eb);
  flex-shrink: 0;
}
.bp-details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  font-size: 10px;
  padding-top: 4px;
  border-top: 1px dotted #ccc;
}
.bp-details .lbl {
  font-size: 7px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.bp-details .val {
  font-weight: 700;
  font-size: 11px;
  color: #1a1a1a;
  margin-top: 1px;
}
.bp-stub-right {
  width: 28%;
  min-width: 80px;
  border-left: 2px dashed #b0b0b0;
  padding: 10px 12px;
  font-size: 9px;
  background: linear-gradient(180deg, #fafafa, #f0f0f0);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bp-stub-right .band {
  background: var(--airline-color, #2563eb);
  color: white;
  margin: -10px -12px 4px;
  padding: 4px 10px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.bp-stub-right .row-info { font-size: 9px; }
.bp-stub-right .row-info .lbl { color: #666; font-size: 7px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.bp-stub-right .row-info .val { font-weight: 700; font-size: 11px; color: #1a1a1a; }
.boarding-pass.lowcost { --airline-color: #4a7c59; }
.boarding-pass.premium { --airline-color: #8b1e2d; }

/* Airline logo dot */
.bp-airline-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

/* ============ ANIMATION DÉCHIRURE BILLET ============ */
.tear-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade-in 0.3s;
}
.tear-container {
  max-width: 600px; width: 100%;
  position: relative;
  perspective: 1000px;
}
.tear-header {
  text-align: center;
  color: white;
  margin-bottom: 20px;
  font-family: var(--serif);
  animation: fade-slide-down 0.6s 0.2s both;
}
.tear-header h2 { color: white; font-size: 26px; margin-bottom: 6px; text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
.tear-header p { color: rgba(255,255,255,0.7); font-size: 13px; }
@keyframes fade-slide-down {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Astuce : on décompose la boarding-pass en 2 sections (main + stub-right)
   déjà présentes. Pour l'animation, on cible ces deux sous-éléments. */
.tear-container .boarding-pass {
  transform-origin: center center;
  animation: pass-appear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
}
@keyframes pass-appear {
  from { opacity: 0; transform: scale(0.7) rotateX(30deg); }
  to { opacity: 1; transform: scale(1) rotateX(0); }
}

.tear-container.tearing .bp-main {
  animation: main-slide 1.4s 0.2s cubic-bezier(0.55, 0.1, 0.25, 1) forwards;
  transform-origin: left center;
}
.tear-container.tearing .bp-stub-right {
  animation: stub-tear 1.4s 0.2s cubic-bezier(0.55, 0.1, 0.25, 1) forwards;
  transform-origin: left center;
  position: relative;
  z-index: 2;
}
@keyframes main-slide {
  0%   { transform: translateX(0) rotate(0deg); }
  15%  { transform: translateX(-6px) rotate(-1deg); }
  30%  { transform: translateX(-3px) rotate(-0.5deg); }
  100% { transform: translateX(-40px) rotate(-3deg); opacity: 0.9; }
}
@keyframes stub-tear {
  0%   { transform: translateX(0) translateY(0) rotate(0deg); opacity: 1; }
  15%  { transform: translateX(0) translateY(6px) rotate(2deg); opacity: 1; }
  25%  { transform: translateX(30px) translateY(15px) rotate(8deg); opacity: 1; }
  100% { transform: translateX(200px) translateY(400px) rotate(45deg); opacity: 0; }
}

/* Ligne de déchirure qui s'illumine */
.tear-container.tearing .bp-stub-right::before {
  content: ''; position: absolute; left: -2px; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, transparent, #ffcc00, transparent);
  animation: tear-flash 0.4s 0.2s ease-out;
  filter: blur(2px);
}
@keyframes tear-flash {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

/* Confettis mini pour ambiance */
.tear-confetti {
  position: absolute; left: 50%; top: 50%;
  pointer-events: none;
}
.tear-confetti span {
  position: absolute;
  width: 8px; height: 12px;
  animation: confetti-burst 2s ease-out forwards;
  opacity: 0;
}
@keyframes confetti-burst {
  0% { opacity: 1; transform: translate(0,0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--tr)); }
}

.tear-status {
  text-align: center; color: white;
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  opacity: 0;
  animation: status-fade 0.6s 1.4s both;
}
@keyframes status-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ TRAVEL DASHBOARD (CHECKLIST) ============ */
.travel-dashboard {
  background: white;
  border: 1px solid var(--paper-warm);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 10px 0;
}
.travel-dashboard h4 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--paper-warm);
}
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 4px;
  transition: background 0.15s;
}
.check-item.ok { background: rgba(74,124,89,0.08); color: var(--ink); }
.check-item.ok .icon { color: var(--forest); }
.check-item.warn { background: rgba(212,150,42,0.08); color: var(--ink); }
.check-item.warn .icon { color: var(--gold-dark); }
.check-item.ko { background: rgba(139,30,45,0.08); color: var(--ink); }
.check-item.ko .icon { color: var(--wine); }
.check-item .icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
  background: white;
  border: 2px solid currentColor;
}
.check-item .content { flex: 1; min-width: 0; }
.check-item .title { font-weight: 700; font-size: 13px; }
.check-item .desc { font-size: 11px; color: var(--ink-mute); margin-top: 1px; }
.check-item .action-btn {
  background: var(--wine);
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 700;
}
.check-item .action-btn:hover { background: var(--wine-dark); }

/* ============ AÉROPORT TABS ============ */
.airport-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--paper-warm);
}
.airport-tab {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mute);
  margin-bottom: -2px;
}
.airport-tab.active {
  color: var(--wine);
  border-bottom-color: var(--wine);
}
.airport-tab:hover:not(.active) { color: var(--ink); }

/* ============ AÉROPORT ============ */
.airport-option {
  background: white;
  border: 2px solid var(--paper-warm);
  border-radius: 8px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.airport-option:hover {
  border-color: var(--wine);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(60,50,30,0.12);
}
.airport-option .ao-icon { font-size: 44px; margin-bottom: 8px; }
.airport-option .ao-title { font-family: var(--serif); font-weight: 900; font-size: 18px; color: var(--ink); }
.airport-option .ao-cost { color: var(--wine); font-weight: 700; margin-top: 4px; font-family: var(--serif); font-size: 16px; }
.airport-option .ao-desc { font-size: 11px; color: var(--ink-mute); margin-top: 6px; line-height: 1.4; }

/* ============ VISA STICKER ============ */
.visa-card {
  width: 100%; aspect-ratio: 16/10;
  background: linear-gradient(135deg, #f8f4e8, #e8dcbf);
  border: 2px solid var(--gold-dark);
  border-radius: 4px;
  padding: 8px 10px;
  position: relative;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
  color: #1a2340;
  box-shadow: 0 3px 8px rgba(60,50,30,0.15);
}
.visa-card::before {
  content: ''; position: absolute; inset: 3px;
  border: 1px dashed var(--gold-dark);
  border-radius: 2px; pointer-events: none;
}
.visa-card .visa-stamp {
  position: absolute; top: 20%; right: 8%;
  width: 40px; height: 40px;
  border: 2px solid var(--wine);
  border-radius: 50%;
  color: var(--wine);
  font-family: var(--serif); font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; text-align: center; line-height: 1;
  transform: rotate(-12deg);
  opacity: 0.8;
}
.visa-card .visa-header {
  font-family: var(--serif); font-size: 11px; font-weight: 900;
  color: var(--wine-dark); letter-spacing: 0.05em;
}
.visa-card .visa-sub { font-size: 7px; color: #555; letter-spacing: 0.06em; }
.visa-card .visa-body { margin-top: 6px; font-size: 8px; }
.visa-card .visa-body .field { margin-bottom: 2px; }
.visa-card .visa-body .field-lbl { font-size: 6px; text-transform: uppercase; color: #555; font-weight: 700; letter-spacing: 0.04em; }
.visa-card .visa-body .field-val { font-weight: 700; }

/* ============ COFFRE - PASS MENSUEL ============ */
.chest-pass {
  background: white; border: 2px solid var(--paper-warm);
  padding: 24px 20px; border-radius: 8px;
  text-align: center; position: relative;
  transition: all 0.2s;
}
.chest-pass:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(60,50,30,0.10); }
.chest-pass.active {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(74,124,89,0.2);
}
.chest-pass.active::after {
  content: 'ACTIF'; position: absolute; top: -12px; right: 12px;
  background: var(--forest); color: white; padding: 3px 10px;
  border-radius: 3px; font-size: 10px; font-weight: 900; letter-spacing: 0.1em;
}
.chest-pass .icon { font-size: 54px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }
.chest-pass .name { font-family: var(--serif); font-weight: 900; font-size: 18px; color: var(--ink); margin: 8px 0 4px; }
.chest-pass .price { font-family: var(--serif); font-size: 24px; color: var(--wine); font-weight: 900; }
.chest-pass .price small { font-size: 12px; color: var(--ink-mute); font-family: var(--sans); font-weight: 500; }
.chest-pass .drops-preview {
  display: flex; flex-wrap: wrap; gap: 3px;
  justify-content: center; margin-top: 12px;
}
.chest-pass .drops-preview .drop-pill {
  padding: 2px 6px; border-radius: 8px;
  font-size: 9px; font-weight: 700;
  border: 1px solid;
}
.chest-pass .desc {
  font-size: 11.5px; color: var(--ink-mute); margin: 10px 0;
  line-height: 1.4;
}

/* ============ BANDEAU VOYAGE ============ */
/* ============ BANDEAU RÉSIDENCE / VOYAGE ============ */
.travel-status {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: var(--sp-5);
  background: linear-gradient(90deg, var(--paper-light), white);
  border: 1px solid var(--paper-warm);
  border-left: 4px solid var(--wine);
  border-radius: var(--r-md);
  color: var(--ink);
  box-shadow: var(--el-2);
  transition: box-shadow var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.travel-status::before {
  content: '';
  position: absolute; top: 0; right: 0; width: 120px; height: 100%;
  background: radial-gradient(circle at right center, var(--wine-tint), transparent 70%);
  pointer-events: none;
}
.travel-status:hover {
  box-shadow: var(--el-3);
  transform: translateY(-1px);
}
.travel-status .travel-flag {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(29,20,15,0.15));
  transition: transform var(--t-base) var(--ease-bounce);
}
.travel-status .travel-flag img,
.travel-status .travel-flag .flag-inline {
  width: 48px !important;
  height: auto !important;
  border-radius: var(--r-xs);
  box-shadow: 0 2px 6px rgba(29,20,15,0.20);
}
.travel-status:hover .travel-flag { transform: scale(1.06) rotate(-3deg); }

.travel-status .travel-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.travel-status .travel-title {
  font-size: 13px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.travel-status .travel-country {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 22px;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.travel-status .travel-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin-top: 6px;
  font-size: 12.5px; color: var(--ink-soft);
}
.travel-status .travel-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.travel-status .travel-meta .meta-lbl {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.travel-status .travel-meta a {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 2px 8px;
  border: 1px solid var(--wine);
  border-radius: 3px;
  transition: all var(--t-fast) var(--ease-out);
}
.travel-status .travel-meta a:hover {
  background: var(--wine);
  color: var(--paper-light);
}
.travel-status .status-pill {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(29,20,15,0.15);
}
.travel-status .status-home {
  color: var(--forest);
  font-weight: 800;
  display: inline-flex; align-items: center; gap: 4px;
}
@media (max-width: 560px) {
  .travel-status { padding: 14px 16px; gap: 14px; }
  .travel-status .travel-flag { font-size: 34px; }
  .travel-status .travel-flag img { width: 40px !important; }
  .travel-status .travel-country { font-size: 18px; }
}

/* ============ ROUE / REEL DE COFFRE ============ */
.wheel-container {
  position: relative;
  background: linear-gradient(180deg, #1a2340 0%, #0a1220 100%);
  border-radius: 12px;
  padding: 20px;
  overflow: hidden;
  height: 180px;
}
.wheel-arrow {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  font-size: 30px; color: var(--gold); z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}
.wheel-track {
  position: absolute; top: 50%; left: 0; transform: translateY(-50%);
  height: 130px; display: flex; gap: 10px; padding: 0 50%;
}
.wheel-item {
  min-width: 140px; height: 130px;
  border-radius: 8px; padding: 10px 8px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: white; border: 3px solid;
  gap: 4px; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.wheel-item .icon { font-size: 40px; line-height: 1; }
.wheel-item .lbl { font-size: 10px; font-weight: 700; text-align: center; line-height: 1.2; color: #1a2340; }
.wheel-item .rarity-tag {
  font-size: 8px; text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 800;
  padding: 1px 6px; border-radius: 4px;
  color: white;
}
.wheel-spin-anim { animation: wheelSpin 4s cubic-bezier(0.09, 0.7, 0.15, 1) forwards; }
@keyframes wheelSpin { from { transform: translateY(-50%) translateX(0); } }

/* Badge rareté générique — visible partout */
.rarity-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: white;
}
.rarity-glow {
  box-shadow: 0 0 0 2px var(--rarity-color, #94a3b8), 0 0 12px var(--rarity-glow, rgba(148,163,184,0.4));
}

/* Contact staff modal */
.contact-form textarea {
  min-height: 120px; font-family: inherit;
  padding: 12px; resize: vertical;
}

/* ============ CARTES DOCUMENTS FIXES ============ */
/* Nouveau layout : chaque doc a une taille fixe pour éviter que ça écrase */
.doc-set {
  display: grid; grid-template-columns: 1fr; gap: 12px;
  background: white; border: 1px solid var(--paper-warm);
  padding: 14px; border-radius: 6px;
}
.doc-set h4 {
  font-family: var(--serif); font-weight: 700; font-size: 15px;
  color: var(--ink); padding-bottom: 6px;
  border-bottom: 1px solid var(--paper-warm);
  display: flex; align-items: center; gap: 8px;
}
.doc-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: start;
}
@media (max-width: 900px) { .doc-row { grid-template-columns: 1fr; } }
.doc-cell {
  display: flex; flex-direction: column; gap: 6px;
}
.doc-cell .doc-frame {
  width: 100%; max-width: 220px; margin: 0 auto;
}
.doc-cell .doc-empty {
  border: 2px dashed var(--paper-warm); border-radius: 6px;
  padding: 24px 12px; text-align: center; color: var(--ink-mute);
  font-size: 11px; min-height: 100px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.doc-cell .doc-empty .doc-icon { font-size: 24px; margin-bottom: 6px; opacity: 0.4; }
.doc-cell button { font-size: 11px; padding: 6px 8px; margin-top: 4px; }

/* ============ SUBSCRIPTION CARDS (FIX BUG) ============ */
.sub-card {
  background: white;
  border: 2px solid var(--paper-warm);
  padding: 22px 20px;
  border-radius: 10px;
  text-align: left;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.sub-card.current { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(74,124,89,0.15); }
.sub-card.bronze { border-color: #cd7f32; }
.sub-card.silver { border-color: #c0c0c0; }
.sub-card.gold { border-color: #f59e0b; background: linear-gradient(180deg, rgba(245,158,11,0.05), white); }
.sub-card .sub-icon { font-size: 40px; line-height: 1; }
.sub-card .sub-name {
  font-family: var(--serif); font-weight: 900;
  font-size: 22px; color: var(--ink); margin-top: 4px;
}
.sub-card .sub-price {
  font-family: var(--serif); font-weight: 900;
  font-size: 26px; color: var(--wine);
  margin-bottom: 6px;
}
.sub-card .sub-price small {
  font-size: 13px; color: var(--ink-mute);
  font-family: var(--sans); font-weight: 500;
}
.sub-card .sub-perks {
  list-style: none; padding: 0; margin: 8px 0;
  font-size: 12.5px;
  color: var(--ink-soft);
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
}
.sub-card .sub-perks li {
  padding: 3px 0 3px 22px;
  position: relative;
  line-height: 1.4;
}
.sub-card .sub-perks li::before {
  content: '✓';
  position: absolute; left: 0; top: 3px;
  color: var(--forest); font-weight: 900;
  width: 16px; text-align: center;
}
.sub-card button {
  margin-top: 12px;
  width: 100%;
}

/* ============ FIX CARTES CI (portrait plus grand + layout ok) ============ */
.id-card .portrait {
  min-width: 44px; min-height: 56px;
  flex-shrink: 0;
}

/* ============ ITEMS SHOP EN STYLE CARTE avec RARETÉ ANCRÉE ============ */
.shop-item {
  background: white;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
  box-shadow: 0 4px 16px rgba(60,50,30,0.08);
  transition: all 0.2s;
  border: 2px solid transparent;
}
.shop-item:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(60,50,30,0.15); }
.shop-item .rar-band {
  padding: 6px 14px;
  background: var(--rarity-color, #94a3b8);
  color: white;
  font-size: 10px; font-weight: 900; letter-spacing: 0.12em;
  text-transform: uppercase; text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.shop-item.rar-glow { border-color: var(--rarity-color, transparent); }
.shop-item .shop-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.shop-item .shop-corner-rarity {
  position: absolute; top: 10px; right: 10px;
  padding: 3px 9px; border-radius: 12px;
  background: var(--rarity-color, #94a3b8);
  color: white; font-size: 9px; font-weight: 900;
  letter-spacing: 0.1em; text-transform: uppercase;
  z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ============ RARETÉ dans ma vie (documents) ============ */
.doc-set.rar-anchor { border-left: 6px solid var(--rarity-color, var(--paper-warm)); }
.doc-set h4 .rar-tag {
  margin-left: auto;
  padding: 2px 8px; border-radius: 10px;
  background: var(--rarity-color, #94a3b8);
  color: white; font-size: 10px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ============ CLOCHE NOTIFICATIONS ============ */
.notif-bell {
  position: relative;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 16px;
}
.notif-bell:hover { background: var(--paper-warm); }
.notif-bell .notif-count {
  position: absolute; top: 2px; right: 2px;
  background: var(--wine); color: white;
  font-size: 10px; font-weight: 900;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.notif-dropdown {
  position: absolute; right: 20px; top: 70px;
  background: white; border: 1px solid var(--paper-warm);
  border-radius: 8px; padding: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  z-index: 100; width: 340px; max-height: 400px; overflow-y: auto;
  display: none;
}
.notif-dropdown.open { display: block; }
.notif-item {
  padding: 10px 12px; border-bottom: 1px solid var(--paper-warm);
  font-size: 12px; color: var(--ink);
  cursor: pointer;
}
.notif-item.unread { background: rgba(139,30,45,0.05); font-weight: 600; }
.notif-item:hover { background: var(--paper); }
.notif-item .time { font-size: 10px; color: var(--ink-mute); }

/* ============ ANIMATIONS DE CÉLÉBRATION ============ */
.confetti-overlay {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  width: 10px; height: 15px;
  top: -20px;
  animation: confetti-fall 3s linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(120vh) rotate(720deg); opacity: 0.6; }
}
.big-celebration {
  position: fixed; top: 20%; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--ink);
  padding: 30px 50px; border-radius: 20px;
  font-family: var(--serif); font-weight: 900;
  font-size: 28px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 9998;
  animation: celebrate-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
             celebrate-out 0.5s 3s forwards;
}
@keyframes celebrate-in { from { transform: translateX(-50%) scale(0) rotate(-10deg); } to { transform: translateX(-50%) scale(1) rotate(0deg); } }
@keyframes celebrate-out { to { transform: translateX(-50%) scale(0) translateY(-100px); opacity: 0; } }

/* ============ CHAT ============ */
.chat-msg {
  padding: 8px 12px; border-radius: 12px;
  margin-bottom: 4px; max-width: 75%;
  font-size: 13px; line-height: 1.4;
  word-wrap: break-word;
}
.chat-msg.me {
  background: var(--wine); color: white;
  align-self: flex-end; border-bottom-right-radius: 4px;
}
.chat-msg.other {
  background: var(--paper); color: var(--ink);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.chat-msg .time { font-size: 9px; opacity: 0.6; margin-top: 2px; display: block; }
.chat-window {
  display: flex; flex-direction: column;
  height: 400px;
}
.chat-messages {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 12px; background: var(--paper);
  border-radius: 8px; gap: 4px;
}
.chat-input {
  display: flex; gap: 8px; margin-top: 10px;
}
.chat-input input { flex: 1; }

/* Rareté "divin" avec effet arc-en-ciel */
@keyframes rainbow-glow {
  0%   { box-shadow: 0 0 40px rgba(255,0,150,0.6); }
  25%  { box-shadow: 0 0 40px rgba(0,150,255,0.6); }
  50%  { box-shadow: 0 0 40px rgba(0,255,150,0.6); }
  75%  { box-shadow: 0 0 40px rgba(255,200,0,0.6); }
  100% { box-shadow: 0 0 40px rgba(255,0,150,0.6); }
}
.rev-icon.divin {
  animation: reveal-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), rainbow-glow 3s infinite;
}

/* ============ LOOT REVEAL — PREMIUM REDESIGN ============ */
.modal-backdrop.reveal-backdrop {
  background: rgba(29, 20, 15, 0.55) !important;
  backdrop-filter: blur(6px);
}
.reveal-backdrop > .modal {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  max-width: 440px !important;
  box-shadow: none !important;
}
.loot-reveal {
  text-align: center;
  padding: 0;
  background: var(--paper-light);
  border: 1px solid var(--paper-warm);
  border-top: 4px solid var(--rarity-color, var(--wine));
  border-radius: 6px;
  overflow: hidden;
  color: var(--ink);
  position: relative;
  box-shadow: 0 24px 60px rgba(29, 20, 15, 0.35);
}
.loot-reveal::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 30%, var(--rarity-color, var(--gold)) 0%, transparent 55%);
  opacity: 0.10;
  animation: pulse-glow 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.16; }
}
.loot-reveal .box-title {
  padding: 22px 24px 6px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  position: relative; z-index: 2;
}
.loot-reveal .rarity-crown {
  position: relative; z-index: 2;
  display: inline-block;
  padding: 6px 22px;
  margin: 10px 0 0;
  background: var(--rarity-color);
  color: white;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  border-radius: 3px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.12);
}
.loot-reveal .rev-icon-wrap {
  position: relative; z-index: 2;
  padding: 22px 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}
.loot-reveal .rev-icon {
  font-size: 120px;
  display: inline-block;
  animation: reveal-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 6px 18px rgba(29,20,15,0.15));
  line-height: 1;
}
@keyframes reveal-pop {
  0% { transform: scale(0) rotate(-360deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(12deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.loot-reveal .rev-content {
  position: relative; z-index: 2;
  padding: 8px 32px 20px;
}
.loot-reveal .rev-name {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 900;
  color: var(--wine);
  margin-bottom: 14px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.loot-reveal .rev-desc {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--paper-warm);
  border-radius: 4px;
  font-family: var(--serif);
  font-style: italic;
}
.loot-reveal .rev-buttons {
  display: flex;
  gap: 10px;
  padding: 18px 24px 24px;
  position: relative;
  z-index: 2;
}
.loot-reveal .btn-close-reveal {
  flex: 1;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 12px 14px;
  border-radius: 4px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 0 var(--ink);
}
.loot-reveal .btn-close-reveal:hover {
  background: var(--ink);
  color: var(--paper-light);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--ink);
}
.loot-reveal .btn-close-reveal:active {
  transform: translateY(1px);
  box-shadow: none;
}
.loot-reveal .btn-reroll {
  flex: 1.4;
  background: var(--wine);
  color: var(--paper-light);
  border: 1px solid var(--wine);
  padding: 12px 14px;
  border-radius: 4px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 0 var(--wine-dark);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.loot-reveal .btn-reroll:hover:not(:disabled) {
  background: var(--wine-dark);
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--wine-dark);
}
.loot-reveal .btn-reroll:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: none;
}
.loot-reveal .btn-reroll:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--paper-warm);
  color: var(--ink-mute);
  border-color: var(--paper-warm);
  box-shadow: none;
}
.loot-reveal .btn-reroll .cost {
  font-size: 11px;
  opacity: 0.9;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.loot-reveal.high-rarity .rev-icon-wrap::before,
.loot-reveal.high-rarity .rev-icon-wrap::after {
  content: '✦'; position: absolute;
  font-size: 22px; opacity: 0.35;
  color: var(--rarity-color, var(--gold));
  animation: sparkle-drift 3s ease-in-out infinite;
  pointer-events: none;
}
.loot-reveal.high-rarity .rev-icon-wrap::before { left: 22%; top: 22%; }
.loot-reveal.high-rarity .rev-icon-wrap::after { right: 22%; bottom: 22%; animation-delay: 1.5s; }
@keyframes sparkle-drift {
  0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.25; }
  50% { transform: scale(1.15) rotate(180deg); opacity: 0.6; }
}

/* ============================================================
   POLISH GLOBAL v4 — Utilitaires, cohérence, micro-animations
   ============================================================ */

/* Titres uniformes h2 dans les cards : sous-ligne dorée */
.card > h2,
.card > .card-title {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 20px;
  font-family: var(--serif);
  color: var(--ink);
}
.card > h2::after,
.card > .card-title::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 60px; height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

/* Séparateur éditorial (fleurons) */
.divider-ornament {
  text-align: center;
  color: var(--gold);
  letter-spacing: 12px;
  margin: 20px 0;
  font-size: 14px;
  opacity: 0.5;
}
.divider-ornament::before { content: '✦ ✦ ✦'; }

/* Grid responsive utilitaires */
.grid { display: grid; gap: var(--sp-4); }
.grid-auto-fit { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-auto-fill { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Spacing utilities */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--ink-mute);
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
}
.empty-state::before {
  content: '';
  display: block;
  width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 20px;
}

/* Loader/spinner cohérent */
.loader {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--paper-warm);
  border-top-color: var(--wine);
  border-radius: 50%;
  animation: loader-spin 800ms linear infinite;
}
.loader-lg { width: 48px; height: 48px; border-width: 4px; }
@keyframes loader-spin { to { transform: rotate(360deg); } }

/* Hover glow doré pour éléments premium */
.premium-glow {
  position: relative;
}
.premium-glow::before {
  content: '';
  position: absolute; inset: -3px;
  background: linear-gradient(45deg, var(--gold), var(--gold-light), var(--gold));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
}
.premium-glow:hover::before { opacity: 0.6; }

/* Nouvelle badge notification (cloche, chat…) : pulse doux */
.notif-dot,
.badge-dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 9px; height: 9px;
  background: var(--wine);
  border: 2px solid var(--paper-light);
  border-radius: 50%;
  animation: notif-pulse 2.4s ease-in-out infinite;
}
@keyframes notif-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139,30,45,0.5); }
  50%      { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(139,30,45,0); }
}

/* Progress bar animée en cours d'action */
.progress-bar {
  height: 5px;
  background: var(--paper-warm);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.progress-bar.indeterminate::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--wine), transparent);
  animation: progress-indeterminate 1.4s var(--ease-in-out) infinite;
}
@keyframes progress-indeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* Titre de section avec ornement */
.section-title {
  display: flex; align-items: center; gap: 14px;
  margin: var(--sp-8) 0 var(--sp-4);
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
}
.section-title::before,
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--paper-shadow), transparent);
}

/* Skeleton pour chargement */
.skeleton {
  background: linear-gradient(90deg, var(--paper-warm) 0%, var(--paper) 50%, var(--paper-warm) 100%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s ease-in-out infinite;
  border-radius: var(--r-sm);
}
@keyframes skeleton-shine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Coin flip animation (pour montrer un gain) */
.coin-flip {
  display: inline-block;
  animation: coin-flip 1.2s var(--ease-bounce);
}
@keyframes coin-flip {
  0%   { transform: rotateY(0deg) scale(1); }
  50%  { transform: rotateY(720deg) scale(1.4); }
  100% { transform: rotateY(1440deg) scale(1); }
}

/* Fade & slide utilitaires */
.fade-in    { animation: fade-in var(--t-slow) var(--ease-out); }
.slide-up   { animation: slide-up var(--t-slow) var(--ease-out); }
.slide-down { animation: slide-down var(--t-slow) var(--ease-out); }
@keyframes fade-in    { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up   { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* Kbd tag (touches clavier) */
kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--paper);
  border: 1px solid var(--paper-shadow);
  border-bottom-width: 2px;
  border-radius: 3px;
  color: var(--ink-soft);
  vertical-align: middle;
}

/* Barre de progression XP améliorée avec shine */
.xp-fill {
  position: relative;
  overflow: hidden;
}
.xp-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: xp-shine 2.5s ease-in-out infinite;
}
@keyframes xp-shine {
  0%   { transform: translateX(-100%); }
  60%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* Cursor pointer helper */
.clickable { cursor: pointer; user-select: none; }

/* Mobile polish */
@media (max-width: 600px) {
  .container { padding: 20px 14px; }
  .card { padding: 18px 16px; }
  .header { padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .header .brand { font-size: 20px; }
  h1 { font-size: 30px; }
  h2 { font-size: 22px; }
  .toast { top: 12px; right: 12px; left: 12px; max-width: none; }
  .modal { padding: 22px 18px; }
}

/* Ancre pour éviter que le header sticky masque les sections */
[id]:target { scroll-margin-top: 90px; }

/* Force le body à ne pas scroll horizontalement */
body { overflow-x: hidden; }

