:root {
  --blue-dark: #002e99;
  --blue-light: #3fb2ff;
  --white: #ffffff;
  --text: #1a1a2e;
  --text-muted: #5a5f73;
  --border: #e7ecf5;
  --bg-alt: #f5f8fd;
  --radius: 14px;
  --font: 'Montserrat', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

h1, h2 { font-weight: 800; margin: 0 0 8px; color: var(--blue-dark); }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.3rem; margin-top: 28px; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
/* Les pages d'administration affichent des tableaux plus larges (plusieurs colonnes de
   données + actions) : on leur laisse plus de place qu'aux pages client, pensées pour
   rester étroites et lisibles. */
.container-admin { max-width: 1500px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  color: var(--blue-light);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 8px;
}

/* En-tête fixe (Logo – Statistiques – Informations – Contact) */
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.app-header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 14px 0;
}
.app-logo-img { height: 32px; width: auto; }
.app-nav { display: flex; gap: 24px; flex: 1; }
.app-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.app-nav a:hover, .app-nav a.active { color: var(--blue-dark); border-color: var(--blue-light); }
.app-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.app-header-meta a { font-weight: 700; color: var(--blue-dark); }

main.app-main { padding: 40px 0 80px; }

/* Connexion */
.login-card {
  max-width: 400px;
  margin: 40px 0 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; }
.form-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.password-field { position: relative; }
.password-field input { padding-right: 42px; }
.toggle-password {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
}
.toggle-password:hover { color: var(--blue-dark); }
.toggle-password .icon-eye-off { display: none; }
.toggle-password.active .icon-eye { display: none; }
.toggle-password.active .icon-eye-off { display: block; }
.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  background: var(--blue-dark);
  color: var(--white);
}
.btn:hover { background: #001f6b; }
.btn-secondary {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  background: var(--white);
  color: var(--blue-dark);
}
.btn-secondary:hover { background: var(--bg-alt); }
.form-error {
  background: #fdeaea;
  color: #a3231f;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 18px; }

/* Statistiques */
.year-block { margin-bottom: 20px; }
.year-block summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blue-dark);
  font-size: 1.1rem;
  padding: 10px 0;
  list-style: none;
}
.year-block summary::-webkit-details-marker { display: none; }
.year-block summary::before { content: '▸ '; }
.year-block[open] summary::before { content: '▾ '; }
.year-block.current summary { pointer-events: none; }
.year-block.current summary::before { content: ''; }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table.stats-table { border-collapse: collapse; width: 100%; min-width: 760px; }
table.stats-table th, table.stats-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: center;
  font-size: 0.85rem;
  white-space: nowrap;
}
table.stats-table th { background: var(--bg-alt); color: var(--blue-dark); }
table.stats-table td.row-label, table.stats-table th.row-label {
  text-align: left;
  font-weight: 600;
  background: var(--bg-alt);
}
table.stats-table td.empty { color: #c7cbd6; }
table.stats-table a.stat-link { font-weight: 700; color: var(--blue-light); }

/* Colonne Actions toujours visible même quand le tableau défile horizontalement
   (sans ça, les boutons de droite peuvent passer inaperçus — on ne voit pas qu'il
   faut faire défiler pour les atteindre). */
table.stats-table th.actions-col, table.stats-table td.actions-col {
  position: sticky;
  right: 0;
  box-shadow: -6px 0 6px -6px rgba(20, 30, 60, 0.18);
}
table.stats-table th.actions-col { background: var(--bg-alt); }
table.stats-table td.actions-col { background: var(--white); }

footer.app-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Articles (page Informations) — titre cliquable pour déplier/replier le contenu */
.article-block { border-bottom: 1px solid var(--border); }
.article-block:first-of-type { border-top: none; }
.article-block summary {
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  list-style: none;
}
.article-block summary::-webkit-details-marker { display: none; }
.article-block .article-title {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--blue-dark);
}
.article-block .article-title::before { content: '▸ '; color: var(--blue-light); }
.article-block[open] .article-title::before { content: '▾ '; }
.article-date { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.article-body { padding: 0 0 22px; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.article-body p { margin: 0 0 12px; }
.article-body ul, .article-body ol { margin: 0 0 12px; padding-left: 22px; }
.article-body blockquote {
  margin: 0 0 12px;
  padding: 10px 16px;
  border-left: 3px solid var(--blue-light);
  background: var(--bg-alt);
  color: var(--text-muted);
}
