/* ==========================================================================
   Repère Québec — Espace client
   Même direction artistique que reperequebec.ca v2 et que le scanner.
   Couleur   : vert = Repère Québec · marine = la structure · or = ce qu'on a relevé
   Forme     : les objets s'arrondissent, les traits restent droits
   Structure : le dossier se lit le long d'un rail, comme le parcours du scanner
   Densité   : l'espace sépare, la bordure est l'exception
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100% 125%;
  font-display: swap;
  src: url("/fonts/archivo-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/publicsans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plexmono-latin.woff2") format("woff2");
}

:root {
  --marine: #0c1b2a;
  --vert: #1b6b4f;
  --vert-fonce: #10442f;
  --vert-clair: #58a483;
  --vert-voile: #e3ece5;
  --or: #d9a93c;
  --or-fonce: #7c5c12;
  --or-voile: #fbf3de;
  --surligneur: #fbe08f;
  --rouge: #c14b3a;
  --rouge-fonce: #8e2f21;
  --rouge-voile: #fbeae6;

  --papier: #eef1eb;
  --blanc: #ffffff;
  --encre: #2c3b39;
  --gris: #5e6d68;
  --gris-clair: #8b968f;
  --trait: #d5dcd4;
  --trait-fort: #bcc5bb;

  --sur-marine: #a7bac7;
  --sur-marine-fort: #dbe5eb;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --texte: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-xs: 6px;
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 26px;

  --sortie: cubic-bezier(0.22, 0.7, 0.25, 1);

  --barre-laterale: 272px;
  --marge-jalon: 172px;
  --ecart-jalon: 40px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--marine);
  font-family: var(--display);
  font-stretch: 112%;
  letter-spacing: -0.016em;
}

p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--vert);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

.portal-sidebar :focus-visible {
  outline-color: var(--or);
}

.muted {
  color: var(--gris);
}

/* --- Boutons -------------------------------------------------------------- */

.primary,
.secondary,
.ghost {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-s);
  font-family: var(--display);
  font-size: 0.92rem;
  font-stretch: 104%;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 110ms var(--sortie);
}

.primary:active,
.secondary:active,
.ghost:active {
  transform: translateY(1px);
}

.primary {
  background: var(--vert);
  color: var(--blanc);
}

.primary:hover {
  background: var(--vert-fonce);
}

.secondary {
  border-color: var(--trait-fort);
  background: var(--blanc);
  color: var(--marine);
}

.secondary:hover {
  border-color: var(--vert);
  color: var(--vert-fonce);
}

.ghost {
  background: transparent;
  color: var(--vert);
}

.ghost:hover {
  background: var(--vert-voile);
}

.small {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.84rem;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 0.88rem;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* --- Champs --------------------------------------------------------------- */

label {
  display: grid;
  gap: 7px;
  color: var(--marine);
  font-family: var(--display);
  font-size: 0.88rem;
  font-stretch: 104%;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--trait-fort);
  border-radius: var(--r-s);
  background: var(--blanc);
  color: var(--marine);
  font-family: var(--texte);
  font-size: 0.98rem;
  font-weight: 400;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: auto;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #9aa7a1;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--vert-clair);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--vert);
  box-shadow: 0 0 0 3px rgba(27, 107, 79, 0.18);
  outline: 0;
}

input[type="file"] {
  padding: 9px 12px;
  background: var(--papier);
}

.error {
  min-height: 1.3em;
  margin: 0;
  color: var(--rouge-fonce);
  font-size: 0.88rem;
}

/* --- Connexion ------------------------------------------------------------ */

.portal-login {
  display: grid;
  min-height: 100vh;
  padding: 28px;
  place-items: center;
}

.portal-login-card {
  display: grid;
  width: min(452px, 100%);
  padding: 40px 38px 36px;
  border: 1px solid var(--trait-fort);
  border-radius: var(--r-l);
  background: var(--blanc);
  gap: 16px;
}

.portal-login-card .portal-logo {
  width: 124px;
  margin-bottom: 10px;
}

.portal-login-card h1 {
  max-width: 15ch;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.12;
}

.portal-login-card > .muted {
  margin-bottom: 6px;
  font-size: 0.94rem;
}

.portal-login-card .primary {
  margin-top: 4px;
}

/* --- La barre latérale : la couverture du dossier ------------------------- */

.portal-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--barre-laterale) minmax(0, 1fr);
}

.portal-sidebar {
  display: flex;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px 22px;
  flex-direction: column;
  gap: 24px;
  background: var(--marine);
  color: var(--sur-marine);
}

.portal-marque {
  display: flex;
  align-items: center;
  margin-left: 8px;
  gap: 11px;
  color: var(--blanc);
  text-decoration: none;
}

/* Marque inversée : elle se pose directement sur le marine, sans conteneur. */
.portal-marque img {
  width: 38px;
  height: 38px;
}

.portal-marque span {
  font-family: var(--display);
  font-size: 0.95rem;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

/* Le dossier appartient au client : son nom est le titre de la barre. */
.portal-org {
  display: grid;
  padding: 0 8px;
  gap: 4px;
}

.portal-org small {
  color: var(--sur-marine);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.portal-org strong {
  color: var(--blanc);
  font-family: var(--display);
  font-size: 1.24rem;
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

/* La navigation reprend la marque en marge du site : un filet or à gauche. */
.portal-sidebar nav {
  display: grid;
  gap: 1px;
}

.portal-sidebar nav button {
  padding: 9px 12px 9px 13px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0 var(--r-s) var(--r-s) 0;
  background: transparent;
  color: var(--sur-marine);
  font-family: var(--texte);
  font-size: 0.93rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.portal-sidebar nav button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--blanc);
}

.portal-sidebar nav button.active {
  border-left-color: var(--or);
  background: rgba(255, 255, 255, 0.08);
  color: var(--blanc);
}

.portal-user {
  display: grid;
  margin-top: auto;
  padding: 15px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  gap: 4px;
}

.portal-user span {
  color: var(--sur-marine-fort);
  font-size: 0.9rem;
  font-weight: 600;
}

.portal-user .link-button {
  color: var(--sur-marine);
}

.portal-user .link-button:hover {
  color: var(--blanc);
}

/* --- L'en-tête : le filet du papier à en-tête du rapport ------------------ */

.portal-main {
  min-width: 0;
}

.portal-header {
  max-width: 1160px;
  padding: 40px 48px 0;
}

.portal-header h1 {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--marine);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.06;
}

.portal-content {
  max-width: 1160px;
  padding: 30px 48px 76px;
}

/* --- Le rail : la structure reprise du parcours du scanner ---------------- */

.rail {
  display: grid;
  position: relative;
  grid-template-columns: var(--marge-jalon) minmax(0, 1fr);
  column-gap: var(--ecart-jalon);
  row-gap: 46px;
}

.rail::before {
  position: absolute;
  top: 8px;
  bottom: 10px;
  left: calc(var(--marge-jalon) - 1px);
  width: 2px;
  border-radius: 999px;
  background: var(--trait);
  content: "";
}

.jalon {
  padding-right: 26px;
  text-align: right;
}

.jalon-num {
  color: var(--vert);
  font-family: var(--display);
  font-size: 1.85rem;
  font-stretch: 122%;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.9;
  opacity: 0.42;
}

.jalon h2 {
  margin-top: 5px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.jalon p {
  margin-top: 6px;
  color: var(--gris-clair);
  font-size: 0.83rem;
  line-height: 1.4;
}

.etape {
  min-width: 0;
  padding-top: 2px;
}

/* --- Le bilan : le même objet que le score du rapport PDF ----------------- */

.bilan {
  padding: 28px 30px 26px;
  border-radius: var(--r-l);
  background: var(--marine);
}

.bilan-haut {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.bilan-note {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.bilan-chiffre {
  color: var(--blanc);
  font-family: var(--display);
  font-size: 3.6rem;
  font-stretch: 118%;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.85;
}

.bilan-pourcent {
  color: var(--sur-marine);
  font-family: var(--display);
  font-size: 1.05rem;
  font-stretch: 104%;
  font-weight: 700;
}

.bilan-legende {
  margin-top: 8px;
  color: var(--or);
  font-family: var(--display);
  font-size: 0.88rem;
  font-stretch: 104%;
  font-weight: 700;
}

.bilan-mot {
  max-width: 32ch;
  color: var(--sur-marine-fort);
  font-size: 0.95rem;
  line-height: 1.5;
}

.bilan-mot b {
  color: var(--blanc);
  font-weight: 600;
}

.bilan .progress {
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.15);
}

.bilan .progress > span {
  background: var(--vert-clair);
}

.progress {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e2e7e1;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--vert);
}

/* --- Listes réglées : le langage d'index du site --------------------------- */

.liste {
  border-top: 1px solid var(--trait);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--trait);
}

.row-main {
  min-width: 0;
}

.row-main strong {
  display: block;
  color: var(--marine);
  font-family: var(--display);
  font-size: 1rem;
  font-stretch: 104%;
  font-weight: 700;
  line-height: 1.3;
}

.row-main p {
  max-width: 74ch;
  margin-top: 3px;
  color: var(--gris);
  font-size: 0.89rem;
}

.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.actions select,
.tache-droite select {
  width: auto;
  min-width: 168px;
  min-height: 40px;
  padding: 7px 12px;
  font-size: 0.88rem;
}

/* --- Une tâche, marquée en marge comme dans le rapport --------------------- */

.tache {
  display: grid;
  padding: 17px 0 18px 15px;
  border-bottom: 1px solid var(--trait);
  border-left: 3px solid var(--trait);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 20px;
  align-items: start;
}

.tache.prioritaire {
  border-left-color: var(--rouge);
}

.tache.attention {
  border-left-color: var(--or);
}

.tache.faite {
  border-left-color: var(--vert);
}

.tache-titre {
  color: var(--marine);
  font-family: var(--display);
  font-size: 1.04rem;
  font-stretch: 104%;
  font-weight: 700;
  line-height: 1.3;
}

.tache-pourquoi {
  max-width: 72ch;
  margin-top: 5px;
  grid-column: 1;
  color: var(--gris);
  font-size: 0.91rem;
}

.tache-meta {
  margin-top: 8px;
  grid-column: 1;
  color: var(--gris-clair);
  font-family: var(--mono);
  font-size: 0.73rem;
}

.tache-droite {
  display: flex;
  grid-row: 1 / span 3;
  grid-column: 2;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* --- Pastilles d'état : les trois du rapport ------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px 5px;
  border-radius: 999px;
  background: var(--papier);
  color: var(--gris);
  font-family: var(--mono);
  font-size: 0.71rem;
  white-space: nowrap;
}

.badge.done,
.badge.implemented,
.badge.accepted,
.badge.ready,
.badge.resolved,
.badge.reviewed,
.badge.low {
  background: var(--vert-voile);
  color: var(--vert-fonce);
}

.badge.in_review,
.badge.needs_review,
.badge.medium,
.badge.processing,
.badge.requested,
.badge.waiting_client,
.badge.sent,
.badge.submitted {
  background: var(--or-voile);
  color: var(--or-fonce);
}

.badge.high,
.badge.critical,
.badge.failed,
.badge.rejected {
  background: var(--rouge-voile);
  color: var(--rouge-fonce);
}

/* --- Index à deux colonnes : le composant « 10 points » du site ------------ */

.index {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--trait);
  grid-auto-flow: column;
  column-gap: 56px;
  list-style: none;
}

.index li {
  display: flex;
  align-items: baseline;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--trait);
}

.index-num {
  flex: 0 0 auto;
  color: var(--vert);
  font-family: var(--display);
  font-size: 0.84rem;
  font-stretch: 104%;
  font-weight: 700;
}

.index-nom {
  min-width: 0;
  flex: 1;
  color: var(--marine);
  font-family: var(--display);
  font-size: 0.98rem;
  font-stretch: 104%;
  font-weight: 600;
  letter-spacing: -0.006em;
}

/* --- Un thème de conformité ------------------------------------------------- */

.theme {
  display: grid;
  padding: 16px 0 17px;
  border-bottom: 1px solid var(--trait);
  grid-template-columns: minmax(0, 1fr) 168px 78px;
  gap: 6px 26px;
  align-items: center;
}

.theme-nom {
  color: var(--marine);
  font-family: var(--display);
  font-size: 1.02rem;
  font-stretch: 104%;
  font-weight: 700;
}

.theme-detail {
  grid-column: 1;
  color: var(--gris);
  font-size: 0.85rem;
}

.theme .progress {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.theme-part {
  grid-row: 1 / span 2;
  grid-column: 3;
  color: var(--marine);
  font-family: var(--display);
  font-size: 1.3rem;
  font-stretch: 110%;
  font-weight: 800;
  line-height: 1;
  text-align: right;
}

/* --- Dépôt de document ------------------------------------------------------ */

.upload-zone {
  display: grid;
  max-width: 600px;
  padding: 22px;
  border: 1px dashed var(--trait-fort);
  border-radius: var(--r-m);
  background: var(--blanc);
  gap: 16px;
}

.upload-zone .primary {
  justify-self: start;
}

/* --- Bandeau d'attention ----------------------------------------------------- */

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 30px;
  padding: 16px 20px;
  border-left: 3px solid var(--or);
  border-radius: var(--r-s);
  background: var(--or-voile);
}

.notice strong {
  color: var(--marine);
  font-family: var(--display);
  font-size: 1rem;
  font-stretch: 104%;
  font-weight: 700;
}

.notice p {
  max-width: 72ch;
  margin-top: 3px;
  color: var(--or-fonce);
  font-size: 0.9rem;
}

/* --- État vide : une phrase, un filet, rien de plus --------------------------- */

.vide {
  padding: 20px 0 4px;
  border-top: 1px solid var(--trait);
}

.vide strong {
  display: block;
  color: var(--marine);
  font-family: var(--display);
  font-size: 1.05rem;
  font-stretch: 104%;
  font-weight: 700;
}

.vide p {
  max-width: 56ch;
  margin-top: 4px;
  color: var(--gris);
  font-size: 0.92rem;
}

/* --- Panneau : réservé aux blocs qui gagnent à être cadrés -------------------- */

.panel {
  padding: 22px 24px;
  border: 1px solid var(--trait);
  border-radius: var(--r-m);
  background: var(--blanc);
}

/* --- Fiche compte ------------------------------------------------------------- */

.account-details {
  display: grid;
  border-top: 1px solid var(--trait);
}

.account-details > div {
  display: grid;
  padding: 13px 0;
  border-bottom: 1px solid var(--trait);
  gap: 2px;
}

.account-details small {
  color: var(--gris);
  font-family: var(--display);
  font-size: 0.8rem;
  font-stretch: 104%;
  font-weight: 600;
}

.account-details strong {
  color: var(--marine);
  font-family: var(--display);
  font-size: 1.02rem;
  font-stretch: 104%;
  font-weight: 700;
}

/* --- Conversation --------------------------------------------------------------- */

.support-card {
  cursor: pointer;
  transition: background-color 150ms ease;
}

.support-card:hover {
  background: #f7f9f6;
}

.message {
  padding: 15px 18px;
  border-radius: var(--r-m);
  background: var(--papier);
}

.message + .message {
  margin-top: 10px;
}

.message.equipe {
  background: var(--vert-voile);
}

.message strong {
  color: var(--marine);
  font-family: var(--display);
  font-size: 0.94rem;
  font-stretch: 104%;
  font-weight: 700;
}

.message p {
  margin: 5px 0 0;
  white-space: pre-wrap;
}

.message small {
  display: block;
  margin-top: 8px;
  color: var(--gris-clair);
  font-family: var(--mono);
  font-size: 0.72rem;
}

/* --- Fenêtre modale --------------------------------------------------------------- */

dialog {
  width: min(680px, calc(100% - 28px));
  padding: 0;
  border: 1px solid var(--trait-fort);
  border-radius: var(--r-l);
  background: var(--blanc);
  color: var(--encre);
}

dialog::backdrop {
  background: rgba(7, 18, 29, 0.62);
}

#portal-dialog-content {
  max-height: min(72vh, 640px);
  padding: 28px;
  overflow-y: auto;
}

#portal-dialog-content h2 {
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--marine);
  font-size: 1.32rem;
  font-weight: 700;
}

.dialog-actions {
  display: flex;
  padding: 15px 28px;
  border-top: 1px solid var(--trait);
  justify-content: flex-end;
  background: #fbfcfa;
  border-radius: 0 0 calc(var(--r-l) - 1px) calc(var(--r-l) - 1px);
}

.stack {
  display: grid;
  gap: 16px;
}

/* --- Notification transitoire -------------------------------------------------- */

.portal-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  max-width: min(380px, calc(100% - 48px));
  padding: 13px 18px;
  border-radius: var(--r-s);
  background: var(--marine);
  color: var(--blanc);
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(12, 27, 42, 0.24);
}

.portal-toast.error {
  background: var(--rouge-fonce);
}

/* --- Adaptations ---------------------------------------------------------------- */

@media (max-width: 1120px) {
  :root {
    --marge-jalon: 132px;
    --ecart-jalon: 28px;
  }

  .theme {
    grid-template-columns: minmax(0, 1fr) 120px 68px;
  }
}

@media (max-width: 900px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    padding: 14px 0 0;
    gap: 12px;
  }

  .portal-marque {
    margin-left: 20px;
  }

  .portal-marque img {
    width: 32px;
    height: 32px;
  }

  .portal-org {
    padding: 0 20px;
  }

  .portal-org small {
    display: none;
  }

  .portal-org strong {
    font-size: 1.08rem;
  }

  /* Une bande de navigation qui défile, plutôt qu'une grille de boutons. */
  .portal-sidebar nav {
    display: flex;
    padding: 0 20px;
    overflow-x: auto;
    gap: 4px;
    scrollbar-width: none;
  }

  .portal-sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .portal-sidebar nav button {
    padding: 9px 13px 11px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: var(--r-s) var(--r-s) 0 0;
    white-space: nowrap;
  }

  .portal-sidebar nav button.active {
    border-bottom-color: var(--or);
  }

  .portal-user {
    display: none;
  }

  .portal-header {
    padding: 26px 20px 0;
  }

  .portal-header h1 {
    font-size: 1.66rem;
  }

  .portal-content {
    padding: 24px 20px 60px;
  }

  /* Le rail se replie : les jalons passent au-dessus de leur contenu. */
  .rail {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 34px;
  }

  .rail::before {
    display: none;
  }

  .jalon {
    display: flex;
    align-items: baseline;
    padding-right: 0;
    padding-bottom: 4px;
    gap: 12px;
    text-align: left;
  }

  .jalon-num {
    font-size: 1.25rem;
  }

  .jalon p {
    display: none;
  }

  .etape {
    margin-top: -22px;
  }

  .index {
    grid-auto-flow: row;
  }

  .theme {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .theme .progress {
    grid-row: 3;
    grid-column: 1 / -1;
    margin-top: 6px;
  }

  .theme-part {
    grid-row: 1;
    grid-column: 2;
  }

  .bilan {
    padding: 24px 22px 22px;
  }

  .bilan-haut {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 14.5px;
  }

  .portal-login-card {
    padding: 30px 24px 28px;
  }

  .row,
  .notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .tache {
    grid-template-columns: minmax(0, 1fr);
  }

  .tache-droite {
    grid-row: auto;
    grid-column: 1;
    margin-top: 12px;
    justify-content: flex-start;
  }

  .bilan-chiffre {
    font-size: 3.1rem;
  }

  .portal-toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* Une précision qui porte sur la liste au-dessus, pas sur la section. */
.note-liste {
  max-width: 66ch;
  margin-top: 14px;
  color: var(--gris-clair);
  font-size: 0.85rem;
  line-height: 1.5;
}

.progression-mini {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.progression-mini b {
  color: var(--marine);
  font-family: var(--display);
  font-size: 1.3rem;
  font-stretch: 110%;
  font-weight: 800;
  line-height: 1;
}

.progression-mini small {
  color: var(--gris);
  font-size: 0.85rem;
}
