/* FormaSDIS — feuille de style commune, d'après la charte « FormaSDIS » (piste A Caserne). */
:root {
  --anthracite: #1F1F21;
  --ink: #1A1A1A;
  --ink-soft: #3E3E44;
  --ink-muted: #5A5A5E;
  --on-dark: #FFFFFF;
  --on-dark-muted: #C9C9CE;
  --surface-page: #F3F3F2;
  --surface-card: #FFFFFF;
  --surface-sunken: #F7F7F6;
  --border: #DADADA;
  --border-control: #8E8E94;
  --divider: #ECECEC;
  --red-600: #B3141B;
  --red-800: #8E1016;
  --red-100: #F7E4E5;
  --neutral-100: #EDEDEC;
  --water: #1976D2;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-pill: 999px;
  --touch-min: 44px;
  --page-max: 1280px;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--surface-page); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 22px; }
a { color: var(--red-800); }
a:hover { color: #5E0A0E; }
:focus-visible { outline: 2px solid var(--red-600); outline-offset: 2px; }

/* En-tête */
.entete { background: var(--anthracite); color: var(--on-dark); display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 14px 32px; border-bottom: 4px solid var(--red-600); }
.entete-logo { width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--surface-card); color: var(--anthracite); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 10px; font-weight: 600; line-height: 1.15; overflow: hidden; }
.entete-logo img { max-width: 100%; max-height: 100%; }
.entete-id { display: flex; flex-direction: column; gap: 2px; }
.surtitre { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
.entete-sdis { font-size: 19px; font-weight: 600; }
.entete-espace { flex: 1 1 40px; }
.entete-user { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.entete-user form { margin: 0; }
.avatar { width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--red-600); color: var(--on-dark); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.entete-nom { font-weight: 500; font-size: 14px; }

/* Page */
.page { max-width: var(--page-max); margin: 0 auto; padding: 32px; }
.titre-display { margin: 0 0 6px; font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -.01em; }
.titre-page { margin: 0 0 6px; font-size: 28px; line-height: 34px; font-weight: 600; }
.sous-titre { margin: 0 0 28px; color: var(--ink-muted); }
.surtitre-clair { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }

/* Cartes */
.carte { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; }
.grille-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.tuile { display: flex; flex-direction: column; gap: 12px; padding: 20px; min-height: 128px; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.tuile:hover { border-color: var(--border-control); color: var(--ink); }
.tuile.inactive { opacity: .5; pointer-events: none; }
.tuile-icone { width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--red-100); display: flex; align-items: center; justify-content: center; }
.tuile-nom { font-size: 16px; font-weight: 600; }
.tuile-desc { font-size: 13px; line-height: 18px; color: var(--ink-muted); }

/* Boutons */
.btn { min-height: var(--touch-min); padding: 0 20px; border-radius: var(--radius-md); font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-principal { border: none; background: var(--red-600); color: var(--on-dark); font-weight: 600; }
.btn-secondaire { border: 1px solid var(--border-control); background: var(--surface-card); color: var(--ink); font-weight: 500; }
.btn-sombre { border: none; background: var(--anthracite); color: var(--on-dark); font-weight: 600; }
.btn-sur-sombre { border: 1px solid #55555B; background: transparent; color: var(--on-dark); min-height: 40px; padding: 0 14px; }

/* Champs */
.champ { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.champ-libelle { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-soft); }
.champ input, .champ select, .champ textarea { min-height: var(--touch-min); padding: 0 12px; border: 1px solid var(--border-control); border-radius: var(--radius-md); font: inherit; background: var(--surface-card); color: var(--ink); }
.champ input:focus, .champ select:focus { outline: 2px solid var(--red-600); outline-offset: 1px; }

/* Badges et messages */
.badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; }
.badge-alerte { background: var(--red-100); color: var(--red-800); }
.badge-neutre { background: var(--neutral-100); color: var(--ink-soft); }
.message { padding: 12px 14px; border-radius: var(--radius-md); font-size: 14px; margin-bottom: 16px; }
.message-alerte { background: var(--red-100); color: var(--red-800); }
.message-info { background: var(--surface-sunken); color: var(--ink-soft); border: 1px solid var(--border); }

/* Connexion */
.connexion { max-width: 420px; margin: 64px auto; padding: 0 16px; }

@media (max-width: 600px) {
  .entete { padding: 12px 16px; }
  .page { padding: 20px 16px; }
  .entete-nom { display: none; }
}
