/* =====================================================================
   Le Cercle Vertueux — Système de design
   Palette inspirée du logo : vert feuille (croissance, le "V" du logo)
   + bleu-cyan (le tourbillon, mentorat/réseau)
   Typo : Fraunces (display, voix de la fondation) + Inter (données, UI)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* --- Couleurs de marque --- */
  --vert-feuille: #2E7D4F;
  --vert-feuille-fonce: #1F5C3A;
  --vert-pale: #E7F2EA;
  --cyan-tourbillon: #1C7C95;
  --cyan-pale: #E3F1F4;
  --encre: #16241F;
  --encre-douce: #44564E;

  /* --- Fond & surfaces --- */
  --fond: #F6F7F2;
  --surface: #FFFFFF;
  --bordure: #E1E5DD;

  /* --- États / statuts KPI --- */
  --excellent: #1C7C95;
  --excellent-bg: #E3F1F4;
  --bon: #2E7D4F;
  --bon-bg: #E7F2EA;
  --attention: #B9802B;
  --attention-bg: #FBF0DD;
  --risque: #B23B2E;
  --risque-bg: #FBE6E2;
  --neutre: #6B7670;
  --neutre-bg: #EEF0EA;

  /* --- Typo --- */
  --police-display: 'Fraunces', serif;
  --police-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* --- Forme --- */
  --rayon: 10px;
  --rayon-sm: 6px;
  --ombre: 0 2px 8px rgba(22, 36, 31, 0.06);
  --ombre-lg: 0 8px 28px rgba(22, 36, 31, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--police-display);
  color: var(--vert-feuille-fonce);
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: var(--cyan-tourbillon); text-decoration: none; }
a:hover { text-decoration: underline; }

p { margin: 0 0 12px; color: var(--encre-douce); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cyan-tourbillon);
  outline-offset: 2px;
}

/* ===================== LAYOUT APPLICATIF (admin/marraine/parent) ===================== */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--vert-feuille-fonce);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 16px;
}

.sidebar-brand .logo-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vert-feuille), var(--cyan-tourbillon));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--police-display);
  font-weight: 700;
  color: #fff;
  font-size: 15px;
}

.sidebar-brand .brand-text { font-family: var(--police-display); font-size: 17px; line-height: 1.15; }
.sidebar-brand .brand-text small { display: block; font-family: var(--police-ui); font-size: 11px; opacity: .75; font-weight: 400; }

.sidebar-nav { flex: 1; padding: 0 12px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--rayon-sm);
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.sidebar-nav a.active { background: var(--cyan-tourbillon); color: #fff; }
.sidebar-nav .nav-icon { width: 18px; text-align: center; font-size: 15px; }

.sidebar-footer { padding: 16px 20px 0; border-top: 1px solid rgba(255,255,255,0.15); margin-top: 16px; }
.sidebar-footer .user-name { font-size: 13px; font-weight: 600; }
.sidebar-footer .user-role { font-size: 11px; opacity: .7; text-transform: uppercase; letter-spacing: .04em; }
.sidebar-footer a.logout { font-size: 12px; color: rgba(255,255,255,0.75); display: inline-block; margin-top: 8px; }

.main-content { flex: 1; min-width: 0; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--bordure);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 { font-size: 22px; margin: 0; }
.topbar .topbar-sub { font-size: 13px; color: var(--encre-douce); }

.page-body { padding: 24px 28px 48px; max-width: 1240px; }

/* ===================== COMPOSANTS ===================== */

.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 18px 20px;
  box-shadow: var(--ombre);
}
.stat-card .stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-douce); font-weight: 600; }
.stat-card .stat-value { font-family: var(--police-display); font-size: 30px; color: var(--vert-feuille-fonce); margin-top: 4px; }
.stat-card .stat-value.cyan { color: var(--cyan-tourbillon); }
.stat-card .stat-hint { font-size: 12px; color: var(--encre-douce); margin-top: 4px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  margin-bottom: 24px;
}
.panel-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--bordure);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-header h2 { font-size: 17px; margin: 0; }
.panel-body { padding: 20px 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--rayon-sm);
  font-weight: 600;
  font-size: 13.5px;
  font-family: var(--police-ui);
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter .15s ease;
}
.btn-primary { background: var(--vert-feuille); color: #fff; }
.btn-primary:hover { filter: brightness(0.93); }
.btn-secondary { background: var(--cyan-pale); color: var(--cyan-tourbillon); }
.btn-secondary:hover { filter: brightness(0.96); }
.btn-outline { background: transparent; border-color: var(--bordure); color: var(--encre); }
.btn-outline:hover { background: var(--fond); }
.btn-danger { background: var(--risque-bg); color: var(--risque); }
.btn-danger:hover { filter: brightness(0.95); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
a.btn { text-decoration: none; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--encre-douce);
  border-bottom: 2px solid var(--bordure);
  padding: 10px 12px;
  font-weight: 600;
}
tbody td { padding: 12px; border-bottom: 1px solid var(--bordure); vertical-align: middle; }
tbody tr:hover { background: var(--fond); }
.table-wrap { overflow-x: auto; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.badge-excellent { background: var(--excellent-bg); color: var(--excellent); }
.badge-bon { background: var(--bon-bg); color: var(--bon); }
.badge-attention { background: var(--attention-bg); color: var(--attention); }
.badge-risque { background: var(--risque-bg); color: var(--risque); }
.badge-neutre { background: var(--neutre-bg); color: var(--neutre); }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--vert-pale); color: var(--vert-feuille-fonce);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; font-family: var(--police-display);
  object-fit: cover;
}

/* --- Formulaires --- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--encre); }
.field .hint { font-size: 11.5px; color: var(--encre-douce); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number],
input[type=tel], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-sm);
  font-family: var(--police-ui);
  font-size: 14px;
  background: var(--surface);
  color: var(--encre);
}
textarea { resize: vertical; min-height: 80px; }
input:disabled, select:disabled { background: var(--fond); color: var(--encre-douce); }

.alert { padding: 12px 16px; border-radius: var(--rayon-sm); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: var(--bon-bg); color: var(--vert-feuille-fonce); }
.alert-error { background: var(--risque-bg); color: var(--risque); }
.alert-info { background: var(--cyan-pale); color: var(--cyan-tourbillon); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--bordure); margin-bottom: 18px; }
.tabs a {
  padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--encre-douce);
  border-bottom: 2px solid transparent;
}
.tabs a.active { color: var(--vert-feuille-fonce); border-color: var(--vert-feuille); }

.progress-bar { background: var(--fond); border-radius: 99px; height: 8px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--cyan-tourbillon); border-radius: 99px; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--encre-douce); }
.empty-state .icon { font-size: 32px; margin-bottom: 10px; }

.muted { color: var(--encre-douce); font-size: 13px; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ===================== PAGE PUBLIQUE (accueil / connexion) ===================== */

.public-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 6%;
  background: var(--surface);
  border-bottom: 1px solid var(--bordure);
}
.public-brand { display: flex; align-items: center; gap: 10px; }
.public-brand .logo-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--vert-feuille), var(--cyan-tourbillon));
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-family: var(--police-display); font-weight: 700;
}
.public-brand .brand-text { font-family: var(--police-display); font-size: 19px; color: var(--vert-feuille-fonce); line-height: 1.1; }
.public-brand .brand-text small { display: block; font-family: var(--police-ui); font-size: 11px; color: var(--encre-douce); font-weight: 500; letter-spacing: .03em; }

.hero {
  padding: 64px 6% 48px;
  background: radial-gradient(circle at 80% 0%, var(--cyan-pale), transparent 55%), var(--fond);
}
.hero-inner { max-width: 760px; }
.hero .eyebrow { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan-tourbillon); font-weight: 700; margin-bottom: 10px; }
.hero h1 { font-size: 38px; line-height: 1.15; margin-bottom: 16px; }
.hero p.lead { font-size: 16.5px; max-width: 600px; }

.pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; padding: 0 6% 64px; }
.pillar-card { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); }
.pillar-card .pillar-num { font-family: var(--police-display); font-size: 13px; color: var(--cyan-tourbillon); font-weight: 700; }
.pillar-card h3 { font-size: 17px; margin: 6px 0 8px; }
.pillar-card p { font-size: 13.5px; margin: 0; }

.contract-band {
  background: var(--vert-feuille-fonce);
  color: #fff;
  padding: 48px 6%;
}
.contract-band h2 { color: #fff; font-size: 26px; }
.contract-band p { color: rgba(255,255,255,0.85); max-width: 640px; }
.contract-band .tig-badge {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: rgba(255,255,255,0.12); border-radius: 99px; padding: 8px 18px; margin-top: 6px;
}
.contract-band .tig-badge strong { font-family: var(--police-display); font-size: 22px; }

.login-wrap {
  min-height: calc(100vh - 78px);
  display: flex; align-items: center; justify-content: center;
  background: var(--fond);
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
}
.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  pointer-events: none;
  z-index: 0;
}
.login-blob.b1 {
  width: 280px; height: 280px; left: -70px; top: -40px;
  background: radial-gradient(circle, var(--vert-feuille) 0%, transparent 70%);
  opacity: 0.14;
  animation: floatDrift 17s ease-in-out infinite;
}
.login-blob.b2 {
  width: 240px; height: 240px; right: -60px; bottom: -50px;
  background: radial-gradient(circle, var(--cyan-tourbillon) 0%, transparent 70%);
  opacity: 0.13;
  animation: floatDriftSlow 21s ease-in-out infinite;
}
.login-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  animation: cardIn .65s var(--ease-fluide) both;
}
.login-card.shake { animation: shakeX .5s var(--ease-fluide); }
.login-card h2 { text-align: center; margin-bottom: 4px; }
.login-card .sub { text-align: center; margin-bottom: 22px; }
.login-card .links-row { display: flex; justify-content: space-between; font-size: 13px; margin-top: 14px; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes shakeX {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

/* --- Champs : transition douce au focus, état d'erreur animé --- */
.login-card input {
  transition: border-color .25s var(--ease-fluide), box-shadow .25s var(--ease-fluide);
}
.login-card input:focus {
  border-color: var(--cyan-tourbillon);
  box-shadow: 0 0 0 4px rgba(28,124,149,0.13);
}
.field.has-error input {
  border-color: var(--risque);
}
.field.has-error input:focus {
  box-shadow: 0 0 0 4px rgba(178,59,46,0.13);
}
.field-error {
  color: var(--risque);
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
  min-height: 0;
  opacity: 0;
}
.field-error.show { animation: fadeUp .35s var(--ease-fluide) both; opacity: 1; }

/* --- Champ mot de passe avec bouton afficher/masquer --- */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 78px; }
.toggle-password {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--cyan-tourbillon);
  padding: 6px 8px; border-radius: var(--rayon-sm);
  transition: background .2s var(--ease-fluide);
}
.toggle-password:hover { background: var(--cyan-pale); }

.caps-warning {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--attention); font-weight: 600;
  margin-top: 5px; height: 0; opacity: 0; overflow: hidden;
  transition: opacity .25s var(--ease-fluide), height .25s var(--ease-fluide);
}
.caps-warning.show { opacity: 1; height: 16px; }

/* --- Bouton de connexion : état de chargement avec spinner --- */
.btn-submit { gap: 8px; }
.spinner {
  display: none;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
}
.btn-submit.is-loading { cursor: progress; opacity: .88; }
.btn-submit.is-loading .spinner { display: inline-block; animation: spin .7s linear infinite; }
.btn-submit.is-loading::after { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

footer.public-footer { padding: 20px 6%; text-align: center; font-size: 12.5px; color: var(--encre-douce); }

/* ===================== ANIMATIONS — PAGE D'ACCUEIL ===================== */

html { scroll-behavior: smooth; }

/* Courbe d'accélération "douce" utilisée partout pour une sensation homogène et fluide */
:root { --ease-fluide: cubic-bezier(.16, 1, .3, 1); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
@keyframes floatDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(18px, -22px) scale(1.06); }
  66%  { transform: translate(-14px, 14px) scale(0.97); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes floatDriftSlow {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-26px, 20px) scale(1.08); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes shine {
  from { transform: translateX(-130%) skewX(-12deg); }
  to   { transform: translateX(230%) skewX(-12deg); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

.public-header {
  transition: box-shadow .35s var(--ease-fluide), background-color .35s var(--ease-fluide), backdrop-filter .35s var(--ease-fluide);
}
.public-header.is-scrolled {
  box-shadow: 0 4px 22px rgba(22,36,31,0.10);
  background-color: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px) saturate(1.2);
}

.logo-mark-img {
  width: 40px; height: 40px;
  object-fit: contain;
  animation: popIn .7s var(--ease-fluide) both;
  transition: transform .4s var(--ease-fluide);
}
.public-brand:hover .logo-mark-img,
.sidebar-brand:hover .logo-mark-img { transform: rotate(8deg) scale(1.06); }
.sidebar-brand .logo-mark-img { width: 34px; height: 34px; }

.public-brand { position: relative; }

.hero { position: relative; overflow: hidden; }

/* --- Logo géant en filigrane, avec parallax au défilement (piloté en JS via --parallax) --- */
.hero-decor {
  position: absolute;
  top: -120px; right: -120px;
  width: 520px; height: 520px;
  opacity: 0.10;
  pointer-events: none;
  animation: slowSpin 100s linear infinite;
  transform: translateY(calc(var(--parallax, 0) * 1px));
  z-index: 0;
  will-change: transform;
}
.hero-decor img { width: 100%; height: 100%; object-fit: contain; }

/* --- Taches de couleur flottantes en arrière-plan, pour un fond vivant --- */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(38px);
  pointer-events: none;
  z-index: 0;
}
.hero-blob.b1 {
  width: 260px; height: 260px; left: -60px; top: 60px;
  background: radial-gradient(circle, var(--vert-feuille) 0%, transparent 70%);
  opacity: 0.16;
  animation: floatDrift 16s ease-in-out infinite;
}
.hero-blob.b2 {
  width: 200px; height: 200px; left: 38%; bottom: -60px;
  background: radial-gradient(circle, var(--cyan-tourbillon) 0%, transparent 70%);
  opacity: 0.13;
  animation: floatDriftSlow 20s ease-in-out infinite;
}

.hero-inner { position: relative; z-index: 1; }

.hero .eyebrow,
.hero h1,
.hero p.lead,
.hero .hero-cta {
  opacity: 0;
  animation: fadeUp .85s var(--ease-fluide) both;
}
.hero .eyebrow   { animation-delay: .05s; }
.hero h1          { animation-delay: .16s; }
.hero p.lead      { animation-delay: .30s; }
.hero .hero-cta   { animation-delay: .44s; }

.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* --- Boutons : lever doux + reflet lumineux au survol --- */
.btn {
  position: relative;
  overflow: hidden;
  transition: filter .2s var(--ease-fluide), transform .35s var(--ease-fluide), box-shadow .35s var(--ease-fluide);
}
.btn::after {
  content: '';
  position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-130%) skewX(-12deg);
  pointer-events: none;
}
.btn:hover::after { animation: shine .9s var(--ease-fluide); }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.98); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(46,125,79,0.30); }
.btn-secondary:hover { box-shadow: 0 10px 24px rgba(28,124,149,0.20); }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--encre-douce); font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: color .25s var(--ease-fluide), gap .25s var(--ease-fluide);
}
.scroll-cue:hover { color: var(--cyan-tourbillon); text-decoration: none; gap: 11px; }
.scroll-cue .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-tourbillon);
  animation: gentlePulse 1.8s ease-in-out infinite;
}
.scroll-cue .arrow { display: inline-block; animation: bob 1.6s ease-in-out infinite; }

/* --- Révélation au défilement : translation + échelle, courbe fluide avec léger rebond --- */
.reveal {
  opacity: 0;
  transform: translateY(32px) scale(.96);
  transition: opacity .8s var(--ease-fluide), transform .8s var(--ease-fluide);
  will-change: transform, opacity;
}
.reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }

.pillar-card {
  position: relative;
  overflow: hidden;
  transition: transform .4s var(--ease-fluide), box-shadow .4s var(--ease-fluide), border-color .4s var(--ease-fluide);
}
.pillar-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--vert-feuille), var(--cyan-tourbillon));
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease-fluide);
}
.pillar-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--ombre-lg);
  border-color: var(--cyan-tourbillon);
}
.pillar-card:hover::before { transform: scaleX(1); }
.pillar-card .pillar-num { transition: color .3s var(--ease-fluide), transform .3s var(--ease-fluide); }
.pillar-card:hover .pillar-num { transform: translateX(3px); }

.contract-band { position: relative; overflow: hidden; }
.contract-band .tig-badge {
  animation: gentlePulse 3.5s ease-in-out infinite;
  transition: transform .3s var(--ease-fluide), background .3s var(--ease-fluide);
}
.contract-band .tig-badge:hover { background: rgba(255,255,255,0.2); }

@media (prefers-reduced-motion: reduce) {
  .logo-mark-img, .hero-decor, .hero-blob, .hero .eyebrow, .hero h1, .hero p.lead, .hero .hero-cta,
  .scroll-cue .dot, .scroll-cue .arrow, .contract-band .tig-badge, .reveal, .btn::after {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  html { scroll-behavior: auto; }
}

@media (max-width: 880px) {
  .hero-decor { width: 320px; height: 320px; top: -80px; right: -100px; }
  .hero-blob.b1 { width: 180px; height: 180px; }
  .hero-blob.b2 { width: 140px; height: 140px; }
}


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

@media (max-width: 880px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 10px 14px; overflow-x: auto; }
  .sidebar-brand { border: none; margin-bottom: 0; padding: 0 12px; }
  .sidebar-footer { display: flex; align-items: center; border: none; margin: 0; padding: 0 4px; flex-shrink: 0; }
  .sidebar-footer .user-info { display: none; }
  .sidebar-footer a.logout { white-space: nowrap; margin-top: 0; }
  .sidebar-nav { display: flex; padding: 0; }
  .sidebar-nav a { white-space: nowrap; }
  .page-body { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =====================================================================
   CONNEXION & DÉCONNEXION — Overrides UI/UX
   Bulles savon, glassmorphisme, boutons pill
   ===================================================================== */

/* --- Fond dégradé doux pour la page de connexion -------------------- */
.login-wrap {
  background: linear-gradient(155deg, #e8f4ec 0%, #f4f8f6 45%, #e4f1f7 100%);
}

/* --- Bulles savon flottantes ----------------------------------------- */
.login-bubble {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: bubbleRise linear infinite;
  /* Effet nacré : dégradé interne léger */
  background: radial-gradient(
    circle at 30% 28%,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.06) 55%,
    transparent 100%
  );
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.28),
    0 0 3px rgba(46, 125, 79, 0.08);
}
/* Reflet principal (brillance haut-gauche) */
.login-bubble::before {
  content: '';
  position: absolute;
  width: 30%; height: 24%;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  top: 18%; left: 22%;
  filter: blur(1.8px);
}
/* Petit reflet secondaire */
.login-bubble::after {
  content: '';
  position: absolute;
  width: 12%; height: 10%;
  background: rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  top: 54%; left: 62%;
  filter: blur(1px);
}

@keyframes bubbleRise {
  0%   { transform: translateY(0)      translateX(0px);  opacity: 0;    }
  7%   {                                                  opacity: 1;    }
  28%  { transform: translateY(-28vh)  translateX(10px);                 }
  55%  { transform: translateY(-55vh)  translateX(-7px); opacity: 0.85; }
  82%  { transform: translateY(-82vh)  translateX(5px);  opacity: 0.55; }
  100% { transform: translateY(-115vh) translateX(-3px); opacity: 0;    }
}
@keyframes bubbleRiseAlt {
  0%   { transform: translateY(0)      translateX(0px);   opacity: 0;    }
  7%   {                                                   opacity: 1;    }
  28%  { transform: translateY(-28vh)  translateX(-12px);                 }
  55%  { transform: translateY(-55vh)  translateX(9px);   opacity: 0.85; }
  82%  { transform: translateY(-82vh)  translateX(-6px);  opacity: 0.55; }
  100% { transform: translateY(-115vh) translateX(4px);   opacity: 0;    }
}

/* --- Login card : glassmorphisme, coins plus ronds ------------------- */
.login-card {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.76) !important;
  border-radius: 22px !important;
  box-shadow:
    0 2px 4px  rgba(22, 36, 31, 0.04),
    0 14px 40px rgba(22, 36, 31, 0.12),
    0  0   0 1px rgba(46, 125, 79, 0.07) !important;
  padding: 42px 40px !important;
}

/* --- Champs : coins plus arrondis, focus vert ------------------------ */
.login-card input[type="email"],
.login-card input[type="password"],
.login-card input[type="text"] {
  border-radius: 12px !important;
  padding: 11px 14px;
  font-size: 14.5px;
  border-color: #d6e4da;
  transition: border-color .25s var(--ease-fluide, ease), box-shadow .25s var(--ease-fluide, ease);
}
.login-card input[type="email"]:focus,
.login-card input[type="password"]:focus,
.login-card input[type="text"]:focus {
  border-color: var(--vert-feuille) !important;
  box-shadow: 0 0 0 4px rgba(46, 125, 79, 0.14) !important;
  outline: none;
}
.login-card .password-wrap input { padding-right: 88px !important; }

/* --- Bouton Afficher / Masquer — pill vert --------------------------- */
.toggle-password {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: var(--vert-pale) !important;
  border: none !important;
  cursor: pointer;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: var(--vert-feuille) !important;
  padding: 5px 12px !important;
  border-radius: 50px !important;
  font-family: var(--police-ui);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease !important;
}
.toggle-password:hover {
  background: var(--vert-feuille) !important;
  color: #fff !important;
  transform: translateY(-50%) scale(1.06) !important;
}

/* --- Bouton Se connecter — pill + dégradé + ombre ------------------- */
.login-card .btn-primary.btn-submit,
.login-card button[type="submit"].btn-primary {
  width: 100%;
  justify-content: center;
  border-radius: 50px !important;
  padding: 13px 24px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.025em;
  background: linear-gradient(135deg, #3a9060 0%, var(--vert-feuille-fonce) 100%) !important;
  box-shadow: 0 4px 20px rgba(46, 125, 79, 0.32) !important;
  border: none !important;
  transition: transform .3s ease, box-shadow .3s ease, filter .2s !important;
}
.login-card .btn-primary.btn-submit:hover:not(:disabled),
.login-card button[type="submit"].btn-primary:hover:not(:disabled) {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 32px rgba(46, 125, 79, 0.42) !important;
  filter: brightness(1.06);
}
.login-card .btn-primary.btn-submit:active,
.login-card button[type="submit"].btn-primary:active {
  transform: translateY(-1px) scale(0.98) !important;
}
.login-card .btn-primary.btn-submit.is-loading {
  opacity: 0.82;
  cursor: progress;
}

/* --- Alerte erreur : bord gauche coloré ----------------------------- */
.login-card .alert-error {
  border-radius: 10px !important;
  border-left: 3px solid var(--risque) !important;
  padding: 11px 15px !important;
  font-size: 13.5px;
  font-weight: 500;
}

/* --- Liens (mot de passe oublié / retour) ---------------------------- */
.login-card .links-row a {
  color: var(--cyan-tourbillon);
  font-weight: 500;
  font-size: 13px;
  opacity: 0.9;
  transition: color .2s, opacity .2s;
}
.login-card .links-row a:hover {
  color: var(--vert-feuille-fonce);
  opacity: 1;
  text-decoration: none;
}

/* === PAGE DE DÉCONNEXION =========================================== */
.logout-wrap {
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #e8f4ec 0%, #f4f8f6 45%, #e4f1f7 100%);
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
}

.logout-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  box-shadow:
    0 2px 4px  rgba(22, 36, 31, 0.04),
    0 14px 40px rgba(22, 36, 31, 0.12),
    0  0   0 1px rgba(46, 125, 79, 0.07);
  padding: 50px 42px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: cardIn .65s cubic-bezier(.16,1,.3,1) both;
}

.logout-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--vert-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  font-size: 32px;
  box-shadow: 0 4px 16px rgba(46,125,79,0.18);
  animation: popIn .6s cubic-bezier(.16,1,.3,1) .18s both;
}

.logout-card h2  { font-size: 24px; margin-bottom: 8px; }
.logout-card .sub { margin-bottom: 6px; font-size: 14.5px; }

.logout-countdown {
  font-size: 13px;
  color: var(--encre-douce);
  margin: 18px 0 26px;
  min-height: 18px;
}
.logout-countdown strong { color: var(--vert-feuille); }

.logout-card .btn-reconnect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 50px;
  padding: 12px 32px;
  font-size: 14.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #3a9060 0%, var(--vert-feuille-fonce) 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(46, 125, 79, 0.30);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--police-ui);
  transition: transform .3s ease, box-shadow .3s ease, filter .2s;
  letter-spacing: 0.02em;
  width: 100%;
}
.logout-card .btn-reconnect:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(46, 125, 79, 0.40);
  filter: brightness(1.06);
  text-decoration: none;
  color: #fff;
}
.logout-card .btn-reconnect:active { transform: translateY(-1px) scale(.98); }

.logout-home-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--encre-douce);
  transition: color .2s;
}
.logout-home-link:hover { color: var(--vert-feuille-fonce); text-decoration: none; }

/* Reduced motion — supprimer les bulles */
@media (prefers-reduced-motion: reduce) {
  .login-bubble { animation: none !important; opacity: 0 !important; display: none; }
}
/* =====================================================================
   Le Cercle Vertueux — Système de design
   Palette inspirée du logo : vert feuille (croissance, le "V" du logo)
   + bleu-cyan (le tourbillon, mentorat/réseau)
   Typo : Fraunces (display, voix de la fondation) + Inter (données, UI)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* --- Couleurs de marque --- */
  --vert-feuille: #2E7D4F;
  --vert-feuille-fonce: #1F5C3A;
  --vert-pale: #E7F2EA;
  --cyan-tourbillon: #1C7C95;
  --cyan-pale: #E3F1F4;
  --encre: #16241F;
  --encre-douce: #44564E;

  /* --- Fond & surfaces --- */
  --fond: #F6F7F2;
  --surface: #FFFFFF;
  --bordure: #E1E5DD;

  /* --- États / statuts KPI --- */
  --excellent: #1C7C95;
  --excellent-bg: #E3F1F4;
  --bon: #2E7D4F;
  --bon-bg: #E7F2EA;
  --attention: #B9802B;
  --attention-bg: #FBF0DD;
  --risque: #B23B2E;
  --risque-bg: #FBE6E2;
  --neutre: #6B7670;
  --neutre-bg: #EEF0EA;

  /* --- Typo --- */
  --police-display: 'Fraunces', serif;
  --police-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* --- Forme --- */
  --rayon: 10px;
  --rayon-sm: 6px;
  --ombre: 0 2px 8px rgba(22, 36, 31, 0.06);
  --ombre-lg: 0 8px 28px rgba(22, 36, 31, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--police-display);
  color: var(--vert-feuille-fonce);
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: var(--cyan-tourbillon); text-decoration: none; }
a:hover { text-decoration: underline; }

p { margin: 0 0 12px; color: var(--encre-douce); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cyan-tourbillon);
  outline-offset: 2px;
}

/* ===================== LAYOUT APPLICATIF (admin/marraine/parent) ===================== */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--vert-feuille-fonce);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  margin-bottom: 16px;
}

.sidebar-brand .logo-mark {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vert-feuille), var(--cyan-tourbillon));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--police-display);
  font-weight: 700;
  color: #fff;
  font-size: 15px;
}

.sidebar-brand .brand-text { font-family: var(--police-display); font-size: 17px; line-height: 1.15; }
.sidebar-brand .brand-text small { display: block; font-family: var(--police-ui); font-size: 11px; opacity: .75; font-weight: 400; }

.sidebar-nav { flex: 1; padding: 0 12px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--rayon-sm);
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.sidebar-nav a.active { background: var(--cyan-tourbillon); color: #fff; }
.sidebar-nav .nav-icon { width: 18px; text-align: center; font-size: 15px; }

.sidebar-footer { padding: 16px 20px 0; border-top: 1px solid rgba(255,255,255,0.15); margin-top: 16px; }
.sidebar-footer .user-name { font-size: 13px; font-weight: 600; }
.sidebar-footer .user-role { font-size: 11px; opacity: .7; text-transform: uppercase; letter-spacing: .04em; }
.sidebar-footer a.logout { font-size: 12px; color: rgba(255,255,255,0.75); display: inline-block; margin-top: 8px; }

.main-content { flex: 1; min-width: 0; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--bordure);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 { font-size: 22px; margin: 0; }
.topbar .topbar-sub { font-size: 13px; color: var(--encre-douce); }

.page-body { padding: 24px 28px 48px; max-width: 1240px; }

/* ===================== COMPOSANTS ===================== */

.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }

.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 18px 20px;
  box-shadow: var(--ombre);
  overflow: hidden;
  transition: transform .3s var(--ease-fluide), box-shadow .3s var(--ease-fluide);
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--vert-feuille), var(--cyan-tourbillon));
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease-fluide);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--ombre-lg); }
.stat-card:hover::before { transform: scaleX(1); }
.stat-card.stat-card--alert { border-color: rgba(178,59,46,0.35); background: linear-gradient(180deg, var(--risque-bg) 0%, var(--surface) 55%); }
.stat-card.stat-card--alert::before { background: linear-gradient(90deg, var(--risque), var(--attention)); transform: scaleX(1); }

.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--vert-pale); color: var(--vert-feuille-fonce);
}
.stat-icon.cyan { background: var(--cyan-pale); color: var(--cyan-tourbillon); }
.stat-icon.alert { background: var(--risque-bg); color: var(--risque); }
.stat-icon svg { width: 19px; height: 19px; }
.stat-pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--risque);
  animation: gentlePulse 1.6s ease-in-out infinite;
}

.stat-card .stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-douce); font-weight: 600; margin-top: 12px; }
.stat-card .stat-value { font-family: var(--police-display); font-size: 32px; color: var(--vert-feuille-fonce); margin-top: 2px; }
.stat-card .stat-value.cyan { color: var(--cyan-tourbillon); }
.stat-card .stat-value.alert { color: var(--risque); }
.stat-card .stat-hint { font-size: 12px; color: var(--encre-douce); margin-top: 4px; }

/* --- Bandeau de bienvenue avec horloge live --- */
.greeting-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-bottom: 22px;
}
.greeting-bar .greeting-text { font-size: 14.5px; color: var(--encre-douce); }
.greeting-bar .greeting-text strong { color: var(--vert-feuille-fonce); }
.greeting-bar .live-clock {
  font-family: var(--police-display); font-size: 14px; color: var(--cyan-tourbillon);
  background: var(--cyan-pale); padding: 6px 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px;
}
.greeting-bar .live-clock .live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-tourbillon);
  animation: gentlePulse 2s ease-in-out infinite;
}

/* --- Barre de répartition KPI animée --- */
.distrib-bar {
  display: flex; height: 14px; border-radius: 999px; overflow: hidden;
  background: var(--neutre-bg); margin: 14px 0 16px;
}
.distrib-seg { height: 100%; width: 0%; transition: width 1s var(--ease-fluide); }
.distrib-seg.excellent { background: var(--excellent); }
.distrib-seg.bon { background: var(--bon); }
.distrib-seg.attention { background: var(--attention); }
.distrib-seg.risque { background: var(--risque); }
.distrib-legend { display: flex; flex-wrap: wrap; gap: 16px; }
.distrib-legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--encre-douce); }
.distrib-legend-item .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.distrib-legend-item .dot.excellent { background: var(--excellent); }
.distrib-legend-item .dot.bon { background: var(--bon); }
.distrib-legend-item .dot.attention { background: var(--attention); }
.distrib-legend-item .dot.risque { background: var(--risque); }
.distrib-legend-item strong { color: var(--encre); }

/* --- États vides plus accueillants --- */
.empty-state .icon-wrap {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--vert-pale); color: var(--vert-feuille);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.empty-state .icon-wrap svg { width: 26px; height: 26px; }
.empty-state .icon-wrap.neutre { background: var(--neutre-bg); color: var(--neutre); }

/* --- Apparition douce en cascade au chargement --- */
.dash-animate { opacity: 0; animation: fadeUp .6s var(--ease-fluide) both; }
.cards-row.dash-animate-group .stat-card:nth-child(1) { animation: fadeUp .6s var(--ease-fluide) both; animation-delay: .02s; }
.cards-row.dash-animate-group .stat-card:nth-child(2) { animation: fadeUp .6s var(--ease-fluide) both; animation-delay: .09s; }
.cards-row.dash-animate-group .stat-card:nth-child(3) { animation: fadeUp .6s var(--ease-fluide) both; animation-delay: .16s; }
.cards-row.dash-animate-group .stat-card:nth-child(4) { animation: fadeUp .6s var(--ease-fluide) both; animation-delay: .23s; }
.panel.dash-animate:nth-of-type(1) { animation-delay: .12s; }
.panel.dash-animate:nth-of-type(2) { animation-delay: .2s; }
.panel.dash-animate:nth-of-type(3) { animation-delay: .28s; }

tbody tr.row-animate { animation: fadeUp .45s var(--ease-fluide) both; }

@media (prefers-reduced-motion: reduce) {
  .stat-card, .dash-animate, .cards-row.dash-animate-group .stat-card, tbody tr.row-animate {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .distrib-seg { transition: none !important; }
}


.panel {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  margin-bottom: 24px;
}
.panel-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--bordure);
  display: flex; align-items: center; justify-content: space-between;
}
.panel-header h2 { font-size: 17px; margin: 0; }
.panel-body { padding: 20px 22px; }

.btn {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--rayon-sm);
  font-weight: 600;
  font-size: 13.5px;
  font-family: var(--police-ui);
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter .15s ease;
}
.btn-primary { background: var(--vert-feuille); color: #fff; }
.btn-primary:hover { filter: brightness(0.93); }
.btn-secondary { background: var(--cyan-pale); color: var(--cyan-tourbillon); }
.btn-secondary:hover { filter: brightness(0.96); }
.btn-outline { background: transparent; border-color: var(--bordure); color: var(--encre); }
.btn-outline:hover { background: var(--fond); }
.btn-danger { background: var(--risque-bg); color: var(--risque); }
.btn-danger:hover { filter: brightness(0.95); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
a.btn { text-decoration: none; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--encre-douce);
  border-bottom: 2px solid var(--bordure);
  padding: 10px 12px;
  font-weight: 600;
}
tbody td { padding: 12px; border-bottom: 1px solid var(--bordure); vertical-align: middle; }
tbody tr:hover { background: var(--fond); }
.table-wrap { overflow-x: auto; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.badge-excellent { background: var(--excellent-bg); color: var(--excellent); }
.badge-bon { background: var(--bon-bg); color: var(--bon); }
.badge-attention { background: var(--attention-bg); color: var(--attention); }
.badge-risque { background: var(--risque-bg); color: var(--risque); }
.badge-neutre { background: var(--neutre-bg); color: var(--neutre); }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--vert-pale); color: var(--vert-feuille-fonce);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; font-family: var(--police-display);
  object-fit: cover;
}

/* --- Formulaires --- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--encre); }
.field .hint { font-size: 11.5px; color: var(--encre-douce); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number],
input[type=tel], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-sm);
  font-family: var(--police-ui);
  font-size: 14px;
  background: var(--surface);
  color: var(--encre);
}
textarea { resize: vertical; min-height: 80px; }
input:disabled, select:disabled { background: var(--fond); color: var(--encre-douce); }

.alert { padding: 12px 16px; border-radius: var(--rayon-sm); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: var(--bon-bg); color: var(--vert-feuille-fonce); }
.alert-error { background: var(--risque-bg); color: var(--risque); }
.alert-info { background: var(--cyan-pale); color: var(--cyan-tourbillon); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--bordure); margin-bottom: 18px; }
.tabs a {
  padding: 9px 14px; font-size: 13.5px; font-weight: 600; color: var(--encre-douce);
  border-bottom: 2px solid transparent;
}
.tabs a.active { color: var(--vert-feuille-fonce); border-color: var(--vert-feuille); }

.progress-bar { background: var(--fond); border-radius: 99px; height: 8px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--cyan-tourbillon); border-radius: 99px; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--encre-douce); }
.empty-state .icon { font-size: 32px; margin-bottom: 10px; }

.muted { color: var(--encre-douce); font-size: 13px; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ===================== PAGE PUBLIQUE (accueil / connexion) ===================== */

.public-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 6%;
  background: var(--surface);
  border-bottom: 1px solid var(--bordure);
}
.public-brand { display: flex; align-items: center; gap: 10px; }
.public-brand .logo-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--vert-feuille), var(--cyan-tourbillon));
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-family: var(--police-display); font-weight: 700;
}
.public-brand .brand-text { font-family: var(--police-display); font-size: 19px; color: var(--vert-feuille-fonce); line-height: 1.1; }
.public-brand .brand-text small { display: block; font-family: var(--police-ui); font-size: 11px; color: var(--encre-douce); font-weight: 500; letter-spacing: .03em; }

.hero {
  padding: 64px 6% 48px;
  background: radial-gradient(circle at 80% 0%, var(--cyan-pale), transparent 55%), var(--fond);
}
.hero-inner { max-width: 760px; }
.hero .eyebrow { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan-tourbillon); font-weight: 700; margin-bottom: 10px; }
.hero h1 { font-size: 38px; line-height: 1.15; margin-bottom: 16px; }
.hero p.lead { font-size: 16.5px; max-width: 600px; }

.pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; padding: 0 6% 64px; }
.pillar-card { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); }
.pillar-card .pillar-num { font-family: var(--police-display); font-size: 13px; color: var(--cyan-tourbillon); font-weight: 700; }
.pillar-card h3 { font-size: 17px; margin: 6px 0 8px; }
.pillar-card p { font-size: 13.5px; margin: 0; }

.contract-band {
  background: var(--vert-feuille-fonce);
  color: #fff;
  padding: 48px 6%;
}
.contract-band h2 { color: #fff; font-size: 26px; }
.contract-band p { color: rgba(255,255,255,0.85); max-width: 640px; }
.contract-band .tig-badge {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: rgba(255,255,255,0.12); border-radius: 99px; padding: 8px 18px; margin-top: 6px;
}
.contract-band .tig-badge strong { font-family: var(--police-display); font-size: 22px; }

.login-wrap {
  min-height: calc(100vh - 78px);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--vert-pale) 0%, var(--fond) 45%, var(--cyan-pale) 100%);
  padding: 40px 16px;
  position: relative;
  overflow: hidden;
}

/* --- Bulles relaxantes : générées en JS, flottent du bas vers le haut --- */
.bubbles-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bubble {
  position: absolute;
  bottom: -140px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.9), rgba(255,255,255,0) 45%),
    radial-gradient(circle, var(--tint-strong, rgba(46,125,79,.22)), var(--tint-soft, rgba(46,125,79,.05)) 60%, transparent 78%);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: inset 0 0 16px rgba(255,255,255,.4), 0 6px 18px rgba(22,36,31,.05);
  animation: bubbleRise linear infinite;
}
@keyframes bubbleRise {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  8%   { opacity: .85; }
  50%  { transform: translate(var(--drift, 30px), -68vh) scale(1.04); }
  88%  { opacity: .7; }
  100% { transform: translate(calc(var(--drift, 30px) * 1.7), -132vh) scale(.94); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bubble { animation: none !important; opacity: 0 !important; }
}

.login-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  animation: cardIn .65s var(--ease-fluide) both;
}
.login-card.shake { animation: shakeX .5s var(--ease-fluide); }
.login-card h2 { text-align: center; margin-bottom: 4px; }
.login-card .sub { text-align: center; margin-bottom: 22px; }
.login-card .links-row { display: flex; justify-content: space-between; font-size: 13px; margin-top: 14px; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes shakeX {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-8px); }
  40%, 60% { transform: translateX(8px); }
}

/* --- Champs : transition douce au focus, état d'erreur animé --- */
.login-card input {
  transition: border-color .25s var(--ease-fluide), box-shadow .25s var(--ease-fluide);
}
.login-card input:focus {
  border-color: var(--cyan-tourbillon);
  box-shadow: 0 0 0 4px rgba(28,124,149,0.13);
}
.field.has-error input {
  border-color: var(--risque);
}
.field.has-error input:focus {
  box-shadow: 0 0 0 4px rgba(178,59,46,0.13);
}
.field-error {
  color: var(--risque);
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
  min-height: 0;
  opacity: 0;
}
.field-error.show { animation: fadeUp .35s var(--ease-fluide) both; opacity: 1; }

.field-match {
  font-size: 12px;
  font-weight: 600;
  margin-top: 5px;
  min-height: 0;
  opacity: 0;
}
.field-match.show { animation: fadeUp .3s var(--ease-fluide) both; opacity: 1; }
.field-match.ok { color: var(--bon); }
.field-match.ko { color: var(--risque); }

/* --- Champ mot de passe avec bouton afficher/masquer (pilule colorée, icône œil) --- */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 84px; }
.toggle-password {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--cyan-pale); border: 1px solid transparent; cursor: pointer;
  font-family: var(--police-ui);
  font-size: 11.5px; font-weight: 700; color: var(--cyan-tourbillon);
  padding: 6px 12px; border-radius: 999px; line-height: 1;
  transition: background .2s var(--ease-fluide), color .2s var(--ease-fluide), transform .2s var(--ease-fluide), box-shadow .2s var(--ease-fluide);
}
.toggle-password:hover { background: var(--cyan-tourbillon); color: #fff; transform: translateY(-50%) scale(1.05); box-shadow: 0 4px 10px rgba(28,124,149,0.25); }
.toggle-password:active { transform: translateY(-50%) scale(0.97); }
.toggle-password .eye-icon { width: 14px; height: 14px; flex-shrink: 0; }

.caps-warning {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--attention); font-weight: 600;
  margin-top: 5px; height: 0; opacity: 0; overflow: hidden;
  transition: opacity .25s var(--ease-fluide), height .25s var(--ease-fluide);
}
.caps-warning.show { opacity: 1; height: 16px; }


/* --- Bouton de connexion : état de chargement avec spinner --- */
.btn-submit { gap: 8px; }
.spinner {
  display: none;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
}
.btn-submit.is-loading { cursor: progress; opacity: .88; }
.btn-submit.is-loading .spinner { display: inline-block; animation: spin .7s linear infinite; }
.btn-submit.is-loading::after { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

footer.public-footer { padding: 20px 6%; text-align: center; font-size: 12.5px; color: var(--encre-douce); }

/* ===================== ANIMATIONS — PAGE D'ACCUEIL ===================== */

html { scroll-behavior: smooth; }

/* Courbe d'accélération "douce" utilisée partout pour une sensation homogène et fluide */
:root { --ease-fluide: cubic-bezier(.16, 1, .3, 1); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
@keyframes floatDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(18px, -22px) scale(1.06); }
  66%  { transform: translate(-14px, 14px) scale(0.97); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes floatDriftSlow {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-26px, 20px) scale(1.08); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes shine {
  from { transform: translateX(-130%) skewX(-12deg); }
  to   { transform: translateX(230%) skewX(-12deg); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

.public-header {
  transition: box-shadow .35s var(--ease-fluide), background-color .35s var(--ease-fluide), backdrop-filter .35s var(--ease-fluide);
}
.public-header.is-scrolled {
  box-shadow: 0 4px 22px rgba(22,36,31,0.10);
  background-color: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px) saturate(1.2);
}

.logo-mark-img {
  width: 40px; height: 40px;
  object-fit: contain;
  animation: popIn .7s var(--ease-fluide) both;
  transition: transform .4s var(--ease-fluide);
}
.public-brand:hover .logo-mark-img,
.sidebar-brand:hover .logo-mark-img { transform: rotate(8deg) scale(1.06); }
.sidebar-brand .logo-mark-img { width: 34px; height: 34px; }

.public-brand { position: relative; }

.hero { position: relative; overflow: hidden; }

/* --- Logo géant en filigrane, avec parallax au défilement (piloté en JS via --parallax) --- */
.hero-decor {
  position: absolute;
  top: -120px; right: -120px;
  width: 520px; height: 520px;
  opacity: 0.10;
  pointer-events: none;
  animation: slowSpin 100s linear infinite;
  transform: translateY(calc(var(--parallax, 0) * 1px));
  z-index: 0;
  will-change: transform;
}
.hero-decor img { width: 100%; height: 100%; object-fit: contain; }

/* --- Taches de couleur flottantes en arrière-plan, pour un fond vivant --- */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(38px);
  pointer-events: none;
  z-index: 0;
}
.hero-blob.b1 {
  width: 260px; height: 260px; left: -60px; top: 60px;
  background: radial-gradient(circle, var(--vert-feuille) 0%, transparent 70%);
  opacity: 0.16;
  animation: floatDrift 16s ease-in-out infinite;
}
.hero-blob.b2 {
  width: 200px; height: 200px; left: 38%; bottom: -60px;
  background: radial-gradient(circle, var(--cyan-tourbillon) 0%, transparent 70%);
  opacity: 0.13;
  animation: floatDriftSlow 20s ease-in-out infinite;
}

.hero-inner { position: relative; z-index: 1; }

.hero .eyebrow,
.hero h1,
.hero p.lead,
.hero .hero-cta {
  opacity: 0;
  animation: fadeUp .85s var(--ease-fluide) both;
}
.hero .eyebrow   { animation-delay: .05s; }
.hero h1          { animation-delay: .16s; }
.hero p.lead      { animation-delay: .30s; }
.hero .hero-cta   { animation-delay: .44s; }

.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* --- Boutons : lever doux + reflet lumineux au survol --- */
.btn {
  position: relative;
  overflow: hidden;
  transition: filter .2s var(--ease-fluide), transform .35s var(--ease-fluide), box-shadow .35s var(--ease-fluide);
}
.btn::after {
  content: '';
  position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: translateX(-130%) skewX(-12deg);
  pointer-events: none;
}
.btn:hover::after { animation: shine .9s var(--ease-fluide); }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(.98); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(46,125,79,0.30); }
.btn-secondary:hover { box-shadow: 0 10px 24px rgba(28,124,149,0.20); }

.scroll-cue {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--encre-douce); font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: color .25s var(--ease-fluide), gap .25s var(--ease-fluide);
}
.scroll-cue:hover { color: var(--cyan-tourbillon); text-decoration: none; gap: 11px; }
.scroll-cue .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-tourbillon);
  animation: gentlePulse 1.8s ease-in-out infinite;
}
.scroll-cue .arrow { display: inline-block; animation: bob 1.6s ease-in-out infinite; }

/* --- Révélation au défilement : translation + échelle, courbe fluide avec léger rebond --- */
.reveal {
  opacity: 0;
  transform: translateY(32px) scale(.96);
  transition: opacity .8s var(--ease-fluide), transform .8s var(--ease-fluide);
  will-change: transform, opacity;
}
.reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }

.pillar-card {
  position: relative;
  overflow: hidden;
  transition: transform .4s var(--ease-fluide), box-shadow .4s var(--ease-fluide), border-color .4s var(--ease-fluide);
}
.pillar-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--vert-feuille), var(--cyan-tourbillon));
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease-fluide);
}
.pillar-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--ombre-lg);
  border-color: var(--cyan-tourbillon);
}
.pillar-card:hover::before { transform: scaleX(1); }
.pillar-card .pillar-num { transition: color .3s var(--ease-fluide), transform .3s var(--ease-fluide); }
.pillar-card:hover .pillar-num { transform: translateX(3px); }

.contract-band { position: relative; overflow: hidden; }
.contract-band .tig-badge {
  animation: gentlePulse 3.5s ease-in-out infinite;
  transition: transform .3s var(--ease-fluide), background .3s var(--ease-fluide);
}
.contract-band .tig-badge:hover { background: rgba(255,255,255,0.2); }

@media (prefers-reduced-motion: reduce) {
  .logo-mark-img, .hero-decor, .hero-blob, .hero .eyebrow, .hero h1, .hero p.lead, .hero .hero-cta,
  .scroll-cue .dot, .scroll-cue .arrow, .contract-band .tig-badge, .reveal, .btn::after {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  html { scroll-behavior: auto; }
}

@media (max-width: 880px) {
  .hero-decor { width: 320px; height: 320px; top: -80px; right: -100px; }
  .hero-blob.b1 { width: 180px; height: 180px; }
  .hero-blob.b2 { width: 140px; height: 140px; }
}


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

@media (max-width: 880px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 10px 14px; overflow-x: auto; }
  .sidebar-brand { border: none; margin-bottom: 0; padding: 0 12px; }
  .sidebar-footer { display: flex; align-items: center; border: none; margin: 0; padding: 0 4px; flex-shrink: 0; }
  .sidebar-footer .user-info { display: none; }
  .sidebar-footer a.logout { white-space: nowrap; margin-top: 0; }
  .sidebar-nav { display: flex; padding: 0; }
  .sidebar-nav a { white-space: nowrap; }
  .page-body { padding: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* =====================================================================
   AMÉLIORATIONS DASHBOARD (horloge, toasts, recherche, animations)
   ===================================================================== */

/* --- Bandeau de bienvenue et horloge --- */
.greeting-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.greeting-bar .greeting-text {
  font-size: 14.5px;
  color: var(--encre-douce);
}
.greeting-bar .greeting-text strong {
  color: var(--vert-feuille-fonce);
}
.live-clock {
  font-family: var(--police-display);
  font-size: 14px;
  color: var(--cyan-tourbillon);
  background: var(--cyan-pale);
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.live-clock .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-tourbillon);
  animation: gentlePulse 2s ease-in-out infinite;
}

/* --- Champ de recherche --- */
#searchFille {
  border-radius: 30px;
  padding: 8px 18px;
  border: 1px solid var(--bordure);
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  background: var(--surface);
  color: var(--encre);
}
#searchFille:focus {
  border-color: var(--cyan-tourbillon);
  box-shadow: 0 0 0 3px rgba(28,124,149,0.15);
  outline: none;
}

/* --- Cartes statistiques améliorées (avec icônes) --- */
.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--vert-pale);
  color: var(--vert-feuille-fonce);
  font-size: 18px;
}
.stat-icon.cyan {
  background: var(--cyan-pale);
  color: var(--cyan-tourbillon);
}
.stat-icon.alert {
  background: var(--risque-bg);
  color: var(--risque);
}
.stat-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--risque);
  animation: gentlePulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}

/* --- Animation des barres de progression --- */
.progress-bar.animate > span {
  transition: width 1.2s cubic-bezier(.16, 1, .3, 1);
}

/* --- Toasts (notifications) --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 380px;
}
.toast {
  background: var(--surface);
  border-left: 4px solid var(--risque);
  padding: 14px 20px;
  border-radius: var(--rayon-sm);
  box-shadow: var(--ombre-lg);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--encre);
  transform: translateX(calc(100% + 30px));
  transition: transform 0.5s cubic-bezier(.16, 1, .3, 1), opacity 0.3s;
  opacity: 0;
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast.info {
  border-left-color: var(--cyan-tourbillon);
}
.toast.success {
  border-left-color: var(--bon);
}
.toast.warning {
  border-left-color: var(--attention);
}
.toast.error {
  border-left-color: var(--risque);
}

/* --- Mode sombre (toggle optionnel) --- */
body.dark-mode {
  --fond: #1a1f1c;
  --surface: #2a312d;
  --bordure: #3b4841;
  --encre: #e8edea;
  --encre-douce: #bcc7c1;
}
body.dark-mode .panel,
body.dark-mode .stat-card,
body.dark-mode .topbar,
body.dark-mode .login-card {
  background: var(--surface);
}
body.dark-mode .btn-outline {
  border-color: var(--bordure);
  color: var(--encre);
}
body.dark-mode .btn-outline:hover {
  background: var(--fond);
}
body.dark-mode .stat-icon {
  background: var(--fond);
}
body.dark-mode .live-clock {
  background: var(--fond);
}
body.dark-mode #searchFille {
  background: var(--surface);
  color: var(--encre);
}

/* ===== Gestion des marraines ===== */
.assign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.assign-column h3 {
  font-size: 15px;
  margin-bottom: 12px;
}
.assign-form .field {
  margin-bottom: 12px;
}
.assign-form select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--rayon-sm);
  border: 1px solid var(--bordure);
  background: var(--surface);
}
.assign-form .btn-primary {
  width: 100%;
  justify-content: center;
}
#assignMessage .alert {
  margin-top: 8px;
}

/* ===== Notifications ===== */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notif-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--rayon-sm);
  border-left: 3px solid transparent;
  background: var(--surface);
  transition: background .2s;
}
.notif-item.unread {
  background: var(--cyan-pale);
  border-left-color: var(--cyan-tourbillon);
}
.notif-item.read {
  opacity: 0.7;
}
.notif-content {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.notif-msg {
  font-weight: 500;
}
.notif-date {
  font-size: 12px;
  color: var(--encre-douce);
}
.notif-link {
  font-size: 13px;
  margin-left: auto;
}
.notif-mark-read {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--cyan-tourbillon);
  padding: 4px 8px;
  border-radius: 50%;
  transition: background .2s;
}
.notif-mark-read:hover {
  background: var(--cyan-pale);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-nav .badge {
  font-size: 0.65rem;
  padding: 1px 8px;
  border-radius: 20px;
  background: var(--vert-feuille);
  color: #fff;
}
.sidebar-nav .badge.badge-risque {
  background: var(--risque);
}