@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --cream: #FFF6E9;
  --cream-deep: #FFEBCF;
  --lagon: #4FC3E0;
  --lagon-deep: #2FA8C9;
  --fraise: #FF6FA0;
  --fraise-deep: #E8548A;
  --soleil: #FFC93C;
  --menthe: #6FDCC4;
  --menthe-deep: #45C2A7;
  --prune: #3D2C4E;
  --prune-soft: #6C5A80;
  --gris-connaissance: #9AA3B2;
  --gris-inconnu: #B7BDC7;
  --rival: #E4573D;
  --rel-inconnu: #C7E1F2;
  --rel-connaissance: #AFE8C7;
  --rel-ami: #FFF1A5;
  --rel-exami: #937B00;
  --rel-aime: #FECDDB;
  --rel-couple: #FFBFD4;
  --rel-excouple: #C695C7;
  --rel-marie: #FFB7C1;
  --rel-divorce: #C47B9C;
  --rel-famille: #8B5A2B;
  --rel-dispute: #DB5851;
  --white: #FFFFFF;
  --shadow: 0 6px 18px rgba(61, 44, 78, 0.12);
  --shadow-strong: 0 12px 30px rgba(61, 44, 78, 0.22);
  /* Variables volontairement FIXES (jamais redéfinies en mode sombre) :
     texte sombre sur des puces à fond pastel toujours clair (soleil,
     catégories de relation...), et surfaces volontairement sombres
     (bandeau admin, toast) qui ne doivent pas s'inverser avec le thème. */
  --texte-sur-pastel: #3D2C4E;
  --texte-clair-fixe: #FFFFFF;
  --surface-fixe-sombre: #3D2C4E;
  --header-degrade-1: #4FC3E0;
  --header-degrade-2: #6FDCC4;
  --login-degrade-1: #4FC3E0;
  --login-degrade-2: #FF6FA0;
  --champ-bordure: #FFEBCF;
  --champ-fond: #FFFFFF;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

/* ---------- Thème sombre ---------- */
/* Ne redéfinit que les variables de "surface/texte général" : la quasi-
   totalité de l'interface (fonds, cartes, texte, bordures) est déjà
   construite avec ces variables, donc ce seul bloc suffit à basculer tout
   le site. Les couleurs d'accent (lagon, fraise, soleil, menthe, types de
   relation...) restent identiques : elles sont assez saturées pour rester
   lisibles sur fond sombre. Seul le dégradé du grand bandeau (très
   lumineux en clair) est assourdi, pour ne pas jurer avec le reste.
   */
html[data-theme="dark"] {
  --cream: #1E1830;
  --cream-deep: #2B2340;
  --white: #29223B;
  --prune: #F2ECFB;
  --prune-soft: #B7A9D6;
  --header-degrade-1: #1B5C74;
  --header-degrade-2: #1D6E5A;
  --login-degrade-1: #1B5C74;
  --login-degrade-2: #7A2E4F;
  --champ-bordure: #6E5F94;
  --champ-fond: #332B4C;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-strong: 0 12px 32px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--prune);
  min-height: 100vh;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3, .display {
  font-family: 'Baloo 2', cursive;
  color: var(--prune);
  margin: 0;
}

a { color: inherit; }

/* ---------- Header vague ---------- */
.header {
  position: relative;
  background: linear-gradient(135deg, var(--header-degrade-1) 0%, var(--header-degrade-2) 100%);
  padding: 38px 24px 64px;
  text-align: center;
  color: var(--texte-clair-fixe);
  overflow: hidden;
}
.header::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 42px;
  background: var(--cream);
  border-radius: 100% 100% 0 0 / 100% 100% 0 0;
  transform: scaleX(1.4);
}
.header h1 {
  color: var(--texte-clair-fixe);
  font-size: clamp(28px, 5vw, 44px);
  text-shadow: 0 3px 0 rgba(0,0,0,0.12);
  letter-spacing: 0.5px;
}
.header p {
  font-weight: 700;
  opacity: 0.95;
  margin-top: 8px;
}
.header .admin-link {
  position: absolute;
  top: 20px; right: 24px;
  background: rgba(255,255,255,0.25);
  border: 2px solid rgba(255,255,255,0.7);
  color: var(--texte-clair-fixe);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  font-size: 14px;
  transition: transform .15s ease, background .15s ease;
}
.header .admin-link:hover { background: rgba(255,255,255,0.4); transform: translateY(-2px); }
.header .theme-toggle-btn-public {
  position: absolute;
  top: 20px; left: 24px;
  background: rgba(255,255,255,0.25);
  border: 2px solid rgba(255,255,255,0.7);
  color: var(--texte-clair-fixe);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.header .theme-toggle-btn-public:hover { background: rgba(255,255,255,0.4); transform: translateY(-2px); }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

section.block {
  margin-top: 46px;
}
section.block h2 {
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
}
section.block .subtitle {
  color: var(--prune-soft);
  font-weight: 700;
  margin: 4px 0 22px;
}

/* ---------- Toile des liens (signature) ---------- */
.toile-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
}
.toile-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  align-items: center;
  justify-content: space-between;
}
.toile-legende {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--prune-soft);
}
.toile-legende span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; transition: opacity .15s ease; }

.legende-item {
  cursor: pointer;
  user-select: none;
  padding: 4px 10px;
  border-radius: 999px;
  transition: background .15s ease, opacity .15s ease;
}
.legende-item:hover { background: var(--cream-deep); }
.legende-item.inactif { opacity: 0.35; }
.legende-item.inactif .dot { opacity: 0.4; }

.legende-action {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: var(--prune-soft);
  background: var(--cream-deep);
  border: none;
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
}
.legende-action:hover { background: var(--soleil); color: var(--texte-sur-pastel); }

select, input[type=text], input[type=password], input[type=email], textarea {
  font-family: 'Nunito', sans-serif;
  border: 2px solid var(--champ-bordure);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--prune);
  background: var(--champ-fond);
}
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--lagon);
}

#toile-svg {
  width: 100%;
  height: 520px;
  display: block;
}
.mii-node-label {
  font-family: 'Baloo 2', cursive;
  font-size: 12px;
  fill: var(--prune);
  pointer-events: none;
}
.mii-node-circle {
  cursor: pointer;
  stroke: var(--white);
  stroke-width: 3;
  transition: transform .15s ease;
}
.mii-node-circle:hover { filter: brightness(1.05); }

.lien-line { transition: opacity .15s ease; }

/* La toile étant entièrement redessinée à chaque changement de filtre
   (Mii recentrés selon ceux qui restent visibles), ce fondu donne un rendu
   dynamique au lieu d'un changement brutal. */
@keyframes toileApparition { from { opacity: 0; } to { opacity: 1; } }
.mii-node, .lien-line {
  animation: toileApparition 0.35s ease;
}

/* ---------- Gallerie Mii (carrousel horizontal) ---------- */
.habitants-entete {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.mii-recherche-barre {
  position: relative;
  width: 320px;
  max-width: 100%;
  flex-shrink: 0;
}
.mii-recherche-barre input {
  width: 100%;
  padding-left: 40px;
  padding-right: 38px;
}
.mii-recherche-icone {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  pointer-events: none;
}
.mii-recherche-effacer {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--prune-soft);
  padding: 6px 8px;
  border-radius: 8px;
}
.mii-recherche-effacer:hover { background: var(--cream-deep); }

.champ-recherche-effacer {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--prune-soft);
  padding: 6px 8px;
  border-radius: 8px;
}
.champ-recherche-effacer:hover { background: var(--cream-deep); }

.pagination-pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.pagination-controles {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pagination-indicateur {
  font-weight: 800;
  font-size: 13px;
  color: var(--prune-soft);
  white-space: nowrap;
}

.mii-carousel-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mii-carousel-fleche {
  flex-shrink: 0;
  width: 40px; height: 40px;
  padding: 0;
  line-height: 0;
  border-radius: 50%;
  border: none;
  background: var(--white);
  box-shadow: var(--shadow);
  color: var(--prune);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, background .15s ease;
}
.mii-carousel-fleche svg { display: block; }
.mii-carousel-fleche:hover { transform: scale(1.08); background: var(--cream-deep); }
.mii-carousel-fleche:disabled { opacity: 0.35; cursor: default; transform: none; }

.mii-grid {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  flex: 1;
  min-width: 0;
}
.mii-grid::-webkit-scrollbar { height: 8px; }
.mii-grid::-webkit-scrollbar-thumb { background: var(--cream-deep); border-radius: 999px; }
.mii-grid::-webkit-scrollbar-track { background: transparent; }

.mii-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 16px 10px 14px;
  text-align: center;
  cursor: pointer;
  border: 3px solid transparent;
  transition: transform .15s ease, border-color .15s ease;
  flex: 0 0 150px;
}
.mii-card:hover { transform: translateY(-4px); }
.mii-card.selectionne { border-color: var(--lagon); background: var(--cream); }
.mii-avatar {
  width: 84px; height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cream-deep);
  border: 3px solid var(--lagon);
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
}
.mii-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.mii-card .nom { font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 16px; }
.mii-card .genre { font-size: 12px; color: var(--prune-soft); font-weight: 700; }

/* ---------- Listes relations / parenté ---------- */
.liste {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.liste-item {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.liste-item .mini-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; background: var(--cream-deep);
  border: 2px solid var(--lagon);
}
.relation-card {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.relation-mii {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 140px;
}
.relation-mii:last-child { justify-content: flex-end; }
.relation-fleches {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.badge {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--texte-clair-fixe);
  white-space: nowrap;
}
/* Badges de statut divers (gestion des admins : niveau, principal, "Vous")
   — noms de classes historiques, indépendants des catégories de relation. */
.badge.Marie { background: var(--fraise-deep); color: var(--texte-clair-fixe); }
.badge.Connaissance { background: var(--gris-connaissance); color: var(--texte-clair-fixe); }
.badge.Rival { background: var(--soleil); color: var(--texte-sur-pastel); }
.badge.Ami { background: var(--lagon-deep); color: var(--texte-clair-fixe); }

.badge.rel-inconnu { background: var(--rel-inconnu); color: var(--texte-sur-pastel); }
.badge.rel-connaissance { background: var(--rel-connaissance); color: var(--texte-sur-pastel); }
.badge.rel-ami { background: var(--rel-ami); color: var(--texte-sur-pastel); }
.badge.rel-exami { background: var(--rel-exami); color: var(--texte-clair-fixe); }
.badge.rel-aime { background: var(--rel-aime); color: var(--texte-sur-pastel); }
.badge.rel-couple { background: var(--rel-couple); color: var(--texte-sur-pastel); }
.badge.rel-excouple { background: var(--rel-excouple); color: var(--texte-sur-pastel); }
.badge.rel-marie { background: var(--rel-marie); color: var(--texte-sur-pastel); }
.badge.rel-divorce { background: var(--rel-divorce); color: var(--texte-sur-pastel); }
.badge.rel-famille { background: var(--rel-famille); color: var(--texte-clair-fixe); }
.badge.rel-dispute { background: var(--rel-dispute); color: var(--texte-clair-fixe); }

/* Badge de caractère (coloré selon la catégorie) */
.badge-caractere {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  color: var(--prune);
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  display: inline-block;
}

/* Chips en forme de flèche pour le ressenti d'une relation dirigée */
.fleche {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--texte-clair-fixe);
  white-space: nowrap;
  padding: 6px 16px 6px 12px;
  clip-path: polygon(0 0, 82% 0, 100% 50%, 82% 100%, 0 100%);
}
.fleche.fleche-gauche {
  padding: 6px 12px 6px 16px;
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 18% 100%, 0 50%);
}
.fleche.rel-inconnu { background: var(--rel-inconnu); color: var(--texte-sur-pastel); }
.fleche.rel-connaissance { background: var(--rel-connaissance); color: var(--texte-sur-pastel); }
.fleche.rel-ami { background: var(--rel-ami); color: var(--texte-sur-pastel); }
.fleche.rel-exami { background: var(--rel-exami); color: var(--texte-clair-fixe); }
.fleche.rel-aime { background: var(--rel-aime); color: var(--texte-sur-pastel); }
.fleche.rel-couple { background: var(--rel-couple); color: var(--texte-sur-pastel); }
.fleche.rel-excouple { background: var(--rel-excouple); color: var(--texte-sur-pastel); }
.fleche.rel-marie { background: var(--rel-marie); color: var(--texte-sur-pastel); }
.fleche.rel-divorce { background: var(--rel-divorce); color: var(--texte-sur-pastel); }
.fleche.rel-famille { background: var(--rel-famille); color: var(--texte-clair-fixe); }
.fleche.rel-dispute { background: var(--rel-dispute); color: var(--texte-clair-fixe); }

/* Texte simple coloré (sans forme de flèche) pour la table admin des
   relations : plus sobre qu'un chip, pour une lecture rapide en tableau. */
.texte-relation { font-weight: 800; font-size: 13px; }
.texte-relation.rel-inconnu { color: var(--rel-inconnu); }
.texte-relation.rel-connaissance { color: var(--rel-connaissance); }
.texte-relation.rel-ami { color: #C9A400; }
.texte-relation.rel-exami { color: var(--rel-exami); }
.texte-relation.rel-aime { color: #E88CA6; }
.texte-relation.rel-couple { color: #E85F8C; }
.texte-relation.rel-excouple { color: var(--rel-excouple); }
.texte-relation.rel-marie { color: #E85F79; }
.texte-relation.rel-divorce { color: var(--rel-divorce); }
.texte-relation.rel-famille { color: #C9A56B; }
.texte-relation.rel-dispute { color: var(--rel-dispute); }

.vide {
  text-align: center;
  color: var(--prune-soft);
  font-weight: 700;
  padding: 30px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

footer {
  text-align: center;
  padding: 30px;
  color: var(--prune-soft);
  font-weight: 700;
  font-size: 13px;
}

/* ---------- ADMIN ---------- */
.admin-body { background: var(--cream); }
.admin-header {
  background: var(--surface-fixe-sombre);
  color: var(--texte-clair-fixe);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-header h1 { color: var(--texte-clair-fixe); font-size: 22px; }
.btn {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background: var(--lagon); color: var(--texte-clair-fixe); }
.btn-accent { background: var(--fraise); color: var(--texte-clair-fixe); }
.btn-mint { background: var(--menthe-deep); color: var(--texte-clair-fixe); }
.btn-ghost { background: rgba(255,255,255,0.15); color: var(--texte-clair-fixe); border: 2px solid rgba(255,255,255,0.5); }
.btn-danger { background: var(--rival); color: var(--texte-clair-fixe); }
.btn-small { padding: 6px 14px; font-size: 12px; }

.login-wrap {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--login-degrade-1), var(--login-degrade-2));
  padding: 20px;
}
.theme-toggle-btn-coin {
  position: absolute;
  top: 20px; right: 24px;
}
.theme-toggle-btn-coin-gauche {
  position: absolute;
  top: 20px; left: 24px;
  text-decoration: none;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-card h1 { font-size: 26px; margin-bottom: 6px; }
.login-card p.sub { color: var(--prune-soft); font-weight: 700; margin-bottom: 24px; font-size: 14px; }
.login-card label { display:block; text-align:left; font-weight: 800; font-size: 13px; margin: 14px 0 6px; }
.login-card input { width: 100%; }
.password-wrap { position: relative; }
.password-wrap .password-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}
.password-wrap input {
  padding-left: 42px;
  padding-right: 40px;
}
.password-toggle {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  padding: 6px 8px;
  line-height: 1;
  border-radius: 8px;
}
.password-toggle:hover { background: var(--cream-deep); }
/* Masque les icônes natives du navigateur (œil "afficher/masquer",
   bouton d'effacement) qui sinon s'affichent par-dessus notre style et
   cassent l'apparence dès qu'on tape un mot de passe. */
.password-wrap input::-ms-reveal,
.password-wrap input::-ms-clear {
  display: none;
}
.password-wrap input::-webkit-textfield-decoration-container {
  visibility: hidden;
}
.password-wrap input::-webkit-credentials-auto-fill-button,
.password-wrap input::-webkit-strong-password-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
  position: absolute;
  right: 0;
}
.error-msg {
  background: #FFE3E0; color: var(--rival);
  border-radius: var(--radius-sm);
  padding: 10px 14px; font-weight: 700; font-size: 13px;
  margin-top: 14px;
  display: none;
}

.lien-mdp-oublie {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--lagon-deep);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 13px;
  margin-top: 16px;
  cursor: pointer;
  text-decoration: underline;
}
.lien-mdp-oublie:hover { color: var(--fraise-deep); }

.tabs {
  display: flex; gap: 8px; padding: 20px 24px 0; flex-wrap: wrap;
}
.tab-btn {
  background: var(--white);
  border: 2px solid var(--cream-deep);
  padding: 10px 18px;
  border-radius: 999px 999px 0 0;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: var(--prune-soft);
}
.tab-btn.active { background: var(--white); color: var(--prune); border-bottom-color: var(--white); box-shadow: var(--shadow); }

.tab-panel { display: none; padding: 24px; }
.tab-panel.active { display: block; }

.panel-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}
.panel-card h2 { font-size: 20px; margin-bottom: 18px; }

/* ---------- Page "Mes informations" ---------- */
.mesinfos-wrap {
  max-width: 640px;
  margin: 32px auto;
  padding: 0 24px 40px;
}
.mesinfos-card { padding: 32px; }
.mesinfos-entete {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 2px dashed var(--cream-deep);
}
.mesinfos-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  background: linear-gradient(135deg, var(--lagon), var(--menthe));
  border: 3px solid var(--white);
  box-shadow: var(--shadow);
}
.mesinfos-nom { font-family: 'Baloo 2', cursive; font-size: 22px; font-weight: 700; color: var(--prune); }
.mesinfos-role {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--cream-deep);
  color: var(--prune-soft);
}
.mesinfos-note { font-weight: 400; font-size: 11px; color: var(--prune-soft); }
.mesinfos-note-bloc {
  font-size: 13px;
  color: var(--prune-soft);
  font-weight: 700;
  margin: -8px 0 16px;
}
.mesinfos-separateur {
  margin: 30px 0 24px;
  border: none;
  border-top: 2px dashed var(--cream-deep);
}
.mesinfos-bouton-centre {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.form-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.form-group { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 800; font-size: 13px; color: var(--prune-soft); }
.form-group select, .form-group input, .form-group textarea { width: 100%; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

.table-scroll {
  overflow-x: auto;
  margin-top: 10px;
  /* évite que le contenu large (chips, boutons) ne déborde ou ne
     désaligne le tableau : au-delà de la largeur dispo, on défile
     proprement au lieu de casser la mise en page. */
}
table.admin-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
}
table.admin-table th {
  text-align: left;
  font-family: 'Baloo 2', cursive;
  color: var(--prune-soft);
  font-size: 13px;
  padding: 10px 12px;
  border-bottom: 3px solid var(--cream-deep);
  white-space: nowrap;
}
table.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--cream-deep);
  vertical-align: middle;
  white-space: nowrap;
}
table.admin-table img.thumb {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--lagon);
}
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; }
.admin-list { max-height: 240px; overflow-y: auto; margin-bottom: 4px; }
.admin-list .liste-item { box-shadow: none; border: 2px solid var(--cream-deep); }

.user-menu { position: relative; }
.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  padding: 8px;
  min-width: 210px;
  z-index: 100;
}
.user-menu-dropdown.open { display: block; }
.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--prune);
  cursor: pointer;
}
.dropdown-item:hover { background: var(--cream-deep); }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(61,44,78,0.55);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-strong);
  text-align: center;
}
.modal-box.form-modal { max-width: 520px; text-align: left; }
.modal-box.crop-modal-box { max-width: 480px; text-align: left; }
.modal-box h3 { font-size: 20px; margin-bottom: 10px; }
.modal-box p { color: var(--prune-soft); font-weight: 700; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 10px; }
.modal-icon { font-size: 46px; margin-bottom: 6px; }

.crop-zone {
  width: 100%;
  height: 340px;
  background: #111;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 6px;
}
.crop-zone img { display: block; max-width: 100%; }

.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--surface-fixe-sombre);
  color: var(--texte-clair-fixe);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-weight: 800;
  box-shadow: var(--shadow-strong);
  z-index: 2000;
  opacity: 0;
  transform: translateY(10px);
  transition: all .25s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--rival); }

.current-image-preview {
  width: 70px; height: 70px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--lagon);
  background: var(--cream-deep);
}

.file-upload-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.zone-glisser-deposer {
  border: 2px dashed var(--champ-bordure);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: border-color .15s ease, background .15s ease;
}
.zone-glisser-deposer.survolee {
  border-color: var(--lagon);
  background: var(--cream-deep);
}
.zone-glisser-deposer.chargement {
  opacity: 0.6;
  pointer-events: none;
}
.zone-glisser-deposer-texte {
  font-size: 12px;
  color: var(--prune-soft);
  font-weight: 700;
  margin: 8px 0 0;
}
.file-upload-input { display: none; }
.file-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--soleil);
  color: var(--texte-sur-pastel);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.file-upload-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.file-upload-filename {
  font-size: 13px;
  font-weight: 700;
  color: var(--prune-soft);
}

@media (max-width: 640px) {
  .admin-header { flex-direction: column; gap: 10px; align-items: flex-start; }
  .toile-toolbar { flex-direction: column; align-items: stretch; }
}
