/* ============================================================
   DASH.CSS — Styles propres au site d'administration
   ------------------------------------------------------------
   Cette version accompagne la nouvelle structure de index.php
   (sidebar persistante + hero narratif + grille stats/graphique/
   activité + cartes invités en grille). Toutes les classes et ID
   utilisés par admin-dashboard.js sont conservés : #stat-*, .tab-btn
   + data-tab, .tab-panel + data-panel, .guest-list, .guest-card et
   ses sous-classes, .letter-btn, #search-input, #overview-meta,
   .overview-meta-item, .overview-countdown, #btn-*, .fab, etc.
   Nouveaux éléments (sidebar, hero, countdown vivant, graphique,
   activité, confettis) sont branchés par admin-dashboard.js dans
   la prochaine livraison.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500;1,9..144,600&family=Manrope:wght@400;500;600;700;800&display=swap');
 
:root{
  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
 
  /* Réglages fins Fraunces (axe optical size / soft) via font-variation-settings
     quand on veut un rendu plus doux sur les très gros chiffres (stats, code). */
  --font-heading-display: 'Fraunces', Georgia, serif;
 
  /* Variante italique de Fraunces — réservée aux moments "faire-part"
     (noms des mariés dans le hero, citations courtes). Ne pas en abuser :
     un seul usage marquant vaut mieux que du texte italique partout. */
  --font-script: 'Fraunces', Georgia, serif;
}
 
/* Chiffres tabulaires pour tout ce qui doit s'aligner (stats, code, compteurs,
   compte à rebours) */
.tabular-nums{
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
 
/* Texte "faire-part" — italique élégant, réservé au hero (noms des mariés).
   font-optical-sizing laisse Fraunces adapter automatiquement les empattements
   aux grandes tailles d'affichage. */
.font-script{
  font-family: var(--font-script);
  font-style: italic;
  font-optical-sizing: auto;
  font-weight: 500;
}

:root{
  --sidebar-width: 272px;
  --content-max: 1240px;
}

/* ---- Fond général admin : papier ivoire + grain léger ---- */
body.admin-body{
  min-height:100vh;
  background:
    radial-gradient(circle at 12% -8%, var(--emeraude-light) 0%, transparent 42%),
    radial-gradient(circle at 102% 0%, var(--or-light) 0%, transparent 38%),
    var(--bg-page);
}

/* ============================================================
   PAGE DE CONNEXION (inchangée dans sa structure, ton signature
   appliqué au liseré supérieur)
   ============================================================ */
.login-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-screen::before{
  content:'';
  position:absolute; inset:0;
  background:
    radial-gradient(circle at 18% 20%, rgba(10,71,53,.10) 0%, transparent 40%),
    radial-gradient(circle at 85% 82%, rgba(169,130,46,.14) 0%, transparent 42%);
  pointer-events:none;
}
.login-card{
  position: relative;
  width:100%;
  max-width: 408px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 44px 34px 36px;
  text-align:center;
  border-top: 4px solid transparent;
  /* border-image: var(--gradient-signature) 1; */
}
.login-card .crest{
  width:68px; height:68px;
  margin: 0 auto 18px;
  border-radius:50%;
  background: var(--gradient-emerald);
  display:flex; align-items:center; justify-content:center;
  color: var(--or-shine);
  font-size: 30px;
  box-shadow: var(--shadow-emerald);
  border: 2px solid var(--or);
}
.login-card h1{
  font-size: 24px;
  margin-bottom: 5px;
  color: var(--emeraude-dark);
}
.login-card .subtitle{
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.login-card .field{ text-align:left; }
.login-card .password-wrap{ position:relative; }
.login-card .password-wrap .toggle-visibility{
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  background:none; border:none; cursor:pointer;
  color: var(--text-muted); padding:8px;
}
.form-error{
  background: var(--terracotta-light);
  color: var(--terracotta-dark);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  display:none;
  text-align:left;
}
.form-error.show{ display:flex; align-items:center; gap:8px; }

/* ============================================================
   OSSATURE DE L'APPLICATION — sidebar persistante + contenu
   ============================================================ */
.app-shell{
  display:flex;
  align-items:flex-start;
  min-height:100vh;
}

/* ---- Sidebar ---- */
.sidebar{
  width: var(--sidebar-width);
  flex-shrink:0;
  position: sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  background: var(--gradient-emerald);
  color: var(--or-light);
  z-index: 30;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar-thumb{ background: rgba(231,201,118,.35); }
.sidebar::before{
  content:'';
  position:absolute; top:0; right:0; bottom:0; width:3px;
  background: var(--gradient-signature);
  opacity:.7;
}

.sidebar-brand{
  display:flex; align-items:center; gap:12px;
  padding: 24px 22px 20px;
}
.sidebar .crest-sm{
  width:40px; height:40px; border-radius:50%;
  background: rgba(255,255,255,.08);
  color: var(--or-shine);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
  border: 1.5px solid rgba(231,201,118,.55);
}
.sidebar .crest-sm .mio{ font-size:19px; }
.sidebar-brand-text{ min-width:0; }
.sidebar-brand-text .title{
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight:600;
  color: #fff;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.sidebar-brand-text .subtitle{
  font-size: 11px;
  color: rgba(231,225,204,.65);
  margin-top:1px;
}

.sidebar-nav{
  flex:1;
  padding: 4px 14px 20px;
  display:flex;
  flex-direction:column;
  gap: 22px;
}
.sidebar-nav-group{ display:flex; flex-direction:column; gap:3px; }
.sidebar-nav-label{
  font-size: 11px;
  font-weight:700;
  letter-spacing:.04em;
  color: rgba(231,225,204,.5);
  padding: 0 12px 6px;
}
.sidebar-link{
  display:flex;
  align-items:center;
  gap:11px;
  width:100%;
  border:none;
  background: transparent;
  color: rgba(251,248,241,.82);
  font-size: 13.5px;
  font-weight:600;
  text-align:left;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor:pointer;
  position:relative;
  transition: background var(--transition), color var(--transition);
}
.sidebar-link .mio{ font-size:18px; opacity:.85; flex-shrink:0; }
.sidebar-link .count{
  margin-left:auto;
  background: rgba(255,255,255,.12);
  color: rgba(251,248,241,.9);
  font-size: 11px; font-weight:700;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  min-width:22px; text-align:center;
}
.sidebar-link:hover{ background: rgba(255,255,255,.07); color:#fff; }
.sidebar-link.active{
  background: rgba(255,255,255,.1);
  color:#fff;
}
.sidebar-link.active::before{
  content:'';
  position:absolute; left:-14px; top:8px; bottom:8px; width:3px;
  border-radius: var(--radius-pill);
  background: var(--gradient-signature);
}
.sidebar-link.active .count{ background: var(--or-shine); color:#3A2E05; }
.sidebar-link.active .mio{ opacity:1; color: var(--or-shine); }
.sidebar-link-danger{ color: rgba(245,225,221,.75); }
.sidebar-link-danger:hover{ background: rgba(168,54,42,.18); color:#F5E1DD; }

.sidebar-footer{
  padding: 14px 14px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* Rideau mobile derrière la sidebar en mode tiroir */
.sidebar-scrim{
  position: fixed; inset:0;
  background: rgba(6,46,34,.5);
  backdrop-filter: blur(2px);
  z-index: 2;
  opacity:0; visibility:hidden;
  transition: opacity var(--transition-slow);
}
.sidebar-scrim.open{ opacity:1; visibility:visible; }

/* ---- Colonne principale ---- */
.app-main{
  flex:1;
  min-width:0;
}

.mobile-topbar{
  display:none;
  position: sticky; top:0; z-index: 40;
  align-items:center;
  gap:12px;
  padding: 12px 16px;
  background: rgba(251,248,241,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.mobile-topbar-title{
  flex:1; min-width:0;
  font-family: var(--font-heading);
  font-size:15px; font-weight:600;
  color: var(--emeraude-dark);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

.admin-main{
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 34px 28px;
}

/* ============================================================
   HERO — identité du mariage + compte à rebours vivant
   Un seul grand moment mémorable de la page ; tout le reste
   reste calme autour de lui.
   ============================================================ */
.hero-card{
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 6% -20%, rgba(228,239,232,.9) 0%, transparent 55%),
    radial-gradient(circle at 104% 120%, rgba(243,233,210,.9) 0%, transparent 50%),
    var(--bg-surface);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
  padding: 38px 40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.hero-card::after{
  content:'';
  position:absolute; left:0; right:0; bottom:0; height:3px;
  background: var(--gradient-signature);
  opacity:.7;
}
.hero-identity{ min-width: 260px; flex: 1 1 320px; }
.hero-title{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap: 12px;
  font-size: clamp(28px, 3.6vw, 42px);
  color: var(--text-main);
  margin-bottom: 14px;
}
.hero-title .font-script{ color: var(--emeraude-dark); }
.hero-heart{
  font-size: .5em;
  color: var(--or);
}
.hero-meta{
  display:flex; flex-wrap:wrap; align-items:center; gap: 12px 22px;
}
.overview-meta-item{
  display:flex; align-items:center; gap:7px;
  font-size: 14px; color: var(--text-muted); font-weight:500;
}
.overview-meta-item .mio{ font-size:18px; color: var(--or-dark); }
.overview-countdown{
  display:inline-flex; align-items:baseline; gap:5px;
  background: var(--emeraude-dark);
  color: var(--or-light);
  padding: 5px 14px 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight:600;
}
.overview-countdown strong{
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight:600;
}

/* Compte à rebours vivant — quatre tuiles, chiffres Fraunces */
.hero-countdown{
  display:flex;
  gap: 14px;
  flex-shrink:0;
}
.count-item{
  background: var(--bg-surface);
  width: 78px;
  padding: 14px 4px 12px;
  border-radius: var(--radius-md);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
}
.count-item strong{
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight:600;
  line-height:1;
  color: var(--or-dark);
  font-variant-numeric: tabular-nums;
}
.count-item span{
  margin-top:7px;
  letter-spacing: .06em;
  font-size: 10px;
  font-weight:700;
  color: var(--text-soft);
}
.count-item:first-child strong{ color: var(--emeraude-dark); }

/* ============================================================
   SÉPARATEUR FLORAL — un seul motif, réutilisé avec parcimonie
   entre les grandes sections (voir .flourish dans all.css)
   ============================================================ */
.section-divider{ margin: 34px auto; }

/* ============================================================
   RANGÉE STATISTIQUES + GRAPHIQUE + ACTIVITÉ (façon Notion/Stripe)
   ============================================================ */
.overview-grid{
  display:flex;
  flex-direction:column;
  gap: 24px;
}

.overview-stats{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card{
  background: var(--bg-surface);
  cursor: pointer; /* ← ajoute cette ligne */
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  /* border-top: 3px solid var(--tile-color, var(--emeraude)); */
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.stat-card:hover{ box-shadow: var(--shadow-sm); transform: translateY(-2px); border-color: var(--border-strong); }
.stat-card[data-stat="pending"]{ --tile-color: var(--or); }
.stat-card[data-stat="confirmed"]{ --tile-color: var(--emeraude); }
.stat-card[data-stat="declined"]{ --tile-color: var(--terracotta); }
.stat-card[data-stat="definitive"]{ --tile-color: var(--emeraude-dark); }

.stat-card-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 14px;
}
.stat-icon{
  width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: color-mix(in srgb, var(--tile-color) 14%, white);
  color: var(--tile-color);
}
.stat-icon .mio{ font-size:18px; }
.stat-delta{
  font-size:11.5px; font-weight:700;
  color: var(--sauge-dark);
  display:flex; align-items:center; gap:3px;
}
.stat-delta .mio{ font-size:14px; }
.stat-delta.is-flat{ color: var(--text-soft); }

.stat-value{
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight:600;
  line-height:1;
  color: var(--text-main);
  margin-bottom:6px;
}
.stat-label{
  font-size: 12.5px;
  font-weight:600;
  color: var(--text-muted);
  letter-spacing: .01em;
}

/* ---- Graphique + activité : deux cartes côte à côte ---- */
.insight-grid{
  display:grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 20px;
  align-items: stretch;
}

.chart-card, .activity-card{
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px 26px 26px;
  box-shadow: var(--shadow-xs);
}
.chart-card h2, .activity-card h2{
  font-size: 15.5px;
  color: var(--text-main);
  margin-bottom: 4px;
}
.card-subtitle{
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.donut-wrap{
  position: relative;
  width: 168px;
  margin: 4px auto 20px;
}
.donut-wrap svg{ width:100%; height:100%; display:block; transform: rotate(-90deg); }
.donut-wrap circle{
  fill:none;
  stroke-width: 14;
  transition: stroke-dasharray var(--transition-slow), stroke var(--transition);
}
.donut-center{
  position:absolute; inset:0;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
}
.donut-center strong{
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight:600;
  color: var(--text-main);
  line-height:1;
}
.donut-center span{
  font-size: 11px;
  color: var(--text-muted);
  margin-top:4px;
  font-weight:600;
}

.chart-legend{ display:flex; flex-direction:column; gap:10px; }
.chart-legend-item{
  display:flex; align-items:center; gap:10px;
  font-size:13px;
}
.legend-dot{ width:9px; height:9px; border-radius:50%; flex-shrink:0; background: var(--dot-color, var(--emeraude)); }
.legend-label{ color: var(--text-muted); flex:1; }
.legend-value{ font-weight:700; color: var(--text-main); }
.legend-pct{ font-size:11.5px; color: var(--text-soft); width:38px; text-align:right; }

/* ---- Activité récente : petite timeline ---- */
.activity-list{
  display:flex; flex-direction:column;
  max-height: 300px;
  overflow-y:auto;
  padding-right: 4px;
}
.activity-item{
  display:flex; gap:12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
  animation: activity-in .4s cubic-bezier(.22,1.4,.36,1);
}
.activity-item:last-child{ border-bottom:none; padding-bottom:2px; }
.activity-item:first-child{ padding-top:2px; }
@keyframes activity-in{
  from{ opacity:0; transform: translateY(-6px); }
  to{ opacity:1; transform: translateY(0); }
}
.activity-dot{
  width:8px; height:8px; border-radius:50%;
  background: var(--sauge);
  margin-top:7px;
  flex-shrink:0;
  box-shadow: 0 0 0 3px var(--sauge-light);
}
.activity-dot.is-declined{ background: var(--terracotta); box-shadow: 0 0 0 3px var(--terracotta-light); }
.activity-dot.is-definitive{ background: var(--or); box-shadow: 0 0 0 3px var(--or-light); }
.activity-body{ min-width:0; }
.activity-title{ font-size:13px; color: var(--text-main); line-height:1.4; }
.activity-title strong{ font-weight:700; }
.activity-time{ font-size:11.5px; color: var(--text-soft); margin-top:2px; }
.activity-empty{
  padding: 34px 10px;
  text-align:center;
  color: var(--text-soft);
  font-size:13px;
}

/* ============================================================
   BARRE RECHERCHE & FILTRES
   ============================================================ */
.toolbar{
  display:flex;
  align-items:flex-end;
  gap:16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.filter-field{
  display:flex;
  flex-direction:column;
  gap:7px;
  flex: 1 1 260px;
}
.filter-field-letter{ flex: 0 1 230px; }
.filter-field label{
  font-size:12.5px;
  font-weight:700;
  color: var(--text-main);
  letter-spacing:-.005em;
}
.search-row{ position:relative; }
.search-row .mio{
  position:absolute; left:16px; top:50%; transform:translateY(-50%);
  color: var(--text-soft); font-size:19px; pointer-events:none;
}
.search-row input{
  width:100%;
  padding: 13px 16px 13px 46px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-soft);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
}
.search-row input:focus{
  outline:none; border-color: var(--emeraude-mid);
  box-shadow: 0 0 0 4px var(--emeraude-light);
}
.search-row .clear-search{
  position:absolute; right:8px; top:50%; transform:translateY(-50%);
  background:none; border:none; cursor:pointer; color:var(--text-muted);
  display:none; padding:6px;
}
.search-row.has-value .clear-search{ display:block; }

.select-wrap{ position:relative; }
.select-wrap .select-caret{
  position:absolute; right:16px; top:50%; transform:translateY(-50%);
  color: var(--text-soft); font-size:20px; pointer-events:none;
}
.letter-select{
  width:100%;
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  padding: 13px 42px 13px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-soft);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  cursor:pointer;
  font-weight:600;
  color: var(--text-main);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.letter-select:focus{
  outline:none; border-color: var(--emeraude-mid);
  box-shadow: 0 0 0 4px var(--emeraude-light);
}

/* ---- Pilules d'onglets — visibles seulement sous la largeur où la
   sidebar passe en tiroir (sur desktop, la navigation se fait depuis
   la sidebar ; ces pilules dupliquent volontairement les mêmes
   .tab-btn pour que admin-dashboard.js les pilote sans modification) ---- */
.mobile-tabs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding-bottom: 4px;
  margin: 4px 0 4px;
}
.mobile-tabs .tab-btn{
  flex-shrink:0;
  display:flex; align-items:center; gap:7px;
  background: var(--bg-muted);
  border: 1.5px solid transparent;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-size: 13.5px; font-weight:600;
  color: var(--text-muted);
  cursor:pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  white-space:nowrap;
}
.mobile-tabs .tab-btn .count{
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight:700;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  min-width: 22px;
  text-align:center;
}
.mobile-tabs .tab-btn.active{
  color: var(--text-main);
  background: var(--bg-surface);
  border-color: var(--tab-color, var(--color-primary));
  box-shadow: var(--shadow-xs);
}
.mobile-tabs .tab-btn.active .count{ background: var(--tab-color, var(--color-primary)); color:#fff; }
.mobile-tabs .tab-btn[data-tab="pending"]{ --tab-color: var(--or); }
.mobile-tabs .tab-btn[data-tab="confirmed"]{ --tab-color: var(--emeraude); }
.mobile-tabs .tab-btn[data-tab="declined"]{ --tab-color: var(--terracotta); }
.mobile-tabs .tab-btn[data-tab="definitive"]{ --tab-color: var(--emeraude-dark); }

.tab-panel{ display:none; }
.tab-panel.active{ display:block; animation: panel-in .3s cubic-bezier(.22,1.4,.36,1); }

/* ---- Vues principales : Tableau de bord / Invités (mutuellement exclusives) ---- */
.view-panel{ display:none; }
.view-panel.active{ display:block; animation: panel-in .32s cubic-bezier(.22,1.4,.36,1); }

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

.panel-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin: 26px 0 16px;
  flex-wrap: wrap;
}
.panel-toolbar-text h2{ font-size:17px; margin-bottom:2px; }
.panel-toolbar .panel-hint{ font-size:13px; color:var(--text-muted); }

/* ---- Cartes invités — grille responsive (façon Notion/Stripe) ---- */
.guest-list{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.guest-card{
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  display:flex;
  flex-direction:column;
  gap: 12px;
  cursor:pointer;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.guest-card:hover{ box-shadow: var(--shadow-sm); border-color: var(--border-strong); transform: translateY(-2px); }
.guest-card:active{ transform: scale(.99); }

.guest-card-top{ display:flex; align-items:center; gap:12px; }
.guest-avatar{
  width:46px; height:46px; border-radius:50%;
  flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-heading);
  font-weight:600; font-size:16px;
  background: var(--bg-surface);
  color: var(--emeraude-dark);
  border: 2px solid var(--emeraude-light);
  box-shadow: inset 0 0 0 2px var(--bg-surface);
}
.tab-panel[data-panel="declined"] .guest-avatar{ color: var(--terracotta-dark); border-color: var(--terracotta-light); }
.tab-panel[data-panel="pending"] .guest-avatar{ color: #6B5116; border-color: var(--or-light); }
.tab-panel[data-panel="definitive"] .guest-avatar{ background: var(--emeraude-dark); color: var(--or-light); border-color: var(--emeraude-dark); }

.guest-info{ min-width:0; flex:1; }
.guest-name{
  font-weight:700; font-size:15px;
  /* white-space:nowrap; overflow:hidden; text-overflow:ellipsis; */
  letter-spacing: -.005em;
}
.guest-meta{
  display:flex; flex-direction:column; gap:5px;
  font-size:12.5px; color: var(--text-muted);
  margin-top:2px;
}
.guest-meta span{ display:inline-flex; align-items:center; gap:5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.guest-meta .mio{ font-size:15px; color: var(--text-soft); flex-shrink:0; }
.guest-code-chip{
  align-self:flex-start;
  font-size:11px; font-weight:700; color: var(--emeraude);
  background: var(--emeraude-light);
  padding:3px 10px; border-radius: var(--radius-pill);
  display:inline-flex; align-items:center; gap:4px;
}

.guest-actions{
  display:flex; flex-wrap:wrap; gap:8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.btn-guest-action{
  display:inline-flex; align-items:center; gap:6px;
  border:1.5px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight:700;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  cursor:pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-guest-action .mio{ font-size:16px; }
.btn-guest-action.action-edit:hover{ background: var(--bg-muted); border-color: var(--border-strong); color: var(--emeraude); }
.btn-guest-action.action-share:hover{ background: var(--or-light); border-color: var(--or); color:#6B5116; }
.btn-guest-action.action-delete:hover{ background: var(--terracotta-light); border-color: var(--terracotta); color: var(--color-danger); }
.btn-guest-action.action-approve{ background: var(--emeraude-light); border-color: var(--emeraude-light); color: var(--emeraude-dark); }
.btn-guest-action.action-approve:hover{ background: var(--emeraude); border-color: var(--emeraude); color:#fff; }

/* ---- Skeleton cards ---- */
.skeleton-card{
  display:flex; align-items:center; gap:14px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
}
.skeleton-avatar{ width:44px; height:44px; border-radius:50%; flex-shrink:0; }
.skeleton-lines{ flex:1; display:flex; flex-direction:column; gap:8px; }
.skeleton-line{ height:11px; }
.skeleton-line.w-40{ width:40%; }
.skeleton-line.w-60{ width:60%; }

/* ---- FAB ajouter (or, pour signaler l'action la plus fréquente) ---- */
.fab{
  position: fixed;
  right: 28px; bottom: 28px;
  height: 58px;
  padding: 0 24px 0 22px;
  border-radius:50%;
  background: var(--gradient-gold);
  color: var(--emeraude-dark);
  border: none;
  box-shadow: var(--shadow-gold);
  display:flex; align-items:center; justify-content:center; gap:9px;
  cursor:pointer;
  z-index: 50;
  transition: transform var(--transition-spring), box-shadow var(--transition);
}
.fab:hover{ box-shadow: 0 20px 44px rgba(169,130,46,.38); transform: translateY(-2px); }
.fab:active{ transform: scale(.95); }
.fab .mio{ font-size:25px; }
.fab-label{ display:none; font-size:14px; font-weight:700; white-space:nowrap; }
@media (min-width: 640px){
  .fab{ width:auto; border-radius: var(--radius-pill); }
  .fab-label{ display:inline; }
}
@media (max-width: 639px){
  .fab{ width:58px; padding:0; }
}

/* ============================================================
   MODALE DÉTAIL INVITÉ — pensée comme une petite fiche narrative
   ============================================================ */
.detail-modal .modal{ max-width: 460px; }
.detail-header{
  display:flex; align-items:center; gap:14px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}
.detail-avatar{
  width:60px; height:60px; border-radius:50%;
  background: var(--emeraude-light); color: var(--emeraude-dark);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-heading);
  font-weight:600; font-size:22px; flex-shrink:0;
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 2px var(--emeraude-light);
}
.detail-name{ font-family: var(--font-heading); font-size:20px; font-weight:600; }
.detail-rows{ display:flex; flex-direction:column; gap:14px; margin: 18px 0; }
.detail-row{ display:flex; gap:12px; align-items:flex-start; font-size:14px; }
.detail-row .mio{
  color: var(--emeraude); font-size:18px; margin-top:2px;
  width:32px; height:32px; border-radius:50%; background: var(--emeraude-light);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.detail-row .label{ color: var(--text-muted); font-size:11.5px; display:block; margin-bottom:1px; }
.detail-row .value{ font-weight:600; }
.detail-status-block{
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  margin: 6px 0 16px;
}
.detail-status-block .label{ font-size:11.5px; color:var(--text-muted); margin-bottom:6px; display:block; font-weight:600; }

/* ============================================================
   MODALE PARTAGE DE CODE — façon "billet"
   ============================================================ */
.share-code-box{
  position: relative;
  text-align:center;
  background: var(--gradient-emerald);
  border-radius: var(--radius-md);
  padding: 26px 16px 22px;
  margin-bottom: 20px;
  overflow: hidden;
}
/* .share-code-box::before{
  content:'';
  position:absolute; left:0; right:0; top:0; height:3px;
  background: var(--gradient-signature);
} */
.share-code-box .code{
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight:600;
  letter-spacing: 7px;
  color: var(--or-shine);
}
.share-code-box .countdown{
  margin-top:10px;
  font-size:13px;
  font-weight:600;
  color: rgba(255,255,255,.82);
  display:flex; align-items:center; justify-content:center; gap:6px;
}
.share-code-box .countdown.almost-expired{ color: #F3A99A; }
.share-link-row{
  display:flex; gap:8px; margin-bottom:16px;
}
.share-link-row input{
  flex:1;
  padding:11px 13px;
  border-radius: var(--radius-sm);
  border:1.5px solid var(--border-soft);
  font-size:12.5px;
  color: var(--text-muted);
  background: var(--bg-sunken);
}

/* ============================================================
   CONFETTIS / PÉTALES — un seul moment déclenché par une action
   (approbation vers la liste définitive), jamais en continu.
   ============================================================ */
.confetti-layer{
  position: fixed; inset:0;
  pointer-events:none;
  overflow:hidden;
  z-index: 1100;
}
.confetti-piece{
  position:absolute;
  top:-24px;
  width:9px; height:9px;
  opacity:.9;
  border-radius: 2px;
  animation-name: confetti-fall;
  animation-timing-function: cubic-bezier(.4,0,.6,1);
  animation-fill-mode: forwards;
}
.confetti-piece.is-round{ border-radius:50%; }
@keyframes confetti-fall{
  0%{ transform: translateY(0) rotate(0deg); opacity:1; }
  85%{ opacity:1; }
  100%{ transform: translateY(105vh) rotate(360deg); opacity:0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Sidebar → tiroir sous 1080px */
@media (max-width: 1080px){
  .sidebar{
    position: fixed;
    top:0; left:0; bottom:0; height:100vh;
    transform: translateX(-104%);
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-spring);
  }
  .sidebar.open{ transform: translateX(0); }
  .mobile-topbar{ display:flex; }
  .admin-main{ padding: 24px 18px; }
}
@media (min-width: 1081px){
  .sidebar-scrim{ display:none; }
}

@media (max-width: 992px){
  .insight-grid{ grid-template-columns: 1fr; }
  .donut-wrap{ margin-left:0; }
}

@media (max-width: 900px){
  .overview-stats{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px){
  .hero-card{ padding: 30px 26px; }
  .hero-countdown{ width:100%; justify-content:space-between; }
  .count-item{ flex:1; width:auto; }
}

@media (max-width: 768px){
  /* Sur mobile, les onglets deviennent la navigation principale
     puisque la sidebar est en tiroir. */
  .mobile-tabs{ display:flex; }
}

@media (max-width: 650px){
  .guest-list{ grid-template-columns: 1fr; }
}

@media (max-width: 560px){
  .login-card{ padding: 34px 24px 28px; }
  .hero-title{ font-size: 26px; }
  .hero-countdown{ gap:8px; }
  .count-item{ padding: 11px 2px 10px; }
  .count-item strong{ font-size:22px; }
  .overview-stats{ grid-template-columns: 1fr 1fr; gap:12px; }
  .panel-toolbar{ flex-direction:column; align-items:flex-start; }
}

/* ============================================================
   PHOTOS + MOTIFS DÉCORATIFS
   ============================================================ */

/* ---- Hero : photo des mariés en fond, overlay pour la lisibilité ---- */
.hero-card.has-photo{
  /* background-image:
    linear-gradient(115deg, rgba(6,46,34,.87) 8%, rgba(6,46,34,.55) 42%, rgba(6,46,34,.18) 100%),
    url('../img/img2.jpg'); */
  background-image: linear-gradient(115deg, rgba(6,46,34,.87) 8%, rgba(6,46,34,.70) 42%, rgba(6,46,34,.87) 100%),
    url('../img/img2.jpg');
  background-size: cover;
  background-position: center -95%; /* ajuste le % selon le cadrage de la photo */
  color: #fff;
}

@media screen and (max-width: 750px) {
  .hero-card.has-photo{
    background-position: unset;
  }
}
.hero-card.has-photo .hero-title,
.hero-card.has-photo .hero-title .font-script{ color:#fff; }
.hero-card.has-photo .overview-meta-item{ color: rgba(255,255,255,.85); }
.hero-card.has-photo .overview-meta-item .mio{ color: var(--or-shine); }
.hero-card.has-photo .overview-countdown{ background: rgba(255,255,255,.16); }
.hero-card.has-photo .count-item{
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  border-color: rgba(255,255,255,.25);
}
.hero-card.has-photo .count-item strong{ color:#fff; }
.hero-card.has-photo .count-item:first-child strong{ color: var(--or-shine); }
.hero-card.has-photo .count-item span{ color: rgba(255,255,255,.65); }

/* ---- Login : photo en fond de page, la carte flotte par-dessus ---- */
.login-screen{
  background-image:
    linear-gradient(160deg, rgba(6,46,34,.84), rgba(28,26,20,.74)),
    url('../img/img2.jpg');
  background-size: cover;
}
.login-screen::before{ display:none; } /* remplace les halos radiaux, plus besoin avec une photo */

/* ---- Motif deco1 : coin du hero (overflow:hidden → reste à l'intérieur) ---- */
.hero-card::before{
  content:'';
  position:absolute;
  top:14px; right:14px;
  width:120px; height:120px;
  background-image: url('../img/deco1.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: top right;
  opacity:.7;
  pointer-events:none;
  z-index:0;
}
.hero-card > *{ position:relative; z-index:1; }

/* ---- Motif deco1 : coin de la login-card (peut déborder) ---- */
.login-card::before{
  content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    transform: translate(-50%, -50%);
    background-image: url(../img/deco1.png);
    background-size: contain;
    background-repeat: no-repeat;
    opacity: .2;
    pointer-events: none;
}

/* ---- Motif deco2 : un seul usage, sur la modale d'envoi du lien ---- */
.share-code-box{ position:relative; overflow:visible; }
/* .share-code-box::after{
  content:'';
  position:absolute;
  bottom:-14px; left:-14px;
  width:64px; height:64px;
  background-image: url('../img/deco2.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity:.9;
  pointer-events:none;
} */

