/* ============================================================
   SUIVI DES ASSEMBLÉES — Design System
   Mobile-first. Sobre, spirituel, fonctionnel.
   Palette : Bleu nuit #1A2744 · Doré #C9972B · Blanc cassé #F7F5F0 · Gris #6B7280
   ============================================================ */

:root {
  --bleu:         #1A2744;
  --bleu-clair:   #243461;
  --bleu-pale:    #E8EDF5;
  --or:           #C9972B;
  --or-clair:     #F5E6C0;
  --blanc:        #F7F5F0;
  --gris-clair:   #F1EFE9;
  --gris:         #6B7280;
  --gris-fonce:   #374151;
  --rouge:        #DC2626;
  --rouge-clair:  #FEE2E2;
  --vert:         #16A34A;
  --vert-clair:   #DCFCE7;
  --orange:       #EA580C;
  --orange-clair: #FFEDD5;

  --rayon:        10px;
  --rayon-sm:     6px;
  --rayon-lg:     16px;
  --ombre:        0 2px 8px rgba(26,39,68,.12);
  --ombre-lg:     0 8px 24px rgba(26,39,68,.16);

  --police:       'Inter', system-ui, sans-serif;
  --police-titre: 'Inter', system-ui, sans-serif;

  --nav-h:        60px;
  --tab-h:        64px;

  /* ── Alias pour compatibilité des vues ──────────────────── */
  --radius:       10px;      /* alias de --rayon */
  --beige-clair:  #F1EFE9;   /* alias de --gris-clair */
  --blanc-casse:  #F7F5F0;
}

/* ---- Reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--police);
  background: var(--blanc);
  color: var(--gris-fonce);
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--bleu); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ---- Typographie ----------------------------------------- */
h1 { font-size: 1.5rem; font-weight: 700; color: var(--bleu); line-height: 1.2; }
h2 { font-size: 1.2rem; font-weight: 700; color: var(--bleu); }
h3 { font-size: 1rem;   font-weight: 600; color: var(--bleu); }
p  { color: var(--gris); font-size: .9rem; }

/* ---- Navigation supérieure ------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bleu);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: .75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.topbar__logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__logo span {
  color: var(--or);
}
.topbar__badge {
  background: var(--rouge);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 20px;
  padding: .15rem .45rem;
  min-width: 20px;
  text-align: center;
}
.topbar__btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: .4rem;
  border-radius: var(--rayon-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .85;
  transition: opacity .15s;
}
.topbar__btn:hover { opacity: 1; }
.topbar__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--or);
  color: var(--bleu);
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---- Navigation onglets bottom (mobile) ------------------ */
.bottomnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tab-h);
  background: #fff;
  border-top: 1px solid #E5E7EB;
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  color: var(--gris);
  font-size: .65rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: color .15s;
  padding: .3rem;
}
.bottomnav__item.active,
.bottomnav__item:hover { color: var(--bleu); }
.bottomnav__item.active svg { color: var(--bleu); }
.bottomnav__icon {
  width: 22px;
  height: 22px;
  position: relative;
}
.bottomnav__dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: var(--rouge);
  border-radius: 50%;
  border: 2px solid #fff;
}

/* ---- Layout principal ------------------------------------ */
.page {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem 1rem calc(var(--tab-h) + 1.5rem);
}

/* ---- Cartes ---------------------------------------------- */
.card {
  background: #fff;
  border-radius: var(--rayon);
  padding: 1rem;
  box-shadow: var(--ombre);
  margin-bottom: 1rem;
}
.card--flat {
  box-shadow: none;
  border: 1px solid #E5E7EB;
}
.card--highlighted {
  border-left: 4px solid var(--or);
}
.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.card__title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--bleu);
}

/* ---- Stats tiles ----------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1rem;
}
.stat-tile {
  background: #fff;
  border-radius: var(--rayon);
  padding: .9rem;
  box-shadow: var(--ombre);
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.stat-tile__value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--bleu);
  line-height: 1;
}
.stat-tile__label {
  font-size: .7rem;
  color: var(--gris);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.stat-tile--accent .stat-tile__value { color: var(--or); }
.stat-tile--vert   .stat-tile__value { color: var(--vert); }
.stat-tile--rouge  .stat-tile__value { color: var(--rouge); }

/* ---- Formulaires ----------------------------------------- */
.form-group {
  margin-bottom: 1rem;
}
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--bleu);
  margin-bottom: .35rem;
}
.form-label span {
  color: var(--gris);
  font-weight: 400;
  font-size: .75rem;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1.5px solid #D1D5DB;
  border-radius: var(--rayon-sm);
  padding: .65rem .85rem;
  font-size: .95rem;
  color: var(--gris-fonce);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px var(--bleu-pale);
}
.form-input--number {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: right;
  padding-right: 1rem;
}
.form-hint {
  font-size: .72rem;
  color: var(--gris);
  margin-top: .25rem;
}
.form-error {
  font-size: .75rem;
  color: var(--rouge);
  margin-top: .25rem;
}

/* ---- Boutons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .75rem 1.25rem;
  border-radius: var(--rayon-sm);
  font-size: .9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--primary   { background: var(--bleu); color: #fff; }
.btn--secondary { background: var(--gris-clair); color: var(--gris-fonce); }
.btn--gold      { background: var(--or); color: #fff; }
.btn--danger    { background: var(--rouge); color: #fff; }
.btn--success   { background: var(--vert); color: #fff; }
.btn--outline   { background: transparent; border: 1.5px solid var(--bleu); color: var(--bleu); }
.btn--full      { width: 100%; }
.btn--sm        { padding: .45rem .85rem; font-size: .8rem; }
.btn:disabled   { opacity: .5; cursor: not-allowed; }

/* Boutons de communication */
.contact-btns {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.btn--appel { background: var(--vert); color: #fff; }
.btn--sms   { background: var(--bleu-clair); color: #fff; }
.btn--whatsapp { background: #25D366; color: #fff; }

/* ---- Badges ---------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .18rem .55rem;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
}
.badge--vert   { background: var(--vert-clair);  color: var(--vert); }
.badge--rouge  { background: var(--rouge-clair); color: var(--rouge); }
.badge--or     { background: var(--or-clair);    color: #92650a; }
.badge--gris   { background: var(--gris-clair);  color: var(--gris); }
.badge--bleu   { background: var(--bleu-pale);   color: var(--bleu); }
.badge--orange { background: var(--orange-clair); color: var(--orange); }

/* ---- Alertes flash --------------------------------------- */
.alert {
  border-radius: var(--rayon-sm);
  padding: .8rem 1rem;
  font-size: .875rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.alert--success { background: var(--vert-clair);  color: #166534; }
.alert--error   { background: var(--rouge-clair); color: #991b1b; }
.alert--info    { background: var(--bleu-pale);   color: var(--bleu); }
.alert--warning { background: var(--orange-clair); color: var(--orange); }

/* ---- Flash Info card ------------------------------------- */
.flash-card {
  border-radius: var(--rayon);
  padding: .9rem 1rem;
  margin-bottom: .6rem;
  border-left: 4px solid var(--bleu);
  background: #fff;
  box-shadow: var(--ombre);
}
.flash-card--urgente { border-left-color: var(--rouge); }
.flash-card__titre {
  font-weight: 700;
  font-size: .95rem;
  color: var(--bleu);
  margin-bottom: .2rem;
}
.flash-card--urgente .flash-card__titre { color: var(--rouge); }
.flash-card__contenu { font-size: .85rem; color: var(--gris-fonce); }
.flash-card__meta   { font-size: .7rem; color: var(--gris); margin-top: .4rem; }
.flash-card.lu { opacity: .6; }

/* ---- Listes de responsables ------------------------------ */
.responsable-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem;
  background: #fff;
  border-radius: var(--rayon-sm);
  margin-bottom: .5rem;
  box-shadow: var(--ombre);
}
.responsable-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bleu-pale);
  color: var(--bleu);
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.responsable-info { flex: 1; min-width: 0; }
.responsable-info__nom {
  font-weight: 600;
  font-size: .9rem;
  color: var(--gris-fonce);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.responsable-info__role { font-size: .7rem; color: var(--gris); }

/* ---- Graphiques (barre) ---------------------------------- */
.chart-bar {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.chart-bar__row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.chart-bar__label {
  font-size: .75rem;
  color: var(--gris);
  min-width: 80px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-bar__track {
  flex: 1;
  height: 10px;
  background: var(--gris-clair);
  border-radius: 5px;
  overflow: hidden;
}
.chart-bar__fill {
  height: 100%;
  background: var(--bleu);
  border-radius: 5px;
  transition: width .4s ease;
}
.chart-bar__fill--or   { background: var(--or); }
.chart-bar__fill--vert { background: var(--vert); }
.chart-bar__val {
  font-size: .75rem;
  font-weight: 700;
  color: var(--bleu);
  min-width: 30px;
}

/* ---- Tableau --------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th {
  background: var(--bleu);
  color: #fff;
  padding: .6rem .75rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  font-size: .75rem;
}
td {
  padding: .6rem .75rem;
  border-bottom: 1px solid #F3F4F6;
  color: var(--gris-fonce);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gris-clair); }

/* ---- Semaine selector ------------------------------------ */
.semaine-badge {
  background: var(--or-clair);
  border: 1px solid var(--or);
  border-radius: var(--rayon-sm);
  padding: .4rem .8rem;
  font-size: .8rem;
  font-weight: 600;
  color: #92650a;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

/* ---- Progress ring --------------------------------------- */
.progress-ring {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring__text { font-size: .8rem; color: var(--gris); }
.progress-ring__num { font-size: 1.2rem; font-weight: 800; color: var(--bleu); }

/* ---- Rubrique row (formulaire rapport) ------------------- */
.rubrique-row {
  display: flex;
  align-items: center;
  padding: .75rem;
  border-bottom: 1px solid #F3F4F6;
  gap: .75rem;
}
.rubrique-row:last-child { border-bottom: none; }
.rubrique-row__info { flex: 1; }
.rubrique-row__libelle {
  font-size: .875rem;
  font-weight: 600;
  color: var(--gris-fonce);
}
.rubrique-row__unite { font-size: .72rem; color: var(--gris); }
.rubrique-row__input {
  width: 90px;
  border: 1.5px solid #D1D5DB;
  border-radius: var(--rayon-sm);
  padding: .5rem;
  text-align: right;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bleu);
  background: var(--blanc);
}
.rubrique-row__input:focus {
  outline: none;
  border-color: var(--bleu);
  background: #fff;
}

/* ---- Taux de soumission ---------------------------------- */
.taux-bar {
  height: 8px;
  background: var(--gris-clair);
  border-radius: 4px;
  overflow: hidden;
  margin-top: .4rem;
}
.taux-bar__fill {
  height: 100%;
  background: var(--vert);
  border-radius: 4px;
  transition: width .5s ease;
}
.taux-bar__fill--orange { background: var(--orange); }
.taux-bar__fill--rouge  { background: var(--rouge); }

/* ---- Skeleton loading ------------------------------------ */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.4s infinite;
  border-radius: var(--rayon-sm);
}
@keyframes skeleton-shine {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Toast notification ---------------------------------- */
.toast-container {
  position: fixed;
  bottom: calc(var(--tab-h) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: calc(100% - 2rem);
  max-width: 400px;
}
.toast {
  background: var(--gris-fonce);
  color: #fff;
  border-radius: var(--rayon);
  padding: .75rem 1rem;
  font-size: .875rem;
  box-shadow: var(--ombre-lg);
  animation: toast-in .2s ease;
}
.toast--success { background: var(--vert); }
.toast--error   { background: var(--rouge); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Fab bouton flottant --------------------------------- */
.fab {
  position: fixed;
  bottom: calc(var(--tab-h) + 1rem);
  right: 1rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bleu);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--ombre-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  transition: transform .2s, background .2s;
}
.fab:hover { background: var(--bleu-clair); transform: scale(1.05); }
.fab--or { background: var(--or); }

/* ---- Classement podium ----------------------------------- */
.podium-row {
  display: flex;
  align-items: center;
  padding: .6rem .75rem;
  border-radius: var(--rayon-sm);
  margin-bottom: .4rem;
  background: #fff;
  gap: .75rem;
}
.podium-row:nth-child(1) { background: #FFF7CD; }
.podium-row:nth-child(2) { background: #F5F5F5; }
.podium-row:nth-child(3) { background: #FFF0E8; }
.podium-rank {
  font-size: 1rem;
  font-weight: 800;
  width: 24px;
  text-align: center;
}
.podium-row:nth-child(1) .podium-rank { color: #D4AC0D; }
.podium-row:nth-child(2) .podium-rank { color: #808080; }
.podium-row:nth-child(3) .podium-rank { color: #CD7F32; }
.podium-name { flex: 1; font-size: .875rem; font-weight: 600; }
.podium-val  { font-size: .875rem; font-weight: 700; color: var(--bleu); }

/* ---- Divider --------------------------------------------- */
.divider {
  height: 1px;
  background: #E5E7EB;
  margin: .75rem 0;
}

/* ---- Section titre --------------------------------------- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.section-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gris);
}

/* ---- Pied de page formulaire sticky ---------------------- */
.form-footer {
  position: sticky;
  bottom: calc(var(--tab-h) + .5rem);
  background: var(--blanc);
  padding: .75rem 0;
  display: flex;
  gap: .5rem;
  z-index: 50;
}

/* ---- Responsive desktop ---------------------------------- */
@media (min-width: 640px) {
  .page { padding: 1.5rem 1.5rem calc(var(--tab-h) + 2rem); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  h1 { font-size: 1.75rem; }
}

@media (min-width: 1024px) {
  .bottomnav { display: none; }
  body { padding-bottom: 0; }
  .page { padding-bottom: 2rem; }
  .form-footer { position: static; }
  .fab { bottom: 2rem; }
}

/* ---- PWA overrides --------------------------------------- */
@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); height: calc(var(--nav-h) + env(safe-area-inset-top)); }
}

/* ---- Utilitaires ----------------------------------------- */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm     { font-size: .8rem; }
.text-muted  { color: var(--gris); }
.font-bold   { font-weight: 700; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-1       { gap: .5rem; }
.gap-2       { gap: 1rem; }
.flex-1      { flex: 1; }
.hidden      { display: none; }
.float-right { float: right; }
.ml-1        { margin-left: .5rem; }
.mb-3        { margin-bottom: 1.5rem; }
.mb-4        { margin-bottom: 2rem; }

/* ---- Rapport note ---------------------------------------- */
.rapport-note {
  background: var(--beige-clair);
  border-left: 3px solid var(--or);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .6rem .9rem;
  font-size: .9rem;
  color: var(--gris);
}

/* ---- Rubrique row readonly (stats) ----------------------- */
.rubrique-row.readonly {
  cursor: default;
  border-bottom: 1px solid var(--beige-clair);
  padding: .55rem 0;
}
.rubrique-row.readonly:last-child { border-bottom: none; }
.rubrique-val {
  font-weight: 700;
  color: var(--bleu);
  min-width: 2.5rem;
  text-align: right;
}

/* ---- Podium classement ----------------------------------- */
.podium-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: .75rem;
  margin: 1rem 0;
}
.podium-item {
  flex: 1;
  text-align: center;
  background: var(--beige-clair);
  border-radius: var(--radius);
  padding: .75rem .5rem;
}
.podium-1 { order: 2; background: #FFF8E6; border: 2px solid var(--or); }
.podium-2 { order: 1; }
.podium-3 { order: 3; }
.podium-medal { font-size: 1.6rem; }
.podium-nom   { font-size: .8rem; font-weight: 600; margin: .3rem 0; color: var(--bleu); }
.podium-val   { font-size: 1.2rem; font-weight: 700; color: var(--or-fonce, #a07820); }

/* ---- Classement liste (rang 4+) -------------------------- */
.classement-liste .rubrique-row { padding: .5rem 0; }

/* ---- Stat value small (classements responsables) --------- */
.stat-value-sm {
  font-size: 1.1rem;
  font-weight: 700;
  min-width: 3rem;
  text-align: right;
}

/* ---- Semaine select form ---------------------------------- */
.semaine-select-form {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

/* ---- Chart container (évolution) ------------------------- */
.chart-container {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding: .5rem 0 0;
}
.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.chart-value {
  font-size: .65rem;
  font-weight: 600;
  color: var(--bleu);
  margin-bottom: 2px;
}
.chart-bar-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
}
.chart-bar {
  width: 100%;
  background: var(--or);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height .3s ease;
}
.chart-label {
  font-size: .6rem;
  color: var(--gris);
  margin-top: 3px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---- Admin : btn-sm -------------------------------------- */
.btn-sm {
  padding: .3rem .65rem;
  font-size: .8rem;
}
.btn-warning {
  background: #f59e0b;
  color: #fff;
}
.btn-warning:active { background: #d97706; }

/* ---- Color helpers --------------------------------------- */
.text-success { color: #16a34a; }
.text-warning { color: #d97706; }
.text-danger  { color: #dc2626; }

/* ---- Auth body (pages erreur) ---------------------------- */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bleu);
  padding: 1.5rem;
}
.auth-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
}


/* ---- Menu utilisateur (topbar) --------------------------- */
.topbar__user-wrap {
  position: relative;
}
.topbar__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--or);
  color: var(--bleu);
  font-weight: 700;
  font-size: .75rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .03em;
  flex-shrink: 0;
}
.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  z-index: 200;
  overflow: hidden;
}
.user-menu__header {
  padding: .75rem 1rem;
  background: var(--beige-clair);
  border-bottom: 1px solid #e5e7eb;
}
.user-menu__item {
  display: block;
  padding: .7rem 1rem;
  text-decoration: none;
  color: var(--bleu);
  font-size: .9rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background .15s;
}
.user-menu__item:hover { background: var(--beige-clair); }
.user-menu__item--danger { color: #dc2626; }
.user-menu__item--danger:hover { background: #FEF2F2; }

/* ---- Lien inscription sur page login --------------------- */
.auth-register-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: .82rem;
  color: var(--gris);
}
.auth-register-link a {
  color: var(--or);
  text-decoration: none;
}

/* ============================================================
   ALIAS DE CLASSES — compatibilité vues (Bootstrap → BEM)
   ============================================================ */

/* Boutons */
.btn-primary   { background: var(--bleu); color: #fff; border-radius: var(--rayon-sm); }
.btn-primary:active { background: var(--bleu-clair); }
.btn-secondary { background: var(--gris-clair); color: var(--gris-fonce); }
.btn-danger    { background: var(--rouge); color: #fff; }
.btn-success   { background: var(--vert); color: #fff; }
.btn-outline   { background: transparent; border: 1.5px solid var(--bleu); color: var(--bleu); }
.btn-gold      { background: var(--or); color: #fff; }

/* Formulaires */
.form-control {
  display: block;
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid #D1D5DB;
  border-radius: var(--rayon-sm);
  background: #fff;
  font-size: .95rem;
  color: var(--gris-fonce);
  transition: border-color .15s;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(26,39,68,.10);
}
.form-control::placeholder { color: #9CA3AF; }
.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--bleu);
  margin-bottom: .35rem;
}
.form-group {
  margin-bottom: 1rem;
}

/* Alertes */
.alert-success { background: var(--vert-clair);   color: #166534; border-left: 4px solid var(--vert); }
.alert-danger  { background: var(--rouge-clair);  color: #991b1b; border-left: 4px solid var(--rouge); }
.alert-warning { background: var(--orange-clair); color: #92400e; border-left: 4px solid var(--orange); }
.alert-info    { background: var(--bleu-pale);    color: var(--bleu); border-left: 4px solid var(--bleu); }

/* Badges */
.badge-success { background: var(--vert-clair);  color: var(--vert); }
.badge-danger  { background: var(--rouge-clair); color: var(--rouge); }
.badge-warning { background: var(--orange-clair); color: var(--orange); }
.badge-info    { background: var(--bleu-pale);   color: var(--bleu); }

/* Card-title */
.card-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--gris);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .75rem;
}
