/* ============================================================
   Portail HER - charte graphique
   Rouge #E2001A / blanc / texte gris fonce - Arial
   ============================================================ */

:root {
  --her-red:        #E2001A;
  --her-red-dark:   #B30015;
  --her-ink:        #2B2B2B;   /* texte gris fonce */
  --her-ink-soft:   #6B6B6B;   /* texte secondaire */
  --her-bg:         #F4F4F5;   /* fond de page */
  --her-line:       #E3E3E5;   /* filets / bordures */
  --her-white:      #FFFFFF;
  --her-radius:     10px;
  --her-shadow:     0 2px 14px rgba(0, 0, 0, .07);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--her-ink);
  background: var(--her-bg);
  line-height: 1.55;
}

a { color: var(--her-red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- En-tete ---------- */
.her-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  height: 64px;
  background: var(--her-red);
  color: var(--her-white);
  box-shadow: var(--her-shadow);
}
.her-header__brand { display: flex; align-items: center; gap: 14px; }
.her-logo { height: 38px; width: auto; display: block; background: #fff; padding: 3px 6px; border-radius: 6px; }
.her-title { font-size: 19px; font-weight: bold; letter-spacing: .2px; }
.her-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.her-nav a { color: var(--her-white); font-weight: bold; }
.her-user { color: rgba(255, 255, 255, .9); font-size: 13px; }

/* ---------- Zone principale ---------- */
.her-main {
  max-width: 680px;
  margin: 40px auto;
  padding: 0 20px;
}

/* ---------- Cartes ---------- */
.her-card {
  background: var(--her-white);
  border: 1px solid var(--her-line);
  border-top: 4px solid var(--her-red);
  border-radius: var(--her-radius);
  box-shadow: var(--her-shadow);
  padding: 30px 32px;
}
.her-card h1 {
  margin: 0 0 6px;
  font-size: 23px;
  color: var(--her-ink);
}
.her-card h3 {
  margin: 22px 0 6px;
  font-size: 15px;
  color: var(--her-red-dark);
}
.lead  { color: var(--her-ink-soft); margin: 0 0 22px; }
.muted { color: var(--her-ink-soft); font-size: 14px; }

/* ---------- Formulaires ---------- */
label {
  display: block;
  margin: 16px 0 6px;
  font-weight: bold;
  font-size: 14px;
}
input[type=text],
input[type=email],
input[type=password],
select {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--her-ink);
  border: 1px solid var(--her-line);
  border-radius: 8px;
  background: #fff;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--her-red);
  box-shadow: 0 0 0 3px rgba(226, 0, 26, .12);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  margin-top: 22px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: bold;
  font-family: inherit;
  color: var(--her-white);
  background: var(--her-red);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--her-red-dark); text-decoration: none; }
.btn--ghost {
  margin: 0;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--her-red);
  background: transparent;
  border: 1px solid var(--her-red);
}
.btn--ghost:hover { color: #fff; background: var(--her-red); }

/* ---------- Messages flash ---------- */
.her-flash {
  margin-bottom: 22px;
  padding: 13px 16px;
  border-radius: 8px;
  border-left: 4px solid;
  font-size: 14px;
}
.her-flash--error   { background: #FDEAEC; border-color: var(--her-red);  color: #8A0012; }
.her-flash--success { background: #EAF6EC; border-color: #2E7D32;         color: #1B5E20; }
.her-flash--info    { background: #EAF1FB; border-color: #1565C0;         color: #0D3F87; }

/* ---------- Tableaux ---------- */
table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--her-line); vertical-align: top; }
th { color: var(--her-ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }

/* ---------- Charte / consentement ---------- */
.charte {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px 18px;
  margin: 10px 0;
  border: 1px solid var(--her-line);
  border-radius: 8px;
  background: #FAFAFB;
  font-size: 14px;
}
.charte p { margin: 4px 0 12px; color: var(--her-ink); }

/* ---------- Cle TOTP ---------- */
.totp-key {
  display: inline-block;
  padding: 8px 12px;
  font-family: "Courier New", monospace;
  font-size: 16px;
  letter-spacing: 2px;
  background: #FAFAFB;
  border: 1px dashed var(--her-red);
  border-radius: 6px;
  color: var(--her-ink);
  word-break: break-all;
}

/* ---------- Pied de page ---------- */
.her-footer {
  max-width: 680px;
  margin: 26px auto 50px;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--her-ink-soft);
}

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  .her-header { height: auto; padding: 12px 16px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .her-card { padding: 22px 18px; }
  .her-user { display: none; }
}

/* Bandeau d'environnement de test */
.her-testbar{display:block;background:#E2001A;color:#fff;text-align:center;
  font-weight:bold;padding:8px 12px;text-decoration:none;font-size:14px;
  position:sticky;top:0;z-index:1000;letter-spacing:.2px}
.her-testbar:hover{background:#C8102E;color:#fff}
