/* ==========================================================================
   Tableau de bord ProAdmin (/dashboard), d'apres la maquette
   sites/proadmin/Dashboard_ProAdmin.png.
   Colonne verte a gauche, barre haute, bandeau de profil, cartes.
   Le theme sombre ne redefinit que les variables de :root.
   ========================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("/static/assets/fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --citron: #b4f21a;
  --vert: #4cb81a;
  --vert-fonce: #2f8a12;
  --foret: #12501a;

  --fond: #f4f7f1;
  --carte: #ffffff;
  --bord: #e1e8da;
  --texte: #14210f;
  --doux: #66755f;
  --champ: #ffffff;
  --champ-bord: #d6dfce;
  --champ-lecture: #fbfcf9;
  --pastille: #e6f6d6;
  --pastille-texte: #1f6a10;
  --neutre: #eef2ea;
  --ombre: 0 1px 2px rgba(20, 33, 15, 0.04), 0 8px 24px rgba(20, 33, 15, 0.05);
  --rouge: #e30b34;
}

:root[data-theme="sombre"] {
  --fond: #0c1a10;
  --carte: #12261a;
  --bord: #23402b;
  --texte: #eef5e8;
  --doux: #9db592;
  --champ: #0f2016;
  --champ-bord: #2d5a35;
  --champ-lecture: #0f2016;
  --pastille: #1d4a1f;
  --pastille-texte: #c5f58a;
  --neutre: #1a3322;
  --ombre: 0 1px 2px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  background: var(--fond);
  color: var(--texte);
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; flex: none; }

:focus-visible { outline: 3px solid var(--vert); outline-offset: 2px; }

.app { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }

/* --- Colonne de navigation ------------------------------------------------ */

.cote {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden auto;
  display: flex;
  flex-direction: column;
  padding: 34px 22px 22px;
  color: #ffffff;
  background:
    linear-gradient(158deg, rgba(255, 255, 255, 0.07) 0 30%, transparent 30%),
    linear-gradient(338deg, rgba(120, 220, 40, 0.3) 0 34%, transparent 34%),
    linear-gradient(180deg, #2f8f1c 0%, #1a6a1a 46%, #0f4a16 100%);
}

.cote-eclat {
  position: absolute;
  background: rgba(150, 235, 60, 0.28);
  clip-path: polygon(0 0, 100% 46%, 12% 100%);
  pointer-events: none;
}
.cote-eclat--a { width: 70px; height: 92px; left: 158px; bottom: 268px; }
.cote-eclat--b { width: 150px; height: 190px; left: 8px; bottom: 44px; transform: rotate(150deg); }
.cote-eclat--c { width: 56px; height: 96px; right: 14px; top: 300px; transform: rotate(72deg); opacity: 0.5; }

.logo {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 42px 16px;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.75rem;
  line-height: 0.98;
}
.logo img { width: 66px; height: 66px; }
.logo b { display: block; font-weight: 800; }
.logo span { font-weight: 400; }

.nav { position: relative; display: flex; flex-direction: column; gap: 8px; }

.nav a {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-radius: 9px;
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
}
.nav a:hover { background: rgba(255, 255, 255, 0.1); }
.nav a[aria-current="page"] {
  background: linear-gradient(90deg, #58c624, #7ed428);
  box-shadow: 0 4px 14px rgba(6, 50, 12, 0.3);
}
.nav a:focus-visible { outline-color: #ffffff; }

.cote-pied {
  position: relative;
  margin: auto 0 0;
  padding: 22px 16px 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.82);
}

/* --- Barre haute ---------------------------------------------------------- */

.principal { min-width: 0; padding: 16px 28px 40px 32px; }

.barre { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }

.burger { display: none; padding: 9px; border: 0; border-radius: 9px; background: var(--carte); box-shadow: var(--ombre); }

.cherche { position: relative; flex: 0 1 370px; }
.cherche svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--doux); }
.cherche input {
  width: 100%;
  padding: 12px 18px 12px 54px;
  border: 1px solid var(--bord);
  border-radius: 999px;
  background: var(--carte);
  box-shadow: var(--ombre);
}
.cherche input::placeholder { color: var(--doux); }

.resultats {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--bord);
  border-radius: 12px;
  background: var(--carte);
  box-shadow: 0 12px 32px rgba(20, 33, 15, 0.14);
}
.resultats[hidden] { display: none; }
.resultats button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}
.resultats button:hover, .resultats button:focus-visible { background: var(--neutre); }
.resultats small { color: var(--doux); margin-left: 6px; }
.resultats .rien { padding: 9px 12px; color: var(--doux); }

.barre-droite { margin-left: auto; display: flex; align-items: center; gap: 22px; }

.cloche { display: block; position: relative; padding: 6px; border: 0; background: transparent; color: var(--texte); border-radius: 8px; }
.cloche i { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--rouge); color: #fff; font: 700 0.6875rem/1 inherit; font-style: normal; border: 2px solid var(--fond); box-sizing: border-box; }
/* Les notifications (notifications.js, PLAN_NOTIFICATIONS.md) */
.nt-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.nt-tete h2 { margin: 0 0 6px; }
.nt-tete p { margin: 0; color: var(--doux); }
.nt-liste-carte { display: flex; flex-direction: column; max-height: calc(100vh - 290px); min-height: 240px; }
.nt-filtres { display: flex; gap: 8px; margin-bottom: 12px; flex: none; }
.nt-filtre { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--bord); background: var(--carte); color: var(--texte); cursor: pointer; font-weight: 600; }
.nt-filtre span { min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--neutre); font-size: 0.75rem; text-align: center; }
.nt-filtre[aria-pressed="true"] { background: var(--foret); color: #fff; border-color: var(--foret); }
.nt-filtre[aria-pressed="true"] span { background: rgba(255, 255, 255, .2); }
.nt-liste { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.nt-ligne { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-bottom: 1px solid var(--bord); border-radius: 8px; }
.nt-ligne:last-child { border-bottom: 0; }
.nt-ligne--nouvelle { background: var(--pastille); }
.nt-pic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--neutre); color: var(--foret); }
.nt-pic--vert { background: #e2f5d3; color: #1f7a10; } .nt-pic--bleu { background: #e4edfd; color: #1d5fd1; } .nt-pic--orange { background: #fff0d9; color: #a65500; }
.nt-pic--violet { background: #eee6fd; color: #6b3fc2; } .nt-pic--rouge { background: #fde8ec; color: #b0122f; }
:root[data-theme="sombre"] .nt-pic--vert { background: rgba(76, 184, 26, .18); color: #9ee07a; } :root[data-theme="sombre"] .nt-pic--bleu { background: rgba(29, 95, 209, .22); color: #9dbdf5; }
:root[data-theme="sombre"] .nt-pic--orange { background: rgba(166, 85, 0, .25); color: #f3c07a; } :root[data-theme="sombre"] .nt-pic--violet { background: rgba(107, 63, 194, .25); color: #c7b0f5; } :root[data-theme="sombre"] .nt-pic--rouge { background: rgba(176, 18, 47, .25); color: #f5a3b2; }
.nt-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nt-texte { line-height: 1.4; }
.nt-corps small { color: var(--doux); font-size: 0.8125rem; }
.nt-badge { color: var(--pastille-texte); }
.nt-ouvrir { flex: none; }
.nt-vide { color: var(--doux); margin: 8px 0; }
@media (max-width: 640px) { .nt-tete { flex-direction: column; } .nt-ligne { flex-wrap: wrap; } .nt-ouvrir { margin-left: 50px; } .nt-liste-carte { max-height: none; } }

.moi { position: relative; }
.moi > button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 4px 2px 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
}
.moi-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--bord);
  border-radius: 12px;
  background: var(--carte);
  box-shadow: 0 12px 32px rgba(20, 33, 15, 0.14);
}
.moi-menu[hidden] { display: none; }
.moi-menu p { margin: 0; padding: 8px 12px 10px; font-size: 0.8125rem; color: var(--doux); border-bottom: 1px solid var(--bord); overflow-wrap: anywhere; }
.moi-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-weight: 600;
  text-align: left;
}
.moi-menu button:hover { background: var(--neutre); }

/* --- Portrait : photo ou initiales --------------------------------------- */

.portrait {
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(140deg, #7ed428, #1f7a17);
  color: #ffffff;
  font-weight: 700;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait--p { width: 48px; height: 48px; font-size: 1rem; }
.portrait--m { width: 126px; height: 126px; font-size: 2.5rem; }
.portrait--g { width: 176px; height: 176px; font-size: 3.5rem; border: 5px solid #ffffff; box-shadow: 0 10px 30px rgba(20, 80, 20, 0.22); }

/* --- Bandeau de profil ---------------------------------------------------- */

.bandeau {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 44px;
  min-height: 248px;
  margin-bottom: 20px;
  padding: 30px 50px;
  border-radius: 14px;
  color: #14210f;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.5) 0 26%, transparent 26%),
    linear-gradient(100deg, #f1fbe2 0%, #d5f3ae 46%, #8ee04a 78%, #57c41f 100%);
}

.bandeau-eclat { position: absolute; background: rgba(255, 255, 255, 0.5); clip-path: polygon(0 0, 100% 46%, 12% 100%); }
.bandeau-eclat--a { width: 64px; height: 80px; right: 34%; top: 26%; background: rgba(110, 210, 50, 0.6); transform: rotate(196deg); }
.bandeau-eclat--b { width: 90px; height: 96px; right: 26%; bottom: 8%; transform: rotate(150deg); }
.bandeau-eclat--c { width: 44px; height: 56px; right: 14px; top: 30%; }

.bandeau-photo { position: relative; flex: none; }
.bandeau-photo button {
  position: absolute;
  right: 2px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #3d4a5c;
  color: #ffffff;
}

.bandeau-texte { position: relative; min-width: 0; }
.bandeau h1 { margin: 0 0 6px; font-size: clamp(1.625rem, 3vw, 2.375rem); font-weight: 700; line-height: 1.12; overflow-wrap: anywhere; }
.bandeau-mail { margin: 0 0 18px; font-size: 1.125rem; color: #5c6d55; overflow-wrap: anywhere; }

.pastilles { display: flex; flex-wrap: wrap; gap: 14px; }
.pastille {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  font-weight: 500;
}
.pastille--ok { background: #dff5c8; color: #1f6a10; }
.pastille--ok svg { color: #2f9a14; }

.bandeau-icone {
  position: absolute;
  right: 110px;
  top: 52%;
  width: 186px;
  height: 186px;
  transform: translateY(-50%) perspective(900px) rotateY(-26deg) rotateX(10deg) rotate(9deg);
  filter: drop-shadow(-14px 18px 0 rgba(31, 122, 23, 0.55)) drop-shadow(-26px 34px 30px rgba(10, 70, 14, 0.3));
}

/* --- Grille de cartes ----------------------------------------------------- */

.grille { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px 20px; align-items: start; }
.colonne { display: grid; gap: 18px; min-width: 0; }

.carte { padding: 22px; border-radius: 12px; background: var(--carte); box-shadow: var(--ombre); }

.carte-tete { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.carte-tete > svg { color: var(--vert-fonce); }
.carte-tete h2 { margin: 0; font-size: 1.125rem; font-weight: 600; }
.carte-tete .outils { margin-left: auto; display: flex; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--bord);
  border-radius: 8px;
  background: var(--carte);
  font-weight: 500;
}
.btn:hover { background: var(--neutre); }
.btn--plein { border: 0; background: linear-gradient(180deg, #5cc71f, #3da315); color: #ffffff; font-weight: 600; }
.btn--plein:hover { background: linear-gradient(180deg, #54b91c, #379512); }
.btn--large { width: 100%; padding: 12px 14px; }
.btn--neutre { background: var(--neutre); }

.champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }

.champ { display: block; min-width: 0; }
.champ > span { display: block; margin-bottom: 7px; font-size: 0.875rem; }

.saisie { position: relative; }
.saisie > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--doux); pointer-events: none; }
.saisie > svg + input, .saisie > svg + select { padding-left: 42px; }

.case { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; cursor: pointer; }
.case input { flex: none; width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--vert-fonce); }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--champ-bord);
  border-radius: 7px;
  background: var(--champ);
}
input::placeholder, textarea::placeholder { color: var(--doux); opacity: 0.75; }
input[readonly], textarea[readonly] { background: var(--champ-lecture); }
select:disabled { opacity: 1; background: var(--champ-lecture); }
textarea { display: block; min-height: 78px; resize: vertical; line-height: 1.5; }

.photo { display: flex; align-items: center; gap: 30px; }
.photo-actions { flex: 1; display: grid; gap: 14px; min-width: 0; }

.liens { display: grid; gap: 12px; }
.lien { display: flex; align-items: center; gap: 24px; }
.reseau { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 7px; color: #ffffff; }
.reseau--linkedin { background: #0a66c2; }
.reseau--x { background: #000000; }
.reseau--instagram { background: linear-gradient(45deg, #f9a03f, #e1306c 55%, #a633c4); }
.reseau--youtube { background: #e62117; }
.reseau--site { background: #4a6076; }
.lien input { font-size: 0.8125rem; }

.prefs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.pref { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pref > i { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border: 1px solid var(--bord); border-radius: 8px; color: var(--doux); }
.pref label { flex: 1; min-width: 0; }
.pref label span { display: block; margin-bottom: 2px; font-size: 0.6875rem; color: var(--doux); }
.pref select { padding: 7px 10px; font-size: 0.875rem; }

.compte-lie { display: flex; align-items: center; gap: 22px; }
.compte-lie img { width: 44px; height: 44px; flex: none; }
.compte-lie div { min-width: 0; margin-right: auto; }
.compte-lie strong { display: block; font-weight: 600; }
.compte-lie span { color: var(--doux); overflow-wrap: anywhere; }
.compte-lie .pastille { background: var(--pastille); color: var(--pastille-texte); }

.vide { padding: 56px 24px; text-align: center; color: var(--doux); }
.vide h2 { margin: 0 0 8px; font-size: 1.5rem; color: var(--texte); }
.vide p { margin: 0; }

.confirmation {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 11px 18px;
  border-radius: 999px;
  background: #14210f;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.confirmation[hidden] { display: none; }

.voile { display: none; }

/* --- Ecrans etroits ------------------------------------------------------- */

@media (max-width: 1180px) {
  .grille { grid-template-columns: minmax(0, 1fr); }
  .bandeau-icone { right: 48px; width: 160px; height: 160px; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .cote {
    position: fixed;
    z-index: 50;
    left: 0;
    width: 262px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }
  .app[data-menu="ouvert"] .cote { transform: none; }
  .app[data-menu="ouvert"] .voile { display: block; position: fixed; z-index: 45; inset: 0; border: 0; background: rgba(10, 30, 14, 0.5); }
  .burger { display: grid; place-items: center; }
  .principal { padding: 14px 16px 36px; }
  .moi-nom { display: none; }
  .barre-droite { gap: 10px; }
  .bandeau { flex-direction: column; align-items: flex-start; gap: 20px; padding: 26px 22px; }
  .bandeau-icone, .bandeau-eclat { display: none; }
  .portrait--g { width: 120px; height: 120px; font-size: 2.5rem; }
  .bandeau-mail { font-size: 0.9375rem; }
}

@media (max-width: 560px) {
  .champs, .prefs { grid-template-columns: minmax(0, 1fr); }
  .photo { flex-direction: column; align-items: stretch; }
  .photo .portrait { align-self: center; }
  .lien { gap: 12px; }
  .compte-lie { flex-wrap: wrap; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .cote { transition: none; }
}

/* --- Comptes : attente du coffre, lien du menu du compte -------------------- */
.charge { margin: 0; padding: 20vh 24px; text-align: center; font-weight: 600; }
.moi-menu .moi-lien {
  display: block;
  margin-top: 6px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}
.moi-menu .moi-lien:hover { background: var(--neutre); }

/* --- Mise en page « écran » (patron de style) ------------------------------
   Sur un écran de bureau, la page ne défile pas : la barre latérale et la
   barre haute restent en place, l'en-tête de la page aussi, et le contenu
   prend la hauteur restante. Une grille de colonnes s'étire : colonnes de
   même hauteur, chacune avec son propre défilement. Sur petit écran, la page
   défile normalement. */
@media (min-width: 1000px) and (min-height: 620px) {
  .app { height: 100vh; min-height: 0; overflow: hidden; }
  .cote { height: 100vh; overflow-y: auto; }
  .principal { display: flex; flex-direction: column; height: 100vh; overflow: hidden; padding-bottom: 18px; }
  .principal > main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .cadre { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .cadre > * { flex: none; }
  .cadre > .zone { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -8px; padding: 2px 8px 8px; scrollbar-gutter: stable; }
  .cadre > .zone > :last-child { margin-bottom: 0; }
  .zone--grille { display: flex; flex-direction: column; overflow: hidden !important; }
  .zone--grille > * { flex: 1; min-height: 0; margin-bottom: 0 !important; align-items: stretch !important; grid-template-rows: minmax(0, 1fr); }
  .zone--grille > * > * { min-height: 0; max-height: 100%; overflow-y: auto; scrollbar-gutter: stable; }
  .cadre > .so-pied-nav { margin: 12px 0 0; }
  /* Une colonne qui empile des cartes : la dernière descend jusqu'en bas. */
  .zone--grille > * > .colonne, .zone--grille > * > .so-colonne { display: flex; flex-direction: column; gap: 18px; }
  .zone--grille > * > .colonne > *, .zone--grille > * > .so-colonne > * { flex: none; margin: 0; }
  /* La dernière carte remplit le bas de la colonne et défile en elle-même (coins
     arrondis gardés) ; si les cartes du dessus débordent, la colonne défile. */
  .zone--grille > * > .colonne > :last-child, .zone--grille > * > .so-colonne > :last-child { flex: 1 1 0; min-height: 220px; overflow-y: auto; }
}

/* --- Onglets (une carte à la fois dans une colonne) --------------------------- */
.onglets { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--carte); box-shadow: var(--ombre); overflow-x: auto; }
.onglets { overflow: hidden !important; }
/* Libellés courts ; s'ils ne tiennent pas, « … » (jamais de défilement horizontal). */
.onglets button { flex: 1 1 0; min-width: 0; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--doux); font-weight: 600; }
.onglets button span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onglets button:hover { color: var(--texte); }
.onglets button[aria-selected="true"] { color: #fff; background: linear-gradient(90deg, #3fa31d, #58c624); }

/* --- Photo du bandeau : changer, retirer ; boutons visibles au survol ----------- */
.bandeau-photo .photo-act { opacity: 0; pointer-events: none; transform: scale(0.85); transition: opacity 140ms ease, transform 140ms ease; }
.bandeau-photo:hover .photo-act, .bandeau-photo:focus-within .photo-act, .bandeau-photo.photo--ouverte .photo-act { opacity: 1; pointer-events: auto; transform: none; }
/* Corbeille en bas à gauche du cercle, symétrique de l'appareil photo (en bas à droite). */
.bandeau-photo .photo-act--retirer { right: auto; left: 2px; background: #b0122f; }
/* Pas de requête média (sur Windows, Chrome peut se dire « sans survol » avec une
   souris) : survol ou clavier pour la souris, une touche sur la photo en tactile. */
.bandeau-photo.photo--ouverte .photo-act { opacity: 1; transform: none; }

/* --- Barres de défilement : fines, arrondies, aux couleurs ProAdmin ------------------ */
* { scrollbar-width: thin; scrollbar-color: rgba(47, 138, 18, 0.45) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: rgba(47, 138, 18, 0.35) padding-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(47, 138, 18, 0.6) padding-box; }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
*::-webkit-scrollbar-corner { background: transparent; }

/* --- Mini-éditeur (À propos) : il prend toute la hauteur de la carte ---------------- */
.carte--editeur { display: flex; flex-direction: column; }
.carte--editeur .carte-tete { flex: none; }
.editeur-outils { flex: none; display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; padding: 5px; border: 1px solid var(--champ-bord); border-radius: 10px; background: var(--neutre); }
.editeur-outils button { min-width: 34px; height: 32px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: var(--texte); font-size: 0.9rem; }
.editeur-outils button:hover { background: var(--carte); box-shadow: var(--ombre); }
.editeur-outils .ed-bold { font-weight: 800; }
.editeur-outils .ed-italic { font-style: italic; font-family: Georgia, serif; }
.editeur-outils .ed-underline { text-decoration: underline; }
.editeur-zone { flex: 1 1 auto; min-height: 140px; overflow-y: auto; padding: 12px 14px; border: 1px solid var(--champ-bord); border-radius: 10px; background: var(--champ); line-height: 1.6; outline: none; overflow-wrap: anywhere; }
.editeur-zone:focus { border-color: var(--vert); box-shadow: 0 0 0 3px rgba(76, 184, 26, 0.18); }
.editeur-zone--lecture { background: var(--champ-lecture); }
.editeur-zone:empty::before { content: attr(data-aide); color: var(--doux); opacity: 0.8; }
.editeur-zone p { margin: 0 0 0.6em; }
.editeur-zone ul, .editeur-zone ol { margin: 0 0 0.6em; padding-left: 1.4em; }
.editeur-zone a { color: var(--vert-fonce); }
.editeur-outils .ed-insertUnorderedList { font-size: 1.35rem; line-height: 1; }
.editeur-outils .ed-insertOrderedList { font-weight: 700; }

/* --- Pays : choix à drapeaux ----------------------------------------------------- */
.pays-choix { position: relative; }
.pays-bouton { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--champ-bord); border-radius: 9px; background: var(--champ); text-align: left; }
.pays-bouton:disabled { cursor: default; background: var(--champ-lecture); }
.pays-bouton .fi { width: 22px; height: 16.5px; flex: none; border-radius: 2px; }
.pays-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pays-nom--vide { color: var(--doux); }
.pays-bouton:disabled .cty-caret { display: none; }
.pays-panel { position: fixed; z-index: 13000; }

/* --- Lieu : champ et fenêtre avec carte ----------------------------------------------- */
.lieu-saisie { position: relative; display: flex; align-items: center; }
.lieu-saisie input[data-lieu-texte] { flex: 1; min-width: 0; text-overflow: ellipsis; }
.lieu-bouton { position: absolute; right: 6px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; color: #fff; background: linear-gradient(135deg, #3fa31d, #58c624); }
.lieu-saisie:has(.lieu-bouton) input[data-lieu-texte] { padding-right: 44px; cursor: pointer; }

.modale-fond { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(10, 36, 16, 0.45); backdrop-filter: blur(2px); }
.modale { display: flex; flex-direction: column; width: min(980px, 100%); max-height: calc(100vh - 40px); border-radius: 16px; background: var(--carte); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3); overflow: hidden; }
.modale-tete { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--bord); }
.modale-tete svg { color: var(--vert-fonce); }
.modale-tete h2 { flex: 1; margin: 0; font-size: 1.15rem; }
.modale-fermer { width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--neutre); }
.modale-corps { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
.lieu-champs { padding: 18px 20px; overflow-y: auto; border-right: 1px solid var(--bord); }
.lieu-champs .champ { margin-bottom: 12px; }
.lieu-ligne { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.lieu-pays { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--doux); }
.lieu-pays .fi { width: 22px; height: 16.5px; }
.lieu-champs .btn { width: 100%; justify-content: center; }
.lieu-msg { min-height: 1.4em; margin: 12px 0 0; font-size: 0.85rem; color: var(--vert-fonce); }
.lieu-note { margin: 12px 0 0; font-size: 0.75rem; color: var(--doux); line-height: 1.5; }
.lieu-carte { position: relative; min-height: 420px; background: var(--neutre); }
.lieu-carte .leaflet-container, .lieu-carte.leaflet-container { width: 100%; height: 100%; min-height: 420px; }
.lieu-attente { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--doux); }
.modale-pied { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--bord); }
@media (max-width: 760px) { .modale-corps { grid-template-columns: 1fr; } .lieu-champs { border-right: 0; border-bottom: 1px solid var(--bord); } .lieu-carte { min-height: 300px; } }
.pays-panel .cty-row.is-actif { background: #dff5c8; outline: 2px solid #4cb81a; outline-offset: -2px; }

/* Cartes empilées dans une zone : le même espace qu'entre les cartes d'une grille. */
.cadre > .zone:not(.zone--grille) > * + * { margin-top: 18px; }
/* Un lien présenté en bouton n'est pas souligné ni bleu. */
a.btn { text-decoration: none; color: var(--texte); }
a.btn.btn--plein { color: #fff; }

/* Appareils de confiance */
.ap-intro { margin: 0 0 16px; color: var(--doux); max-width: 70ch; }
.ap-liste { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ap-ligne { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--bord); border-radius: 12px; background: var(--carte); }
.ap-ligne--ici { border-color: var(--vert); background: var(--pastille); }
.ap-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--neutre); color: var(--vert-fonce); }
.ap-texte { flex: 1; min-width: 0; }
.ap-texte b { display: block; }
.ap-texte small { color: var(--doux); }
.ap-badge { margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: var(--vert); color: #fff; font-size: .75rem; font-weight: 700; vertical-align: middle; }
.ap-vide { color: var(--doux); }

/* Comptes : les adresses de l'identité */
.co-liste { margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 10px; }
.co-ligne { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--bord); border-radius: 12px; background: var(--carte); }
.co-ligne--principale { border-color: var(--vert); background: var(--pastille); }
.co-texte { flex: 1 1 260px; min-width: 0; }
.co-texte b { display: block; overflow-wrap: anywhere; }
.co-texte small { color: var(--doux); }
.co-nature, .co-ajout select, .co-ajout input { padding: 9px 12px; border: 1px solid var(--champ-bord); border-radius: 10px; background: var(--champ); color: var(--texte); font: inherit; }
.co-ajout { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 18px; border-top: 1px solid var(--bord); }
.co-ajout h3 { flex: 1 0 100%; margin: 0 0 4px; font-size: 1rem; }
.co-ajout input { flex: 1 1 260px; }
.co-envoye { flex: 1 0 100%; margin: 4px 0 0; color: var(--pastille-texte); overflow-wrap: anywhere; }
.co-fusion { margin-top: 18px; }
/* Comptes : chaque adresse sur une ligne (la règle générale met les listes à 100 %). */
.co-ligne .co-nature { width: auto; flex: 0 0 auto; min-width: 170px; }
.co-ligne .co-texte { flex: 1 1 280px; }
.co-ajout input[name="adresse"] { width: auto; flex: 1 1 280px; }
.co-ajout select { width: auto; flex: 0 0 auto; min-width: 170px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.co-attente-titre { margin: 4px 0 10px; font-size: 1rem; }
.co-ligne--attente { border-style: dashed; }
.co-envoye--non { color: #b3261e; }

/* Jamais de défilement horizontal de la page (téléphone) : une adresse longue
   passe à la ligne ; le contenu large défile dans son propre cadre. */
html, body { max-width: 100%; overflow-x: hidden; overflow-x: clip; }

/* --- La barre de menu réduite aux icônes (bureau) --------------------------- */
.cote-replier { position: relative; display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 9px 16px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 9px; background: rgba(255, 255, 255, 0.08); color: #ffffff; font: inherit; font-size: 0.8125rem; cursor: pointer; }
.cote-replier:hover { background: rgba(255, 255, 255, 0.16); }
@media (min-width: 901px) {
  .app[data-replie="1"] { grid-template-columns: 84px minmax(0, 1fr); }
  .app[data-replie="1"] .cote { padding: 26px 12px 18px; }
  .app[data-replie="1"] .logo { margin: 0 auto 32px; }
  .app[data-replie="1"] .logo img { width: 52px; height: 52px; }
  .app[data-replie="1"] .logo span, .app[data-replie="1"] .nav-texte, .app[data-replie="1"] .cote-pied, .app[data-replie="1"] .cote-eclat { display: none; }
  .app[data-replie="1"] .nav a { justify-content: center; padding: 12px 0; }
  .app[data-replie="1"] .cote-replier { justify-content: center; margin-top: auto; padding: 9px 0; }
}
@media (max-width: 900px) { .cote-replier { display: none; } }

/* --- Écran peu haut : des bandeaux compacts, le contenu d'abord -------------- */
@media (min-width: 1000px) and (max-height: 920px) {
  .bandeau.rg-bandeau { min-height: 0; gap: 22px; margin-bottom: 12px; padding: 14px 200px 14px 30px; }
  .rg-bandeau .rg-embleme { padding: 4px; border-radius: 16px; }
  .rg-bandeau .rg-embleme i { width: 60px; height: 60px; border-radius: 13px; }
  .rg-bandeau .rg-embleme svg { width: 32px; height: 32px; }
  .rg-bandeau h1 { margin-bottom: 2px; font-size: 1.5rem; }
  .rg-bandeau p { font-size: 0.9375rem; }
  .rg-bandeau .rg-decor { width: 120px; bottom: -10px; }
  .rg-fil { margin-bottom: 10px; }
}


/* Installer depuis l'ODESA Store (store-installer.js) */
.si-tete { margin-bottom: 16px; } .si-tete h2 { margin: 0; }
.si-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.si-app-tete { display: flex; align-items: center; gap: 14px; } .si-app-tete h3 { margin: 0 0 4px; } .si-app-tete p { margin: 0; color: var(--doux); }
.si-tuile { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--vert), var(--foret)); }
.si-desc { margin: 14px 0 0; line-height: 1.5; } .si-note { color: var(--doux); font-size: 0.875rem; margin: 12px 0 0; }
.si-choix h3 { margin: 0 0 10px; } .si-serveurs { display: flex; flex-direction: column; gap: 8px; }
.si-serveur { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 10px; cursor: pointer; }
.si-serveur.actif { border-color: var(--vert); background: var(--pastille); } .si-serveur small { display: block; color: var(--doux); font-size: 0.78rem; }
.si-champ { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; font-weight: 600; font-size: 0.9rem; }
.si-champ input { padding: 9px 11px; border: 1px solid var(--champ-bord); border-radius: 9px; background: var(--champ); font: inherit; font-weight: 400; }
.si-choix .btn { margin-top: 14px; } .si-msg { margin: 12px 0 0; font-weight: 600; } .si-msg--ok { color: var(--pastille-texte); } .si-msg--ko { color: var(--rouge); }
.si-deps { margin: 16px 0 0; display: flex; flex-direction: column; gap: 8px; } .si-deps h4 { margin: 0; font-size: 0.95rem; }
.si-dep { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--bord); border-radius: 10px; } .si-dep small { color: var(--doux); font-size: 0.78rem; }
.si-dep-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.si-dep-badge { flex: none; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--pastille); color: var(--pastille-texte); } .si-dep-badge.obl { background: var(--rouge); color: #fff; }
.si-dep-etat { font-size: 0.85rem; font-weight: 600; } .si-dep-etat.ok { color: var(--pastille-texte); } .si-dep-etat.attente { color: #b45309; } .si-dep-etat.ko { color: var(--rouge); }
.si-dep-case { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.88rem; cursor: pointer; } .si-dep-note { display: block; }
@media (max-width: 760px) { .si-grille { grid-template-columns: 1fr; } }
