/* ==========================================================================
   ELEVEN4U - styles communs (connexion, installeur, back office, portail)
   Les couleurs du client sont injectées dans --principale et --accent.
   ========================================================================== */
:root {
  --principale: #17406D;
  --accent: #389ABE;
  --fond: #F3F5F8;
  --surface: #FFFFFF;
  --texte: #1F2937;
  --texte-doux: #64748B;
  --bordure: #DCE2EA;
  --danger: #D32F2F;
  --succes: #2E7D32;
  --alerte: #ED8936;
  --rayon: 8px;
  --ombre: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--police); font-size: 14px; line-height: 1.5; color: var(--texte); background: var(--fond); }
a { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.25; color: var(--principale); }
h1 { font-size: 1.6rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
small, .doux { color: var(--texte-doux); }
[hidden] { display: none !important; }

/* Boutons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border: 1px solid transparent; border-radius: 6px;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  background: var(--accent); color: #fff; cursor: pointer; transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-principal { background: var(--principale); }
.btn-secondaire { background: var(--surface); color: var(--texte); border-color: var(--bordure); }
.btn-secondaire:hover { background: #F8FAFC; filter: none; }
.btn-danger { background: var(--danger); }
.btn-succes { background: var(--succes); }
.btn-lien { background: none; color: var(--accent); padding: 4px 6px; }
.btn-petit { padding: 4px 9px; font-size: 12px; }
.btn-bloc { width: 100%; }

/* Formulaires ------------------------------------------------------------ */
.champ { margin-bottom: 14px; }
.champ label, .etiquette { display: block; font-weight: 600; margin-bottom: 4px; }
.champ .aide { display: block; font-size: 12px; color: var(--texte-doux); margin-top: 3px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search],
input[type=url], input[type=tel], input[type=date], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--bordure); border-radius: 6px;
  font: inherit; color: var(--texte); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
input[type=color] { width: 56px; height: 36px; padding: 2px; border: 1px solid var(--bordure); border-radius: 6px; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
.case { display: inline-flex; align-items: center; gap: 6px; font-weight: normal; cursor: pointer; }
.ligne-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.actions .droite { margin-left: auto; }

/* Cartes, alertes -------------------------------------------------------- */
.carte { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; margin-bottom: 18px; }
.carte > h2:first-child, .carte > h3:first-child { margin-top: 0; }
.alerte { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border: 1px solid; }
.alerte-succes { background: #E8F5E9; border-color: #A5D6A7; color: #1B5E20; }
.alerte-erreur { background: #FDECEA; border-color: #F5B7B1; color: #8E1B12; }
.alerte-info { background: #E8F4FD; border-color: #B3D7F2; color: #0B4A75; }
.alerte-attention { background: #FFF6E5; border-color: #F6D49A; color: #7A4B00; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; background: #E2E8F0; color: #334155; }
.badge-ok { background: #E8F5E9; color: #1B5E20; } .badge-ko { background: #FDECEA; color: #8E1B12; }

/* Tableaux --------------------------------------------------------------- */
.tableau-conteneur { overflow-x: auto; }
table.tableau { width: 100%; border-collapse: collapse; background: var(--surface); }
.tableau th, .tableau td { padding: 8px 10px; border-bottom: 1px solid var(--bordure); text-align: left; vertical-align: middle; }
.tableau th { background: #F8FAFC; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--texte-doux); }
.tableau tr:hover td { background: #FAFCFE; }
.tableau td.actions-ligne { white-space: nowrap; text-align: right; }
.tableau input, .tableau select { padding: 5px 7px; }

/* Pastille de statut ----------------------------------------------------- */
.pastille { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); flex-shrink: 0; }
.statut-a_faire { background: #E53935; } .statut-en_cours { background: #FB8C00; } .statut-fait { background: #43A047; }

/* Page de connexion / installeur ---------------------------------------- */
.page-centree { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(160deg, var(--principale) 0%, color-mix(in srgb, var(--principale) 70%, var(--accent)) 100%); }
.page-centree .bandeau { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; color: #fff; }
.page-centree .bandeau img { height: 54px; width: auto; }
.page-centree .bandeau .slogan { font-style: italic; opacity: .9; }
.boite { width: 100%; max-width: 420px; margin: 4vh auto; background: var(--surface); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); overflow: hidden; }
.boite-large { max-width: 860px; }
.boite-entete { padding: 22px 26px 12px; border-bottom: 4px solid var(--accent); }
.boite-entete h1 { margin: 0; font-size: 1.35rem; }
.boite-entete .logo-client { max-height: 70px; margin-bottom: 10px; }
.boite-corps { padding: 22px 26px 26px; }
.pied-page { text-align: center; color: rgba(255,255,255,.7); font-size: 12px; padding: 16px; margin-top: auto; }

@media (max-width: 600px) {
  .page-centree .bandeau .slogan { display: none; }
  .boite { margin: 0; border-radius: 0; min-height: calc(100vh - 86px); }
  .boite-corps, .boite-entete { padding-left: 16px; padding-right: 16px; }
}
