:root {
  --encre: #1E3A6E;
  --encre-fonce: #142A52;
  --tableau: #23413A;
  --tableau-clair: #2E5148;
  --craie: #ECF1EA;
  --craie-douce: #B9C7BE;
  --papier: #FBFCFE;
  --blanc: #FFFFFF;
  --seyes: #E3EAF6;
  --seyes-fort: #C7D4EC;
  --marge: #C43B3B;
  --texte: #1C2430;
  --texte-doux: #5A6472;
  --bordure: #DCE2EA;
  --premium-fond: #EFE8F7;
  --premium-bordure: #D9C8EC;
  --premium-texte: #5A2D82;
  --erreur-fond: #FBEDED;
  --erreur-texte: #8A1F1F;
  --attention-fond: #FDF3E1;
  --attention-texte: #7A4A00;
  --police: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  /* Profondeur et mouvement : ombres douces teintées d'encre, une durée commune */
  --ombre-1: 0 1px 2px rgb(28 36 48 / 0.06), 0 1px 3px rgb(28 36 48 / 0.08);
  --ombre-2: 0 2px 4px rgb(28 36 48 / 0.06), 0 6px 16px rgb(28 36 48 / 0.10);
  --ombre-3: 0 4px 8px rgb(28 36 48 / 0.08), 0 14px 32px rgb(28 36 48 / 0.14);
  --anneau: 0 0 0 3px rgb(30 58 110 / 0.28);
  --duree: 160ms;
  --courbe: cubic-bezier(0.2, 0, 0, 1);
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: var(--police);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--texte);
  background: var(--papier);
}

a { color: var(--encre); }

code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  background: var(--seyes);
  border-radius: 3px;
}

:focus-visible {
  outline: 2px solid var(--encre);
  outline-offset: 2px;
}

/* En-tête */
.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 1.5rem;
  color: var(--craie);
  background: var(--tableau);
}

.entete :focus-visible { outline-color: var(--craie); }

.marque {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  color: var(--craie);
  text-decoration: none;
}

.marque-logo {
  flex: none;
  border-radius: 6px;
}

.marque-texte {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.marque-nom {
  font-size: 1.0625rem;
  font-weight: 600;
}

.marque-sous-titre {
  overflow: hidden;
  font-size: 0.8125rem;
  color: var(--craie-douce);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.entete-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.entete-actions form { margin: 0; }

/* Compte connecté (avatar et nom) : ouvre « Mes préférences ». */
.compte {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.125rem;
  padding-inline: 0.125rem 0.5rem;
  color: inherit;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color var(--duree) var(--courbe);
}

.compte:hover,
.compte[aria-current="page"] { background: var(--tableau-clair); }

.bouton-icone {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--craie);
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background-color var(--duree) var(--courbe), transform var(--duree) var(--courbe);
}

.bouton-icone:hover { background: var(--tableau-clair); }

.bouton-icone:active { transform: scale(0.94); }

.bouton-icone[aria-current="page"] {
  background: var(--tableau-clair);
  border-color: var(--craie-douce);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tableau);
  background: var(--craie);
  border-radius: 50%;
}

.utilisateur-nom { font-size: 0.9375rem; }

.bouton-discret {
  position: relative;
  overflow: hidden;
  font: inherit;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  color: var(--craie);
  background: transparent;
  border: 1px solid var(--craie-douce);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color var(--duree) var(--courbe), transform var(--duree) var(--courbe);
}

.bouton-discret:hover { background: var(--tableau-clair); }

.bouton-discret:active { transform: scale(0.97); }

/* Menu du compte (shell/partiels/menu_profil.html) : l'avatar et le nom ouvrent un panneau
   blanc sous l'en-tête, aligné sur son bord de fin (droite, ou gauche en arabe). */
.profil { position: relative; }

.profil > summary { list-style: none; cursor: pointer; }

.profil > summary::-webkit-details-marker { display: none; }

.profil-chevron { transition: transform var(--duree) var(--courbe); }

.profil[open] .profil-chevron { transform: rotate(180deg); }

.profil[open] > .compte {
  background: color-mix(in srgb, var(--entete-texte, var(--craie)) 14%, transparent);
}

.profil-panneau {
  position: absolute;
  inset-block-start: calc(100% + 0.375rem);
  inset-inline-end: 0;
  z-index: 50;
  display: grid;
  width: min(18rem, calc(100vw - 1.5rem));
  color: var(--texte);
  font-family: var(--police);
  font-size: 0.875rem;
  text-align: start;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  box-shadow: 0 0 2px rgb(34 53 72 / 0.16), 0 10px 24px rgb(34 53 72 / 0.16);
  overflow: hidden;
  animation: profil-ouverture var(--duree) var(--courbe);
}

@keyframes profil-ouverture {
  from { opacity: 0; transform: translateY(-0.25rem); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .profil-panneau { animation: none; }
  .profil-chevron { transition: none; }
}

.profil-panneau p { margin: 0; }

/* Icônes de l'en-tête (G5) : cloche des notifications et icônes [[entete]] des modules. */
.entete-icone {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: inherit;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--duree) var(--courbe);
}

.entete-icone:hover,
.entete-icone[aria-current="page"],
.cloche[open] > .entete-icone {
  background: color-mix(in srgb, var(--entete-texte, var(--craie)) 14%, transparent);
}

/* Icône SVG d'un module : peinte dans la couleur du texte de l'en-tête. */
.entete-icone-image {
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: var(--icone) center / contain no-repeat;
}

.pastille {
  position: absolute;
  inset-block-start: 0.125rem;
  inset-inline-end: 0.125rem;
  min-width: 1.05rem;
  padding: 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
  color: #FFFFFF;
  background: #D20A0A;
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--entete-fond, var(--tableau));
}

.cloche { position: relative; }

.cloche > summary { list-style: none; }

.cloche > summary::-webkit-details-marker { display: none; }

.cloche-panneau {
  position: absolute;
  inset-block-start: calc(100% + 0.375rem);
  inset-inline-end: 0;
  z-index: 50;
  width: min(22rem, calc(100vw - 1.5rem));
  color: var(--texte);
  font-family: var(--police);
  font-size: 0.875rem;
  text-align: start;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  box-shadow: 0 0 2px rgb(34 53 72 / 0.16), 0 10px 24px rgb(34 53 72 / 0.16);
  overflow: hidden;
}

.cloche-titre {
  margin: 0;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-block-end: 1px solid var(--bordure);
}

.cloche-liste { margin: 0; padding: 0; list-style: none; max-height: 22rem; overflow-y: auto; }

.cloche-avis + .cloche-avis { border-block-start: 1px solid var(--bordure); }

.cloche-avis a {
  display: grid;
  gap: 0.125rem;
  padding: 0.625rem 1rem;
  padding-inline-start: 1.375rem;
  color: var(--texte);
  text-decoration: none;
  position: relative;
}

.cloche-avis a:hover { background: var(--survol, var(--seyes)); }

.cloche-avis.non-lue a::before {
  content: "";
  position: absolute;
  inset-block-start: 1rem;
  inset-inline-start: 0.625rem;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--encre);
  border-radius: 999px;
}

.cloche-avis.non-lue .cloche-avis-titre { font-weight: 600; }

.cloche-avis.niveau-alerte .cloche-avis-titre { color: var(--erreur-texte, #AA0808); }

.cloche-avis-texte { color: var(--texte-doux); font-size: 0.8125rem; }

.cloche-avis-date { color: var(--texte-doux); font-size: 0.75rem; }

.cloche-vide { margin: 0; padding: 1rem; color: var(--texte-doux); }

.cloche-tout {
  display: block;
  padding: 0.625rem 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--encre);
  text-decoration: none;
  border-block-start: 1px solid var(--bordure);
}

.cloche-tout:hover { background: var(--survol, var(--seyes)); }

/* Identité centrée : grand avatar (photo ou initiales), nom, e-mail. */
.profil-identite {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 1.25rem 1rem 1rem;
  text-align: center;
  border-block-end: 1px solid var(--bordure);
}

.profil-avatar { margin-block-end: 0.375rem; }

.profil-avatar .avatar {
  width: 4.5rem;
  height: 4.5rem;
  font-size: 1.625rem;
  font-weight: 500;
  color: #0064D9;
  background: #D1EFFF;
}

.profil-nom { font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; }

.profil-detail {
  font-size: 0.8125rem;
  color: var(--texte-doux);
  overflow-wrap: anywhere;
}

.profil-detail-vide { font-style: italic; }


.profil-section {
  display: grid;
  gap: 0.375rem;
  padding: 0.625rem 0.75rem;
  border-block-end: 1px solid var(--bordure);
}

.profil-langues { display: grid; gap: 0.375rem; margin: 0; }

.profil-titre {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--texte-doux);
}

.profil-langue-ligne { display: flex; gap: 0.375rem; align-items: center; }

.profil-langue-ligne [hidden] { display: none; }

/* Liste des langues : un choix envoie le formulaire (portail.js, data-envoi-auto). */
.profil-langue {
  flex: 1;
  min-width: 0;
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--texte);
  background: var(--blanc);
  border: 1px solid var(--bordure-champ, var(--bordure));
  border-radius: 6px;
  cursor: pointer;
}

.profil-langue:hover:not(:disabled) { border-color: var(--encre); }

.profil-langue:disabled { color: var(--texte-doux); background: var(--papier); cursor: default; }

.profil-section .profil-detail a { color: var(--encre); }

.profil-liens { display: grid; padding: 0.25rem; }

.profil-lien {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  color: var(--texte);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color var(--duree) var(--courbe);
}

.profil-lien svg { flex: none; width: 18px; height: 18px; color: var(--texte-doux); }

.profil-lien:hover { background: var(--survol, var(--seyes)); }

.profil-lien[aria-current="page"] { font-weight: 600; color: var(--encre); }

.profil-lien[aria-current="page"] svg { color: var(--encre); }

/* Déconnexion : en bas, alignée en fin de ligne, discrète (lien bleu avec icône). */
.profil-sortie {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-block-start: 1px solid var(--bordure);
}

.bouton-deconnexion {
  display: inline-flex;
  gap: 0.375rem;
  align-items: center;
  padding: 0.375rem 0.5rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--encre);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color var(--duree) var(--courbe);
}

.bouton-deconnexion svg { width: 18px; height: 18px; }

.bouton-deconnexion:hover { background: var(--survol, var(--seyes)); }

/* Photo de profil (avatar-photo) : même cercle que les initiales. */
img.avatar-photo { object-fit: cover; padding: 0; }

.photo-ligne { display: flex; gap: 0.75rem; align-items: center; }
.photo-apercu .avatar { width: 3rem; height: 3rem; font-size: 1rem; }

.profil-panneau :focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }

/* Contenu : marge rouge du cahier */
.contenu {
  flex: 1;
  padding: 2.5rem 2rem 3rem 5rem;
  background-image: linear-gradient(var(--marge), var(--marge));
  background-size: 2px 100%;
  background-position: 3rem 0;
  background-repeat: no-repeat;
}

/* Bouton principal : relief léger, monte au survol, s'enfonce quand on appuie */
.bouton {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 500;
  padding: 0.625rem 1.125rem;
  color: var(--blanc);
  text-decoration: none;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0)) var(--encre);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--ombre-1);
  cursor: pointer;
  transition:
    background-color var(--duree) var(--courbe),
    box-shadow var(--duree) var(--courbe),
    transform var(--duree) var(--courbe);
}

.bouton:hover {
  background-color: var(--encre-fonce);
  box-shadow: var(--ombre-2);
  transform: translateY(-1px);
}

.bouton:active {
  box-shadow: var(--ombre-1);
  transform: translateY(0) scale(0.97);
}

.bouton:focus-visible {
  outline: none;
  box-shadow: var(--ombre-1), var(--anneau);
}

.bouton:disabled,
.bouton[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

/* Portail d'accueil */
.portail { max-width: 60rem; }

.portail-titre {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
}

.portail-intro {
  margin: 0.25rem 0 1.5rem;
  color: var(--texte-doux);
}

.tuiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tuile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 0.75rem;
  color: var(--texte);
  text-align: center;
  text-decoration: none;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 8px;
}

.tuile:hover { border-color: var(--encre); }

.tuile-initiale {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--craie);
  background: var(--tableau);
  border-radius: 8px;
}

.tuile-nom { font-weight: 500; }

/* États vides */
.vide {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--texte-doux);
  background: var(--blanc);
  border: 1px dashed var(--seyes-fort);
  border-radius: 8px;
}

.vide svg { color: var(--encre); }

.vide p {
  max-width: 40rem;
  margin-inline-end: auto;
  margin-inline-start: auto;
}

.vide .vide-titre {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--texte);
}

.vide .bouton { margin-top: 0.75rem; }

/* Paramétrage */
.parametrage {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 2rem;
  max-width: 72rem;
}

.parametrage-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.parametrage-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--texte);
  text-decoration: none;
  border-inline-start: 3px solid transparent;
}

.parametrage-nav a:hover { background: var(--seyes); }

.parametrage-nav a[aria-current="page"] {
  font-weight: 600;
  background: var(--seyes);
  border-inline-start-color: var(--marge);
}

.parametrage-contenu h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.aide {
  max-width: 65ch;
  margin: 0 0 1.5rem;
  color: var(--texte-doux);
}

.liste-modules {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 8px;
}

.ligne-module {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
}

.ligne-module + .ligne-module { border-top: 1px solid var(--bordure); }

.ligne-module-texte {
  flex: 1;
  min-width: 0;
}

.ligne-module-nom {
  margin: 0;
  font-weight: 600;
}

.ligne-module-meta {
  margin: 0;
  font-size: 0.875rem;
  color: var(--texte-doux);
}

.ligne-module-erreur {
  margin: 0;
  font-size: 0.875rem;
  color: var(--erreur-texte);
}

.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  font-size: 0.8125rem;
  color: var(--texte-doux);
  white-space: nowrap;
  background: var(--papier);
  border: 1px solid var(--bordure);
  border-radius: 4px;
}

.badge-standard {
  color: var(--encre);
  background: var(--seyes);
  border-color: var(--seyes-fort);
}

.badge-premium {
  color: var(--premium-texte);
  background: var(--premium-fond);
  border-color: var(--premium-bordure);
}

.tableau-defilant {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 8px;
}

.tableau {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.tableau th,
.tableau td {
  padding: 0.75rem 1rem;
  text-align: start;
  white-space: nowrap;
}

.tableau th {
  font-weight: 600;
  color: var(--texte-doux);
  border-bottom: 1px solid var(--bordure);
}

.tableau tbody tr + tr td { border-top: 1px solid var(--bordure); }

.fiche {
  max-width: 40rem;
  margin: 0;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 8px;
}

.fiche div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
}

.fiche div + div { border-top: 1px solid var(--bordure); }

.fiche dt { color: var(--texte-doux); }

.fiche dd {
  margin: 0;
  font-weight: 500;
}

/* Connexion : page de cahier Seyès */
.page-connexion {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background-color: var(--blanc);
  background-image:
    linear-gradient(var(--marge), var(--marge)),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--seyes-fort) 31px 32px),
    repeating-linear-gradient(to bottom, transparent 0 7px, var(--seyes) 7px 8px),
    repeating-linear-gradient(to right, transparent 0 31px, var(--seyes-fort) 31px 32px);
  background-size: 2px 100%, auto, auto, auto;
  background-position: 4rem 0, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, repeat, repeat, repeat;
}

.connexion {
  width: 100%;
  max-width: 22rem;
  padding: 2rem;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-top: 4px solid var(--encre);
  border-radius: 6px 6px 14px 14px;
  box-shadow: var(--ombre-3);
}

.connexion-logo {
  display: block;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.connexion-marque {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--encre);
}

.connexion-intro {
  margin: 0 0 1.5rem;
  color: var(--texte-doux);
}

.connexion form {
  display: grid;
  gap: 0.375rem;
}

.connexion label {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.connexion input {
  font: inherit;
  padding: 0.625rem 0.75rem;
  background: var(--papier);
  border: 1px solid var(--bordure);
  border-radius: 4px;
}

.connexion input:focus-visible {
  outline-offset: 0;
  border-color: var(--encre);
}

.connexion .bouton { margin-top: 1.5rem; }

/* Crédit de l'éditeur, en bas à gauche (texte et logo : kernel/shell/credits.py). */
.connexion-credit {
  position: fixed;
  inset-block-end: 1rem;
  inset-inline-start: 1.25rem;
  display: flex;
  gap: 0.625rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--texte-doux);
}

.connexion-credit-logo {
  border-radius: 7px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.16);
}

.connexion-credit a { color: inherit; text-decoration: none; }

.connexion-credit a:hover { color: var(--encre); text-decoration: underline; }

.erreur {
  margin: 0 0 1rem;
  padding: 0.75rem;
  color: var(--erreur-texte);
  background: var(--erreur-fond);
  border-inline-start: 3px solid var(--marge);
}

/* Petits écrans */
@media (max-width: 48rem) {
  .entete { padding: 0.5rem 1rem; }
  .utilisateur-nom { display: none; }
  .contenu {
    padding: 2rem 1rem 2rem 2.5rem;
    background-position: 1.25rem 0;
  }
  .parametrage {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .parametrage-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .page-connexion { background-position: 1.5rem 0, 0 0, 0 0, 0 0; }
  .connexion-credit { position: static; margin-top: 1.5rem; }
}

/* Page « Mes notifications » (G5) : mêmes lignes que la cloche, dans une carte. */
.liste-notifications {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  overflow: hidden;
}

.mes-notifications .barre-filtres { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }

.mes-notifications .barre-filtres form { margin: 0; }

.mes-notifications .pagination { display: flex; gap: 1rem; margin-top: 1rem; }

/* Boutons d'une ligne de tableau (Tâches planifiées : Lancer, Suspendre). */
.actions-ligne { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; }

/* Fenêtre « À propos » (partiels/a_propos.html) : au centre, au-dessus de la page ouverte,
   fond assombri, ombre simple. Ouverte par portail.js (showModal) ou, sans JavaScript, par
   le lien #a-propos (:target). */
.dialogue {
  width: min(26rem, calc(100vw - 2rem));
  padding: 0;
  color: var(--texte);
  font-family: var(--police);
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 12px;
  box-shadow: 0 0 2px rgb(34 53 72 / 0.18), 0 16px 40px rgb(34 53 72 / 0.22);
}

.dialogue:target:not([open]) {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 100;
  margin: auto;
  height: fit-content;
}

.dialogue::backdrop { background: rgb(29 45 62 / 0.45); }

.dialogue[open] { animation: dialogue-ouverture var(--duree) var(--courbe); }

@keyframes dialogue-ouverture {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dialogue[open] { animation: none; }
}

.dialogue-entete {
  display: flex;
  gap: 0.875rem;
  align-items: center;
  padding: 1.25rem 1.5rem 1rem;
  border-block-end: 1px solid var(--bordure);
}

.dialogue-logo { flex: none; border-radius: 10px; box-shadow: 0 1px 3px rgb(0 0 0 / 0.14); }

.dialogue-titre { margin: 0; font-size: 1.25rem; font-weight: 600; color: var(--encre); }

.dialogue-sous-titre { margin: 0.125rem 0 0; font-size: 0.875rem; color: var(--texte-doux); }

.dialogue-infos { display: grid; gap: 0; margin: 0; padding: 0.5rem 1.5rem; font-size: 0.875rem; }

.dialogue-infos div {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.dialogue-infos div + div { border-block-start: 1px solid var(--bordure); }

.dialogue-infos dt { color: var(--texte-doux); }

.dialogue-infos dd { min-width: 0; margin: 0; font-weight: 500; text-align: end; overflow-wrap: anywhere; }

.dialogue-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0.875rem 1.5rem;
  background: var(--papier);
  border-block-start: 1px solid var(--bordure);
}

/* Fenêtre de confirmation du portail (partiels/confirmation.html, portail.js) : remplace la
   boîte du navigateur pour tout data-confirmer. */
.dialogue-confirmation { width: min(28rem, calc(100vw - 2rem)); }

.confirmation-corps {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 1.375rem 1.5rem 1.25rem;
}

.confirmation-icone {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--attention-texte);
  background: var(--attention-fond);
  border-radius: 50%;
}

.confirmation-texte { margin: 0.375rem 0 0; font-size: 0.9375rem; line-height: 1.5; color: var(--texte); }

.confirmation-actions { gap: 0.5rem; }

/* Un élément caché par le script (hidden : boutons data-sans-js…) le reste, même si sa
   classe donne un display (bouton, grille). */
[hidden] { display: none !important; }

/* Fenêtres des icônes de l'en-tête (SDK 3.1, partiels/panneaux_entete.html) : flottantes,
   sous l'en-tête, du côté de la fin de ligne ; le contenu vient du module. */
.panneau-entete {
  position: fixed;
  inset-block-start: 4.25rem;
  inset-inline-end: 1rem;
  z-index: 60;
  inline-size: min(22rem, calc(100vw - 2rem));
  max-block-size: calc(100vh - 5.5rem);
  overflow: auto;
  background: var(--blanc, #fff);
  border: 1px solid var(--bordure, #d9dde3);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.22);
}

.panneau-entete[hidden] {
  display: none;
}

.entete-icone[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.18);
}

html[aria-busy="true"] {
  cursor: progress;
}
