/* ==========================================================================
   ENSPD — gestion des mémoires : feuille de style unique
   Direction visuelle « soft et intuitive » : palette pastel, coins arrondis,
   ombres diffuses, aucune bordure dure, thème clair et sombre.
   ========================================================================== */

/* --------------------------------- Jetons -------------------------------- */

:root {
  --fond: #f5f7fc;
  --fond-motif: #eef1f9;
  --surface: #ffffff;
  --surface-2: #f2f4fa;
  --surface-3: #e7ebf5;

  --texte: #1c2233;
  --texte-doux: #5a6480;
  --texte-tres-doux: #97a0ba;

  --primaire: #3453e0;
  --primaire-vif: #5570f5;
  --primaire-fonce: #22318f;
  --primaire-doux: #e4eaff;

  --indigo: #7a5af0;
  --indigo-fonce: #4a2fae;
  --indigo-doux: #ede8ff;

  --menthe: #16b98a;
  --menthe-fonce: #0d7a5a;
  --menthe-doux: #ddf6ec;

  --ambre: #f0a83e;
  --ambre-fonce: #92610c;
  --ambre-doux: #fdf1da;

  --corail: #ef6a5c;
  --corail-fonce: #ab3426;
  --corail-doux: #fdeae6;

  --lavande: #9b8af2;
  --lavande-fonce: #5b46c5;
  --lavande-doux: #ede9ff;

  --trait: rgba(84, 100, 160, 0.14);
  --trait-fort: rgba(84, 100, 160, 0.26);

  --degrade: linear-gradient(135deg, var(--primaire) 0%, var(--indigo) 100%);
  --degrade-doux: linear-gradient(135deg, var(--primaire-doux) 0%, var(--indigo-doux) 100%);
  --halo: 0 10px 34px -10px rgba(52, 83, 224, 0.5);

  --ombre-s: 0 1px 2px rgba(36, 48, 94, 0.05), 0 2px 8px rgba(36, 48, 94, 0.05);
  --ombre-m: 0 2px 6px rgba(36, 48, 94, 0.06), 0 12px 28px rgba(36, 48, 94, 0.1);
  --ombre-l: 0 6px 14px rgba(36, 48, 94, 0.08), 0 28px 60px rgba(36, 48, 94, 0.16);

  --r-xs: 8px;
  --r-s: 12px;
  --r-m: 16px;
  --r-l: 22px;
  --r-xl: 28px;
  --r-rond: 999px;

  --largeur-menu: 264px;
  --hauteur-barre: 68px;

  --police: "Plus Jakarta Sans", system-ui, "Segoe UI Variable Text", "Segoe UI",
    Nunito, Quicksand, -apple-system, Roboto, "Helvetica Neue", sans-serif;

  --transition: 180ms cubic-bezier(0.32, 0.72, 0.35, 1);
}

:root[data-theme="sombre"] {
  --fond: #10131c;
  --fond-motif: #141826;
  --surface: #181d2b;
  --surface-2: #1f2537;
  --surface-3: #283048;

  --texte: #e7eaf6;
  --texte-doux: #9aa4c0;
  --texte-tres-doux: #6b7494;

  --primaire: #6c86ff;
  --primaire-vif: #8ba0ff;
  --primaire-fonce: #b9c6ff;
  --primaire-doux: rgba(52, 83, 224, 0.22);

  --indigo: #a18bff;
  --indigo-fonce: #c6b8ff;
  --indigo-doux: rgba(122, 90, 240, 0.2);

  --menthe: #41d4a3;
  --menthe-fonce: #9be7c9;
  --menthe-doux: rgba(65, 212, 163, 0.16);

  --ambre: #f2b45c;
  --ambre-fonce: #f7cf92;
  --ambre-doux: rgba(242, 180, 92, 0.16);

  --corail: #f0796c;
  --corail-fonce: #f8a9a0;
  --corail-doux: rgba(240, 121, 108, 0.16);

  --lavande: #a493f5;
  --lavande-fonce: #c8bcff;
  --lavande-doux: rgba(164, 147, 245, 0.16);

  --trait: rgba(160, 180, 225, 0.13);
  --trait-fort: rgba(160, 180, 225, 0.24);

  --degrade: linear-gradient(135deg, var(--primaire) 0%, var(--indigo) 100%);
  --degrade-doux: linear-gradient(135deg, rgba(52, 83, 224, 0.2) 0%, rgba(122, 90, 240, 0.2) 100%);

  --ombre-s: 0 1px 2px rgba(0, 0, 0, 0.24), 0 2px 8px rgba(0, 0, 0, 0.2);
  --ombre-m: 0 2px 6px rgba(0, 0, 0, 0.26), 0 12px 30px rgba(0, 0, 0, 0.32);
  --ombre-l: 0 6px 14px rgba(0, 0, 0, 0.3), 0 28px 60px rgba(0, 0, 0, 0.44);
}

/* ---------------------------------- Base --------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Barre de défilement discrète, assortie à la palette. */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: var(--r-rond); border: 2px solid var(--fond); }
::-webkit-scrollbar-thumb:hover { background: var(--texte-tres-doux); }

/* `hidden` doit primer : la règle du navigateur perd contre toute déclaration
   `display` d'un composant, ce qui laissait des blocs masqués occuper la page. */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--police);
  font-size: 15px;
  line-height: 1.6;
  color: var(--texte);
  background: var(--fond);
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
}

/* Toile de fond : photo du campus, légèrement voilée, avec halos colorés et un
   lent mouvement « Ken Burns » pour donner de la vie à l'interface. */
body::before {
  content: "";
  position: fixed; inset: -8%; z-index: -1;
  background-image: url("/img/enspd.jpeg");
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  filter: saturate(0.6) contrast(1.02);
  animation: kenburns 32s ease-in-out infinite alternate;
}
:root[data-theme="sombre"] body::before { opacity: 0.1; }
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    radial-gradient(1100px 520px at 12% -8%, var(--primaire-doux) 0%, transparent 62%),
    radial-gradient(900px 460px at 96% 4%, var(--indigo-doux) 0%, transparent 58%);
  animation: respiration 9s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.08) translate(-1.6%, -1.4%); }
}
@keyframes respiration {
  from { opacity: 0.75; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  body::after { animation: none; }
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 0.8em; }
p:last-child { margin-bottom: 0; }

a { color: var(--primaire-fonce); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }
svg { flex: none; }

:focus-visible {
  outline: 2.5px solid var(--primaire-vif);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection { background: var(--primaire-doux); color: var(--texte); }

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ------------------------------- Démarrage -------------------------------- */

.demarrage {
  min-height: 100vh;
  display: grid; place-content: center; justify-items: center; gap: 20px;
  color: var(--texte-doux);
  background: radial-gradient(760px 420px at 50% 30%, var(--primaire-doux), transparent 66%);
}
.demarrage__logo {
  width: 72px; height: 72px; object-fit: contain;
  animation: pulsation 1.5s ease-in-out infinite;
}
@keyframes pulsation {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.09); opacity: 1; }
}

/* -------------------------------- Structure ------------------------------- */

.app { display: flex; min-height: 100vh; }

.menu {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--largeur-menu);
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--trait);
  overflow-y: auto;
  transition: transform var(--transition);
}

.marque { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.marque--centree { justify-content: center; padding: 0 0 18px; }
/* L'emblème est bleu foncé : il lui faut un fond clair, y compris en thème sombre. */
.marque__pastille {
  display: grid; place-items: center; flex: none; padding: 4px;
  border-radius: var(--r-s); background: #fff;
  box-shadow: var(--ombre-s);
  transition: transform var(--transition), box-shadow var(--transition);
}
.marque:hover .marque__pastille { transform: scale(1.06) rotate(-3deg); box-shadow: var(--ombre-m); }
.marque__pastille img { display: block; object-fit: contain; }
.marque__nom {
  font-weight: 800; font-size: 1.05rem; letter-spacing: 0.01em;
  background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.marque__sous { font-size: 0.74rem; color: var(--texte-doux); }

.menu__titre {
  padding: 16px 12px 6px;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--texte-tres-doux);
}

.lien {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r-s);
  color: var(--texte-doux); font-weight: 550; font-size: 0.9rem;
  cursor: pointer; text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.lien svg { transition: transform var(--transition); }
.lien:hover { background: var(--surface-2); color: var(--texte); text-decoration: none; }
.lien:hover svg { transform: translateX(2px); }
.lien[aria-current="page"] {
  background: var(--degrade-doux); color: var(--primaire-fonce);
  font-weight: 650;
}
.lien[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 22%; bottom: 22%;
  width: 3px; border-radius: var(--r-rond);
  background: var(--degrade);
}
:root[data-theme="sombre"] .lien[aria-current="page"] { color: var(--primaire-fonce); }
.lien__pastille {
  margin-left: auto; min-width: 21px; height: 21px; padding: 0 6px;
  border-radius: var(--r-rond); display: grid; place-items: center;
  background: var(--corail); color: #fff;
  font-size: 0.7rem; font-weight: 700;
}
:root[data-theme="sombre"] .lien__pastille { color: #2a1b1a; }

.menu__pied { margin-top: auto; padding-top: 14px; }

.principal {
  flex: 1; min-width: 0;
  margin-left: var(--largeur-menu);
  display: flex; flex-direction: column;
}

.barre {
  position: sticky; top: 0; z-index: 30;
  height: var(--hauteur-barre);
  display: flex; align-items: center; gap: 12px;
  padding: 0 clamp(16px, 3vw, 32px);
  background: var(--fond);
  background: color-mix(in srgb, var(--fond) 74%, transparent);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--trait);
}
.barre__titre {
  font-size: 1.06rem; font-weight: 750; letter-spacing: -0.02em;
  background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.barre__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.contenu {
  flex: 1;
  padding: clamp(18px, 3vw, 32px);
  max-width: 1320px; width: 100%;
}

.contenu--plein { padding: 0; max-width: none; }

.entete { margin-bottom: 22px; position: relative; padding-bottom: 14px; }
.entete::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 64px; height: 3px; border-radius: var(--r-rond);
  background: var(--degrade);
}
.entete__sous { color: var(--texte-doux); font-size: 0.92rem; margin-top: 5px; max-width: 68ch; }

/* --------------------------- Bandeau d'accueil ------------------------------ */

.bienvenue {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-bottom: 22px;
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--r-xl);
  color: #fff;
  background: linear-gradient(130deg, var(--primaire) 0%, var(--indigo) 48%, var(--menthe) 125%);
  box-shadow: var(--halo), var(--ombre-m);
  animation: apparaitre 480ms cubic-bezier(0.22, 0.85, 0.35, 1) both;
}
.bienvenue::before {
  content: ""; position: absolute; top: -30%; left: -70%;
  width: 45%; height: 160%; transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: balayage 8s ease-in-out infinite;
}
.bienvenue::after {
  content: ""; position: absolute; right: -90px; top: -130px;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 66%);
  animation: flottement 8s ease-in-out infinite;
}
@keyframes balayage {
  0% { left: -70%; }
  55%, 100% { left: 130%; }
}
.bienvenue > * { position: relative; z-index: 1; }
.bienvenue .avatar {
  width: 56px; height: 56px; font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.22); color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px);
}
.bienvenue__texte { min-width: 0; }
.bienvenue__sous { color: rgba(255, 255, 255, 0.82); font-size: 0.84rem; margin-bottom: 2px; }
.bienvenue__titre { color: #fff; font-weight: 800; letter-spacing: -0.02em; }
.bienvenue__date { display: flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, 0.85); font-size: 0.82rem; margin-top: 5px; }
.bienvenue__actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.bienvenue__actions .btn {
  background: rgba(255, 255, 255, 0.16); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: none;
  backdrop-filter: blur(8px);
}
.bienvenue__actions .btn:hover { background: rgba(255, 255, 255, 0.28); transform: translateY(-2px); }
.bienvenue__actions .btn--plein { background: #fff; color: var(--primaire-fonce); }
.bienvenue__actions .btn--plein:hover { background: rgba(255, 255, 255, 0.92); }
@media (max-width: 720px) { .bienvenue__actions { margin-left: 0; } }

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

.btn {
  --btn-fond: var(--surface);
  --btn-texte: var(--texte);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; min-height: 40px;
  border: none; border-radius: var(--r-s);
  background: var(--btn-fond); color: var(--btn-texte);
  font: inherit; font-size: 0.885rem; font-weight: 650;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--ombre-s);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition), color var(--transition);
}
.btn:hover { text-decoration: none; box-shadow: var(--ombre-m); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: var(--ombre-s); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--primaire {
  --btn-fond: var(--degrade); --btn-texte: #fff;
  position: relative; overflow: hidden;
}
.btn--primaire::after {
  content: ""; position: absolute; top: -20%; left: -70%;
  width: 45%; height: 140%; transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 480ms ease;
}
.btn--primaire:hover { box-shadow: var(--halo), var(--ombre-m); }
.btn--primaire:hover::after { left: 130%; }
:root[data-theme="sombre"] .btn--primaire { --btn-texte: #10152b; }
.btn--menthe { --btn-fond: var(--menthe); --btn-texte: #06382a; }
.btn--corail { --btn-fond: var(--corail); --btn-texte: #4a1510; }
.btn--doux { --btn-fond: var(--surface-2); --btn-texte: var(--texte-doux); box-shadow: none; }
.btn--doux:hover { --btn-texte: var(--texte); background: var(--surface-3); box-shadow: none; }
.btn--fantome { --btn-fond: transparent; --btn-texte: var(--texte-doux); box-shadow: none; }
.btn--fantome:hover { background: var(--surface-2); box-shadow: none; }
.btn--petit { min-height: 34px; padding: 6px 12px; font-size: 0.82rem; }
.btn--icone { padding: 9px; min-width: 40px; }
.btn--icone.btn--petit { padding: 6px; min-width: 32px; }
.btn--large { width: 100%; }

.pastille-notif {
  position: absolute; top: 4px; right: 4px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: var(--r-rond); background: var(--corail); color: #fff;
  font-size: 0.64rem; font-weight: 700; line-height: 17px; text-align: center;
}
.enveloppe-relative { position: relative; display: inline-flex; }

/* ------------------------------- Apparition -------------------------------- */

@keyframes apparaitre {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.carte, .memoire, .chiffre, .notif, .vide, .commentaire, .fil__element {
  animation: apparaitre 460ms cubic-bezier(0.22, 0.85, 0.35, 1) both;
}
.grille > *:nth-child(2) { animation-delay: 40ms; }
.grille > *:nth-child(3) { animation-delay: 80ms; }
.grille > *:nth-child(4) { animation-delay: 120ms; }
.grille > *:nth-child(5) { animation-delay: 160ms; }
.grille > *:nth-child(6) { animation-delay: 200ms; }
.grille > *:nth-child(n + 7) { animation-delay: 240ms; }

/* --------------------------------- Cartes --------------------------------- */

.carte {
  background: var(--surface);
  border-radius: var(--r-l);
  box-shadow: var(--ombre-s);
  padding: clamp(16px, 2.2vw, 24px);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.carte:hover { transform: translateY(-2px); box-shadow: var(--ombre-m); }
.carte--plate { box-shadow: none; background: var(--surface-2); }
.carte--plate:hover { transform: none; box-shadow: none; }
.carte__entete {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.carte__entete h2, .carte__entete h3 { margin-right: auto; }

.grille { display: grid; gap: 16px; }
.grille--auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grille--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grille--stats { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grille--fiche { grid-template-columns: minmax(0, 1fr) 336px; align-items: start; }
.grille--large-gauche { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 940px) {
  .grille--fiche, .grille--large-gauche { grid-template-columns: 1fr; }
}

.pile { display: flex; flex-direction: column; gap: 14px; }
.rangee { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rangee--fin { justify-content: flex-end; }
.pousse { margin-left: auto; }

/* ------------------------------ Carte chiffre ------------------------------ */

.chiffre {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-l);
  padding: 18px 20px; box-shadow: var(--ombre-s);
  transition: transform var(--transition), box-shadow var(--transition);
}
.chiffre:hover { transform: translateY(-4px); box-shadow: var(--ombre-m), 0 0 0 1px var(--ton-doux, var(--trait)); }
.chiffre::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ton, var(--degrade));
}
.chiffre::after {
  content: ""; position: absolute; inset: auto -30px -40px auto;
  width: 116px; height: 116px; border-radius: 50%;
  background: var(--ton, var(--degrade-doux)); opacity: 0.55;
}
.chiffre__icone {
  width: 42px; height: 42px; border-radius: var(--r-m);
  display: grid; place-items: center;
  background: var(--ton-doux, var(--primaire-doux));
  color: var(--ton-fonce, var(--primaire-fonce));
  margin-bottom: 14px;
  transition: transform var(--transition);
}
.chiffre:hover .chiffre__icone { transform: scale(1.08) rotate(-4deg); }
.chiffre__valeur {
  position: relative; font-size: 2rem; font-weight: 800; letter-spacing: -0.03em;
  background: var(--ton, var(--degrade));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.chiffre__libelle { position: relative; font-size: 0.82rem; color: var(--texte-doux); margin-top: 2px; }
.chiffre--bleu { --ton: var(--degrade); --ton-doux: var(--primaire-doux); --ton-fonce: var(--primaire-fonce); }
.chiffre--menthe { --ton: linear-gradient(135deg, var(--menthe), #2bd4a2); --ton-doux: var(--menthe-doux); --ton-fonce: var(--menthe-fonce); }
.chiffre--ambre { --ton: linear-gradient(135deg, var(--ambre), #f6bd63); --ton-doux: var(--ambre-doux); --ton-fonce: var(--ambre-fonce); }
.chiffre--corail { --ton: linear-gradient(135deg, var(--corail), #f47f70); --ton-doux: var(--corail-doux); --ton-fonce: var(--corail-fonce); }
.chiffre--lavande { --ton: linear-gradient(135deg, var(--lavande), #b3a5f7); --ton-doux: var(--lavande-doux); --ton-fonce: var(--lavande-fonce); }

/* --------------------------------- Badges --------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--r-rond);
  font-size: 0.77rem; font-weight: 650; white-space: nowrap;
  background: var(--surface-3); color: var(--texte-doux);
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.75; flex: none;
}
.badge--sans-point::before { display: none; }
.badge--valide { background: var(--menthe-doux); color: var(--menthe-fonce); }
.badge--attente { background: var(--ambre-doux); color: var(--ambre-fonce); }
.badge--rejete { background: var(--corail-doux); color: var(--corail-fonce); }
.badge--info { background: var(--primaire-doux); color: var(--primaire-fonce); }
.badge--neutre { background: var(--lavande-doux); color: var(--lavande-fonce); }

.puce {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--r-rond);
  background: var(--surface-2); color: var(--texte-doux);
  font-size: 0.76rem; font-weight: 550;
}

/* ------------------------------- Formulaires ------------------------------- */

.champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.champ__libelle { font-size: 0.83rem; font-weight: 600; color: var(--texte); }
.champ__aide { font-size: 0.78rem; color: var(--texte-doux); }
.champ__erreur { font-size: 0.78rem; color: var(--corail-fonce); font-weight: 550; }

.saisie, .selection, .zone {
  width: 100%; padding: 10px 13px; min-height: 42px;
  font: inherit; font-size: 0.9rem; color: var(--texte);
  background: var(--surface-2);
  border: 1.5px solid transparent; border-radius: var(--r-s);
  transition: border-color var(--transition), background var(--transition);
}
.saisie::placeholder, .zone::placeholder { color: var(--texte-tres-doux); }
.saisie:hover, .selection:hover, .zone:hover { background: var(--surface-3); }
.saisie:focus, .selection:focus, .zone:focus {
  outline: none; background: var(--surface);
  border-color: var(--primaire);
  box-shadow: 0 0 0 4px var(--primaire-doux);
}
.zone { min-height: 118px; resize: vertical; line-height: 1.6; }
.selection { appearance: none; cursor: pointer; padding-right: 34px; }
.champ--erreur .saisie, .champ--erreur .selection, .champ--erreur .zone { border-color: var(--corail); }

.selection-enveloppe { position: relative; display: block; }
.selection-enveloppe::after {
  content: ""; position: absolute; right: 14px; top: 50%; pointer-events: none;
  width: 8px; height: 8px; margin-top: -6px;
  border-right: 1.8px solid var(--texte-doux); border-bottom: 1.8px solid var(--texte-doux);
  transform: rotate(45deg);
}

.recherche { position: relative; flex: 1; min-width: 210px; }
.recherche .saisie { padding-left: 40px; }
.recherche__icone {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--texte-tres-doux); pointer-events: none;
}

/* La barre de filtres accueille l'autocomplétion : elle doit rester au-dessus
   des cartes suivantes. Sans ce z-index, l'élévation au survol (transform)
   crée un contexte d'empilement qui emprisonne la liste déroulante derrière
   les résultats. */
form#filtres { position: relative; z-index: 5; }

.barre__recherche { flex: 0 1 440px; min-width: 150px; margin-left: auto; }

.autocompletion {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 45;
  margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--trait);
  border-radius: var(--r-s); box-shadow: var(--ombre-l);
  max-height: 320px; overflow-y: auto;
}
.autocompletion__element { border-radius: var(--r-xs); }
.autocompletion__element button {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  padding: 9px 12px; text-align: left; cursor: pointer;
  background: none; border: none; border-radius: var(--r-xs);
  color: var(--texte); font: inherit;
}
.autocompletion__element--active button, .autocompletion__element:hover button { background: var(--surface-3); }
.autocompletion__titre { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.autocompletion__meta { font-size: 0.8rem; color: var(--texte-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.grille-form { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grille-form--large { grid-column: 1 / -1; }

.bascule { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.88rem; }
.bascule input { position: absolute; opacity: 0; pointer-events: none; }
.bascule__piste {
  width: 42px; height: 24px; border-radius: var(--r-rond);
  background: var(--surface-3); position: relative; flex: none;
  transition: background var(--transition);
}
.bascule__piste::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--ombre-s);
  transition: transform var(--transition);
}
.bascule input:checked + .bascule__piste { background: var(--degrade); }
.bascule input:checked + .bascule__piste::after { transform: translateX(18px); }
.bascule input:focus-visible + .bascule__piste { outline: 2.5px solid var(--primaire-vif); outline-offset: 2px; }

.cases { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.case {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: var(--r-s);
  background: var(--surface-2); cursor: pointer; font-size: 0.86rem;
  transition: background var(--transition);
}
.case:hover { background: var(--surface-3); }
.case input { accent-color: var(--primaire-vif); width: 17px; height: 17px; cursor: pointer; }
.case--cochee { background: var(--primaire-doux); color: var(--primaire-fonce); font-weight: 600; }

.depot {
  display: grid; place-items: center; gap: 8px;
  padding: 30px 22px; text-align: center; cursor: pointer;
  border: 2px dashed var(--trait-fort); border-radius: var(--r-m);
  background: var(--surface-2); color: var(--texte-doux);
  transition: background var(--transition), border-color var(--transition);
}
.depot:hover, .depot--survol { background: var(--primaire-doux); border-color: var(--primaire); color: var(--primaire-fonce); }
.depot__nom { font-weight: 650; color: var(--texte); }

/* Aperçu de la première page après sélection du fichier. */
.apercu {
  display: grid; place-items: center; padding: 16px;
  background: var(--fond-motif); border: 1px solid var(--trait);
  border-radius: var(--r-m);
}
.apercu canvas {
  max-width: 100%; height: auto; display: block;
  background: #fff; border-radius: var(--r-xs); box-shadow: var(--ombre-m);
}

.extraction__liste { margin: 8px 0 12px; padding-left: 18px; display: grid; gap: 4px; }
.extraction__liste li { font-size: 0.85rem; }
.extraction__liste li span:first-child {
  display: inline-block; min-width: 84px; font-weight: 600;
}

/* -------------------------------- Tableaux -------------------------------- */

.tableau-enveloppe { overflow-x: auto; border-radius: var(--r-m); }
.tableau { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 620px; }
.tableau th {
  text-align: left; padding: 11px 14px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--texte-doux); background: var(--surface-2);
  white-space: nowrap;
}
.tableau th:first-child { border-radius: var(--r-s) 0 0 var(--r-s); }
.tableau th:last-child { border-radius: 0 var(--r-s) var(--r-s) 0; }
.tableau td { padding: 13px 14px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.tableau tbody tr:last-child td { border-bottom: none; }
.tableau tbody tr { transition: background var(--transition); }
.tableau tbody tr:hover { background: var(--surface-2); }
.tableau tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--primaire); }
.tableau__actions { display: flex; gap: 6px; justify-content: flex-end; }
.tableau__principal { font-weight: 600; color: var(--texte); }
.tableau__secondaire { font-size: 0.8rem; color: var(--texte-doux); }

/* ----------------------------- Carte de mémoire ---------------------------- */

.memoire {
  display: flex; flex-direction: column; gap: 12px;
  padding: 20px; border-radius: var(--r-l);
  background: var(--surface); box-shadow: var(--ombre-s);
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.memoire:hover { transform: translateY(-4px); box-shadow: var(--ombre-l); border-color: var(--trait); }
.memoire__titre:hover { color: var(--primaire); }
.memoire__haut { display: flex; align-items: flex-start; gap: 10px; }
.memoire__titre {
  font-size: 1rem; font-weight: 650; line-height: 1.4; color: var(--texte);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.memoire__meta { font-size: 0.82rem; color: var(--texte-doux); }
.memoire__resume {
  font-size: 0.855rem; color: var(--texte-doux); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.memoire__pied {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--trait);
}
.memoire__mots { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------- États vides ------------------------------- */

.vide {
  display: grid; place-items: center; gap: 12px;
  padding: 52px 24px; text-align: center; color: var(--texte-doux);
}
.vide__icone {
  width: 62px; height: 62px; border-radius: var(--r-l);
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--texte-tres-doux);
}
.vide__titre { font-weight: 650; color: var(--texte); font-size: 1rem; }
.vide p { max-width: 44ch; font-size: 0.88rem; }

.squelette {
  border-radius: var(--r-m);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: chargement 1.3s ease infinite;
}
@keyframes chargement { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ------------------------------- Pagination -------------------------------- */

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; }
.pagination__info { font-size: 0.84rem; color: var(--texte-doux); }

/* --------------------------------- Modale ---------------------------------- */

.calque {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 20px;
  background: rgba(38, 45, 66, 0.42);
  backdrop-filter: blur(4px);
  animation: apparition 160ms ease;
}
@keyframes apparition { from { opacity: 0; } to { opacity: 1; } }

.modale {
  width: min(620px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--surface); border-radius: var(--r-xl);
  border: 1px solid var(--trait);
  box-shadow: var(--ombre-l); padding: clamp(20px, 3vw, 30px);
  animation: montee 200ms cubic-bezier(0.22, 0.85, 0.35, 1);
}
.modale--large { width: min(880px, 100%); }
@keyframes montee { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
.modale__entete { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.modale__titre { margin-right: auto; }
.modale__sous { font-size: 0.87rem; color: var(--texte-doux); margin-top: 4px; }
.modale__pied { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }

/* -------------------------------- Messages --------------------------------- */

.toasts {
  position: fixed; z-index: 80; right: 20px; bottom: 20px;
  display: flex; flex-direction: column; gap: 10px;
  max-width: min(400px, calc(100vw - 40px));
}
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 16px; border-radius: var(--r-m);
  background: var(--surface); box-shadow: var(--ombre-l);
  font-size: 0.875rem; font-weight: 550;
  animation: glisse 220ms cubic-bezier(0.22, 0.85, 0.35, 1);
}
@keyframes glisse { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.toast--succes { color: var(--menthe-fonce); }
.toast--erreur { color: var(--corail-fonce); }
.toast--info { color: var(--primaire-fonce); }
.toast__fermer { margin-left: auto; }

.annonce {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 14px 16px; border-radius: var(--r-m);
  font-size: 0.875rem; line-height: 1.55;
}
.annonce--info { background: var(--primaire-doux); color: var(--primaire-fonce); }
.annonce--succes { background: var(--menthe-doux); color: var(--menthe-fonce); }
.annonce--attention { background: var(--ambre-doux); color: var(--ambre-fonce); }
.annonce--erreur { background: var(--corail-doux); color: var(--corail-fonce); }
.annonce strong { font-weight: 700; }

/* ------------------------------ Notifications ------------------------------ */

.notif {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-m);
  background: var(--surface-2); cursor: pointer;
  transition: background var(--transition);
}
.notif:hover { background: var(--surface-3); }
.notif--nonlue { background: var(--primaire-doux); }
.notif__point { width: 8px; height: 8px; border-radius: 50%; background: var(--primaire-vif); margin-top: 7px; flex: none; }
.notif__corps { flex: 1; min-width: 0; }
.notif__date { font-size: 0.76rem; color: var(--texte-doux); margin-top: 3px; }

/* --------------------------------- Onglets --------------------------------- */

.onglets {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface-2); border-radius: var(--r-s);
  overflow-x: auto; scrollbar-width: none;
}
.onglets::-webkit-scrollbar { display: none; }
.onglet {
  padding: 8px 15px; border: none; border-radius: var(--r-xs);
  background: transparent; color: var(--texte-doux);
  font: inherit; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.onglet:hover { color: var(--texte); }
.onglet[aria-selected="true"] { background: var(--surface); color: var(--texte); box-shadow: var(--ombre-s); }

/* ------------------------------ Lecteur PDF -------------------------------- */

.lecteur { display: flex; flex-direction: column; height: calc(100vh - var(--hauteur-barre)); background: var(--fond-motif); }
.lecteur__barre {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 11px clamp(12px, 2vw, 22px);
  background: var(--surface); border-bottom: 1px solid var(--trait);
}
.lecteur__page { display: flex; align-items: center; gap: 7px; font-size: 0.85rem; color: var(--texte-doux); }
.lecteur__page .saisie { width: 62px; text-align: center; min-height: 34px; padding: 5px 8px; }
.lecteur__zoom { font-size: 0.85rem; color: var(--texte-doux); min-width: 48px; text-align: center; }
/* Flux de blocs plutôt que flex : au-delà de 100 % de zoom, une page plus large
   que la scène doit déborder vers la droite et rester atteignable au défilement,
   ce qu'un centrage flex rendrait impossible. */
.lecteur__scene {
  flex: 1; overflow: auto; padding: 22px clamp(10px, 2vw, 26px) 40px;
  scroll-behavior: smooth;
}
.lecteur__feuille {
  margin: 0 auto 20px;
  position: relative; border-radius: var(--r-s); overflow: hidden;
  box-shadow: var(--ombre-m); background: #fff; line-height: 0;
  /* Dissuade la copie : la sélection et le menu contextuel sont neutralisés. */
  user-select: none; -webkit-user-select: none;
}
.lecteur__feuille canvas { display: block; max-width: 100%; height: auto; }
/* Emplacement réservé tant que la page n'est pas peinte (rendu à la demande). */
.lecteur__feuille--attente {
  background: linear-gradient(90deg, #f4f6fa 25%, #eaeef6 37%, #f4f6fa 63%);
  background-size: 400% 100%;
  animation: chargement 1.4s ease infinite;
}
.lecteur__voile {
  position: absolute; inset: 0; pointer-events: none;
  display: grid; place-items: center;
}
.lecteur__voile span {
  font-size: clamp(11px, 1.6vw, 15px); font-weight: 700; letter-spacing: 0.06em;
  color: rgba(67, 100, 143, 0.13); transform: rotate(-32deg); white-space: nowrap;
  text-transform: uppercase;
}
.lecteur__etat { display: grid; place-items: center; gap: 12px; padding: 60px 20px; color: var(--texte-doux); text-align: center; }

/* -------------------------------- Graphiques -------------------------------- */

.graphe { width: 100%; height: auto; overflow: visible; }
.graphe__grille { stroke: var(--trait); stroke-width: 1; }
.graphe__barre { fill: var(--primaire); transition: fill var(--transition), filter var(--transition); }
.graphe__barre:hover { fill: var(--primaire-vif); filter: drop-shadow(0 4px 6px rgba(52, 83, 224, 0.35)); }
.graphe__texte { fill: var(--texte-doux); font-size: 10px; font-family: var(--police); }
.graphe__valeur { fill: var(--texte); font-size: 10.5px; font-weight: 650; font-family: var(--police); }
.graphe__ligne { fill: none; stroke: var(--primaire-vif); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 3px 4px rgba(52, 83, 224, 0.25)); }
.graphe__aire { fill: var(--primaire); opacity: 0.16; }
.graphe__point { fill: var(--surface); stroke: var(--primaire-vif); stroke-width: 2; }
.graphe__point:hover { fill: var(--primaire-vif); }

.jauge { display: flex; align-items: center; gap: 12px; }
.jauge__piste { flex: 1; height: 9px; border-radius: var(--r-rond); background: var(--surface-3); overflow: hidden; }
.jauge__valeur { height: 100%; border-radius: var(--r-rond); background: var(--degrade); }
.jauge__valeur--menthe { background: var(--menthe); }
.jauge__valeur--ambre { background: var(--ambre); }
.jauge__valeur--corail { background: var(--corail); }
.jauge__chiffre { font-size: 0.82rem; font-weight: 650; color: var(--texte-doux); min-width: 42px; text-align: right; }

/* ------------------------------ Fil / historique --------------------------- */

.fil { display: flex; flex-direction: column; gap: 2px; }
.fil__element { display: flex; gap: 14px; }
.fil__rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 26px; }
.fil__puce {
  width: 12px; height: 12px; border-radius: 50%; margin-top: 6px;
  background: var(--primaire); box-shadow: 0 0 0 4px var(--primaire-doux);
}
.fil__puce--valide { background: var(--menthe); box-shadow: 0 0 0 4px var(--menthe-doux); }
.fil__puce--rejete { background: var(--corail); box-shadow: 0 0 0 4px var(--corail-doux); }
.fil__puce--attente { background: var(--ambre); box-shadow: 0 0 0 4px var(--ambre-doux); }
.fil__trait { flex: 1; width: 2px; background: var(--trait); margin: 6px 0 0; border-radius: 2px; }
.fil__corps { padding-bottom: 20px; flex: 1; min-width: 0; }
.fil__element:last-child .fil__corps { padding-bottom: 0; }
.fil__date { font-size: 0.77rem; color: var(--texte-doux); }

.commentaire { padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-2); }
.commentaire__entete { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; flex-wrap: wrap; }
.commentaire__auteur { font-weight: 650; font-size: 0.87rem; }
.commentaire__texte { font-size: 0.88rem; line-height: 1.6; white-space: pre-wrap; }

.avatar {
  width: 34px; height: 34px; border-radius: var(--r-rond); flex: none;
  display: grid; place-items: center;
  background: var(--primaire-doux); color: var(--primaire-fonce);
  font-size: 0.78rem; font-weight: 700;
}
.avatar--grand { width: 46px; height: 46px; font-size: 0.95rem; }
.avatar--menthe { background: var(--menthe-doux); color: var(--menthe-fonce); }
.avatar--ambre { background: var(--ambre-doux); color: var(--ambre-fonce); }
.avatar--corail { background: var(--corail-doux); color: var(--corail-fonce); }
.avatar--lavande { background: var(--lavande-doux); color: var(--lavande-fonce); }

/* --------------------------------- Citation -------------------------------- */

.citation {
  padding: 15px 17px; border-radius: var(--r-m);
  background: var(--lavande-doux); color: var(--texte);
  font-size: 0.87rem; line-height: 1.65;
}
.citation__texte { font-style: italic; }

/* ----------------------------- Page d'identification ----------------------- */

.acces { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.acces__presentation {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
  padding: clamp(32px, 6vw, 76px);
  color: #fff;
  background-image: url("/img/enspd.jpeg");
  background-size: cover; background-position: center;
}
.acces__presentation::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(720px 480px at 82% 6%, rgba(122, 90, 240, 0.4), transparent 62%),
    linear-gradient(160deg, rgba(24, 35, 120, 0.86) 0%, rgba(46, 32, 140, 0.84) 55%, rgba(11, 82, 94, 0.82) 100%);
}
.acces__presentation::after {
  content: ""; position: absolute; right: -140px; bottom: -160px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 68%);
  animation: flottement 9s ease-in-out infinite;
}
@keyframes flottement {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-26px) scale(1.06); }
}
.acces__presentation > * { position: relative; z-index: 1; }
.acces__presentation .doux { color: rgba(255, 255, 255, 0.82); }
.acces__titre {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.03em;
  font-weight: 800;
}
.acces__liste { display: flex; flex-direction: column; gap: 13px; margin-top: 6px; }
.acces__point { display: flex; gap: 12px; align-items: flex-start; font-size: 0.92rem; }
.acces__point strong { color: #fff; }
.acces__puce {
  width: 30px; height: 30px; border-radius: var(--r-xs); flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.acces__logo {
  align-self: flex-start; padding: 14px 20px;
  border-radius: var(--r-m); background: rgba(255, 255, 255, 0.96); box-shadow: var(--ombre-l);
}
.acces__logo img { display: block; width: 260px; max-width: 100%; height: auto; }
.acces__formulaire {
  display: grid; place-items: center; padding: clamp(24px, 5vw, 56px);
  background:
    radial-gradient(900px 520px at 118% -16%, var(--primaire-doux) 0%, transparent 58%),
    radial-gradient(760px 460px at -12% 112%, var(--indigo-doux) 0%, transparent 56%),
    var(--surface);
}
.acces__boite {
  width: min(400px, 100%);
  padding: clamp(24px, 3.2vw, 36px);
  border-radius: var(--r-xl);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid var(--trait);
  box-shadow: var(--ombre-l);
  animation: apparaitre 520ms cubic-bezier(0.22, 0.85, 0.35, 1) both;
}
.acces__comptes { margin-top: 22px; }
.acces__compte {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; margin-bottom: 6px;
  border: none; border-radius: var(--r-s); background: var(--surface-2);
  font: inherit; font-size: 0.82rem; text-align: left; color: var(--texte-doux); cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.acces__compte:hover { background: var(--primaire-doux); color: var(--primaire-fonce); transform: translateX(3px); }

/* -------------------------------- Utilitaires ------------------------------ */

.doux { color: var(--texte-doux); }
.tres-doux { color: var(--texte-tres-doux); }
.petit { font-size: 0.82rem; }
.gras { font-weight: 650; }
.centre { text-align: center; }
.tronque { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.82rem; }
.separateur { height: 1px; background: var(--trait); border: none; margin: 18px 0; }
.espace-haut { margin-top: 12px; }
.espace-haut--large { margin-top: 22px; }
.masque-bureau { display: none; }

/* -------------------------------- Responsive ------------------------------- */

@media (max-width: 1000px) {
  .menu {
    transform: translateX(-100%);
    box-shadow: var(--ombre-l);
    width: min(300px, 84vw);
  }
  .menu--ouvert { transform: none; }
  .principal { margin-left: 0; }
  .masque-bureau { display: inline-flex; }
  .acces { grid-template-columns: 1fr; }
  .acces__presentation { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 14.5px; }
  .barre { padding: 0 14px; gap: 8px; }
  .barre__titre { font-size: 0.98rem; }
  .barre__recherche { flex: 1 1 120px; min-width: 84px; }
  .contenu { padding: 16px 14px 28px; }
  .modale { border-radius: var(--r-l); padding: 20px; }
  .toasts { right: 12px; left: 12px; bottom: 12px; max-width: none; }
  .grille--auto { grid-template-columns: 1fr; }
  .btn { font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .menu, .barre, .toasts { display: none !important; }
  .principal { margin-left: 0; }
  body { background: #fff; }
  .carte, .memoire { box-shadow: none; break-inside: avoid; }
}
