/* =====================================================================
   gestion.css — MISE EN FORME DE LA PAGE DE GESTION
   ---------------------------------------------------------------------
   Mêmes couleurs et même police que la surcouche (charte LCA).
   Pour changer une couleur partout : modifier le bloc :root.
   ===================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;800&display=swap");

:root {
  --police: "Manrope", "Segoe UI", system-ui, Arial, sans-serif;
  --vert-fonce: #2e6f40;
  --vert-lca: #73ba64;
  --gris-lca: #5b5a4f;
  --trait: #d9ded8;
  --fond: #f3f4f1;
  --blanc: #ffffff;
  --texte: #2b2b26;
  --rouge: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--police);
  background: var(--fond);
  color: var(--texte);
  font-size: 15px;
}

/* --- Pages connexion / mot de passe : une carte centrée --- */
.centre {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.carte {
  width: 100%; max-width: 400px;
  background: var(--blanc);
  border-top: 6px solid var(--vert-lca);
  padding: 28px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.carte .logo { height: 54px; display: block; margin-bottom: 18px; }

h1 { font-size: 1.3rem; font-weight: 800; color: var(--vert-fonce); margin: 0 0 18px; }
h2 { font-size: 1.1rem; font-weight: 800; color: var(--vert-fonce); margin: 0 0 14px; }

/* --- Formulaires --- */
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--trait);
  border-radius: 4px;
  font: inherit;
}
input:focus { outline: 2px solid var(--vert-lca); border-color: var(--vert-lca); }

button {
  font: inherit; font-weight: 600;
  background: var(--vert-fonce); color: #fff;
  border: none; border-radius: 4px;
  padding: 10px 18px;
  cursor: pointer;
}
button:hover { background: #255a34; }
button:disabled { opacity: .6; cursor: wait; }
button.secondaire { background: transparent; color: var(--vert-fonce); border: 1px solid var(--vert-fonce); }
button.secondaire:hover { background: #eef5ec; }
button.petit { padding: 5px 10px; font-size: .85rem; }

/* Champ mot de passe avec bouton "Afficher / Masquer" à l'intérieur */
.champ-mdp { position: relative; }
.champ-mdp input { padding-right: 88px; }
.voir-mdp {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: transparent; color: var(--vert-fonce);
  padding: 6px 10px; font-size: .8rem;
}
.voir-mdp:hover { background: #eef5ec; }

.plein { width: 100%; margin-top: 18px; }
.lien { display: inline-block; margin-top: 14px; color: var(--vert-fonce); font-size: .9rem; }
.aide { font-size: .85rem; color: var(--gris-lca); margin: 6px 0 0; }

/* Messages d'erreur / de réussite */
.message { margin: 12px 0 0; font-size: .9rem; min-height: 1em; }
.message.erreur { color: var(--rouge); }
.message.ok { color: var(--vert-fonce); }

/* --- Page d'accueil : bandeau + sections --- */
.bandeau {
  background: var(--blanc);
  border-bottom: 4px solid var(--vert-lca);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.bandeau .logo { height: 38px; }
.bandeau .titre { font-weight: 800; color: var(--vert-fonce); flex: 1; }
.bandeau .qui { font-size: .9rem; color: var(--gris-lca); }

main.contenu { max-width: 1200px; margin: 0 auto; padding: 16px; }
section.bloc {
  background: var(--blanc);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .05);
}

.ligne-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ligne-form input { flex: 1; min-width: 200px; }

/* Tableau des comptes (défile horizontalement sur téléphone) */
.tableau-conteneur { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
th { color: var(--gris-lca); font-weight: 600; }
.etat { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .8rem; font-weight: 600; }
.etat.actif { background: #e2f2dd; color: var(--vert-fonce); }
.etat.attente { background: #fff2cc; color: #7a5b00; }
.etat.desactive { background: #eee; color: #777; }

/* --- Brique 2 : jauge, zone de dépôt, progression --- */
.jauge { margin-bottom: 16px; }
.jauge-barre { height: 10px; background: #e7eae5; border-radius: 5px; overflow: hidden; }
.jauge-remplissage { height: 100%; width: 0; background: var(--vert-lca); transition: width .3s; }
.jauge-remplissage.alerte { background: #e0a100; }
.jauge-remplissage.pleine { background: var(--rouge); }

.zone-depot {
  display: block; text-align: center; cursor: pointer;
  border: 2px dashed var(--trait); border-radius: 6px;
  padding: 28px 16px; margin: 0; font-weight: 400;
  color: var(--gris-lca); background: #fafbf9;
}
.zone-depot strong { color: var(--vert-fonce); }
.zone-depot.survol { border-color: var(--vert-lca); background: #eef5ec; }

.fichiers-choisis { list-style: none; padding: 0; margin: 10px 0 0; font-size: .9rem; }
.fichiers-choisis li { padding: 4px 0; }
.fichiers-choisis li.erreur { color: var(--rouge); }
.progression { margin-top: 16px; }

/* Liste des maquettes : colonnes qui ne se chevauchent pas.
   Le titre peut passer à la ligne, les autres colonnes restent sur une ligne ;
   si l'écran est trop étroit, le tableau défile horizontalement. */
#liste-maquettes td, .tableau-maquettes th { white-space: nowrap; }
#liste-maquettes td:first-child { white-space: normal; min-width: 220px; line-height: 1.35; }
.tableau-maquettes { min-width: 900px; }
#liste-maquettes td button { margin: 2px 6px 2px 0; }

[hidden] { display: none !important; }
