/* Console Sentinelle DH — échelle de bureau (refonte d'octobre 2026).

   Pourquoi : la console chargeait les commandes de l'application de terrain (boutons et champs de 48 px, pensés pour le
   pouce en plein air) puis deux couches de correctifs (44-46 px). Un opérateur travaille au bureau, à la souris, par
   séries de dossiers : il lui faut des commandes compactes, des formulaires réguliers et un rythme d'espacement fixe.
   Ce fichier est chargé en dernier et ne touche que la console (.cs-app et l'écran de connexion).

   Échelle : commandes 34 px (28 px en ligne de tableau) · rayon 8 px · espacements 4 / 8 / 12 / 16 / 24 · texte 13-14 px.
   La couleur porte l'état (vert, orange, rouge, gris), jamais la décoration ; une seule action principale par bloc. */

.cs-app, .cs-connexion {
  --c-h: 34px; --c-h-sm: 28px; --c-r: 8px;
  --c-bord: #cfd9de; --c-bord-h: #aebdc5; --c-texte: #1d2f3f; --c-doux: #5f7180; --c-tres-doux: #7b8b97;
  --c-fond-champ: #fff; --c-fond-calme: #f5f8f9; --c-focus: 0 0 0 3px rgba(51, 109, 152, .22);
}

/* ---------------------------------------------------------------- boutons */
.cs-app .btn, .cs-connexion .btn {
  min-height: var(--c-h); height: auto; padding: 6px 14px; gap: 6px;
  border-radius: var(--c-r); font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: 0;
  white-space: nowrap; box-shadow: none; transform: none; transition: background .12s, border-color .12s, color .12s;
}
.cs-app .btn:hover:not(:disabled) { transform: none; box-shadow: none; filter: brightness(1.1); }
.cs-app .btn:focus-visible, .cs-connexion .btn:focus-visible { outline: 2px solid var(--cs-blue); outline-offset: 2px; }
.cs-app .btn.sm { min-height: var(--c-h-sm); padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.cs-app .btn.ghost { background: #fff; border: 1px solid var(--c-bord); color: var(--c-texte); }
.cs-app .btn.ghost:hover:not(:disabled) { filter: none; background: var(--c-fond-calme); border-color: var(--c-bord-h); }
.cs-app .btn.danger-t, .cs-app .btn.ghost.danger-t { color: var(--cs-red); border-color: #e7c3bf; background: #fff; }
.cs-app .btn.danger-t:hover:not(:disabled) { background: var(--cs-red-soft); filter: none; }
.cs-app .btn.block { width: 100%; }
.cs-app .btn svg { width: 15px; height: 15px; }
.cs-app .btn:disabled { opacity: .45; }
/* plus de bouton gonflé dans les formulaires et les en-têtes (anciens correctifs à 46 px) */
.cs-app .cs-form-actions .btn, .cs-app .cs-page-heading .btn, .cs-app .cs-welcome .btn,
.cs-app .cs-offer-head-actions .btn, .cs-app .cs-page-heading .cs-offer-head-actions .btn { min-height: var(--c-h); padding: 6px 14px; }

/* ---------------------------------------------------------------- champs */
.cs-app input[type=text], .cs-app input[type=number], .cs-app input[type=password], .cs-app input[type=date],
.cs-app input[type=datetime-local], .cs-app input[type=time], .cs-app input[type=search], .cs-app input[type=email],
.cs-app input[type=url], .cs-app input[type=tel], .cs-app input:not([type]), .cs-app select, .cs-app textarea,
.cs-app .cs-org-form input, .cs-app .cs-org-form select, .cs-app .cs-org-form textarea,
.cs-app .cs-intake-create input, .cs-app .cs-intake-create select, .cs-app .cs-intake-create textarea {
  width: 100%; min-height: var(--c-h); padding: 6px 10px; border: 1px solid var(--c-bord); border-radius: var(--c-r);
  background: var(--c-fond-champ); color: var(--c-texte); font: inherit; font-size: 13.5px; line-height: 1.35; box-shadow: none;
}
.cs-app textarea, .cs-app .cs-org-form textarea, .cs-app .cs-intake-create textarea { min-height: 72px; resize: vertical; padding: 8px 10px; }
.cs-app input:hover:not(:disabled), .cs-app select:hover:not(:disabled), .cs-app textarea:hover:not(:disabled) { border-color: var(--c-bord-h); }
.cs-app input:focus, .cs-app select:focus, .cs-app textarea:focus { border-color: var(--cs-blue); box-shadow: var(--c-focus); outline: 0; }
.cs-app input:disabled, .cs-app select:disabled, .cs-app textarea:disabled { background: var(--c-fond-calme); color: var(--c-doux); }
.cs-app input::placeholder, .cs-app textarea::placeholder { color: #9aa8b2; }
.cs-app input[type=checkbox] { width: 16px; height: 16px; min-height: 0; }
.cs-app input[type=file] { min-height: 0; padding: 4px 0; border: 0; font-size: 13px; }

/* étiquettes, aides, erreurs */
.cs-app .q { margin: 0; min-width: 0; }
.cs-app .q > label.lbl, .cs-app .q > .lbl, .cs-app label.lbl { display: block; margin: 0 0 5px; padding: 0; color: #2f4354;
  font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.cs-app .q .muted, .cs-app .lbl .muted { font-weight: 400; }
.cs-app .q small, .cs-app .q .hint, .cs-app .cs-field-hint { display: block; margin: 4px 0 0; color: var(--c-tres-doux);
  font-size: 12px; line-height: 1.4; }
.cs-app .cs-required, .cs-app .q .req { color: var(--cs-red); }

/* grilles de formulaire : colonnes régulières, champs pleine largeur de leur colonne */
.cs-app .form-grid, .cs-app .cs-intake-form-grid, .cs-app .cs-offer-fields {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 16px; align-items: start; margin: 0;
}
.cs-app .form-grid > .full, .cs-app .form-grid > .q.full, .cs-app .cs-intake-form-grid > .full { grid-column: 1 / -1; }
.cs-app .cs-org-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .cs-app .cs-org-form .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* sections d'un formulaire et barre d'actions */
.cs-app .cs-org-form { padding: 20px 22px; }
.cs-app .cs-org-form-section { padding: 16px 0; border-bottom: 1px solid var(--cs-line); }
.cs-app .cs-org-form-section:first-of-type { padding-top: 4px; }
.cs-app .cs-org-form-section:last-of-type { border-bottom: 0; }
.cs-app .cs-form-section-head { display: flex; gap: 10px; align-items: baseline; margin: 0 0 12px; }
.cs-app .cs-form-section-head > span { color: var(--c-tres-doux); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cs-app .cs-form-section-head b { display: block; font-size: 13.5px; color: var(--c-texte); }
.cs-app .cs-form-section-head small { display: block; color: var(--c-tres-doux); font-size: 12px; }
.cs-app .cs-form-actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--cs-line); }
.cs-app .cs-form-actions .btn { width: auto; }
.cs-app .cs-form-actions > span { color: var(--c-tres-doux); font-size: 12px; }
.cs-app .row { gap: 8px; }

/* ---------------------------------------------------------------- panneaux et rythme vertical */
.cs-app .panel, .cs-app .cs-panel { padding: 18px 20px; border-radius: 12px; box-shadow: none; }
.cs-app .panel > h3, .cs-app .panel > header h3 { margin: 0 0 10px; font-size: 14.5px; font-weight: 700; color: var(--c-texte); }
.cs-app .panel > .small.muted:first-of-type { margin-top: 0; }
.cs-app .cs-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 12px; }
.cs-app .cs-panel-head h2 { margin: 2px 0 0; font-size: 16px; }
.cs-app .cs-panel-head p:not(.cs-eyebrow) { margin: 3px 0 0; color: var(--c-doux); font-size: 12.5px; line-height: 1.45; }
.cs-app .cs-eyebrow { margin: 0; font-size: 10.5px; letter-spacing: .1em; }
.cs-app .notice { margin: 10px 0; padding: 10px 12px; border-radius: var(--c-r); font-size: 13px; line-height: 1.45; }
.cs-app .pile { display: grid; gap: 16px; align-content: start; }
.cs-app .pile > .panel, .cs-app .pile > .cs-panel { margin: 0 !important; }

/* tableaux : lignes denses, actions sur une ligne, alignées à droite */
.cs-app table.t th { font-size: 11.5px; letter-spacing: .02em; }
.cs-app table.t td, .cs-app table.t th { padding: 9px 10px; vertical-align: middle; }
.cs-app table.t td .cs-actions, .cs-app .cs-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }   /* en ligne si la place existe, sinon sur deux lignes : jamais de défilement horizontal */
.cs-app td.cs-col-actions, .cs-app th.cs-col-actions { text-align: right; }
.cs-app td.cs-col-actions .btn { white-space: nowrap; }
.cs-app .cs-cell-sub { display: block; margin-top: 2px; color: var(--c-tres-doux); font-size: 12px; }

/* chargement d'un panneau : squelette calqué sur des lignes de texte, pas « Chargement… » */
.cs-app .cs-attente { display: grid; gap: 9px; padding: 4px 0; }
.cs-app .cs-attente i { display: block; height: 10px; border-radius: 99px; background: #e9eef1; }
.cs-app .cs-attente i:nth-child(1) { width: 40%; height: 13px; } .cs-app .cs-attente i:nth-child(2) { width: 85%; } .cs-app .cs-attente i:nth-child(3) { width: 65%; }

/* ---------------------------------------------------------------- fiche d'une organisation */
.cs-app .cs-fiche-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 8px 0 16px; }
.cs-app .cs-fiche-tete h1 { margin: 2px 0 0; font-size: 26px; }
.cs-app .cs-fiche-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 0 0; color: var(--c-doux); font-size: 13px; }
.cs-app .cs-fiche-meta a { color: var(--cs-blue); }
.cs-app .cs-prochaine { min-width: 260px; max-width: 360px; padding: 12px 14px; border: 1px solid var(--cs-line); border-left: 3px solid var(--cs-blue);
  border-radius: 10px; background: #fff; }
.cs-app .cs-prochaine.calme { border-left-color: var(--cs-teal); }
.cs-app .cs-prochaine.urgente { border-left-color: var(--cs-orange); }
.cs-app .cs-prochaine small { display: block; color: var(--c-tres-doux); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cs-app .cs-prochaine b { display: block; margin: 3px 0 2px; font-size: 14px; color: var(--c-texte); }
.cs-app .cs-prochaine p { margin: 0 0 10px; color: var(--c-doux); font-size: 12.5px; line-height: 1.4; }
.cs-app .cs-prochaine p:last-child { margin: 0; }

/* frise du dossier : une ligne, étape en cours mise en avant, date sous chaque étape franchie */
.cs-app .cs-frise { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(84px, 1fr); gap: 0; margin: 0 0 18px; padding: 0; scrollbar-width: thin;
  list-style: none; overflow-x: auto; }
.cs-app .cs-frise li { position: relative; padding: 10px 10px 0 0; border-top: 3px solid #dfe6e9; }
.cs-app .cs-frise li.fait { border-top-color: var(--cs-teal); }
.cs-app .cs-frise li.encours { border-top-color: var(--cs-blue); }
.cs-app .cs-frise b { display: block; font-size: 12.5px; font-weight: 650; color: var(--c-texte); line-height: 1.25; }
.cs-app .cs-frise li:not(.fait):not(.encours) b { color: var(--c-tres-doux); font-weight: 500; }
.cs-app .cs-frise li.encours b::after { content: " · en cours"; color: var(--cs-blue); font-weight: 600; }
.cs-app .cs-frise small { display: block; margin-top: 2px; color: var(--c-tres-doux); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* onglets de la fiche */
.cs-app .cs-onglets { display: flex; gap: 2px; margin: 0 0 16px; border-bottom: 1px solid var(--cs-line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.cs-app .cs-onglets button { position: relative; padding: 9px 14px 10px; border: 0; background: none; color: var(--c-doux);
  font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cs-app .cs-onglets button:hover { color: var(--c-texte); }
.cs-app .cs-onglets button[aria-selected=true] { color: var(--c-texte); }
.cs-app .cs-onglets button[aria-selected=true]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--cs-blue); }
.cs-app .cs-onglets button:focus-visible { outline: 2px solid var(--cs-blue); outline-offset: -2px; border-radius: 6px; }
.cs-app .cs-onglet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }   /* minmax(0) : un tableau large défile dans son panneau au lieu d’élargir la page */
.cs-app .cs-onglet[hidden] { display: none; }
.cs-app .cs-onglet > * { margin: 0 !important; }
.cs-app .cs-deux-colonnes { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cs-app .cs-deux-colonnes { grid-template-columns: minmax(0, 1fr); } }

/* listes de contrôle (mise en service, provisionnement) : une ligne par étape, preuve lisible */
.cs-app .cs-checklist { margin: 4px 0 0; padding: 0; list-style: none; }
.cs-app .cs-checklist li { display: grid; grid-template-columns: 22px minmax(150px, 230px) minmax(0, 1fr); gap: 4px 10px; align-items: baseline;
  padding: 8px 0; border-top: 1px solid #edf1f3; font-size: 13px; }
.cs-app .cs-checklist li:first-child { border-top: 0; }
.cs-app .cs-checklist .marque { display: inline-grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: #eef2f4;
  color: var(--c-tres-doux); font-size: 11px; font-weight: 700; }
.cs-app .cs-checklist li.fait .marque { background: var(--cs-teal-soft); color: var(--cs-teal); }
.cs-app .cs-checklist li.encours .marque { background: var(--cs-blue-soft); color: var(--cs-blue); }
.cs-app .cs-checklist li b { font-weight: 600; color: var(--c-texte); }
.cs-app .cs-checklist li:not(.fait) b { color: var(--c-doux); }
.cs-app .cs-checklist li span.preuve { color: var(--c-tres-doux); font-size: 12.5px; overflow-wrap: anywhere; }
@media (max-width: 700px) { .cs-app .cs-checklist li { grid-template-columns: 22px minmax(0, 1fr); } .cs-app .cs-checklist li span.preuve { grid-column: 2; } }

/* tableaux de mesures dans les panneaux : libellé à gauche, valeur à droite */
.cs-app .panel table.t.small td:first-child, .cs-app .cs-panel table.t.small td:first-child { color: var(--c-doux); width: 42%; }

@media (prefers-reduced-motion: reduce) { .cs-app .btn { transition: none; } }

/* chiffres d'usage : une grille de valeurs plutôt qu'un tableau à une colonne */
.cs-app .cs-chiffres { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0 0 4px; }
.cs-app .cs-chiffres > div { padding: 9px 12px; border: 1px solid var(--cs-line); border-radius: 8px; background: #fbfcfd; }
.cs-app .cs-chiffres dt { color: var(--c-doux); font-size: 12px; line-height: 1.3; }
.cs-app .cs-chiffres dd { margin: 3px 0 0; font-size: 17px; font-weight: 650; color: var(--c-texte); font-variant-numeric: tabular-nums; }
.cs-app .cs-chiffres dd.cs-chiffre-date { font-size: 13.5px; font-weight: 600; }

/* demandes entrantes : contact regroupé, plus de largeur minimale imposée (l'ancienne table exigeait 1020 px) */
.cs-app .cs-requests-table { min-width: 0; }
.cs-app .cs-requests-table th { height: auto; padding: 10px 12px; }
.cs-app .cs-requests-table td { padding: 10px 12px; }
.cs-app .cs-requests-table .cs-actions { min-width: 0; }
.cs-app .cs-requests-table .cs-cell-sub a { color: inherit; }
/* un libellé masqué (.sr-only, en position absolue) reste dans son conteneur défilant : sinon la page entière déborde sur mobile */
.cs-app .cs-scroll, .cs-app .scroll { position: relative; }
/* en-tête de fiche sur petit écran : la prochaine action passe sous le nom */
@media (max-width: 760px) {
  .cs-app .cs-fiche-tete { flex-direction: column; align-items: stretch; gap: 12px; }
  .cs-app .cs-fiche-tete h1 { font-size: 22px; overflow-wrap: anywhere; }
  .cs-app .cs-prochaine { min-width: 0; max-width: none; }
  .cs-app .cs-fiche-meta a { overflow-wrap: anywhere; }
}

/* réglages plateforme : aide repliable, ligne de test, case déclarative */
.cs-app .cs-aide { margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--cs-line); border-radius: 8px; background: #f8fafb; }
.cs-app .cs-aide summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--c-texte); }
.cs-app .cs-aide ol { margin: 8px 0 2px; padding-left: 18px; display: grid; gap: 4px; line-height: 1.45; }
.cs-app .cs-test-ligne { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin: 14px 0 6px; padding-top: 14px; border-top: 1px solid var(--cs-line); }
.cs-app .cs-test-ligne .lbl { flex-basis: 100%; margin: 0; }
.cs-app .cs-test-ligne input { flex: 1 1 240px; max-width: 360px; }
.cs-app .cs-case { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.4; cursor: pointer; }
.cs-app .cs-case input { width: 16px; height: 16px; min-height: 0; margin: 2px 0 0; flex: none; }
.cs-app .ok-t { color: #1d7a4f; }
.cs-app .cs-checklist a { color: inherit; text-decoration: none; }
.cs-app .cs-checklist a:hover { text-decoration: underline; }
/* instances : les corrections à côté de l'état, empilées si la colonne est étroite */
.cs-app td.cs-corriger { min-width: 150px; }
.cs-app table.t td.cs-corriger .cs-actions { justify-content: flex-start; }
.cs-app td.cs-corriger .btn { white-space: nowrap; }
