/* Portail Bénévoles — système visuel repris du design Claude.
   Les couleurs sont en oklch, comme la maquette d'origine. */

:root {
  --fond:            oklch(0.965 0.014 300);
  --fond-carte:      oklch(0.995 0.005 300);
  --fond-blanc:      oklch(1 0 0);
  --fond-barre:      oklch(0.975 0.016 300);
  --fond-doux:       oklch(0.985 0.008 300);
  --fond-survol:     oklch(0.975 0.014 300);

  --texte:           oklch(0.29 0.018 300);
  --texte-doux:      oklch(0.45 0.016 300);
  --texte-tendre:    oklch(0.53 0.016 300);
  --texte-pale:      oklch(0.6 0.016 300);

  --bord:            oklch(0.9 0.016 300);
  --bord-fort:       oklch(0.88 0.016 300);
  --bord-fin:        oklch(0.93 0.012 300);

  --violet:          oklch(0.52 0.128 300);
  --violet-fonce:    oklch(0.42 0.144 300);
  --violet-presse:   oklch(0.44 0.144 300);
  --violet-clair:    oklch(0.94 0.056 300);
  --violet-survol:   oklch(0.9 0.08 300);
  --violet-texte:    oklch(0.4 0.144 300);

  --ambre:           oklch(0.6 0.108 72);
  --ambre-clair:     oklch(0.95 0.045 72);
  --ambre-texte:     oklch(0.45 0.099 72);
  --ambre-bord:      oklch(0.9 0.063 72);

  --rouge:           oklch(0.56 0.13 12);
  --rouge-clair:     oklch(0.94 0.04 12);
  --rouge-texte:     oklch(0.5 0.13 12);
  --rouge-bord:      oklch(0.88 0.05 12);

  --serif: 'Newsreader', Georgia, serif;
  --sans:  'Instrument Sans', Helvetica, Arial, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--fond);
}

body {
  font-family: var(--sans);
  color: var(--texte);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--violet); text-decoration: none; }
a:hover { color: var(--violet-fonce); text-decoration: underline; }
input, textarea, select, button { font-family: inherit; }
::placeholder { color: oklch(0.68 0.014 300); }

@keyframes dcFade  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes dcSlide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- Coque */

.coque { min-height: 100vh; display: flex; flex-direction: row; }

.barre {
  width: 264px;
  flex: 0 0 264px;
  padding: 26px 18px;
  border-right: 1px solid var(--bord);
  background: var(--fond-barre);
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.marque {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  margin: -8px;
  border-radius: 16px;
  color: inherit;
}
.marque:hover { background: oklch(0.955 0.02 300); text-decoration: none; color: inherit; }

.marque-mono {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 14px;
  background: var(--violet);
  display: flex; align-items: center; justify-content: center;
  color: oklch(0.97 0.02 300);
  font-family: var(--serif);
  font-size: 20px;
}
.marque-logo {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 14px;
  background: var(--fond-blanc);
  border: 1px solid oklch(0.91 0.014 300);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.marque-logo img { width: 34px; height: 34px; object-fit: contain; }
.marque-nom { font-family: var(--serif); font-size: 19px; line-height: 1.2; }
.marque-sous { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-tendre); }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-lien {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  color: var(--texte-doux);
  background: transparent;
}
.nav-lien:hover { background: oklch(0.96 0.02 300); text-decoration: none; color: var(--texte-doux); }
.nav-lien.actif { background: var(--violet-clair); color: oklch(0.36 0.144 300); font-weight: 600; }
.nav-lien.actif:hover { background: var(--violet-clair); color: oklch(0.36 0.144 300); }
.nav-lien span { flex: 1; }
.nav-badge {
  font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: oklch(0.9 0.016 300); color: var(--texte-doux);
}
.nav-lien.actif .nav-badge { background: var(--violet); color: oklch(0.98 0.015 300); }

.barre-pied {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: var(--fond-carte);
  border: 1px solid var(--bord);
}
.sur-titre { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-tendre); }
.barre-user { font-size: 13px; font-weight: 600; }
.barre-note { font-size: 12.5px; color: var(--texte-tendre); line-height: 1.45; }
.barre-version { font-family: var(--mono); font-size: 11px; color: var(--texte-pale); }

.principal { flex: 1; min-width: 0; padding: 34px 40px 60px; position: relative; }

.ecran { animation: dcFade 0.28s ease both; display: flex; flex-direction: column; gap: 22px; }
.ecran-large { gap: 26px; }

.entete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.entete-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
h1.titre { margin: 6px 0 0; font-family: var(--serif); font-size: 34px; font-weight: 400; letter-spacing: -0.01em; }
h2.sous-titre { margin: 0; font-size: 15px; font-weight: 600; }

/* ------------------------------------------------------------ Réglages */

.reglages { position: relative; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-bottom: 14px; }
.reglages-bouton {
  width: 42px; height: 42px;
  border-radius: 15px;
  border: 1px solid oklch(0.89 0.016 300);
  background: var(--fond-carte);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer;
}
.reglages-bouton:hover { background: var(--violet-clair); }
.reglages-bouton i { display: block; width: 18px; height: 2px; border-radius: 2px; background: oklch(0.4 0.048 300); }
.reglages-bouton i:nth-child(2) { width: 12px; }
.reglages-menu {
  position: absolute; top: 50px; right: 0; width: 262px;
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 24px 50px -22px oklch(0.29 0.018 300 / 0.35);
  animation: dcFade 0.16s ease both;
}
.reglages-menu[hidden] { display: none; }
.reglages-menu .sur-titre { padding: 9px 12px 7px; }
.reglages-item { display: block; width: 100%; padding: 11px 12px; border-radius: 14px; color: inherit; }
.reglages-item:hover { background: oklch(0.96 0.012 300); text-decoration: none; color: inherit; }
.reglages-item.actif { background: oklch(0.955 0.04 300); }
.reglages-item b { display: block; font-size: 13.5px; font-weight: 600; }
.reglages-item small { display: block; font-size: 12px; color: var(--texte-tendre); margin-top: 2px; }

/* --------------------------------------------------------------- Cartes */

.carte {
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-radius: 22px;
  padding: 22px;
}
.carte-nue { padding: 0; overflow: hidden; }
.carte-entete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.carte-note { font-size: 12.5px; color: var(--texte-tendre); margin-bottom: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-radius: 22px;
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 6px;
  color: inherit;
}
.stat:hover { border-color: oklch(0.72 0.08 300); background: oklch(0.99 0.012 300); text-decoration: none; color: inherit; }
.stat-label { font-size: 12.5px; color: var(--texte-tendre); }
.stat-valeur { font-family: var(--serif); font-size: 40px; line-height: 1; }
.stat-note { font-size: 12px; color: var(--texte-pale); }

.duo { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.colonne { display: flex; flex-direction: column; gap: 16px; }

.ligne-perso { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--bord-fin); }
.ligne-perso:first-child { border-top: none; }
.pastille {
  width: 36px; height: 36px; flex: 0 0 36px;
  border-radius: 12px;
  background: var(--violet-clair); color: var(--violet-fonce);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600;
}
.pastille-sm { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 11px; font-size: 11.5px; }
.perso-nom { font-size: 14px; font-weight: 600; }
.perso-note { font-size: 12.5px; color: var(--texte-tendre); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.jauge { display: flex; flex-direction: column; gap: 5px; }
.jauge-entete { display: flex; justify-content: space-between; font-size: 12.5px; }
.jauge-piste { height: 8px; border-radius: 999px; background: var(--bord-fin); overflow: hidden; }
.jauge-barre { height: 100%; border-radius: 999px; background: var(--violet); }

.fil { display: flex; flex-direction: column; gap: 11px; }
.fil-item { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.5; }
.fil-point { width: 7px; height: 7px; border-radius: 999px; margin-top: 6px; flex: 0 0 7px; }
.fil-quand { color: var(--texte-pale); }

/* -------------------------------------------------------------- Tableau */

.tableau { background: var(--fond-carte); border: 1px solid var(--bord); border-radius: 22px; overflow: hidden; }
.tableau-entete {
  display: grid; gap: 12px;
  padding: 14px 22px;
  background: var(--fond-survol);
  border-bottom: 1px solid oklch(0.92 0.014 300);
  font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: oklch(0.5 0.016 300);
}
.tableau-entete a { color: inherit; }
.tableau-entete a:hover { color: var(--violet); text-decoration: none; }
.tableau-ligne {
  display: grid; gap: 12px; align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid oklch(0.94 0.01 300);
  font-size: 13.5px;
  color: inherit;
}
.tableau-ligne:hover { background: var(--fond-survol); text-decoration: none; color: inherit; }
.tableau-ligne:last-child { border-bottom: none; }
.tableau-vide { padding: 46px; text-align: center; font-size: 13.5px; color: oklch(0.58 0.016 300); }
.cols-candidats { grid-template-columns: 2fr 0.6fr 1.2fr 1.3fr 0.9fr 130px; }
.ellipse { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cellule-douce { font-size: 12.5px; color: var(--texte-tendre); }

/* -------------------------------------------------------- Pastilles etc. */

.pilule {
  display: inline-block; white-space: nowrap;
  font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}

.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce {
  font-size: 13px; padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--bord-fort);
  background: var(--fond-blanc);
  color: var(--texte-doux);
  cursor: pointer;
}
.puce:hover { text-decoration: none; color: var(--texte-doux); border-color: oklch(0.78 0.06 300); }
.puce.active { background: var(--violet); border-color: var(--violet); color: oklch(0.98 0.015 300); font-weight: 600; }
.puce.active:hover { color: oklch(0.98 0.015 300); }
.puce small { opacity: 0.6; }
.puce-sm { font-size: 12.5px; padding: 9px 13px; }

/* -------------------------------------------------------------- Boutons */

.bouton {
  display: inline-block; text-align: center; cursor: pointer;
  font-size: 13.5px; font-weight: 600;
  padding: 11px 16px; border-radius: 14px;
  border: 1px solid transparent;
  background: var(--violet); color: oklch(0.98 0.015 300);
}
.bouton:hover { background: var(--violet-presse); color: oklch(0.98 0.015 300); text-decoration: none; }
.bouton-sombre { background: var(--texte); color: oklch(0.97 0.01 300); }
.bouton-sombre:hover { background: oklch(0.22 0.018 300); color: oklch(0.97 0.01 300); }
.bouton-clair { background: var(--fond-blanc); border-color: var(--bord-fort); color: var(--texte); }
.bouton-clair:hover { background: oklch(0.96 0.012 300); color: var(--texte); }
.bouton-doux { background: var(--violet-clair); color: var(--violet-texte); }
.bouton-doux:hover { background: var(--violet-survol); color: var(--violet-texte); }
.bouton-ambre { background: oklch(0.97 0.027 72); border-color: oklch(0.85 0.054 72); color: var(--ambre-texte); }
.bouton-ambre:hover { background: oklch(0.94 0.045 72); color: var(--ambre-texte); }
.bouton-rouge { background: var(--rouge); color: oklch(0.98 0.01 300); }
.bouton-rouge:hover { background: oklch(0.48 0.13 12); color: oklch(0.98 0.01 300); }
.bouton-danger { background: oklch(0.97 0.02 300); border-color: var(--rouge-bord); color: var(--rouge-texte); }
.bouton-danger:hover { background: var(--rouge-clair); color: var(--rouge-texte); }
.bouton-lien { background: none; border: none; padding: 0; color: var(--violet); font-size: 13px; font-weight: 600; cursor: pointer; }
.bouton-lien:hover { color: var(--violet-fonce); text-decoration: underline; }
.bouton-grand { font-size: 15px; padding: 16px; border-radius: 18px; width: 100%; }
.bouton-plein { width: 100%; }
.bouton:disabled, .bouton[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ------------------------------------------------------------- Formulaire */

.champ { display: block; }
.champ-label { font-size: 12.5px; font-weight: 600; margin-bottom: 5px; display: block; }
.saisie {
  width: 100%;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--bord-fort);
  background: var(--fond-blanc);
  font-size: 14px;
  outline: none;
  color: var(--texte);
}
.saisie:focus { border-color: var(--violet); }
.saisie.erreur { border-color: oklch(0.7 0.12 12); }
textarea.saisie { line-height: 1.55; resize: vertical; border-radius: 16px; padding: 13px; }
.saisie-compacte { padding: 11px 15px; border-radius: 14px; font-size: 13.5px; background: var(--fond-carte); }
.duo-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trio-champs { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.pile { display: flex; flex-direction: column; gap: 16px; }
.pile-serree { display: flex; flex-direction: column; gap: 10px; }

.case {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: oklch(0.97 0.012 300);
  border: 1px solid var(--bord);
  font-size: 12.5px; line-height: 1.5;
  color: var(--texte-doux);
  cursor: pointer;
}
.case input[type="checkbox"] { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--violet); cursor: pointer; flex: 0 0 17px; }
.case.erreur { border-color: oklch(0.7 0.12 12); }
.case-douce { background: oklch(0.98 0.008 300); border-color: oklch(0.91 0.014 300); padding: 13px 14px; }
.case small { color: oklch(0.58 0.016 300); }

.encart {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 13.5px; line-height: 1.55;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.encart-rouge { background: var(--rouge-clair); border: 1px solid oklch(0.88 0.06 12); color: oklch(0.4 0.09 12); }
.encart-ambre { background: var(--ambre-clair); border: 1px solid var(--ambre-bord); color: var(--ambre-texte); }
.encart-violet { background: var(--violet-clair); color: oklch(0.36 0.144 300); }
.encart-gris { background: oklch(0.98 0.01 300); border: 1px solid var(--bord); color: var(--texte-doux); }
.encart span { flex: 1; min-width: 200px; }

/* ---------------------------------------------------------------- Tiroir */

.voile {
  position: fixed; inset: 0;
  background: oklch(0.29 0.018 300 / 0.28);
  display: flex; justify-content: flex-end;
  z-index: 40;
}
.voile-fond { flex: 1; cursor: pointer; }
.tiroir {
  width: 500px;
  background: var(--fond-doux);
  height: 100vh; overflow-y: auto;
  padding: 28px;
  animation: dcSlide 0.24s ease both;
  box-shadow: -20px 0 60px -20px oklch(0.29 0.018 300 / 0.4);
}
.tiroir-entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tiroir-titre { margin: 12px 0 2px; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.tiroir-note { font-size: 13px; color: var(--texte-tendre); }
.fermer {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: oklch(0.5 0.016 300);
  border: 1px solid var(--bord);
  background: none; cursor: pointer;
}
.fermer:hover { background: oklch(0.95 0.012 300); text-decoration: none; }
.fiche-ligne {
  display: grid; grid-template-columns: 130px 1fr; gap: 14px;
  padding-bottom: 14px; border-bottom: 1px solid var(--bord-fin);
  font-size: 13.5px;
}
.fiche-label { color: var(--texte-tendre); font-size: 12.5px; }
.fiche-valeur { line-height: 1.5; white-space: pre-wrap; }
.bloc-decision { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.decision-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.decision-grille .pleine-largeur { grid-column: span 2; }

/* ---------------------------------------------------------------- Modale */

.modale-voile {
  position: fixed; inset: 0;
  background: oklch(0.29 0.018 300 / 0.35);
  display: flex; align-items: center; justify-content: center;
  padding: 40px; z-index: 60;
  overflow-y: auto;
}
.modale {
  width: 760px; max-width: 100%;
  background: var(--fond-doux);
  border-radius: 26px;
  padding: 28px;
  animation: dcFade 0.2s ease both;
  box-shadow: 0 40px 80px -40px oklch(0.29 0.018 300 / 0.55);
}
.modale-petite { width: 460px; padding: 26px; border-radius: 24px; }
.modale-titre { margin: 6px 0 0; font-family: var(--serif); font-size: 26px; font-weight: 400; }
.modale-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Toast */

.toast-zone {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--texte);
  color: oklch(0.97 0.01 300);
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 20px 40px -18px oklch(0.29 0.018 300 / 0.6);
  animation: dcFade 0.2s ease both;
}
.toast-erreur { background: var(--rouge); }
.toast-succes { background: var(--violet); }

/* ------------------------------------------------------------ Pages nues */

.page-nue {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.carte-nue-centre {
  width: 460px; max-width: 100%;
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-radius: 26px;
  padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
}
.carte-nue-large { width: 620px; }
.titre-serif { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 400; }
.texte-doux { font-size: 14.5px; line-height: 1.65; color: oklch(0.48 0.016 300); margin: 0; }
.texte-petit { font-size: 12.5px; line-height: 1.55; color: var(--texte-tendre); margin: 0; }
.mono { font-family: var(--mono); font-size: 12.5px; color: var(--violet-fonce); word-break: break-all; }

/* -------------------------------------------------------- Formulaire public */

.public { min-height: 100vh; background: var(--fond); padding: 40px 20px 60px; }
.public-carte {
  width: 720px; max-width: 100%; margin: 0 auto;
  background: var(--fond-doux);
  border: 1px solid var(--bord);
  border-radius: 28px;
  padding: 32px 36px 40px;
}
.public-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.public-titre { font-family: var(--serif); font-size: 26px; }
.public-sous { font-size: 13px; color: var(--texte-tendre); }
.public-logo { height: 40px; max-width: 150px; margin-bottom: 8px; object-fit: contain; object-position: left center; }
.bascule { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: oklch(0.95 0.012 300); flex: 0 0 auto; }
.bascule a { font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 999px; color: var(--texte-doux); }
.bascule a:hover { text-decoration: none; }
.bascule a.actif { background: var(--violet); color: oklch(0.98 0.015 300); }
.public-pied { text-align: center; font-size: 12px; color: oklch(0.58 0.016 300); }

/* ------------------------------------------------------------ Responsive */

@media (max-width: 1180px) {
  .duo { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .principal { padding: 26px 24px 52px; }
}

@media (max-width: 900px) {
  .cols-candidats { grid-template-columns: 1fr auto; }
  .masquer-petit { display: none !important; }
}

@media (max-width: 760px) {
  .coque { flex-direction: column; }
  .barre {
    width: 100%; flex: 0 0 auto; height: auto;
    position: static;
    padding: 16px 14px; gap: 14px;
    border-right: none; border-bottom: 1px solid var(--bord);
    overflow: visible;
  }
  .nav { flex-direction: row; overflow-x: auto; white-space: nowrap; }
  .barre-pied { margin-top: 0; }
  .principal { padding: 16px 14px 44px; }
  .stats { grid-template-columns: 1fr 1fr; }
  h1.titre { font-size: 25px; }
  .tiroir { width: 100%; }
  .modale-voile { padding: 10px; }
  .duo-champs { grid-template-columns: 1fr; }
  .public-carte { padding: 24px 20px 32px; border-radius: 22px; }
}

@media print {
  .barre, .reglages, .toast-zone, .sans-impression { display: none !important; }
  .principal { padding: 0; }
  body { background: #fff; }
  .carte, .tableau { border: none; box-shadow: none; }
}
