/* ==========================================================================
   COMPTEUR DE CARACTÈRES PRO — themes.css
   --------------------------------------------------------------------------
   Version : V24 (4.8.0) — 15/11/2026 (onglet Dictionnaires dans le style du Bloc-notes : case « Dictée » posée
             sur la ligne choisie, ligne choisie survolée qui garde sa vidéo inversée, lignes « Arrive bientôt »
             — bloc « V24 » en fin de fichier ; même correction du survol de la ligne choisie pour « Mes notes »
             du Bloc-notes, le plan et l'historique des versions, touchés depuis la V22)
   V13.1 (3.4.1) — 25/10/2026 (pastilles « Nos engagements »)
   V13 (3.4.0) — 25/10/2026 (bulle du premier clic sur le micro, protection des données)
   V12 (3.3.0) — 25/10/2026 (dictée : calque, voyant et pastille dans les 4 thèmes)
   Créé en V11 (3.2.0) — 25/10/2026

   Quatre thèmes qui transforment VRAIMENT l'interface (pas seulement les
   couleurs). Ce fichier est chargé APRÈS style.css : ses règles l'emportent.
   Chaque règle commence par [data-theme="…"] : elle ne s'applique que si
   l'attribut data-theme de la balise <html> a cette valeur (choix « Thème »
   de l'en-tête, mémorisé dans le navigateur).

   SOMMAIRE
     0.  Mode d'emploi (comment lire ce fichier)
     1.  Windows 95  — bureau bleu-vert, fenêtres grises en relief,
                       barres de titre bleues, barre des tâches
         1.1 Jetons   1.2 Bureau et base   1.3 Fenêtres   1.4 Barres de titre
         1.5 En-tête et onglets   1.6 Boutons   1.7 Champs et cases
         1.8 Éditeur et jauges   1.9 Statistiques et groupes d'outils
         1.10 Bloc-notes   1.11 Comparaison, variables, tableaux
         1.12 Fenêtres, menus, palette, notifications, infobulles
         1.13 Succès et barre des tâches   1.14 Ascenseurs   1.15 Petits écrans
     2.  Terminal rétro — écran noir, texte vert phosphore, police à chasse fixe,
                       titres posés sur les cadres, vidéo inversée
     3.  Macintosh 1984 — noir et blanc pur (1 bit), fenêtres à rayures,
                       motifs à la place des couleurs
     4.  Contraste élevé — accessibilité (texte blanc sur noir, jaune pour
                       le focus, les liens et les boutons enfoncés)
     4 bis. Commun aux 4 thèmes : très petits écrans (320 px)
     5.  Mode « couleurs forcées » de Windows (tous les thèmes)

   Chaque thème couvre aussi les composants ajoutés en V11 : jauges des
   succès, sous-onglets de l'onglet Variables, bulle et corrections de la
   dictée, fenêtre « Nouveautés » et son bouton dans l'en-tête.

   PRINCIPES COMMUNS
     • Chaque thème redéfinit TOUS les jetons de couleur (variables --fond,
       --texte, --accent…). Un élément qui n'est pas retouché ici reste donc
       cohérent avec le thème.
     • Les contrastes des jetons sont vérifiés automatiquement
       (tests/test-navigateur.py, étape 8) : texte 4,5:1, couleurs de
       famille et de catégorie 3:1.
     • Jamais de taille de police en px pour le texte : rem / em, pour
       respecter le zoom et le réglage « Taille du texte ».
     • Aucune animation. Aucune ressource externe : les petits dessins
       (boutons de fenêtre, flèches, coches) sont des images SVG écrites
       directement dans le CSS (« data: »), autorisées par la politique de
       sécurité du site.
   ========================================================================== */

/* ==========================================================================
   0. MODE D'EMPLOI
   --------------------------------------------------------------------------
   • Spécificité : [data-theme="x"] .btn compte comme 2 classes, donc plus
     fort que .btn (1 classe) de style.css. Quand style.css utilise déjà
     2 classes (ex. .btn:hover), notre règle gagne parce qu'elle est écrite
     PLUS LOIN (même force → la dernière l'emporte).
   • Astuce du « relief » (Windows 95) : un bord de 1 px avec 4 couleurs
     différentes (border-color: haut droite bas gauche) + une ombre
     INTÉRIEURE de 1 px (box-shadow: inset). Clair en haut à gauche, foncé
     en bas à droite = l'objet semble sortir de l'écran ; on inverse les
     couleurs pour qu'il semble enfoncé.
   • Astuce des « barres de titre » : la carte a une marge intérieure
     connue (--w95-marge, --mac-marge) ; le titre reçoit une marge NÉGATIVE
     de la même valeur, ce qui l'étire jusqu'aux bords de la carte.
   • Zone de texte de l'Analyse : le texte coloré (#surlignage) est une
     copie placée DERRIÈRE la zone de saisie ; les deux couches doivent
     garder exactement la même police, la même taille et les mêmes bords,
     sinon les couleurs seraient décalées. On ne change donc la police
     qu'avec les jetons (--police), qui s'appliquent aux deux couches.
   ========================================================================== */


/* ##########################################################################
   1. THÈME « WINDOWS 95 »
   ########################################################################## */

/* --------------------------------------------------------------------------
   1.1 Jetons
   -------------------------------------------------------------------------- */
[data-theme="windows95"] {
  /* --fond reste gris : c'est la couleur « sous le texte ». Le bureau
     bleu-vert (#008080) est posé directement sur <body> (voir 1.2), car
     aucun texte n'est écrit directement sur le bureau. */
  --fond: #c0c0c0;
  --fond-carte: #c0c0c0;          /* gris des fenêtres */
  --fond-sourd: #c0c0c0;
  --fond-saisie: #ffffff;         /* champs blancs « creusés » */
  --texte: #000000;
  --texte-2: #222222;
  --texte-3: #404040;             /* 5,7:1 sur le gris */
  --bordure: #808080;
  --bordure-forte: #404040;
  --accent: #000080;              /* bleu marine des barres de titre */
  --accent-fort: #000080;
  --accent-doux: #ffffff;
  --sur-accent: #ffffff;
  --danger: #800000;
  --danger-doux: #ffffff;
  --succes: #005200;
  --avertissement: #703800;
  --info: #0000a0;

  /* Familles d'outils : couleurs de la palette Windows à 16 couleurs,
     assombries quand il le fallait pour atteindre 3:1 sur le gris. */
  --fam-nettoyage: #006060;
  --fam-transformation: #600080;
  --fam-developpeur: #000080;
  --fam-export: #5c5c00;
  --fam-generateur: #800040;
  --fam-motsVides: #006000;
  --fam-redaction: #804000;
  --cat-rouge: #800000;
  --cat-orange: #804000;
  --cat-jaune: #5c5c00;
  --cat-vert: #006000;
  --cat-turquoise: #006060;
  --cat-bleu: #000080;
  --cat-violet: #600080;
  --cat-gris: #404040;

  /* Coloration du texte (sur fond blanc). */
  --c-voyelle: #a00000;
  --c-consonne: #0000a0;
  --c-chiffre: #6b5200;
  --c-chiffre-fond: rgba(255, 255, 0, 0.45);
  --c-ponctuation: #800080;
  --c-espace-fond: rgba(0, 128, 128, 0.3);
  --r-longue: rgba(255, 255, 0, 0.5);
  --r-tres-longue: rgba(255, 0, 0, 0.3);
  --r-adverbe: rgba(0, 0, 255, 0.22);
  --r-tournure: rgba(128, 0, 128, 0.25);
  --r-repetition: rgba(255, 128, 0, 0.3);
  --r-repetition-trait: #804000;
  --r-invisible: #ff0000;
  --r-insecable: rgba(0, 128, 0, 0.3);
  /* Surlignage de recherche = sélection Windows (bleu marine, texte blanc). */
  --surligne-fond: #000080;
  --surligne-texte: #ffffff;
  --diff-suppr-fond: #ffe0e0;
  --diff-suppr-marque: #ffa8a8;
  --diff-suppr-fort: #800000;
  --diff-ajout-fond: #e0f4e0;
  --diff-ajout-marque: #a8e0a8;
  --diff-ajout-fort: #005200;
  --diff-modif-fond: #ffffe1;

  --rayon: 0;
  --rayon-carte: 0;
  --ombre: 0 0 0 0 transparent;   /* pas d'ombre floue sous Windows 95 */
  --ombre-forte: 0 0 0 0 transparent;
  --police: "Microsoft Sans Serif", "MS Sans Serif", Tahoma, Arial, sans-serif;
  --police-titre: "Microsoft Sans Serif", "MS Sans Serif", Tahoma, Arial, sans-serif;
  --police-chiffres: "Lucida Console", "Courier New", "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;

  /* Jetons propres à ce thème. */
  --w95-bureau: #008080;
  --w95-marge: 0.75rem;           /* marge intérieure commune des fenêtres */
  /* Dégradé des barres de titre : bleu marine plein sur le premier tiers
     (là où s'écrit le titre : texte blanc lisible), puis bleu clair. */
  --w95-titre: linear-gradient(90deg, #000080 0%, #000080 35%, #1084d0 100%);
  /* Les 4 reliefs : couleurs du bord (haut droite bas gauche) + ombre intérieure. */
  --w95-bord-fenetre: #dfdfdf #000000 #000000 #dfdfdf;
  --w95-relief-fenetre: inset 1px 1px #ffffff, inset -1px -1px #808080;
  --w95-bord-bouton: #ffffff #000000 #000000 #ffffff;
  --w95-relief-bouton: inset 1px 1px #dfdfdf, inset -1px -1px #808080;
  --w95-bord-enfonce: #000000 #ffffff #ffffff #000000;
  --w95-relief-enfonce: inset 1px 1px #808080, inset -1px -1px #dfdfdf;
  --w95-bord-champ: #808080 #ffffff #ffffff #808080;
  --w95-relief-champ: inset 1px 1px #000000, inset -1px -1px #dfdfdf;
  /* Trame « damier » 1 pixel blanc / 1 pixel gris : fond des boutons
     enfoncés (bascules) et des rails d'ascenseur sous Windows 95. */
  --w95-trame: repeating-conic-gradient(#ffffff 0 25%, #c0c0c0 0 50%) 0 0 / 2px 2px;
  /* Les 3 faux boutons de fenêtre (réduire, agrandir, fermer) dessinés
     pixel par pixel dans une petite image SVG de 50 × 14. */
  --w95-boutons-fenetre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 14' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M0 0h32v14H0zM34 0h16v14H34z'/%3E%3Cpath fill='%23fff' d='M0 0h15v13H0zM16 0h15v13H16zM34 0h15v13H34z'/%3E%3Cpath fill='%23808080' d='M1 1h14v12H1zM17 1h14v12H17zM35 1h14v12H35z'/%3E%3Cpath fill='%23c0c0c0' d='M1 1h13v11H1zM17 1h13v11H17zM35 1h13v11H35z'/%3E%3Cpath fill='%23000' d='M4 9h6v2H4zM20 2h9v9h-9zM38 3h2v1h-2zM44 3h2v1h-2zM39 4h2v1h-2zM43 4h2v1h-2zM40 5h4v1h-4zM41 6h2v1h-2zM40 7h4v1h-4zM39 8h2v1h-2zM43 8h2v1h-2zM38 9h2v1h-2zM44 9h2v1h-2z'/%3E%3Cpath fill='%23c0c0c0' d='M21 4h7v6h-7z'/%3E%3C/svg%3E");
  /* Petites flèches noires en pixels (listes déroulantes, ascenseurs). */
  --w95-fleche-bas: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 4' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h7v1H0zM1 1h5v1H1zM2 2h3v1H2zM3 3h1v1H3z'/%3E%3C/svg%3E");
  --w95-fleche-haut: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 4' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h1v1H3zM2 1h3v1H2zM1 2h5v1H1zM0 3h7v1H0z'/%3E%3C/svg%3E");
  --w95-fleche-gauche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 7' shape-rendering='crispEdges'%3E%3Cpath d='M3 0h1v7H3zM2 1h1v5H2zM1 2h1v3H1zM0 3h1v1H0z'/%3E%3C/svg%3E");
  --w95-fleche-droite: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 7' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h1v7H0zM1 1h1v5H1zM2 2h1v3H2zM3 3h1v1H3z'/%3E%3C/svg%3E");
  /* Coche de case à cocher, en pixels (7 × 7). */
  --w95-coche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' shape-rendering='crispEdges'%3E%3Cpath d='M6 0h1v1H6zM5 1h2v1H5zM0 2h1v1H0zM4 2h3v1H4zM0 3h2v1H0zM3 3h3v1H3zM0 4h5v1H0zM1 5h3v1H1zM2 6h1v1H2z'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   1.2 Bureau, polices, sélection, focus
   -------------------------------------------------------------------------- */
[data-theme="windows95"] body {
  background: var(--w95-bureau);
  color: #000000;
}

/* Aucun angle arrondi dans tout le thème (les boutons radio, ronds sous
   Windows 95, retrouvent leur rond plus bas). */
[data-theme="windows95"] *,
[data-theme="windows95"] *::before,
[data-theme="windows95"] *::after { border-radius: 0; }
[data-theme="windows95"] mark.surligne { border-radius: 0; }

/* Texte sélectionné : bleu marine, texte blanc, comme sous Windows. */
[data-theme="windows95"] ::selection { background: #000080; color: #ffffff; }

/* Focus clavier : le fameux rectangle en pointillés. Pour rester bien
   visible, il est noir, épais de 2 px. Dans les boutons, il se dessine
   à l'INTÉRIEUR (décalage négatif), comme sous Windows 95. */
[data-theme="windows95"] :focus-visible { outline: 2px dotted #000000; outline-offset: 2px; }
[data-theme="windows95"] .btn:focus-visible,
[data-theme="windows95"] .btn-outil:focus-visible,
[data-theme="windows95"] .onglet:focus-visible,
[data-theme="windows95"] .commande:focus-visible,
[data-theme="windows95"] .notification__action:focus-visible,
[data-theme="windows95"] .notification__fermer:focus-visible,
[data-theme="windows95"] .badge-alerte:focus-visible { outline-offset: -5px; }
[data-theme="windows95"] .segmente__option input:focus-visible + span { outline: 2px dotted #000000; outline-offset: -5px; }
/* Éléments de liste dans une zone qui défile : contour intérieur (sinon coupé). */
[data-theme="windows95"] .note-item__bouton:focus-visible,
[data-theme="windows95"] .plan__bouton:focus-visible,
[data-theme="windows95"] .version-item__bouton:focus-visible,
[data-theme="windows95"] .menu__item:focus-visible,
[data-theme="windows95"] .notes__stockage:focus-visible { outline-offset: -3px; }

[data-theme="windows95"] a { color: #000080; }
[data-theme="windows95"] a:hover { color: #0000ff; }

[data-theme="windows95"] .lien-evitement {
  background: #ffffe1;
  color: #000000;
  border: 1px solid #000000;
}

/* --------------------------------------------------------------------------
   1.3 Fenêtres : cartes, panneaux, boîtes de dialogue, menus…
   --------------------------------------------------------------------------
   Toutes ces boîtes deviennent des « fenêtres » grises en relief. */
[data-theme="windows95"] .carte,
[data-theme="windows95"] .panneau-repliable,
[data-theme="windows95"] .groupe,
[data-theme="windows95"] .succes,
[data-theme="windows95"] .dialogue,
[data-theme="windows95"] .menu__liste,
[data-theme="windows95"] .notification,
[data-theme="windows95"] .focus-barre,
[data-theme="windows95"] .barre-lecture,
[data-theme="windows95"] .bandeau-organiser,
[data-theme="windows95"] .alerte,
[data-theme="windows95"] .pied__contenu,
[data-theme="windows95"] .entete {
  background: #c0c0c0;
  color: #000000;
  border: 1px solid;
  border-color: var(--w95-bord-fenetre);
  box-shadow: var(--w95-relief-fenetre);
}

/* Même marge intérieure pour toutes les cartes : les barres de titre
   peuvent ainsi s'étirer jusqu'aux bords (voir 1.4). */
[data-theme="windows95"] .carte { padding: var(--w95-marge); }

/* Carte « Limites » quand les limites portent sur la sélection : liseré bleu. */
[data-theme="windows95"] .carte--limites-selection {
  box-shadow: var(--w95-relief-fenetre), 0 0 0 2px #000080;
}

/* Groupe « gravé » (cadre en creux) : un trait gris + un trait blanc
   décalé d'un pixel, comme les cadres de regroupement de Windows. */
[data-theme="windows95"] .panneau-outil,
[data-theme="windows95"] .cmp-reglages,
[data-theme="windows95"] .guide__regles li,
[data-theme="windows95"] .modele,
[data-theme="windows95"] .import-apercu,
[data-theme="windows95"] .anon__table,
[data-theme="windows95"] .trophee {
  background: transparent;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px #ffffff, 1px 1px #ffffff;
}

/* Titre d'un panneau à champs posé SUR le trait du cadre (comme une
   légende de cadre Windows) : on le remonte de la moitié de sa hauteur
   et on lui donne le fond gris pour « couper » le trait. */
[data-theme="windows95"] .panneau-outil { margin-top: 0.75rem; }
[data-theme="windows95"] .panneau-outil > .panneau-outil__titre {
  width: fit-content;
  max-width: 100%;
  margin: calc(-0.9rem - 1px - 0.65em) 0 0.6rem -0.35rem;
  padding: 0 0.35rem;
  background: #c0c0c0;
  font: 400 0.92rem/1.3 var(--police);
}
[data-theme="windows95"] .panneau-outil__titre i { color: var(--famille, #000080); }

/* --------------------------------------------------------------------------
   1.4 Barres de titre (bleu marine) et faux boutons de fenêtre
   -------------------------------------------------------------------------- */
[data-theme="windows95"] .carte > .titre-section,
[data-theme="windows95"] .carte > .carte__titre,
[data-theme="windows95"] .carte__entete > .titre-section,
[data-theme="windows95"] .notes__barre-entete,
[data-theme="windows95"] .notes__plan-titre,
[data-theme="windows95"] .notes__accueil > .titre-section,
[data-theme="windows95"] .succes__entete .titre-section {
  position: relative;
  display: flex;
  flex: 1 1 100%;
  align-self: stretch;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  min-height: 1.6rem;
  /* 2px = l'épaisseur du relief de la fenêtre, qu'on laisse visible. */
  margin: calc(2px - var(--w95-marge)) calc(2px - var(--w95-marge)) 0.75rem;
  padding: 0.2rem 3.75rem 0.2rem 0.45rem;   /* à droite : place des 3 boutons */
  background: var(--w95-titre);
  color: #ffffff;
  font: 700 0.95rem/1.25 var(--police);
  letter-spacing: 0;
  text-align: left;
}
/* Les 3 boutons dessinés (_ □ ×) : simple décor, ils ne sont pas cliquables. */
[data-theme="windows95"] .carte > .titre-section::after,
[data-theme="windows95"] .carte > .carte__titre::after,
[data-theme="windows95"] .carte__entete > .titre-section::after,
[data-theme="windows95"] .notes__barre-entete::after,
[data-theme="windows95"] .notes__plan-titre::after,
[data-theme="windows95"] .notes__accueil > .titre-section::after,
[data-theme="windows95"] .succes__entete .titre-section::after,
[data-theme="windows95"] .entete__titre::after,
[data-theme="windows95"] .dialogue--palette::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.25rem;
  width: 3.125rem;
  height: 0.875rem;
  margin-top: -0.4375rem;
  background: var(--w95-boutons-fenetre) center / 100% 100% no-repeat;
  pointer-events: none;
}
/* Tout ce qui est dans une barre de titre passe en blanc. (Attention : on
   ne touche pas à la police des icônes <i>, sinon elles disparaissent.) */
[data-theme="windows95"] .carte__titre i,
[data-theme="windows95"] .notes__plan-titre i,
[data-theme="windows95"] .titre-section i { color: inherit; }
[data-theme="windows95"] .notes__barre-entete .titre-section { color: inherit; font: inherit; }
[data-theme="windows95"] .notes__barre-entete .notes__compte { color: #dfdfdf; font-family: var(--police-chiffres); }
[data-theme="windows95"] .titre-section .etiquette-profil { color: #ffffff; border-color: #ffffff; }
[data-theme="windows95"] .carte--scrabble .carte__titre { color: #ffffff; }
/* Accueil du Bloc-notes : la barre de titre passe en premier (order: -1). */
[data-theme="windows95"] .notes__accueil {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 1.6rem;
}
[data-theme="windows95"] .notes__accueil > .titre-section { order: -1; }

/* --------------------------------------------------------------------------
   1.5 En-tête (fenêtre de l'application) et onglets
   -------------------------------------------------------------------------- */
[data-theme="windows95"] .entete {
  width: calc(100% - 3rem);
  max-width: calc(var(--largeur-max) - 3rem);
  margin: 1.25rem auto 0;
}
[data-theme="windows95"] .entete__contenu { padding: 0 0.75rem 0.5rem; gap: 0.6rem 1.5rem; }
/* Le titre de la page devient la barre de titre de la fenêtre. */
[data-theme="windows95"] .entete__titre {
  position: relative;
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.75rem;
  margin: 2px -0.625rem 0;        /* -0.75rem + 2px : jusqu'au relief */
  padding: 0.25rem 4rem 0.3rem 0.5rem;
  background: var(--w95-titre);
  color: #ffffff;
}
[data-theme="windows95"] .entete__titre h1 {
  font: 700 1.15rem/1.3 var(--police);
  letter-spacing: 0;
}
[data-theme="windows95"] .entete__titre p { color: #ffffff; font-size: 0.85rem; }
[data-theme="windows95"] .entete__titre::after { top: 0.3rem; margin-top: 0; }
[data-theme="windows95"] .reglage__libelle {
  color: #000000;
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
[data-theme="windows95"] .reglage__libelle i { color: #000080; }

/* Onglets : le contrôle à onglets de Windows 95. Un trait blanc court sous
   les onglets ; l'onglet choisi est plus haut, plus large, et recouvre ce
   trait : il semble relié au panneau du dessous. */
[data-theme="windows95"] .onglets { border-top: 0; padding: 0 0.75rem 0.6rem; }
[data-theme="windows95"] .onglets__contenu {
  align-items: flex-end;
  gap: 0;
  padding: 0.35rem 0.3rem 0;
  /* trait blanc dessiné en fond (et non en bordure) pour que l'onglet
     choisi puisse le recouvrir sans être coupé par le défilement. */
  background: linear-gradient(#ffffff, #ffffff) left bottom / 100% 1px no-repeat;
  scrollbar-width: auto;
}
[data-theme="windows95"] .onglet {
  position: relative;
  margin: 0 0 1px;
  padding: 0.3rem 0.85rem;
  border: 1px solid;
  border-bottom: 0;
  border-color: #ffffff #000000 transparent #ffffff;
  box-shadow: inset 1px 1px #dfdfdf, inset -1px 0 #808080;
  background: #c0c0c0;
  color: #000000;
  font: 400 0.9rem/1.2 var(--police);
}
[data-theme="windows95"] .onglet:hover { background: #c0c0c0; color: #000000; }
[data-theme="windows95"] .onglet[aria-selected="true"] {
  z-index: 1;
  margin: 0 -2px;
  padding: 0.45rem 1.05rem 0.4rem;
  color: #000000;
  background: #c0c0c0;
  font-weight: 700;
}
[data-theme="windows95"] .onglet i { color: #000080; }

/* Bouton « Nouveautés » posé dans la barre de titre : petit bouton gris. */
[data-theme="windows95"] .entete__nouveautes {
  min-height: 1.6rem;
  background: #c0c0c0;
  color: #000000;
  border: 1px solid;
  border-color: var(--w95-bord-bouton);
  box-shadow: var(--w95-relief-bouton);
  font-weight: 400;
}
[data-theme="windows95"] .entete__nouveautes:hover { background: #c0c0c0; border-color: var(--w95-bord-bouton); }
[data-theme="windows95"] .entete__nouveautes:active { border-color: var(--w95-bord-enfonce); box-shadow: var(--w95-relief-enfonce); }
[data-theme="windows95"] .entete__nouveautes:focus-visible { outline-offset: -5px; }
[data-theme="windows95"] .entete__nouveautes i { color: #000080; }
[data-theme="windows95"] .entete__nouveautes-version { color: #404040; }
[data-theme="windows95"] .entete__sous-titre { color: #ffffff; }

/* Sous-onglets de l'onglet Variables : un vrai contrôle à onglets de
   Windows 95, collé à la fenêtre qui suit. Astuce : la rangée d'onglets
   chevauche le haut de la fenêtre de 2 px (marge négative) ; l'onglet
   choisi descend jusqu'en bas de la rangée et cache ainsi le bord de la
   fenêtre sous lui ; les autres s'arrêtent 2 px plus haut. */
[data-theme="windows95"] .var-sections {
  position: relative;
  z-index: 1;
  align-items: flex-end;
  gap: 0;
  margin-bottom: -2px;
  padding: 0 0.4rem;
  border-bottom: 0;
}
[data-theme="windows95"] .var-section-onglet {
  min-height: 2.1rem;
  margin: 0 0 2px;
  padding: 0.3rem 0.85rem;
  border: 1px solid;
  border-bottom: 0;
  border-color: #ffffff #000000 transparent #ffffff;
  box-shadow: inset 1px 1px #dfdfdf, inset -1px 0 #808080;
  background: #c0c0c0;
  color: #000000;
  font-weight: 400;
}
[data-theme="windows95"] .var-section-onglet:hover { background: #c0c0c0; color: #000000; }
[data-theme="windows95"] .var-section-onglet[aria-selected="true"] {
  position: relative;
  min-height: 2.45rem;
  margin: 0 -2px;
  padding: 0.45rem 1.05rem 0.4rem;
  border-color: #dfdfdf #000000 transparent #dfdfdf;
  box-shadow: inset 1px 1px #ffffff, inset -1px 0 #808080;
  background: #c0c0c0;
  color: #000000;
  font-weight: 700;
}
[data-theme="windows95"] .var-section-onglet:focus-visible { outline-offset: -5px; }
[data-theme="windows95"] .var-section-onglet i { color: #000080; }

/* --------------------------------------------------------------------------
   1.6 Boutons : relief « sorti », enfoncé au clic et quand aria-pressed="true"
   -------------------------------------------------------------------------- */
[data-theme="windows95"] .btn,
[data-theme="windows95"] .btn-outil,
[data-theme="windows95"] .segmente__option > span,
[data-theme="windows95"] .notification__action,
[data-theme="windows95"] .badge-alerte {
  background: #c0c0c0;
  color: #000000;
  border: 1px solid;
  border-color: var(--w95-bord-bouton);
  box-shadow: var(--w95-relief-bouton);
  font-family: var(--police);
  font-weight: 400;
  transition: none;
}
/* Sous Windows 95, un bouton ne change pas au survol. */
[data-theme="windows95"] .btn:hover,
[data-theme="windows95"] .btn-outil:hover,
[data-theme="windows95"] .segmente__option > span:hover,
[data-theme="windows95"] .notification__action:hover,
[data-theme="windows95"] .badge-alerte:hover {
  background: #c0c0c0;
  color: #000000;
  border-color: var(--w95-bord-bouton);
}
[data-theme="windows95"] .badge-alerte,
[data-theme="windows95"] .badge-alerte:hover { color: var(--avertissement); }

/* Enfoncé : on inverse le relief et on décale le contenu d'un pixel.
   Bouton « bascule » enfoncé : fond en damier, comme dans les barres
   d'outils de Windows 95. */
[data-theme="windows95"] .btn:active,
[data-theme="windows95"] .btn-outil:active,
[data-theme="windows95"] .notification__action:active,
[data-theme="windows95"] .badge-alerte:active,
[data-theme="windows95"] .btn[aria-pressed="true"],
[data-theme="windows95"] .menu[open] > summary.btn,
[data-theme="windows95"] .note-meta-bascule[aria-expanded="true"],
[data-theme="windows95"] .segmente__option input:checked + span {
  border-color: var(--w95-bord-enfonce);
  box-shadow: var(--w95-relief-enfonce);
}
[data-theme="windows95"] .btn[aria-pressed="true"],
[data-theme="windows95"] .menu[open] > summary.btn,
[data-theme="windows95"] .note-meta-bascule[aria-expanded="true"],
[data-theme="windows95"] .segmente__option input:checked + span {
  background: var(--w95-trame);
  color: #000000;
}
[data-theme="windows95"] .btn:active > *,
[data-theme="windows95"] .btn[aria-pressed="true"] > *,
[data-theme="windows95"] .btn-outil:active > *,
[data-theme="windows95"] .segmente__option input:checked + span > * { transform: translate(1px, 1px); }
[data-theme="windows95"] .btn-bascule[aria-pressed="true"]::after { color: #000080; }
[data-theme="windows95"] .btn-micro[aria-pressed="true"] { color: #800000; }

/* Bouton principal = « bouton par défaut » de Windows : un cadre noir
   autour du relief habituel. */
[data-theme="windows95"] .btn--principal,
[data-theme="windows95"] .btn--principal:hover {
  border-color: #000000;
  box-shadow: inset 1px 1px #ffffff, inset -1px -1px #000000, inset 2px 2px #dfdfdf, inset -2px -2px #808080;
  font-weight: 700;
}
[data-theme="windows95"] .btn--principal:active {
  border-color: #000000;
  box-shadow: inset 0 0 0 1px #808080;
}
[data-theme="windows95"] .btn--danger,
[data-theme="windows95"] .btn--danger:hover { color: #800000; }

/* Bouton discret = bouton « plat » : le relief n'apparaît qu'au survol. */
[data-theme="windows95"] .btn--discret,
[data-theme="windows95"] .commande,
[data-theme="windows95"] .notes__stockage,
[data-theme="windows95"] .notification__fermer {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  color: #000000;
}
[data-theme="windows95"] .btn--discret:hover,
[data-theme="windows95"] .commande:hover,
[data-theme="windows95"] .notes__stockage:hover,
[data-theme="windows95"] .notification__fermer:hover {
  background: transparent;
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #000000;
}
[data-theme="windows95"] .btn--discret:active,
[data-theme="windows95"] .commande:active {
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: none;
}
[data-theme="windows95"] .notes__stockage { color: var(--texte-3); }

/* Bouton désactivé : texte gris « gravé » (ombre blanche décalée). */
[data-theme="windows95"] .btn:disabled,
[data-theme="windows95"] .btn:disabled:hover,
[data-theme="windows95"] .btn[aria-disabled="true"] {
  opacity: 1;
  color: #808080;
  text-shadow: 1px 1px #ffffff;
  background: #c0c0c0;
  border-color: var(--w95-bord-bouton);
  box-shadow: var(--w95-relief-bouton);
}
[data-theme="windows95"] .btn--discret:disabled { border-color: transparent; box-shadow: none; }

/* Boutons d'outils : relief simple ; la famille reste visible par la
   couleur de l'icône. */
[data-theme="windows95"] .btn-outil { text-align: left; }
[data-theme="windows95"] .btn-favori i { color: var(--famille, #000080); }

/* Boutons segmentés : une rangée de boutons collés. */
[data-theme="windows95"] .segmente__option > span { margin-left: 0; }
[data-theme="windows95"] .segmente__legende {
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #000000;
}

/* Petit bouton de légende de fenêtre (fermer des dialogues, notification,
   boutons de la barre de titre d'une note). */
[data-theme="windows95"] .dialogue__entete .btn,
[data-theme="windows95"] .notification__fermer,
[data-theme="windows95"] .notes__barre-entete .btn {
  width: 1.5rem;
  min-height: 0;
  height: 1.375rem;
  padding: 0;
  background: #c0c0c0;
  color: #000000;
  border: 1px solid;
  border-color: var(--w95-bord-bouton);
  box-shadow: var(--w95-relief-bouton);
  font-size: 0.75rem;
}
[data-theme="windows95"] .notes__barre-entete .btn { width: auto; padding: 0 0.4rem; gap: 0.3rem; }
[data-theme="windows95"] .dialogue__entete .btn:active,
[data-theme="windows95"] .notification__fermer:active {
  border-color: var(--w95-bord-enfonce);
  box-shadow: var(--w95-relief-enfonce);
}

/* --------------------------------------------------------------------------
   1.7 Champs (blancs et « creusés »), listes déroulantes, cases à cocher
   -------------------------------------------------------------------------- */
[data-theme="windows95"] .champ,
[data-theme="windows95"] .note-texte {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
  font-family: var(--police);
}
[data-theme="windows95"] .champ:hover { border-color: var(--w95-bord-champ); }
[data-theme="windows95"] .champ:focus,
[data-theme="windows95"] .note-texte:focus,
[data-theme="windows95"] .note-section__texte:focus,
[data-theme="windows95"] .zone-texte:focus {
  border-color: var(--w95-bord-champ);
  outline: 2px dotted #000000;
  outline-offset: 2px;
}
[data-theme="windows95"] .note-section__texte:focus { outline-offset: -3px; }
/* Zone de texte de l'Analyse : on ne touche qu'à la couleur des bords
   (même épaisseur que la couche colorée cachée derrière). */
[data-theme="windows95"] .zone-texte {
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
}
[data-theme="windows95"] .zone-saisie { background: #ffffff; }

/* Liste déroulante = « boîte combinée » de Windows 95 : un bouton gris
   avec une flèche, dessiné en fond par des dégradés d'une seule couleur
   (un dégradé de 1 px de large = un trait). Du haut vers le bas de la
   liste : flèche, traits noirs, traits gris, traits blancs, face grise. */
[data-theme="windows95"] select.champ {
  appearance: none;
  padding-right: 1.75rem;
  background-image:
    var(--w95-fleche-bas),
    linear-gradient(#000000, #000000), linear-gradient(#000000, #000000),
    linear-gradient(#808080, #808080), linear-gradient(#808080, #808080),
    linear-gradient(#ffffff, #ffffff), linear-gradient(#ffffff, #ffffff),
    linear-gradient(#c0c0c0, #c0c0c0);
  background-repeat: no-repeat;
  background-position:
    right calc(1px + 0.33rem) center,
    right 1px top 1px, right 1px bottom 1px,
    right 2px top 2px, right 2px bottom 2px,
    right 1px top 1px, right 1.1rem top 1px,
    right 1px top 1px;
  background-size:
    0.44rem 0.25rem,
    1px calc(100% - 2px), 1.1rem 1px,
    1px calc(100% - 4px), calc(1.1rem - 2px) 1px,
    1.1rem 1px, 1px calc(100% - 2px),
    1.1rem calc(100% - 2px);
}

/* Cases à cocher et boutons radio : carrés (ou ronds) blancs creusés. */
[data-theme="windows95"] .case input[type="checkbox"],
[data-theme="windows95"] .case input[type="radio"] {
  appearance: none;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0;
  background: #ffffff center / 0.4375rem 0.4375rem no-repeat;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
}
[data-theme="windows95"] .case input[type="checkbox"]:checked { background-image: var(--w95-coche); }
[data-theme="windows95"] .case input[type="radio"] { border-radius: 50%; }
[data-theme="windows95"] .case input[type="radio"]:checked {
  background-image: radial-gradient(circle, #000000 0 0.16rem, transparent 0.18rem);
  background-size: 100% 100%;
}
[data-theme="windows95"] .case { color: #000000; }

/* Champ de recherche et champs « titre » sans cadre. */
[data-theme="windows95"] .champ-recherche__icone { color: #404040; }

/* --------------------------------------------------------------------------
   1.8 Éditeur : barre d'outils, coloration, jauges (barres de progression)
   -------------------------------------------------------------------------- */
/* Barre d'outils : léger relief + « poignée » à gauche (deux traits). */
[data-theme="windows95"] .barre-outils {
  background: #c0c0c0;
  border: 1px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 0.3rem 0.4rem;
}
[data-theme="windows95"] .barre-outils::before {
  content: "";
  align-self: stretch;
  flex: 0 0 3px;
  min-height: 1.5rem;
  margin-right: 0.15rem;
  box-shadow: inset 1px 1px #ffffff, inset -1px -1px #808080;
}
/* Séparateurs « gravés » : un trait gris suivi d'un trait blanc. */
[data-theme="windows95"] .barre-outils__favoris,
[data-theme="windows95"] .note-barre .barre-outils__groupe + .barre-outils__groupe:not(.barre-outils__groupe--fin) {
  border-left: 1px solid #808080;
  box-shadow: inset 1px 0 #ffffff;
}
[data-theme="windows95"] .coloration,
[data-theme="windows95"] .note-meta,
[data-theme="windows95"] .notes__barre-pied,
[data-theme="windows95"] .notes__plan-aller,
[data-theme="windows95"] .limites__reglages,
[data-theme="windows95"] .perso__section,
[data-theme="windows95"] .succes__entete {
  border-color: #808080;
  box-shadow: inset 0 1px #ffffff;
}
[data-theme="windows95"] .note-meta,
[data-theme="windows95"] .perso__section { box-shadow: 0 1px #ffffff; }
[data-theme="windows95"] .pastille,
[data-theme="windows95"] .pastille-categorie { border: 1px solid #000000; }
[data-theme="windows95"] .resume-compact {
  background: #ffffff;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
  color: #000000;
}
[data-theme="windows95"] .portee--selection {
  background: #ffffe1;
  border: 1px solid #000000;
  color: #000000;
}

/* Barres de progression : rail creusé, remplissage en « blocs » séparés
   par des fentes grises (dégradé répétitif posé PAR-DESSUS la couleur). */
[data-theme="windows95"] .objectif__piste,
[data-theme="windows95"] .jauge__barre,
[data-theme="windows95"] .jauge-limite__piste {
  height: 1rem;
  padding: 1px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}
[data-theme="windows95"] .jauge-limite__piste { height: 0.8rem; }
[data-theme="windows95"] .objectif__remplissage,
[data-theme="windows95"] .jauge__remplissage,
[data-theme="windows95"] .jauge-limite__remplissage {
  background-image: repeating-linear-gradient(90deg, transparent 0 0.5rem, #c0c0c0 0.5rem 0.625rem);
}

/* Suggestions d'écriture : bulle jaune, comme les astuces de Windows. */
[data-theme="windows95"] .suggestions,
[data-theme="windows95"] .guide__pourquoi {
  background: #ffffe1;
  color: #000000;
  border: 1px solid #000000;
}
[data-theme="windows95"] .dictee-provisoire { background: #ffffff; border: 1px dashed #000080; color: #404040; }

/* --------------------------------------------------------------------------
   1.9 Statistiques, analyses, groupes d'outils
   -------------------------------------------------------------------------- */
[data-theme="windows95"] .stat { border-bottom-color: #808080; box-shadow: 0 1px #ffffff; }
[data-theme="windows95"] .stat:last-child { box-shadow: none; }
[data-theme="windows95"] .stat dt i { color: #000080; }
/* Statistique principale : un afficheur blanc creusé. */
[data-theme="windows95"] .stat--principale {
  margin: 0 0 0.4rem;
  padding: 0.5rem 0.6rem;
  background: #ffffff;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
}
[data-theme="windows95"] .stat--principale dd { color: #000080; }
/* Score Scrabble : affichage de calculatrice (chiffres à droite). */
[data-theme="windows95"] .scrabble__score {
  margin: 0.3rem 0;
  padding: 0.1rem 0.6rem;
  background: #ffffff;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
  color: #000000;
  text-align: right;
}
[data-theme="windows95"] .session__stat {
  background: #ffffff;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
}
[data-theme="windows95"] .session__stat dd { color: #000080; }

/* Accordéons et groupes d'outils : fermés = barre grise ; ouverts =
   barre de titre bleue (comme la fenêtre active de Windows). */
[data-theme="windows95"] .panneau-repliable__bascule,
[data-theme="windows95"] .groupe__bascule {
  margin: 2px;
  width: calc(100% - 4px);
  background: transparent;
  color: #000000;
  font-family: var(--police);
}
[data-theme="windows95"] .groupe__bascule { width: auto; }
[data-theme="windows95"] .panneau-repliable__bascule:hover,
[data-theme="windows95"] .groupe__bascule:hover { background: transparent; }
[data-theme="windows95"] .panneau-repliable__bascule[aria-expanded="true"],
[data-theme="windows95"] .groupe__bascule[aria-expanded="true"] {
  background: var(--w95-titre);
  color: #ffffff;
}
[data-theme="windows95"] .panneau-repliable__bascule > i:first-child { color: #000080; }
[data-theme="windows95"] .panneau-repliable__bascule[aria-expanded="true"] > i:first-child,
[data-theme="windows95"] .groupe__bascule[aria-expanded="true"] .groupe__icone,
[data-theme="windows95"] .groupe__bascule[aria-expanded="true"] .groupe__description { color: #ffffff; }
[data-theme="windows95"] .groupe__description { color: #404040; }
/* La flèche devient un petit bouton gris (la rotation à l'ouverture
   inverse son relief : il paraît enfoncé). */
[data-theme="windows95"] .panneau-repliable__bascule .chevron,
[data-theme="windows95"] .groupe__bascule .chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.05rem;
  background: #c0c0c0;
  color: #000000;
  border: 1px solid;
  border-color: var(--w95-bord-bouton);
  box-shadow: var(--w95-relief-bouton);
  font-size: 0.6rem;
  transition: none;
}
[data-theme="windows95"] .panneau-repliable__bascule:focus-visible,
[data-theme="windows95"] .groupe__bascule:focus-visible { outline-offset: -4px; }
[data-theme="windows95"] .panneau-repliable__bascule[aria-expanded="true"]:focus-visible,
[data-theme="windows95"] .groupe__bascule[aria-expanded="true"]:focus-visible { outline-color: #ffffff; }
[data-theme="windows95"] .groupe__organiser { border-left: 1px solid #808080; }
[data-theme="windows95"] .liste-mots-cles li { border-bottom-color: #dfdfdf; }
[data-theme="windows95"] .mot-cle__nombre { background: #ffffff; border: 1px solid #808080; color: #000080; }
[data-theme="windows95"] .mode-organiser .outil { border: 1px dashed #000000; background: transparent; }

/* --------------------------------------------------------------------------
   1.10 Bloc-notes
   -------------------------------------------------------------------------- */
/* Liste des notes = zone de liste blanche creusée ; note ouverte = ligne
   sélectionnée bleu marine. */
[data-theme="windows95"] .notes__liste,
[data-theme="windows95"] .plan,
[data-theme="windows95"] .versions__liste,
[data-theme="windows95"] .colonne-liste,
[data-theme="windows95"] .versions__contenu,
[data-theme="windows95"] .diff-flux__texte {
  background: #ffffff;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
}
[data-theme="windows95"] .notes__liste,
[data-theme="windows95"] .plan { padding: 2px; }
[data-theme="windows95"] .plan:empty { display: none; }
[data-theme="windows95"] .note-item,
[data-theme="windows95"] .version-item__bouton { border-bottom-color: #dfdfdf; }
[data-theme="windows95"] .note-item__bouton:hover,
[data-theme="windows95"] .plan__bouton:hover,
[data-theme="windows95"] .version-item__bouton:hover { background: transparent; }
[data-theme="windows95"] .note-item__bouton[aria-current="true"],
[data-theme="windows95"] .plan__bouton[aria-current="true"],
[data-theme="windows95"] .version-item__bouton[aria-current="true"],
[data-theme="windows95"] .palette__option[aria-selected="true"],
[data-theme="windows95"] .menu__item:hover,
[data-theme="windows95"] .menu__item:focus-visible {
  background: #000080;
  border-left-color: #000080;
  box-shadow: none;
  color: #ffffff;
}
/* Tout le contenu d'une ligne sélectionnée passe en blanc. */
[data-theme="windows95"] .note-item__bouton[aria-current="true"] *,
[data-theme="windows95"] .plan__bouton[aria-current="true"] *,
[data-theme="windows95"] .version-item__bouton[aria-current="true"] *,
[data-theme="windows95"] .palette__option[aria-selected="true"] *,
[data-theme="windows95"] .menu__item:hover *,
[data-theme="windows95"] .menu__item:focus-visible * { color: #ffffff; }
[data-theme="windows95"] .palette__option[aria-selected="true"] b { text-decoration: underline; }
[data-theme="windows95"] .note-item__bouton[aria-current="true"] .pastille-categorie { border-color: #ffffff; }
[data-theme="windows95"] .menu__item:focus-visible,
[data-theme="windows95"] .note-item__bouton[aria-current="true"]:focus-visible,
[data-theme="windows95"] .plan__bouton[aria-current="true"]:focus-visible,
[data-theme="windows95"] .version-item__bouton[aria-current="true"]:focus-visible { outline-color: #ffffff; }
[data-theme="windows95"] .notes__rappel { background: #ffffe1; border-left-color: #703800; }

/* Note ouverte : la ligne du titre devient la barre de titre de la
   fenêtre (le dégradé ne couvre que la 1re ligne de l'en-tête). */
[data-theme="windows95"] .note-entete {
  margin: calc(2px - var(--w95-marge)) calc(2px - var(--w95-marge)) 0.5rem;
  padding: 2px 3px 0;
  gap: 4px 3px;
  background: var(--w95-titre) 0 0 / 100% calc(2.1rem + 4px) no-repeat;
}
[data-theme="windows95"] .note-entete .note-sauvegarde { padding: 0 0.3rem; }
[data-theme="windows95"] .note-entete__titre {
  height: 2.1rem;
  margin: 0;
  padding: 0 0.4rem;
  border: 1px dotted transparent;
  background: transparent;
  color: #ffffff;
  font: 700 1rem/1.2 var(--police);
}
[data-theme="windows95"] .note-entete__titre::placeholder { color: #dfdfdf; font-style: italic; }
[data-theme="windows95"] .note-entete__titre:hover { border-color: #ffffff; }
/* En modification : le titre devient un champ blanc (comme « Renommer »). */
[data-theme="windows95"] .note-entete__titre:focus {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
  outline: 2px dotted #ffffff;
  outline-offset: 1px;
}
/* Ses boutons deviennent des boutons de barre de titre. */
[data-theme="windows95"] .note-entete .btn {
  width: 1.65rem;
  min-height: 0;
  height: 1.5rem;
  padding: 0;
  font-size: 0.72rem;
}
[data-theme="windows95"] .note-entete__epingle[aria-pressed="true"] i { color: #000080; }

/* Mode Sections : chaque section est une zone creusée ; la section active
   a sa barre bleue. */
[data-theme="windows95"] .note-section {
  background: #ffffff;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
  padding: 2px;
}
[data-theme="windows95"] .note-section__entete {
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
}
[data-theme="windows95"] .note-section--active .note-section__entete { background: var(--w95-titre); }
[data-theme="windows95"] .note-section--active .note-section__titre,
[data-theme="windows95"] .note-section--active .note-section__numero,
[data-theme="windows95"] .note-section--active .note-section__compte,
[data-theme="windows95"] .note-section--active .note-section__titre::placeholder { color: #ffffff; }
[data-theme="windows95"] .note-section__titre:hover { border-color: #808080; background: transparent; }
[data-theme="windows95"] .note-section--active .note-section__titre:hover { border-color: #ffffff; }
[data-theme="windows95"] .note-section__titre:focus,
[data-theme="windows95"] .note-section--active .note-section__titre:focus {
  background: #ffffff;
  color: #000000;
  outline: 2px dotted #000000;
  outline-offset: 0;
}
[data-theme="windows95"] .note-section__texte { background: #ffffff; }

/* --------------------------------------------------------------------------
   1.11 Comparaison, variables, tableaux
   -------------------------------------------------------------------------- */
/* Pastilles de résumé = cases de barre d'état (creusées). La couleur du
   liseré gauche (type de différence) vient de style.css. */
[data-theme="windows95"] .cmp-pastille {
  background: #c0c0c0;
  border-top-color: #808080;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
}
[data-theme="windows95"] .colonne-liste {
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  border-left-color: #808080;
}
[data-theme="windows95"] .colonne-liste__entete { background: #c0c0c0; border-bottom-color: #808080; }
[data-theme="windows95"] .colonne-liste__compte { background: #ffffff; border: 1px solid #808080; }
[data-theme="windows95"] .cmp-message { border-color: #808080; color: #000000; }

/* Tableaux = « vue détaillée » : fond blanc, en-têtes de colonnes en
   boutons gris en relief. */
[data-theme="windows95"] .tableau-var,
[data-theme="windows95"] .diff { background: #ffffff; }
[data-theme="windows95"] .tableau-var th,
[data-theme="windows95"] .diff th {
  background: #c0c0c0;
  color: #000000;
  border: 1px solid;
  border-color: var(--w95-bord-bouton);
  box-shadow: var(--w95-relief-bouton);
  font-family: var(--police);
  font-weight: 400;
}
[data-theme="windows95"] .tableau-var td,
[data-theme="windows95"] .diff td { border-bottom-color: #dfdfdf; }
[data-theme="windows95"] .tableau-defilant,
[data-theme="windows95"] .cmp-resultat:has(.diff) {
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
  background: #ffffff;
}
[data-theme="windows95"] .diff__repli td { background: #dfdfdf; }
[data-theme="windows95"] .diff__deplier:hover { background: #ffffff; text-decoration: underline; }
[data-theme="windows95"] .var-nom code { background: #ffffe1; border: 1px solid #808080; }

/* Petits éléments : touches de clavier en relief, code, badges. */
[data-theme="windows95"] kbd {
  background: #c0c0c0;
  color: #000000;
  border: 1px solid;
  border-color: var(--w95-bord-bouton);
  box-shadow: var(--w95-relief-bouton);
  font-family: var(--police);
  font-weight: 400;
}
[data-theme="windows95"] code { background: #ffffff; border-color: #808080; color: #000000; }
[data-theme="windows95"] .segmente__option code { background: transparent; border: 0; color: inherit; }
[data-theme="windows95"] .var-regles { background: #ffffe1; border: 1px solid #000000; border-left: 4px solid #000080; }
[data-theme="windows95"] .var-fiche__titre { color: #000080; font-family: var(--police); }
[data-theme="windows95"] .badge { border-color: #000000; color: #000000; }

/* --------------------------------------------------------------------------
   1.12 Boîtes de dialogue, menus, palette, notifications, infobulles
   -------------------------------------------------------------------------- */
/* Fond derrière une boîte de dialogue : la trame grise d'« Arrêter
   l'ordinateur » de Windows 95 (1 pixel sur 2). */
[data-theme="windows95"] .dialogue::backdrop {
  background: repeating-conic-gradient(rgba(0, 0, 0, 0.5) 0 25%, transparent 0 50%) 0 0 / 2px 2px;
}
[data-theme="windows95"] .dialogue { padding: 0; }
[data-theme="windows95"] .dialogue__entete {
  margin: 2px 2px 0;
  padding: 0.2rem 0.2rem 0.2rem 0.45rem;
  gap: 0.5rem;
  border-bottom: 0;
  background: var(--w95-titre);
  color: #ffffff;
}
[data-theme="windows95"] .dialogue__entete h2 { font: 700 0.95rem/1.25 var(--police); color: #ffffff; }
[data-theme="windows95"] .dialogue__corps { padding: 0.9rem 0.9rem 1rem; }
[data-theme="windows95"] .dialogue__pied {
  margin: 0 2px 2px;
  padding: 0.6rem 0.9rem;
  background: #c0c0c0;
  border-top: 1px solid #808080;
  box-shadow: inset 0 1px #ffffff;
}
[data-theme="windows95"] .dialogue__message { color: #000000; }
[data-theme="windows95"] .perso__titre { font: 700 0.95rem/1.3 var(--police); }
[data-theme="windows95"] .perso__titre i { color: #000080; }

/* Palette de commandes : une barre de titre sans texte, un champ creusé,
   une liste blanche. */
[data-theme="windows95"] .dialogue--palette { position: relative; }
[data-theme="windows95"] .dialogue--palette::before {
  position: static;
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 1.5rem;
  margin: 2px 2px 0;
  background: var(--w95-boutons-fenetre) right 0.25rem center / 3.125rem 0.875rem no-repeat, var(--w95-titre);
}
[data-theme="windows95"] .palette__champ {
  margin: 0.6rem 0.6rem 0.5rem;
  padding: 0.35rem 0.6rem;
  background: #ffffff;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
}
[data-theme="windows95"] .palette__champ:focus-within {
  box-shadow: var(--w95-relief-champ);
  outline: 2px dotted #000000;
  outline-offset: 2px;
}
[data-theme="windows95"] .palette__champ > i { color: #000000; }
[data-theme="windows95"] .palette__liste {
  margin: 0 0.6rem;
  background: #ffffff;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
}
[data-theme="windows95"] .palette__aide { margin: 0.4rem 2px 2px; border-top-color: #808080; color: #000000; }

/* Menus déroulants : fenêtre grise, ligne survolée en bleu marine,
   séparateur gravé. */
[data-theme="windows95"] .menu__liste { padding: 2px; }
[data-theme="windows95"] .menu__item { color: #000000; }
[data-theme="windows95"] .menu__item i { color: #000000; }
[data-theme="windows95"] .menu__item--danger,
[data-theme="windows95"] .menu__item--danger i { color: #800000; }
[data-theme="windows95"] .menu__separateur {
  margin: 0.2rem 2px;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
}

/* Notifications : petites fenêtres avec une fine barre de titre. */
[data-theme="windows95"] .notification {
  padding-top: calc(0.7rem + 0.35rem);
  background: var(--w95-titre) 2px 2px / calc(100% - 4px) 0.4rem no-repeat, #c0c0c0;
}
[data-theme="windows95"] .notification__fermer { width: 1.5rem; }

/* Infobulles : jaune pâle, cadre noir, comme sous Windows 95. */
[data-theme="windows95"] .infobulle {
  background: #ffffe1;
  color: #000000;
  border: 1px solid #000000;
  box-shadow: none;
  font-family: var(--police);
}

[data-theme="windows95"] .alerte > i { font-size: 1.15rem; }
[data-theme="windows95"] .bandeau-organiser > i { color: #000080; }
[data-theme="windows95"] .focus-barre,
[data-theme="windows95"] .barre-lecture { color: #000000; }

/* --------------------------------------------------------------------------
   1.13 Succès et pied de page (barre des tâches)
   -------------------------------------------------------------------------- */
[data-theme="windows95"] .succes {
  margin-top: 2rem;
  padding: var(--w95-marge);
}
[data-theme="windows95"] .succes__entete { border: 0; box-shadow: none; }
[data-theme="windows95"] .succes__entete p { color: #000000; }
/* Le titre est dans un bloc à côté du filtre : ce bloc prend toute la
   largeur pour que la barre de titre aille d'un bord à l'autre. */
[data-theme="windows95"] .succes__entete > div { flex: 1 1 100%; }
[data-theme="windows95"] .succes__filtre { margin-left: auto; }
[data-theme="windows95"] .pied__bas br { display: none; }
[data-theme="windows95"] .trophee__etat { color: #404040; }
/* Trophée obtenu : il « sort » (relief bouton) au lieu d'être gravé. */
[data-theme="windows95"] .trophee--obtenu {
  border-color: var(--w95-bord-bouton);
  box-shadow: var(--w95-relief-bouton);
}
[data-theme="windows95"] .trophee--obtenu .trophee__icone { color: #000080; }

/* Résumé et jauges de progression des succès (V11). */
[data-theme="windows95"] .succes-resume,
[data-theme="windows95"] .var-fiche,
[data-theme="windows95"] .var-regles-teepee,
[data-theme="windows95"] .historique-item {
  background: transparent;
  border: 1px solid #808080;
  box-shadow: inset 1px 1px #ffffff, 1px 1px #ffffff;
}
[data-theme="windows95"] .historique-item { border-left: 4px solid var(--cat-couleur); }
[data-theme="windows95"] .succes-resume__texte strong { color: #000080; }
[data-theme="windows95"] .succes-cat__titre { font: 700 1rem/1.3 var(--police); }
[data-theme="windows95"] .progression {
  height: 1rem;
  padding: 1px;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}
[data-theme="windows95"] .progression__barre {
  background-color: #000080;
  background-image: repeating-linear-gradient(90deg, transparent 0 0.5rem, #c0c0c0 0.5rem 0.625rem);
}
[data-theme="windows95"] .trophee--secret:not(.trophee--obtenu) { border-style: dashed; }
[data-theme="windows95"] .trophee__badge { border-color: #000080; color: #000080; background: #ffffe1; }

/* Saisie vocale (V11) : bulle d'information jaune, liste de corrections
   blanche et creusée. */
[data-theme="windows95"] .dictee-bulle--info {
  background: #ffffe1;
  color: #000000;
  border: 1px solid #000000;
  box-shadow: none;
}
[data-theme="windows95"] .dictee-corr { border-top-color: #808080; box-shadow: inset 0 1px #ffffff; }
[data-theme="windows95"] .dictee-corr__liste,
[data-theme="windows95"] .historique-frise {
  background: #ffffff;
  border: 1px solid;
  border-color: var(--w95-bord-champ);
  box-shadow: var(--w95-relief-champ);
}
[data-theme="windows95"] .dictee-corr__ligne { border-bottom-color: #dfdfdf; }

/* Fenêtre « Nouveautés » (V11). */
[data-theme="windows95"] .historique-filtres { background: #c0c0c0; border-bottom: 1px solid #808080; box-shadow: 0 1px #ffffff; }
[data-theme="windows95"] .historique-frise { margin: 0.5rem; }
[data-theme="windows95"] .historique-frise__lien:hover { background: #000080; color: #ffffff; }
[data-theme="windows95"] .historique-frise__lien:hover * { color: #ffffff; }
[data-theme="windows95"] .historique-version__titre { font: 700 1.1rem/1.3 var(--police); color: #000080; }
[data-theme="windows95"] .historique-cat { background: #ffffff; }

[data-theme="windows95"] .pied {
  margin-top: 2rem;
  background: transparent;
  border-top: 0;
}
[data-theme="windows95"] .pied__contenu {
  width: calc(100% - 3rem);
  max-width: calc(var(--largeur-max) - 3rem);
  margin: 0 auto 1.5rem;
  padding: 1rem 1.1rem;
}
[data-theme="windows95"] .pied__titre { font: 700 1rem/1.3 var(--police); }
[data-theme="windows95"] .pied__colonne p,
[data-theme="windows95"] .pied__liste { color: #000000; }
/* La dernière ligne du pied devient la barre des tâches : bouton
   « Démarrer » (simple décor) à gauche, numéro de version dans la zone
   de l'horloge à droite. Elle reste à sa place, en bas de la page
   (jamais « fixée » par-dessus le contenu). */
[data-theme="windows95"] .pied__bas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
  max-width: none;
  margin: 0;
  padding: 3px 4px;
  background: #c0c0c0;
  border-top: 1px solid #dfdfdf;
  box-shadow: inset 0 1px #ffffff;
  color: #000000;
  font-size: 0.8rem;
  text-align: left;
}
[data-theme="windows95"] .pied__bas::before {
  content: "Démarrer";
  content: "Démarrer" / "";        /* « / "" » : décor ignoré par les lecteurs d'écran */
  order: -1;
  margin-right: 0.35rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid;
  border-color: var(--w95-bord-bouton);
  box-shadow: var(--w95-relief-bouton);
  font-weight: 700;
}
[data-theme="windows95"]:lang(en) .pied__bas::before,
[data-theme="windows95"]:lang(de) .pied__bas::before { content: "Start"; content: "Start" / ""; }
[data-theme="windows95"]:lang(es) .pied__bas::before { content: "Inicio"; content: "Inicio" / ""; }
[data-theme="windows95"]:lang(ja) .pied__bas::before { content: "スタート"; content: "スタート" / ""; }
[data-theme="windows95"] .pied__version {
  order: 99;
  margin-left: auto;
  padding: 0.2rem 0.7rem;
  border: 1px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

/* --------------------------------------------------------------------------
   1.14 Ascenseurs (barres de défilement)
   --------------------------------------------------------------------------
   Chrome, Edge, Safari : pseudo-éléments ::-webkit-scrollbar (rail en
   damier, curseur et flèches en relief). Firefox ne les connaît pas : il
   reçoit seulement des couleurs (scrollbar-color). Attention : dans Chrome,
   scrollbar-color désactive ::-webkit-scrollbar ; on le réserve donc à
   Firefox avec @supports (-moz-appearance: none). */
[data-theme="windows95"] .notes__liste,
[data-theme="windows95"] .notes__plan { scrollbar-width: auto; }
[data-theme="windows95"]::-webkit-scrollbar,
[data-theme="windows95"] ::-webkit-scrollbar { width: 16px; height: 16px; }
[data-theme="windows95"]::-webkit-scrollbar-track,
[data-theme="windows95"] ::-webkit-scrollbar-track { background: var(--w95-trame); }
[data-theme="windows95"]::-webkit-scrollbar-thumb,
[data-theme="windows95"] ::-webkit-scrollbar-thumb,
[data-theme="windows95"]::-webkit-scrollbar-button,
[data-theme="windows95"] ::-webkit-scrollbar-button {
  background-color: #c0c0c0;
  border: 1px solid;
  border-color: var(--w95-bord-bouton);
  box-shadow: var(--w95-relief-bouton);
}
[data-theme="windows95"]::-webkit-scrollbar-button:single-button,
[data-theme="windows95"] ::-webkit-scrollbar-button:single-button {
  display: block;
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
}
[data-theme="windows95"]::-webkit-scrollbar-button:vertical:decrement,
[data-theme="windows95"] ::-webkit-scrollbar-button:vertical:decrement { background-image: var(--w95-fleche-haut); background-size: 7px 4px; }
[data-theme="windows95"]::-webkit-scrollbar-button:vertical:increment,
[data-theme="windows95"] ::-webkit-scrollbar-button:vertical:increment { background-image: var(--w95-fleche-bas); background-size: 7px 4px; }
[data-theme="windows95"]::-webkit-scrollbar-button:horizontal:decrement,
[data-theme="windows95"] ::-webkit-scrollbar-button:horizontal:decrement { background-image: var(--w95-fleche-gauche); background-size: 4px 7px; }
[data-theme="windows95"]::-webkit-scrollbar-button:horizontal:increment,
[data-theme="windows95"] ::-webkit-scrollbar-button:horizontal:increment { background-image: var(--w95-fleche-droite); background-size: 4px 7px; }
[data-theme="windows95"]::-webkit-scrollbar-button:active,
[data-theme="windows95"] ::-webkit-scrollbar-button:active { border-color: #808080; box-shadow: none; }
[data-theme="windows95"]::-webkit-scrollbar-corner,
[data-theme="windows95"] ::-webkit-scrollbar-corner { background: #c0c0c0; }
/* Chrome dessine aussi des flèches « doubles » (deux à chaque bout) :
   Windows 95 n'en avait qu'une à chaque extrémité. */
[data-theme="windows95"]::-webkit-scrollbar-button:start:increment,
[data-theme="windows95"] ::-webkit-scrollbar-button:start:increment,
[data-theme="windows95"]::-webkit-scrollbar-button:end:decrement,
[data-theme="windows95"] ::-webkit-scrollbar-button:end:decrement { display: none; }
@supports (-moz-appearance: none) {
  [data-theme="windows95"],
  [data-theme="windows95"] * { scrollbar-color: #c0c0c0 #dfdfdf; }
}

/* --------------------------------------------------------------------------
   1.15 Petits écrans
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
  /* Le bouton « Liste » apparaît dans la barre de titre « Mes notes » :
     il remplace les faux boutons de fenêtre. */
  [data-theme="windows95"] .notes__barre-entete { padding-right: 0.25rem; }
  [data-theme="windows95"] .notes__barre-entete::after { display: none; }
  /* Sur deux lignes, les boutons de la note sont sur le gris : taille normale. */
  [data-theme="windows95"] .note-entete .btn { width: 2.5rem; height: 2.25rem; font-size: 0.85rem; }
}
@media (max-width: 640px) {
  [data-theme="windows95"] .entete,
  [data-theme="windows95"] .pied__contenu { width: calc(100% - 2rem); }
  [data-theme="windows95"] .entete { margin-top: 1rem; }
  [data-theme="windows95"] .entete__titre { padding-right: 3.75rem; }
  [data-theme="windows95"] .onglets { padding: 0 0.4rem 0.5rem; }
  [data-theme="windows95"] .onglet { padding: 0.3rem 0.6rem; }
  [data-theme="windows95"] .onglet[aria-selected="true"] { padding: 0.45rem 0.8rem 0.4rem; }
  /* Les favoris passent sur leur propre ligne : plus de séparateur. */
  [data-theme="windows95"] .barre-outils__favoris { border-left: 0; box-shadow: none; }
}
/* Petit téléphone : style.css range les 4 onglets en grille de 2 × 2.
   Des onglets sur deux rangées ne peuvent plus « toucher » le panneau :
   ils deviennent des boutons, l'onglet choisi est enfoncé (damier). */
@media (max-width: 560px) {
  [data-theme="windows95"] .onglets__contenu { gap: 3px; padding: 0.4rem 0 0; background: none; }
  [data-theme="windows95"] .onglet,
  [data-theme="windows95"] .onglet[aria-selected="true"] {
    margin: 0;
    padding: 0.45rem 0.4rem;
    border: 1px solid;
    border-color: var(--w95-bord-bouton);
    box-shadow: var(--w95-relief-bouton);
  }
  [data-theme="windows95"] .onglet[aria-selected="true"] {
    border-color: var(--w95-bord-enfonce);
    box-shadow: var(--w95-relief-enfonce);
    background: var(--w95-trame);
  }
}


/* ##########################################################################
   2. THÈME « TERMINAL RÉTRO »
   ##########################################################################
   Écran cathodique monochrome : fond noir, texte vert phosphore légèrement
   lumineux, police à chasse fixe, cadres d'un pixel, aucun arrondi. */

/* --------------------------------------------------------------------------
   2.1 Jetons
   -------------------------------------------------------------------------- */
[data-theme="terminal"] {
  --fond: #030603;
  --fond-carte: #050b06;
  --fond-sourd: #0a160c;
  --fond-saisie: #020402;
  --texte: #33ff66;               /* vert phosphore */
  --texte-2: #2bd957;
  --texte-3: #1fa847;             /* vert atténué : ≥ 4,5:1 sur tous les fonds */
  --bordure: #12401c;
  --bordure-forte: #1f8a3c;
  --accent: #33ff66;
  --accent-fort: #8cffaa;
  --accent-doux: #0a2210;
  --sur-accent: #021a08;          /* texte foncé posé sur le vert (inversion) */
  --danger: #ff6e5e;
  --danger-doux: #2b0b08;
  --succes: #66ff99;
  --avertissement: #ffb627;       /* ambre */
  --info: #4fd8ff;                /* cyan */

  /* Couleurs « ANSI » des vieux terminaux pour les familles d'outils. */
  --fam-nettoyage: #33ff66;
  --fam-transformation: #e58cff;
  --fam-developpeur: #4fd8ff;
  --fam-export: #ffb627;
  --fam-generateur: #ff7aa8;
  --fam-motsVides: #c3ff4f;
  --fam-redaction: #ff9a3c;
  --cat-rouge: #ff6e5e;
  --cat-orange: #ff9a3c;
  --cat-jaune: #ffe14f;
  --cat-vert: #33ff66;
  --cat-turquoise: #3dffd8;
  --cat-bleu: #6ab8ff;
  --cat-violet: #c99bff;
  --cat-gris: #9cc8a6;

  --c-voyelle: #ff8a7a;
  --c-consonne: #6ab8ff;
  --c-chiffre: #ffd24f;
  --c-chiffre-fond: rgba(255, 210, 79, 0.16);
  --c-ponctuation: #e58cff;
  --c-espace-fond: rgba(51, 255, 102, 0.22);
  --r-longue: rgba(255, 182, 39, 0.28);
  --r-tres-longue: rgba(255, 110, 94, 0.34);
  --r-adverbe: rgba(79, 216, 255, 0.28);
  --r-tournure: rgba(229, 140, 255, 0.28);
  --r-repetition: rgba(255, 154, 60, 0.3);
  --r-repetition-trait: #ff9a3c;
  --r-invisible: #ff6e5e;
  --r-insecable: rgba(51, 255, 102, 0.3);
  --surligne-fond: #33ff66;
  --surligne-texte: #021a08;
  --diff-suppr-fond: #2b0e0b;
  --diff-suppr-marque: #6b1f17;
  --diff-suppr-fort: #ff6e5e;
  --diff-ajout-fond: #0b2b14;
  --diff-ajout-marque: #1b6b33;
  --diff-ajout-fort: #33ff66;
  --diff-modif-fond: #2b2509;

  --rayon: 0;
  --rayon-carte: 0;
  --ombre: 0 0 0 0 transparent;
  --ombre-forte: 0 0 1.2rem rgba(51, 255, 102, 0.16);
  --police: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --police-titre: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --police-chiffres: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;

  --term-marge: 1rem;
  --term-lueur: 0 0 3px rgba(51, 255, 102, 0.4);    /* halo du phosphore */
  --term-fleche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%2333ff66'/%3E%3C/svg%3E");
  /* Ascenseurs fins et verts (Chrome et Firefox). */
  scrollbar-color: #1f8a3c #030603;
}

/* --------------------------------------------------------------------------
   2.2 Base : halo, lignes de balayage, sélection, focus
   -------------------------------------------------------------------------- */
[data-theme="terminal"] body {
  background: var(--fond);
  color: var(--texte);
  text-shadow: var(--term-lueur);
}
/* Lignes de balayage d'un écran cathodique : un calque fixe, transparent
   aux clics (pointer-events: none), qui assombrit très légèrement une
   ligne de pixels sur trois. Il ne bouge pas (aucune animation). */
@media screen {
  [data-theme="terminal"] body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.16) 2px 3px);
  }
}
[data-theme="terminal"] *,
[data-theme="terminal"] *::before,
[data-theme="terminal"] *::after { border-radius: 0; }
[data-theme="terminal"] mark.surligne { border-radius: 0; text-shadow: none; }
[data-theme="terminal"] ::selection { background: #33ff66; color: #021a08; text-shadow: none; }
/* Focus : cadre ambre (bien distinct de l'inversion verte du survol). */
[data-theme="terminal"] :focus-visible { outline: 2px solid var(--avertissement); outline-offset: 2px; }
[data-theme="terminal"] .segmente__option input:focus-visible + span { outline: 2px solid var(--avertissement); outline-offset: 2px; }
[data-theme="terminal"] .note-item__bouton:focus-visible,
[data-theme="terminal"] .plan__bouton:focus-visible,
[data-theme="terminal"] .version-item__bouton:focus-visible,
[data-theme="terminal"] .menu__item:focus-visible,
[data-theme="terminal"] .notes__stockage:focus-visible { outline-offset: -3px; }
[data-theme="terminal"] a { color: var(--info); }
[data-theme="terminal"] a:hover { color: #9fe9ff; }
[data-theme="terminal"] .lien-evitement { color: var(--sur-accent); text-shadow: none; }

/* --------------------------------------------------------------------------
   2.3 En-tête : invite de commande et curseur en bloc
   -------------------------------------------------------------------------- */
[data-theme="terminal"] .entete {
  background: var(--fond);
  border-bottom: 1px solid var(--bordure-forte);
}
[data-theme="terminal"] .entete__titre h1 {
  font: 600 clamp(1.3rem, 3vw, 1.9rem)/1.2 var(--police);
  letter-spacing: 0;
}
/* « > » devant le titre ; « / "" » : décor ignoré par les lecteurs d'écran. */
[data-theme="terminal"] .entete__titre h1::before {
  content: "> ";
  content: "> " / "";
  color: var(--texte-3);
}
/* Curseur en bloc, FIXE (pas de clignotement). */
[data-theme="terminal"] .entete__titre h1::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 0.2em;
  vertical-align: -0.12em;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(51, 255, 102, 0.6);
}
[data-theme="terminal"] .entete__titre p { color: var(--texte-3); }
[data-theme="terminal"] .entete__titre p::before { content: "# "; content: "# " / ""; }
[data-theme="terminal"] .reglage__libelle { color: var(--texte-3); }

/* Onglets : l'onglet choisi est en vidéo inversée (fond vert, texte noir). */
[data-theme="terminal"] .onglets { border-top: 1px dashed var(--bordure); }
[data-theme="terminal"] .onglet {
  margin: 0.35rem 0;
  padding: 0.45rem 0.9rem;
  border: 1px solid transparent;
  color: var(--texte-2);
  font: 500 0.92rem/1.2 var(--police);
}
[data-theme="terminal"] .onglet:hover { background: var(--accent-doux); color: var(--accent); border-color: var(--bordure-forte); }
[data-theme="terminal"] .onglet[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--sur-accent);
  text-shadow: none;
}

/* --------------------------------------------------------------------------
   2.4 Cadres et titres « posés sur le trait » (comme une interface texte)
   -------------------------------------------------------------------------- */
[data-theme="terminal"] .carte,
[data-theme="terminal"] .panneau-repliable,
[data-theme="terminal"] .groupe,
[data-theme="terminal"] .menu__liste,
[data-theme="terminal"] .focus-barre,
[data-theme="terminal"] .barre-lecture,
[data-theme="terminal"] .bandeau-organiser,
[data-theme="terminal"] .alerte,
[data-theme="terminal"] .session__stat {
  background: var(--fond-carte);
  border: 1px solid var(--bordure-forte);
  box-shadow: none;
}
[data-theme="terminal"] .carte { padding: var(--term-marge); }
[data-theme="terminal"] .groupe { border-left: 3px solid var(--famille); }
/* La couleur d'alerte garde son liseré gauche. */
[data-theme="terminal"] .alerte { border-left-width: 4px; }
[data-theme="terminal"] .alerte--danger { border-color: var(--danger); }
[data-theme="terminal"] .alerte--avertissement { border-color: var(--avertissement); }
[data-theme="terminal"] .alerte--info { border-color: var(--info); }

/* Le titre remonte sur le trait du haut (marge négative) avec le fond de
   la carte pour couper le trait : « ─[ VOTRE TEXTE ]──── ». */
[data-theme="terminal"] .carte__entete,
[data-theme="terminal"] .notes__barre-entete { align-items: flex-start; }
[data-theme="terminal"] .carte > .titre-section,
[data-theme="terminal"] .carte > .carte__titre,
[data-theme="terminal"] .carte__entete > .titre-section,
[data-theme="terminal"] .notes__barre-entete > .titre-section {
  width: fit-content;
  max-width: 100%;
  margin: calc(-1 * var(--term-marge) - 1px - 0.65em) 0 0.55rem -0.5ch;
  padding: 0 0.5ch;
  background: var(--fond-carte);
  color: var(--accent);
  font: 600 1rem/1.3 var(--police);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
[data-theme="terminal"] .carte > .titre-section::before,
[data-theme="terminal"] .carte > .carte__titre::before,
[data-theme="terminal"] .carte__entete > .titre-section::before,
[data-theme="terminal"] .notes__barre-entete > .titre-section::before,
[data-theme="terminal"] .notes__plan-titre::before,
[data-theme="terminal"] .dialogue__entete h2::before { content: "[ "; content: "[ " / ""; }
[data-theme="terminal"] .carte > .titre-section::after,
[data-theme="terminal"] .carte > .carte__titre::after,
[data-theme="terminal"] .carte__entete > .titre-section::after,
[data-theme="terminal"] .notes__barre-entete > .titre-section::after,
[data-theme="terminal"] .notes__plan-titre::after,
[data-theme="terminal"] .dialogue__entete h2::after { content: " ]"; content: " ]" / ""; }
[data-theme="terminal"] .carte__titre i,
[data-theme="terminal"] .notes__plan-titre i { color: inherit; }
[data-theme="terminal"] .carte--scrabble .carte__titre { color: var(--accent); }
/* La colonne des statistiques défile : on laisse de la place en haut
   pour le titre de la première carte. */
[data-theme="terminal"] .disposition--droite .colonne-stats { padding-top: 0.75rem; }
/* Le plan défile lui-même : son titre reste à l'intérieur du cadre. */
[data-theme="terminal"] .notes__plan-titre {
  color: var(--accent);
  font: 600 0.95rem/1.2 var(--police);
  text-transform: uppercase;
}
/* Titres hors cadre : préfixe « ## » (titre Markdown). */
[data-theme="terminal"] .titre-section { font-family: var(--police); letter-spacing: 0; }
[data-theme="terminal"] .succes__entete .titre-section::before,
[data-theme="terminal"] .notes__accueil .titre-section::before,
[data-theme="terminal"] .pied__titre::before { content: "## "; content: "## " / ""; color: var(--texte-3); }
[data-theme="terminal"] .pied__titre,
[data-theme="terminal"] .perso__titre,
[data-theme="terminal"] .panneau-outil__titre,
[data-theme="terminal"] .groupe__titre { font-family: var(--police); }

/* Panneaux à champs : cadre en tirets. */
[data-theme="terminal"] .panneau-outil,
[data-theme="terminal"] .cmp-reglages,
[data-theme="terminal"] .guide__regles li,
[data-theme="terminal"] .modele,
[data-theme="terminal"] .import-apercu,
[data-theme="terminal"] .anon__table {
  background: transparent;
  border: 1px dashed var(--bordure-forte);
}
[data-theme="terminal"] .segmente__legende { color: var(--texte-3); }

/* --------------------------------------------------------------------------
   2.5 Boutons : vidéo inversée au survol, au clic et quand enfoncés
   -------------------------------------------------------------------------- */
[data-theme="terminal"] .btn,
[data-theme="terminal"] .btn-outil,
[data-theme="terminal"] .segmente__option > span,
[data-theme="terminal"] .notification__action,
[data-theme="terminal"] .badge-alerte {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--bordure-forte);
  box-shadow: none;
  font-family: var(--police);
  transition: none;
}
[data-theme="terminal"] .btn:hover,
[data-theme="terminal"] .btn:active,
[data-theme="terminal"] .btn[aria-pressed="true"],
[data-theme="terminal"] .menu[open] > summary.btn,
[data-theme="terminal"] .note-meta-bascule[aria-expanded="true"],
[data-theme="terminal"] .btn-outil:hover,
[data-theme="terminal"] .btn-outil:active,
[data-theme="terminal"] .segmente__option > span:hover,
[data-theme="terminal"] .segmente__option input:checked + span,
[data-theme="terminal"] .notification__action:hover,
[data-theme="terminal"] .badge-alerte:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--sur-accent);
  text-shadow: none;
}
/* Dans un bouton inversé, icônes et coche prennent la couleur du texte. */
[data-theme="terminal"] .btn:hover *,
[data-theme="terminal"] .btn[aria-pressed="true"] *,
[data-theme="terminal"] .btn-outil:hover *,
[data-theme="terminal"] .menu[open] > summary.btn * { color: inherit; }
[data-theme="terminal"] .btn-bascule[aria-pressed="true"]::after { color: inherit; }
[data-theme="terminal"] .btn-micro[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: #1a0505; }
/* Bouton principal : cadre double et texte gras. */
[data-theme="terminal"] .btn--principal {
  background: var(--accent-doux);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--accent-fort);
  font-weight: 600;
}
[data-theme="terminal"] .btn--principal:hover { box-shadow: none; }
[data-theme="terminal"] .btn--danger { color: var(--danger); border-color: #8a3a32; }
[data-theme="terminal"] .btn--danger:hover { background: var(--danger); border-color: var(--danger); color: #1a0505; }
[data-theme="terminal"] .btn--discret,
[data-theme="terminal"] .commande,
[data-theme="terminal"] .notes__stockage { border-color: transparent; background: transparent; color: var(--texte-2); }
[data-theme="terminal"] .commande:hover,
[data-theme="terminal"] .notes__stockage:hover { background: var(--accent); color: var(--sur-accent); text-shadow: none; }
[data-theme="terminal"] .btn:disabled,
[data-theme="terminal"] .btn:disabled:hover {
  opacity: 1;
  background: transparent;
  color: #157232;
  border-color: var(--bordure);
  text-shadow: none;
}
[data-theme="terminal"] .btn-outil { border-left: 3px solid var(--famille, var(--accent)); }
[data-theme="terminal"] .btn-outil:hover { border-left-color: var(--famille, var(--accent)); }
[data-theme="terminal"] .notification__fermer { color: var(--texte-2); }
[data-theme="terminal"] .notification__fermer:hover { background: var(--accent); color: var(--sur-accent); text-shadow: none; }

/* --------------------------------------------------------------------------
   2.6 Champs, listes déroulantes, cases
   -------------------------------------------------------------------------- */
[data-theme="terminal"] .champ,
[data-theme="terminal"] .note-texte {
  background-color: var(--fond-saisie);
  color: var(--texte);
  border: 1px solid var(--bordure-forte);
  caret-color: var(--accent);
}
[data-theme="terminal"] .zone-texte { border-color: var(--bordure-forte); caret-color: var(--accent); }
[data-theme="terminal"] .champ:hover { border-color: var(--accent); }
[data-theme="terminal"] .champ:focus,
[data-theme="terminal"] .zone-texte:focus,
[data-theme="terminal"] .note-texte:focus,
[data-theme="terminal"] .note-section__texte:focus,
[data-theme="terminal"] .note-entete__titre:focus,
[data-theme="terminal"] .note-section__titre:focus {
  border-color: var(--accent);
  outline: 2px solid var(--avertissement);
  outline-offset: 1px;
}
[data-theme="terminal"] .note-section__texte:focus { outline-offset: -2px; }
[data-theme="terminal"] select.champ {
  appearance: none;
  padding-right: 1.8rem;
  background: var(--fond-saisie) var(--term-fleche) right 0.6rem center / 0.6rem 0.36rem no-repeat;
}
[data-theme="terminal"] .case input[type="checkbox"],
[data-theme="terminal"] .case input[type="radio"] {
  appearance: none;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0;
  background: transparent;
  border: 1px solid var(--accent);
}
/* Case cochée : un carré plein au centre, « [■] ». */
[data-theme="terminal"] .case input:checked {
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--fond-carte);
}
[data-theme="terminal"] .case input[type="radio"] { border-radius: 50%; }

/* --------------------------------------------------------------------------
   2.7 Éditeur, statistiques (points de conduite), jauges en blocs
   -------------------------------------------------------------------------- */
[data-theme="terminal"] .barre-outils { background: var(--fond-sourd); border: 1px solid var(--bordure); }
[data-theme="terminal"] .zone-texte::placeholder,
[data-theme="terminal"] .note-texte::placeholder { color: var(--texte-3); font-style: normal; }
[data-theme="terminal"] .portee--selection { background: var(--accent); color: var(--sur-accent); text-shadow: none; }
[data-theme="terminal"] .pastille { border-color: rgba(51, 255, 102, 0.4); }
/* Points de conduite : « Caractères ........ 33 » (un pointillé qui
   remplit l'espace entre l'intitulé et le nombre). */
[data-theme="terminal"] .stat dt { flex: 1; }
[data-theme="terminal"] .stat dt::after {
  content: "";
  flex: 1;
  min-width: 1rem;
  align-self: flex-end;
  margin: 0 0.2rem 0.3em;
  border-bottom: 2px dotted var(--bordure-forte);
}
[data-theme="terminal"] .stat { border-bottom-color: transparent; }
[data-theme="terminal"] .disposition--bas .liste-stats:not(.liste-stats--secondaire) .stat dt::after { display: none; }
[data-theme="terminal"] .disposition--bas .liste-stats:not(.liste-stats--secondaire) .stat { border-color: var(--bordure); }
/* Statistique principale en vidéo inversée. */
[data-theme="terminal"] .stat--principale { background: var(--accent); text-shadow: none; }
[data-theme="terminal"] .stat--principale dt,
[data-theme="terminal"] .stat--principale dd,
[data-theme="terminal"] .stat--principale dt i { color: var(--sur-accent); }
[data-theme="terminal"] .stat--principale dt::after { border-color: var(--sur-accent); }
[data-theme="terminal"] .scrabble__score { text-shadow: 0 0 8px rgba(51, 255, 102, 0.6); }
[data-theme="terminal"] .session__stat dd { color: var(--accent); }
/* Jauges : « [▮▮▮▮▮    ] » — des blocs séparés par des fentes noires. */
[data-theme="terminal"] .objectif__piste,
[data-theme="terminal"] .jauge__barre,
[data-theme="terminal"] .jauge-limite__piste {
  height: 0.8rem;
  padding: 1px;
  background: transparent;
  border: 1px solid var(--bordure-forte);
}
[data-theme="terminal"] .objectif__remplissage,
[data-theme="terminal"] .jauge__remplissage,
[data-theme="terminal"] .jauge-limite__remplissage {
  background-image: repeating-linear-gradient(90deg, transparent 0 0.4rem, var(--fond-carte) 0.4rem 0.55rem);
}

/* Accordéons : « [+] » fermé, « [-] » ouvert, à la place de la flèche. */
[data-theme="terminal"] .panneau-repliable__bascule,
[data-theme="terminal"] .groupe__bascule { font-family: var(--police); }
[data-theme="terminal"] .panneau-repliable__bascule:hover,
[data-theme="terminal"] .groupe__bascule:hover { background: var(--accent-doux); }
[data-theme="terminal"] .panneau-repliable__bascule .chevron,
[data-theme="terminal"] .groupe__bascule .chevron { display: none; }
[data-theme="terminal"] .panneau-repliable__bascule::after,
[data-theme="terminal"] .groupe__bascule::after {
  content: "[+]";
  content: "[+]" / "";
  margin-left: auto;
  color: var(--accent);
}
[data-theme="terminal"] .panneau-repliable__bascule[aria-expanded="true"]::after,
[data-theme="terminal"] .groupe__bascule[aria-expanded="true"]::after { content: "[-]"; content: "[-]" / ""; }
[data-theme="terminal"] .groupe__bascule[aria-expanded="true"],
[data-theme="terminal"] .panneau-repliable__bascule[aria-expanded="true"] { border-bottom: 1px dashed var(--bordure); }

/* --------------------------------------------------------------------------
   2.8 Listes, bloc-notes, sélection en vidéo inversée
   -------------------------------------------------------------------------- */
[data-theme="terminal"] .note-item__bouton[aria-current="true"],
[data-theme="terminal"] .plan__bouton[aria-current="true"],
[data-theme="terminal"] .version-item__bouton[aria-current="true"],
[data-theme="terminal"] .palette__option[aria-selected="true"],
[data-theme="terminal"] .menu__item:hover,
[data-theme="terminal"] .menu__item:focus-visible {
  background: var(--accent);
  border-left-color: var(--accent);
  box-shadow: none;
  color: var(--sur-accent);
  text-shadow: none;
}
[data-theme="terminal"] .note-item__bouton[aria-current="true"] *,
[data-theme="terminal"] .plan__bouton[aria-current="true"] *,
[data-theme="terminal"] .version-item__bouton[aria-current="true"] *,
[data-theme="terminal"] .palette__option[aria-selected="true"] *,
[data-theme="terminal"] .menu__item:hover *,
[data-theme="terminal"] .menu__item:focus-visible * { color: inherit; }
[data-theme="terminal"] .note-item__bouton[aria-current="true"] .pastille-categorie { outline: 1px solid var(--sur-accent); }
/* Focus sur une ligne en vidéo inversée : contour foncé (l'ambre se
   verrait mal sur le vert). */
[data-theme="terminal"] .note-item__bouton[aria-current="true"]:focus-visible,
[data-theme="terminal"] .plan__bouton[aria-current="true"]:focus-visible,
[data-theme="terminal"] .version-item__bouton[aria-current="true"]:focus-visible,
[data-theme="terminal"] .menu__item:focus-visible { outline-color: var(--sur-accent); }
[data-theme="terminal"] .note-item__bouton:hover,
[data-theme="terminal"] .plan__bouton:hover { background: var(--accent-doux); }
[data-theme="terminal"] .note-item,
[data-theme="terminal"] .notes__liste { border-color: var(--bordure); }
[data-theme="terminal"] .note-entete__titre { font-family: var(--police); font-size: 1.35rem; }
[data-theme="terminal"] .note-section { border-left-color: var(--bordure-forte); }
[data-theme="terminal"] .note-section--active { border-left-color: var(--accent); }
[data-theme="terminal"] .note-section__entete { background: var(--fond-sourd); }
[data-theme="terminal"] .note-section__titre { font-family: var(--police); }

/* --------------------------------------------------------------------------
   2.9 Tableaux, comparaison
   -------------------------------------------------------------------------- */
[data-theme="terminal"] .tableau-var th,
[data-theme="terminal"] .diff th {
  background: transparent;
  color: var(--texte-3);
  border-bottom: 1px solid var(--accent);
  font-family: var(--police);
  text-transform: uppercase;
}
[data-theme="terminal"] .tableau-var td,
[data-theme="terminal"] .diff td { border-bottom: 1px dashed var(--bordure); }
[data-theme="terminal"] .cmp-lettre { text-shadow: none; }
[data-theme="terminal"] .cmp-lettre--a { background: var(--danger); color: #1a0505; }
[data-theme="terminal"] .cmp-lettre--b { background: var(--accent); color: var(--sur-accent); }
[data-theme="terminal"] .cmp-pastille { background: transparent; }
[data-theme="terminal"] .colonne-liste { background: transparent; }
[data-theme="terminal"] .var-nom code { background: var(--accent-doux); color: var(--accent-fort); }
[data-theme="terminal"] kbd { background: transparent; border-color: var(--bordure-forte); color: var(--texte-2); }

/* --------------------------------------------------------------------------
   2.10 Boîtes de dialogue (cadre double), menus, palette, notifications
   -------------------------------------------------------------------------- */
[data-theme="terminal"] .dialogue {
  background: var(--fond-carte);
  border: 3px double var(--accent);
  box-shadow: var(--ombre-forte);
}
[data-theme="terminal"] .dialogue::backdrop { background: rgba(0, 0, 0, 0.78); }
/* Titre de fenêtre en vidéo inversée, comme les boîtes des interfaces texte. */
[data-theme="terminal"] .dialogue__entete {
  padding: 0.35rem 0.5rem 0.35rem 1rem;
  background: var(--accent);
  border-bottom: 0;
  color: var(--sur-accent);
  text-shadow: none;
}
[data-theme="terminal"] .dialogue__entete h2 {
  font: 600 1rem/1.3 var(--police);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
[data-theme="terminal"] .dialogue__entete .btn {
  background: transparent;
  border-color: var(--sur-accent);
  color: var(--sur-accent);
}
[data-theme="terminal"] .dialogue__entete .btn:hover { background: var(--sur-accent); color: var(--accent); }
[data-theme="terminal"] .dialogue__entete .btn:focus-visible { outline-color: var(--sur-accent); }
[data-theme="terminal"] .dialogue__pied { background: transparent; border-top: 1px dashed var(--bordure-forte); }
[data-theme="terminal"] .perso__section { border-bottom-style: dashed; }
/* Palette : une invite « > » remplace la loupe. */
[data-theme="terminal"] .palette__champ > i { display: none; }
[data-theme="terminal"] .palette__champ::before {
  content: ">";
  content: ">" / "";
  color: var(--accent);
  font-weight: 600;
}
[data-theme="terminal"] .palette__champ:focus-within { box-shadow: inset 0 -2px 0 var(--avertissement); }
[data-theme="terminal"] .palette__saisie { font-family: var(--police); caret-color: var(--accent); }
[data-theme="terminal"] .menu__liste { border-color: var(--accent); }
[data-theme="terminal"] .menu__separateur { border-top: 1px dashed var(--bordure-forte); }
/* Notifications : on garde le liseré coloré de gauche (type du message). */
[data-theme="terminal"] .notification {
  background: var(--fond-carte);
  border-top-color: var(--bordure-forte);
  border-right-color: var(--bordure-forte);
  border-bottom-color: var(--bordure-forte);
  box-shadow: var(--ombre-forte);
}
[data-theme="terminal"] .infobulle { box-shadow: none; text-shadow: none; font-family: var(--police); }

/* --------------------------------------------------------------------------
   2.11 Succès et pied de page
   -------------------------------------------------------------------------- */
[data-theme="terminal"] .succes { border-top: 1px dashed var(--bordure-forte); }
[data-theme="terminal"] .trophee {
  background: var(--fond-carte);
  border: 1px dashed var(--bordure-forte);
}
[data-theme="terminal"] .trophee--obtenu { border: 1px solid var(--accent); }
[data-theme="terminal"] .trophee--secret:not(.trophee--obtenu) { border-style: dotted; }
[data-theme="terminal"] .succes-resume { background: var(--fond-carte); border: 1px solid var(--bordure-forte); }
[data-theme="terminal"] .succes-cat__titre { color: var(--accent); }
[data-theme="terminal"] .progression { height: 0.8rem; padding: 1px; background: transparent; border: 1px solid var(--bordure-forte); }
[data-theme="terminal"] .progression__barre {
  background-image: repeating-linear-gradient(90deg, transparent 0 0.4rem, var(--fond-carte) 0.4rem 0.55rem);
}
/* Saisie vocale et fenêtre « Nouveautés » (V11). */
[data-theme="terminal"] .dictee-bulle--info { background: var(--fond-carte); box-shadow: none; }
[data-theme="terminal"] .historique-filtres { background: var(--fond-sourd); border-bottom: 1px dashed var(--bordure-forte); }
[data-theme="terminal"] .historique-frise { border-color: var(--bordure); }
[data-theme="terminal"] .historique-frise__lien:hover { background: var(--accent); color: var(--sur-accent); text-shadow: none; }
[data-theme="terminal"] .historique-frise__lien:hover * { color: inherit; }
[data-theme="terminal"] .historique-version__titre,
[data-theme="terminal"] .var-fiche__titre { font-family: var(--police); }
[data-theme="terminal"] .historique-item,
[data-theme="terminal"] .var-fiche,
[data-theme="terminal"] .var-regles-teepee { background: var(--fond-carte); }
[data-theme="terminal"] .var-section-onglet { font-family: var(--police); }
[data-theme="terminal"] .var-section-onglet[aria-selected="true"] {
  background: var(--accent);
  color: var(--sur-accent);
  border-color: var(--accent);
  box-shadow: none;
  text-shadow: none;
}
[data-theme="terminal"] .var-section-onglet[aria-selected="true"] * { color: inherit; }
[data-theme="terminal"] .var-sections { border-bottom-color: var(--accent); }
[data-theme="terminal"] .entete__nouveautes { background: transparent; color: var(--accent); }
[data-theme="terminal"] .entete__nouveautes:hover { background: var(--accent); color: var(--sur-accent); text-shadow: none; }
[data-theme="terminal"] .entete__nouveautes:hover * { color: inherit; }
[data-theme="terminal"] .segmente__option code { background: transparent; border: 0; color: inherit; }
[data-theme="terminal"] .pied {
  background: var(--fond);
  border-top: 1px dashed var(--bordure-forte);
}
[data-theme="terminal"] .pied__bas { border-top: 1px dashed var(--bordure); }

@media (max-width: 640px) {
  [data-theme="terminal"] { --term-marge: 0.8rem; }   /* même marge que le thème par défaut */
  [data-theme="terminal"] .onglet { padding: 0.45rem 0.6rem; }
}
@media (max-width: 400px) {
  /* La police à chasse fixe est plus large : les libellés longs passent
     à la ligne au lieu de sortir du bouton. */
  [data-theme="terminal"] .btn { white-space: normal; text-align: center; }
}


/* ##########################################################################
   3. THÈME « MACINTOSH 1984 »
   ##########################################################################
   Écran 1 bit : seulement du noir et du blanc (un peu de gris pour ce qui
   est désactivé). Fenêtres blanches à cadre noir et ombre noire NETTE,
   barres de titre à rayures horizontales, bureau tramé gris clair. */

/* --------------------------------------------------------------------------
   3.1 Jetons
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] {
  --fond: #ffffff;                /* le bureau tramé est posé sur <body> (voir 3.2) */
  --fond-carte: #ffffff;
  --fond-sourd: #ffffff;
  --fond-saisie: #ffffff;
  --texte: #000000;
  --texte-2: #000000;
  --texte-3: #4d4d4d;             /* seul gris des textes discrets : 8,4:1 */
  --bordure: #000000;
  --bordure-forte: #000000;
  --accent: #000000;
  --accent-fort: #000000;
  --accent-doux: #ffffff;
  --sur-accent: #ffffff;
  --danger: #000000;
  --danger-doux: #ffffff;
  --succes: #000000;
  --avertissement: #000000;
  --info: #000000;
  /* En 1 bit, pas de couleur : familles et catégories sont noires.
     Les catégories se distinguent par des MOTIFS (voir 3.9). */
  --fam-nettoyage: #000000;
  --fam-transformation: #000000;
  --fam-developpeur: #000000;
  --fam-export: #000000;
  --fam-generateur: #000000;
  --fam-motsVides: #000000;
  --fam-redaction: #000000;
  --cat-rouge: #000000;
  --cat-orange: #000000;
  --cat-jaune: #000000;
  --cat-vert: #000000;
  --cat-turquoise: #000000;
  --cat-bleu: #000000;
  --cat-violet: #000000;
  --cat-gris: #000000;
  --c-voyelle: #000000;
  --c-consonne: #000000;
  --c-chiffre: #000000;
  --c-chiffre-fond: transparent;
  --c-ponctuation: #000000;
  --c-espace-fond: transparent;
  --r-longue: transparent;
  --r-tres-longue: transparent;
  --r-adverbe: transparent;
  --r-tournure: transparent;
  --r-repetition: transparent;
  --r-repetition-trait: #000000;
  --r-invisible: #000000;
  --r-insecable: transparent;
  --surligne-fond: #000000;       /* surlignage = vidéo inversée */
  --surligne-texte: #ffffff;
  --diff-suppr-fond: #ffffff;
  --diff-suppr-marque: #ffffff;
  --diff-suppr-fort: #000000;
  --diff-ajout-fond: #ffffff;
  --diff-ajout-marque: #ffffff;
  --diff-ajout-fort: #000000;
  --diff-modif-fond: #ffffff;

  --rayon: 0;
  --rayon-carte: 0;
  --ombre: 2px 2px 0 #000000;     /* ombre noire nette, sans flou */
  --ombre-forte: 3px 3px 0 #000000;
  --police: Geneva, "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --police-titre: Chicago, Charcoal, "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --police-chiffres: Monaco, "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;

  --mac-marge: 0.9rem;
  /* Trames « bitmap » faites de dégradés : */
  /* 50 % = damier 1 pixel noir / 1 pixel blanc */
  --mac-trame-50: repeating-conic-gradient(#000000 0 25%, #ffffff 0 50%) 0 0 / 2px 2px;
  /* 25 % = 1 pixel noir sur 4 */
  --mac-trame-25: conic-gradient(at 1px 1px, transparent 75%, #000000 0) 0 0 / 2px 2px;
  /* 12,5 % = 1 pixel noir sur 8, en quinconce (gris très clair) */
  --mac-trame-12: conic-gradient(at 1px 1px, transparent 75%, #000000 0) 0 0 / 4px 4px, conic-gradient(at 1px 1px, transparent 75%, #000000 0) 2px 2px / 4px 4px;
  /* Rayures des barres de titre : une ligne noire, une ligne blanche. */
  --mac-rayures: repeating-linear-gradient(#000000 0 1px, #ffffff 1px 2px);
  /* Case de fermeture : carré blanc à cadre noir, détouré de blanc, posé
     à gauche sur les rayures (3 dégradés unis empilés). */
  --mac-case: linear-gradient(#ffffff, #ffffff) 0.4rem 50% / 0.6875rem 0.6875rem no-repeat,
              linear-gradient(#000000, #000000) calc(0.4rem - 1px) 50% / calc(0.6875rem + 2px) calc(0.6875rem + 2px) no-repeat,
              linear-gradient(#ffffff, #ffffff) calc(0.4rem - 4px) 0 / calc(0.6875rem + 8px) 100% no-repeat;
  --mac-fleche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   3.2 Bureau tramé, base, sélection, focus
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] body {
  background: var(--mac-trame-12);
  background-color: #ffffff;
  color: #000000;
}
[data-theme="macintosh"] *,
[data-theme="macintosh"] *::before,
[data-theme="macintosh"] *::after { border-radius: 0; }
[data-theme="macintosh"] mark.surligne { border-radius: 0; }
[data-theme="macintosh"] ::selection { background: #000000; color: #ffffff; }
/* Focus : pointillés noirs (« fourmis » de MacPaint, immobiles). */
[data-theme="macintosh"] :focus-visible { outline: 2px dashed #000000; outline-offset: 3px; }
[data-theme="macintosh"] .segmente__option input:focus-visible + span { outline: 2px dashed #000000; outline-offset: 3px; }
[data-theme="macintosh"] .note-item__bouton:focus-visible,
[data-theme="macintosh"] .plan__bouton:focus-visible,
[data-theme="macintosh"] .version-item__bouton:focus-visible,
[data-theme="macintosh"] .notes__stockage:focus-visible { outline-offset: -4px; }
[data-theme="macintosh"] .menu__item:focus-visible { outline: 2px dashed #ffffff; outline-offset: -4px; }
[data-theme="macintosh"] a { color: #000000; }
[data-theme="macintosh"] a:hover { color: #000000; text-decoration-thickness: 2px; }
[data-theme="macintosh"] .lien-evitement { border: 1px solid #ffffff; }

/* --------------------------------------------------------------------------
   3.3 En-tête (barre de menus) et onglets (titres de menus)
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] .entete {
  background: #ffffff;
  border-bottom: 2px solid #000000;
}
[data-theme="macintosh"] .entete__titre h1 {
  font: 700 clamp(1.5rem, 3vw, 2.1rem)/1.15 var(--police-titre);
  letter-spacing: -0.01em;
}
[data-theme="macintosh"] .entete__titre p { color: #000000; }
[data-theme="macintosh"] .reglage__libelle {
  color: #000000;
  font: 700 0.78rem/1.2 var(--police-titre);
  text-transform: none;
  letter-spacing: 0;
}
[data-theme="macintosh"] .onglets { border-top: 1px solid #000000; }
[data-theme="macintosh"] .onglet {
  padding: 0.6rem 1rem 0.55rem;
  border-bottom: 0;
  color: #000000;
  font: 700 0.95rem/1.2 var(--police-titre);
}
[data-theme="macintosh"] .onglet:hover { background: transparent; color: #000000; text-decoration: underline; }
/* Onglet choisi = titre de menu ouvert : vidéo inversée. */
[data-theme="macintosh"] .onglet[aria-selected="true"] { background: #000000; color: #ffffff; text-decoration: none; }

/* --------------------------------------------------------------------------
   3.4 Fenêtres : cadre noir, ombre nette, barre de titre à rayures
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] .carte,
[data-theme="macintosh"] .panneau-repliable,
[data-theme="macintosh"] .groupe,
[data-theme="macintosh"] .succes,
[data-theme="macintosh"] .menu__liste,
[data-theme="macintosh"] .notification,
[data-theme="macintosh"] .focus-barre,
[data-theme="macintosh"] .barre-lecture,
[data-theme="macintosh"] .bandeau-organiser,
[data-theme="macintosh"] .alerte,
[data-theme="macintosh"] .pied__contenu {
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  box-shadow: 2px 2px 0 #000000;
}
[data-theme="macintosh"] .carte { padding: var(--mac-marge); }
[data-theme="macintosh"] .carte--limites-selection { box-shadow: 2px 2px 0 #000000, 0 0 0 3px #ffffff, 0 0 0 4px #000000; }
/* La colonne des statistiques défile : place pour les ombres. */
[data-theme="macintosh"] .disposition--droite .colonne-stats { padding: 0 4px 4px 0; }

/* Barre de titre : fond blanc ; ::before et ::after sont deux bandes de
   rayures qui s'étirent (flex: 1) de part et d'autre du titre, qui reste
   ainsi centré dans sa « boîte » blanche. La case de fermeture est
   dessinée sur la bande de gauche. */
[data-theme="macintosh"] .carte > .titre-section,
[data-theme="macintosh"] .carte > .carte__titre,
[data-theme="macintosh"] .carte__entete > .titre-section,
[data-theme="macintosh"] .notes__barre-entete,
[data-theme="macintosh"] .notes__plan-titre,
[data-theme="macintosh"] .notes__accueil > .titre-section,
[data-theme="macintosh"] .succes__entete .titre-section {
  display: flex;
  flex: 1 1 100%;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 1.6rem;
  margin: calc(-1 * var(--mac-marge)) calc(-1 * var(--mac-marge)) 0.8rem;
  padding: 0.15rem 0.3rem;
  background: #ffffff;
  border-bottom: 1px solid #000000;
  color: #000000;
  font: 700 0.95rem/1.2 var(--police-titre);
  letter-spacing: 0;
  text-align: center;
}
[data-theme="macintosh"] .carte > .titre-section::before,
[data-theme="macintosh"] .carte > .carte__titre::before,
[data-theme="macintosh"] .carte__entete > .titre-section::before,
[data-theme="macintosh"] .notes__barre-entete::before,
[data-theme="macintosh"] .notes__plan-titre::before,
[data-theme="macintosh"] .notes__accueil > .titre-section::before,
[data-theme="macintosh"] .succes__entete .titre-section::before,
[data-theme="macintosh"] .carte > .titre-section::after,
[data-theme="macintosh"] .carte > .carte__titre::after,
[data-theme="macintosh"] .carte__entete > .titre-section::after,
[data-theme="macintosh"] .notes__barre-entete::after,
[data-theme="macintosh"] .notes__plan-titre::after,
[data-theme="macintosh"] .notes__accueil > .titre-section::after,
[data-theme="macintosh"] .succes__entete .titre-section::after {
  content: "";
  flex: 1 1 0.75rem;
  min-width: 0.75rem;
  align-self: stretch;
  min-height: 0.75rem;
  margin: 2px 0;
  background: var(--mac-rayures);
}
[data-theme="macintosh"] .carte > .titre-section::before,
[data-theme="macintosh"] .carte > .carte__titre::before,
[data-theme="macintosh"] .carte__entete > .titre-section::before,
[data-theme="macintosh"] .notes__barre-entete::before,
[data-theme="macintosh"] .notes__plan-titre::before,
[data-theme="macintosh"] .notes__accueil > .titre-section::before,
[data-theme="macintosh"] .succes__entete .titre-section::before {
  flex-basis: 1.75rem;
  min-width: 1.75rem;
  background: var(--mac-case), var(--mac-rayures);
}
[data-theme="macintosh"] .carte__titre i,
[data-theme="macintosh"] .notes__plan-titre i,
[data-theme="macintosh"] .titre-section i { color: inherit; }
[data-theme="macintosh"] .notes__barre-entete .titre-section { color: inherit; font: inherit; }
[data-theme="macintosh"] .notes__barre-entete .notes__compte { color: #000000; font-family: var(--police-chiffres); }
[data-theme="macintosh"] .carte--scrabble .carte__titre { color: #000000; }
[data-theme="macintosh"] .notes__accueil { display: flex; flex-direction: column; align-items: center; padding-bottom: 1.6rem; }
[data-theme="macintosh"] .notes__accueil > .titre-section { order: -1; }
/* Note ouverte : barre à rayures sans titre (le titre est le champ juste dessous). */
[data-theme="macintosh"] .notes__edition::before {
  content: "";
  display: block;
  height: 1.6rem;
  margin: calc(-1 * var(--mac-marge)) calc(-1 * var(--mac-marge)) 0.8rem;
  padding: 4px 0.3rem;
  border-bottom: 1px solid #000000;
  background: var(--mac-case), var(--mac-rayures);
  background-origin: content-box;
  background-clip: content-box;
}

/* Panneaux à champs : cadre noir fin. */
[data-theme="macintosh"] .panneau-outil,
[data-theme="macintosh"] .cmp-reglages,
[data-theme="macintosh"] .guide__regles li,
[data-theme="macintosh"] .modele,
[data-theme="macintosh"] .import-apercu,
[data-theme="macintosh"] .anon__table,
[data-theme="macintosh"] .session__stat {
  background: #ffffff;
  border: 1px solid #000000;
  box-shadow: none;
}
[data-theme="macintosh"] .panneau-outil__titre,
[data-theme="macintosh"] .perso__titre,
[data-theme="macintosh"] .groupe__titre,
[data-theme="macintosh"] .pied__titre,
[data-theme="macintosh"] .modele__titre,
[data-theme="macintosh"] .versions__detail-titre,
[data-theme="macintosh"] .titre-section { font-family: var(--police-titre); font-weight: 700; }
[data-theme="macintosh"] .segmente__legende {
  color: #000000;
  font: 700 0.78rem/1.2 var(--police-titre);
  text-transform: none;
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   3.5 Boutons : rectangles arrondis (6 px), vidéo inversée quand enfoncés
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] .btn,
[data-theme="macintosh"] .btn-outil,
[data-theme="macintosh"] .notification__action,
[data-theme="macintosh"] .badge-alerte {
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  border-radius: 6px;
  box-shadow: none;
  font-family: var(--police-titre);
  font-weight: 700;
  transition: none;
}
[data-theme="macintosh"] .btn:hover,
[data-theme="macintosh"] .btn-outil:hover,
[data-theme="macintosh"] .notification__action:hover,
[data-theme="macintosh"] .badge-alerte:hover {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
  box-shadow: 1px 1px 0 #000000;
}
[data-theme="macintosh"] .btn:active,
[data-theme="macintosh"] .btn[aria-pressed="true"],
[data-theme="macintosh"] .menu[open] > summary.btn,
[data-theme="macintosh"] .note-meta-bascule[aria-expanded="true"],
[data-theme="macintosh"] .btn-outil:active,
[data-theme="macintosh"] .notification__action:active,
[data-theme="macintosh"] .segmente__option input:checked + span {
  background: #000000;
  border-color: #000000;
  color: #ffffff;
  box-shadow: none;
}
[data-theme="macintosh"] .btn:active *,
[data-theme="macintosh"] .btn[aria-pressed="true"] *,
[data-theme="macintosh"] .btn-outil:active *,
[data-theme="macintosh"] .menu[open] > summary.btn * { color: inherit; }
[data-theme="macintosh"] .btn-bascule[aria-pressed="true"]::after { color: inherit; }
[data-theme="macintosh"] .btn-micro[aria-pressed="true"] { background: #000000; color: #ffffff; }
/* Bouton par défaut du Macintosh : un anneau noir épais autour du bouton. */
[data-theme="macintosh"] .btn--principal,
[data-theme="macintosh"] .btn--principal:hover {
  box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px #000000;
}
[data-theme="macintosh"] .btn--principal:active { box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px #000000; }
[data-theme="macintosh"] .btn--principal:focus-visible { outline-offset: 5px; }
[data-theme="macintosh"] .btn--danger,
[data-theme="macintosh"] .btn--danger:hover { color: #000000; }
[data-theme="macintosh"] .btn--discret,
[data-theme="macintosh"] .commande,
[data-theme="macintosh"] .notes__stockage { border-color: transparent; background: transparent; color: #000000; }
[data-theme="macintosh"] .btn--discret:hover,
[data-theme="macintosh"] .commande:hover,
[data-theme="macintosh"] .notes__stockage:hover { border-color: #000000; background: #ffffff; box-shadow: none; }
/* Désactivé : gris (le seul usage du gris dans ce thème). */
[data-theme="macintosh"] .btn:disabled,
[data-theme="macintosh"] .btn:disabled:hover {
  opacity: 1;
  color: #8c8c8c;
  border-color: #8c8c8c;
  background: #ffffff;
  box-shadow: none;
}
[data-theme="macintosh"] .btn--discret:disabled { border-color: transparent; }
[data-theme="macintosh"] .btn-outil { border-radius: 6px; }
[data-theme="macintosh"] .btn-outil__icone,
[data-theme="macintosh"] .btn-favori i { color: #000000; }
/* Boutons segmentés : extrémités arrondies. */
[data-theme="macintosh"] .segmente__option > span {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
  font-family: var(--police-titre);
  font-weight: 700;
}
[data-theme="macintosh"] .segmente__option > span:hover { background: #ffffff; color: #000000; text-decoration: underline; }
[data-theme="macintosh"] .segmente__option:first-of-type > span { border-radius: 6px 0 0 6px; }
[data-theme="macintosh"] .segmente__option:last-of-type > span { border-radius: 0 6px 6px 0; }
[data-theme="macintosh"] .segmente__option input:checked + span:hover { background: #000000; color: #ffffff; }

/* --------------------------------------------------------------------------
   3.6 Champs, menus locaux, cases (croix), boutons radio
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] .champ,
[data-theme="macintosh"] .note-texte {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  box-shadow: none;
}
[data-theme="macintosh"] .zone-texte { border-color: #000000; }
[data-theme="macintosh"] .champ:hover { border-color: #000000; }
[data-theme="macintosh"] .champ:focus,
[data-theme="macintosh"] .zone-texte:focus,
[data-theme="macintosh"] .note-texte:focus,
[data-theme="macintosh"] .note-section__texte:focus,
[data-theme="macintosh"] .note-entete__titre:focus,
[data-theme="macintosh"] .note-section__titre:focus {
  border-color: #000000;
  outline: 2px dashed #000000;
  outline-offset: 2px;
}
[data-theme="macintosh"] .note-section__texte:focus { outline-offset: -4px; }
/* Liste déroulante = menu local : flèche noire et ombre nette. */
[data-theme="macintosh"] select.champ {
  appearance: none;
  padding-right: 1.8rem;
  background: #ffffff var(--mac-fleche) right 0.6rem center / 0.6rem 0.36rem no-repeat;
  box-shadow: 2px 2px 0 #000000;
  font-family: var(--police-titre);
  font-weight: 700;
}
[data-theme="macintosh"] .case input[type="checkbox"],
[data-theme="macintosh"] .case input[type="radio"] {
  appearance: none;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0;
  background: #ffffff;
  border: 1px solid #000000;
}
/* Case cochée du Macintosh : une croix, faite de deux dégradés en diagonale. */
[data-theme="macintosh"] .case input[type="checkbox"]:checked {
  background:
    linear-gradient(45deg, transparent calc(50% - 1px), #000000 calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), #000000 calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    #ffffff;
}
[data-theme="macintosh"] .case input[type="radio"] { border-radius: 50%; }
[data-theme="macintosh"] .case input[type="radio"]:checked { background: radial-gradient(circle, #000000 0 0.22rem, #ffffff 0.24rem); }
[data-theme="macintosh"] .case,
[data-theme="macintosh"] .champ-libelle { color: #000000; }
[data-theme="macintosh"] .champ-recherche__icone { color: #000000; }

/* --------------------------------------------------------------------------
   3.7 Éditeur, statistiques, jauges, accordéons
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] .barre-outils { background: #ffffff; border: 1px solid #000000; }
/* Séparateurs en pointillés. Attention : on ne change que le côté qui a
   déjà un trait (donner un style à un côté sans trait le ferait apparaître). */
[data-theme="macintosh"] .coloration,
[data-theme="macintosh"] .notes__barre-pied,
[data-theme="macintosh"] .notes__plan-aller,
[data-theme="macintosh"] .limites__reglages,
[data-theme="macintosh"] .dictee-corr { border-top: 1px dotted #000000; }
[data-theme="macintosh"] .note-meta,
[data-theme="macintosh"] .perso__section { border-bottom: 1px dotted #000000; }
[data-theme="macintosh"] .portee--selection { background: #000000; color: #ffffff; }
[data-theme="macintosh"] .stat { border-bottom: 1px dotted #000000; }
[data-theme="macintosh"] .stat dt i { color: #000000; }
/* Statistique principale en vidéo inversée. */
[data-theme="macintosh"] .stat--principale { background: #000000; border: 0; }
[data-theme="macintosh"] .stat--principale dt,
[data-theme="macintosh"] .stat--principale dd,
[data-theme="macintosh"] .stat--principale dt i { color: #ffffff; }
[data-theme="macintosh"] .scrabble__score,
[data-theme="macintosh"] .session__stat dd,
[data-theme="macintosh"] .jauge__valeur { color: #000000; font-family: var(--police-titre); font-weight: 700; }
[data-theme="macintosh"] .resume-compact { background: #ffffff; border: 1px solid #000000; color: #000000; }
/* Jauges : remplissage noir ; « proche » = damier 50 %, « dépassé » =
   hachures (on ne dépend pas de la couleur). */
[data-theme="macintosh"] .objectif__piste,
[data-theme="macintosh"] .jauge__barre,
[data-theme="macintosh"] .jauge-limite__piste { height: 0.75rem; background: #ffffff; border: 1px solid #000000; }
[data-theme="macintosh"] .jauge--moyen,
[data-theme="macintosh"] .jauge-limite--proche .jauge-limite__remplissage { background: var(--mac-trame-50); }
[data-theme="macintosh"] .jauge--faible,
[data-theme="macintosh"] .jauge-limite--depasse .jauge-limite__remplissage {
  background: repeating-linear-gradient(45deg, #000000 0 2px, #ffffff 2px 4px);
}
[data-theme="macintosh"] .jauge-limite--depasse .jauge-limite__message { text-decoration: underline; }

/* Accordéons : fermé = blanc ; ouvert = en-tête en vidéo inversée. */
[data-theme="macintosh"] .panneau-repliable__bascule,
[data-theme="macintosh"] .groupe__bascule { background: #ffffff; color: #000000; }
[data-theme="macintosh"] .panneau-repliable__bascule:hover,
[data-theme="macintosh"] .groupe__bascule:hover { background: #ffffff; text-decoration: underline; }
[data-theme="macintosh"] .panneau-repliable__bascule[aria-expanded="true"],
[data-theme="macintosh"] .groupe__bascule[aria-expanded="true"] { background: #000000; color: #ffffff; }
[data-theme="macintosh"] .panneau-repliable__bascule[aria-expanded="true"] *,
[data-theme="macintosh"] .groupe__bascule[aria-expanded="true"] * { color: #ffffff; }
[data-theme="macintosh"] .panneau-repliable__bascule[aria-expanded="true"]:focus-visible,
[data-theme="macintosh"] .groupe__bascule[aria-expanded="true"]:focus-visible { outline-color: #ffffff; outline-offset: -4px; }
[data-theme="macintosh"] .panneau-repliable__bascule > i:first-child,
[data-theme="macintosh"] .groupe__icone,
[data-theme="macintosh"] .chevron { color: #000000; }
[data-theme="macintosh"] .groupe__description { color: #4d4d4d; }
[data-theme="macintosh"] .groupe__titre { font-family: var(--police-titre); }
[data-theme="macintosh"] .liste-mots-cles li { border-bottom: 1px dotted #000000; }
[data-theme="macintosh"] .mot-cle__nombre { background: #000000; color: #ffffff; }
[data-theme="macintosh"] .suggestions,
[data-theme="macintosh"] .guide__pourquoi { background: #ffffff; border: 1px solid #000000; border-left-width: 4px; color: #000000; }

/* --------------------------------------------------------------------------
   3.8 Listes et bloc-notes : sélection en vidéo inversée
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] .note-item__bouton[aria-current="true"],
[data-theme="macintosh"] .plan__bouton[aria-current="true"],
[data-theme="macintosh"] .version-item__bouton[aria-current="true"],
[data-theme="macintosh"] .palette__option[aria-selected="true"],
[data-theme="macintosh"] .menu__item:hover,
[data-theme="macintosh"] .menu__item:focus-visible {
  background: #000000;
  border-left-color: #000000;
  box-shadow: none;
  color: #ffffff;
}
[data-theme="macintosh"] .note-item__bouton[aria-current="true"] *,
[data-theme="macintosh"] .plan__bouton[aria-current="true"] *,
[data-theme="macintosh"] .version-item__bouton[aria-current="true"] *,
[data-theme="macintosh"] .palette__option[aria-selected="true"] *,
[data-theme="macintosh"] .menu__item:hover *,
[data-theme="macintosh"] .menu__item:focus-visible * { color: #ffffff; }
[data-theme="macintosh"] .palette__option[aria-selected="true"] b { text-decoration: underline; }
[data-theme="macintosh"] .note-item__bouton[aria-current="true"] .pastille-categorie { outline: 1px solid #ffffff; }
[data-theme="macintosh"] .note-item__bouton[aria-current="true"]:focus-visible,
[data-theme="macintosh"] .plan__bouton[aria-current="true"]:focus-visible,
[data-theme="macintosh"] .version-item__bouton[aria-current="true"]:focus-visible { outline-color: #ffffff; }
[data-theme="macintosh"] .note-item__bouton:hover,
[data-theme="macintosh"] .plan__bouton:hover,
[data-theme="macintosh"] .version-item__bouton:hover { background: #ffffff; text-decoration: underline; }
[data-theme="macintosh"] .notes__liste,
[data-theme="macintosh"] .versions__liste,
[data-theme="macintosh"] .versions__contenu,
[data-theme="macintosh"] .diff-flux__texte { border: 1px solid #000000; }
[data-theme="macintosh"] .note-item,
[data-theme="macintosh"] .version-item__bouton { border-bottom: 1px dotted #000000; }
[data-theme="macintosh"] .note-entete__titre { font-family: var(--police-titre); font-weight: 700; }
[data-theme="macintosh"] .notes__rappel { background: #ffffff; border-left-color: #000000; color: #000000; }
[data-theme="macintosh"] .notes__accueil-icone,
[data-theme="macintosh"] .notes__atouts i,
[data-theme="macintosh"] .note-entete__epingle[aria-pressed="true"] i { color: inherit; }
/* Section active : son en-tête passe en vidéo inversée. */
[data-theme="macintosh"] .note-section { border: 1px solid #000000; }
[data-theme="macintosh"] .note-section__entete { background: #ffffff; border-bottom: 1px solid #000000; }
[data-theme="macintosh"] .note-section--active .note-section__entete { background: #000000; }
[data-theme="macintosh"] .note-section--active .note-section__titre,
[data-theme="macintosh"] .note-section--active .note-section__numero,
[data-theme="macintosh"] .note-section--active .note-section__compte,
[data-theme="macintosh"] .note-section--active .note-section__titre::placeholder { color: #ffffff; }
[data-theme="macintosh"] .note-section--active .note-section__titre:hover { background: transparent; border-color: #ffffff; }
[data-theme="macintosh"] .note-section--active .note-section__titre:focus { background: #ffffff; color: #000000; outline-color: #ffffff; }
[data-theme="macintosh"] .note-section__titre { font-family: var(--police-titre); }

/* --------------------------------------------------------------------------
   3.9 Motifs à la place des couleurs (MacPaint)
   --------------------------------------------------------------------------
   Catégories, coloration du texte et repérages : en 1 bit, on distingue
   par des motifs, des soulignements ou l'inversion. Dans la zone de texte,
   aucun de ces effets ne change la largeur des lettres (pas de gras) :
   la couche colorée reste parfaitement alignée sur le texte tapé. */
[data-theme="macintosh"] .pastille-categorie { border: 1px solid #000000; }
[data-theme="macintosh"] .pastille-categorie--rouge { background: #000000; }
[data-theme="macintosh"] .pastille-categorie--orange { background: var(--mac-trame-50); }
[data-theme="macintosh"] .pastille-categorie--jaune { background: var(--mac-trame-25); }
[data-theme="macintosh"] .pastille-categorie--vert { background: repeating-linear-gradient(90deg, #000000 0 1px, #ffffff 1px 3px); }
[data-theme="macintosh"] .pastille-categorie--turquoise { background: repeating-linear-gradient(#000000 0 1px, #ffffff 1px 3px); }
[data-theme="macintosh"] .pastille-categorie--bleu { background: repeating-linear-gradient(45deg, #000000 0 1px, #ffffff 1px 3px); }
[data-theme="macintosh"] .pastille-categorie--violet { background: repeating-linear-gradient(-45deg, #000000 0 1px, #ffffff 1px 3px); }
[data-theme="macintosh"] .pastille-categorie--gris { background: #ffffff; }

[data-theme="macintosh"] .c-voyelle { background: #000000; color: #ffffff; }
[data-theme="macintosh"] .c-consonne { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
[data-theme="macintosh"] .c-chiffre { text-decoration: underline double; text-underline-offset: 0.12em; }
[data-theme="macintosh"] .c-ponctuation { box-shadow: 0 0 0 1px #000000; }
[data-theme="macintosh"] .c-espace { background: var(--mac-trame-50); }
[data-theme="macintosh"] .r-longue { background: var(--mac-trame-12); }
[data-theme="macintosh"] .r-tresLongue { background: var(--mac-trame-25); }
[data-theme="macintosh"] .r-adverbe { text-decoration: underline dotted 2px; text-underline-offset: 0.15em; }
[data-theme="macintosh"] .r-tournure { text-decoration: underline wavy 1px; text-underline-offset: 0.15em; }
[data-theme="macintosh"] .r-repetition { box-shadow: inset 0 -2px 0 #000000; }
[data-theme="macintosh"] .r-insecable { background: repeating-linear-gradient(90deg, #000000 0 1px, transparent 1px 3px); }
/* Légendes des boutons de coloration : le même motif en petit. */
[data-theme="macintosh"] .pastille { border: 1px solid #000000; }
[data-theme="macintosh"] .pastille--voyelle { background: #000000; }
[data-theme="macintosh"] .pastille--consonne { background: #ffffff; box-shadow: inset 0 -3px 0 #000000; }
[data-theme="macintosh"] .pastille--chiffre { background: #ffffff; box-shadow: inset 0 -2px 0 #000000, inset 0 -4px 0 #ffffff, inset 0 -5px 0 #000000; }
[data-theme="macintosh"] .pastille--ponctuation { background: #ffffff; box-shadow: inset 0 0 0 2px #ffffff, inset 0 0 0 3px #000000; }
[data-theme="macintosh"] .pastille--espace { background: var(--mac-trame-50); }
[data-theme="macintosh"] .pastille--longue { background: var(--mac-trame-25); }
[data-theme="macintosh"] .pastille--adverbe { background: #ffffff; border-bottom: 3px dotted #000000; }
[data-theme="macintosh"] .pastille--tournure { background: repeating-linear-gradient(45deg, #000000 0 1px, #ffffff 1px 3px); }
[data-theme="macintosh"] .pastille--repetition { background: #ffffff; border-bottom: 3px solid #000000; }
[data-theme="macintosh"] .pastille--invisible { background: #000000; }
[data-theme="macintosh"] .btn[aria-pressed="true"] .pastille { border-color: #ffffff; }

/* Différences : suppressions sur trame légère et barrées ; ajouts en
   vidéo inversée. Les signes « − » et « + » restent affichés. */
[data-theme="macintosh"] .diff__ligne--suppr .diff__texte:not(.diff__vide),
[data-theme="macintosh"] .diff--unifiee .diff__ligne--suppr td { background: var(--mac-trame-12); background-color: #ffffff; }
[data-theme="macintosh"] .diff del,
[data-theme="macintosh"] .diff-flux del,
[data-theme="macintosh"] .versions__contenu del { background: #ffffff; text-decoration: line-through 2px; outline: 1px dotted #000000; }
[data-theme="macintosh"] .diff ins,
[data-theme="macintosh"] .diff-flux ins,
[data-theme="macintosh"] .versions__contenu ins { background: #000000; color: #ffffff; border-bottom: 0; }
[data-theme="macintosh"] .diff__vide { background: var(--mac-trame-25); }
[data-theme="macintosh"] .cmp-lettre--a { background: #000000; color: #ffffff; }
[data-theme="macintosh"] .cmp-lettre--b { background: #ffffff; color: #000000; box-shadow: inset 0 0 0 1px #000000; }
[data-theme="macintosh"] .cmp-pastille { background: #ffffff; border-color: #000000; }
[data-theme="macintosh"] .cmp-pastille--suppr { border-left-style: dotted; }
[data-theme="macintosh"] .cmp-pastille--modif { border-left-style: dashed; }
[data-theme="macintosh"] .colonne-liste { border: 1px solid #000000; border-top-width: 4px; }
[data-theme="macintosh"] .colonne-liste--a { border-top-style: double; }
[data-theme="macintosh"] .colonne-liste--communs { border-top-style: dotted; }

/* --------------------------------------------------------------------------
   3.10 Tableaux, petits éléments
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] .tableau-var th,
[data-theme="macintosh"] .diff th {
  background: #ffffff;
  color: #000000;
  border-bottom: 2px solid #000000;
  font-family: var(--police-titre);
  font-weight: 700;
}
[data-theme="macintosh"] .tableau-var td,
[data-theme="macintosh"] .diff td { border-bottom: 1px dotted #000000; }
[data-theme="macintosh"] kbd { background: #ffffff; border-color: #000000; color: #000000; }
[data-theme="macintosh"] code { background: #ffffff; border-color: #000000; color: #000000; }
[data-theme="macintosh"] .var-nom code { background: #ffffff; border-color: #000000; }
[data-theme="macintosh"] .badge { border-color: #000000; color: #000000; }
[data-theme="macintosh"] .badge--actuelle { background: #000000; color: #ffffff; }

/* --------------------------------------------------------------------------
   3.11 Boîtes de dialogue, menus, palette, notifications, infobulles
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] .dialogue {
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  box-shadow: 4px 4px 0 #000000;
}
/* Fond tramé (1 pixel noir sur 4) : la page reste visible derrière. */
[data-theme="macintosh"] .dialogue::backdrop {
  background: conic-gradient(at 1px 1px, transparent 75%, rgba(0, 0, 0, 0.9) 0) 0 0 / 2px 2px;
}
/* Barre de titre : rayures sur toute la largeur, titre centré dans une
   boîte blanche ; le bouton « Fermer » devient la case de gauche. */
[data-theme="macintosh"] .dialogue__entete {
  position: relative;
  justify-content: center;
  min-height: 2.25rem;
  padding: 4px 2.6rem;
  border-bottom: 1px solid #000000;
  background: var(--mac-rayures);
  background-origin: content-box;
  background-clip: content-box;
  box-shadow: inset 0 0 0 4px #ffffff;
}
[data-theme="macintosh"] .dialogue__entete h2 {
  padding: 0.05rem 0.6rem;
  background: #ffffff;
  font: 700 1rem/1.25 var(--police-titre);
  text-align: center;
}
[data-theme="macintosh"] .dialogue__entete .btn {
  position: absolute;
  top: 50%;
  left: 0.5rem;
  width: 1.5rem;
  min-height: 0;
  height: 1.5rem;
  margin-top: -0.75rem;
  padding: 0;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid #000000;
  box-shadow: 0 0 0 3px #ffffff;
  font-size: 0.75rem;
}
[data-theme="macintosh"] .dialogue__entete .btn:active { background: #000000; color: #ffffff; }
[data-theme="macintosh"] .dialogue__pied { background: #ffffff; border-top: 1px solid #000000; }
[data-theme="macintosh"] .dialogue__message { color: #000000; }
[data-theme="macintosh"] .perso__titre i,
[data-theme="macintosh"] .modele__titre i,
[data-theme="macintosh"] .modele--perso .modele__titre i { color: #000000; }
[data-theme="macintosh"] .modele { border-left-width: 4px; }
/* Palette : barre à rayures sans titre, liste blanche. */
[data-theme="macintosh"] .dialogue--palette::before {
  content: "";
  display: block;
  flex: 0 0 auto;
  height: 1.6rem;
  padding: 4px 0.3rem;
  border-bottom: 1px solid #000000;
  background: var(--mac-case), var(--mac-rayures);
  background-origin: content-box;
  background-clip: content-box;
}
[data-theme="macintosh"] .palette__champ { border-bottom: 1px solid #000000; }
[data-theme="macintosh"] .palette__champ:focus-within { box-shadow: inset 0 -3px 0 #000000; }
[data-theme="macintosh"] .palette__champ > i,
[data-theme="macintosh"] .palette__option > i { color: #000000; }
[data-theme="macintosh"] .palette__groupe { color: #000000; font-family: var(--police-titre); }
/* Menus déroulants : séparateur en pointillés gris (comme sur le Mac). */
[data-theme="macintosh"] .menu__item { font-family: var(--police-titre); font-weight: 700; }
[data-theme="macintosh"] .menu__item i { color: #000000; }
[data-theme="macintosh"] .menu__item--danger,
[data-theme="macintosh"] .menu__item--danger i { color: #000000; }
[data-theme="macintosh"] .menu__separateur { border-top: 1px dotted #808080; }
[data-theme="macintosh"] .notification { border-left: 4px solid #000000; box-shadow: 3px 3px 0 #000000; }
[data-theme="macintosh"] .notification > i { color: #000000; }
[data-theme="macintosh"] .notification__fermer { color: #000000; }
[data-theme="macintosh"] .infobulle {
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  box-shadow: 2px 2px 0 #000000;
}
[data-theme="macintosh"] .alerte > i,
[data-theme="macintosh"] .bandeau-organiser > i { color: #000000; }
[data-theme="macintosh"] .alerte { border-left-width: 4px; }

/* --------------------------------------------------------------------------
   3.12 Succès et pied de page
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] .succes { margin-top: 2rem; padding: var(--mac-marge); }
[data-theme="macintosh"] .succes__entete { border: 0; }
[data-theme="macintosh"] .succes__entete p { color: #000000; }
[data-theme="macintosh"] .succes__entete > div { flex: 1 1 100%; }
[data-theme="macintosh"] .succes__filtre { margin-left: auto; }
[data-theme="macintosh"] .trophee--secret:not(.trophee--obtenu) { border-style: dashed; }
[data-theme="macintosh"] .succes-resume,
[data-theme="macintosh"] .var-fiche,
[data-theme="macintosh"] .var-regles-teepee,
[data-theme="macintosh"] .historique-item,
[data-theme="macintosh"] .historique-frise,
[data-theme="macintosh"] .dictee-corr__liste { background: #ffffff; border: 1px solid #000000; }
[data-theme="macintosh"] .historique-item { border-left-width: 4px; }
[data-theme="macintosh"] .succes-resume__texte strong { color: #000000; font-family: var(--police-titre); }
[data-theme="macintosh"] .succes-cat__titre,
[data-theme="macintosh"] .historique-version__titre,
[data-theme="macintosh"] .var-fiche__titre { font-family: var(--police-titre); font-weight: 700; color: #000000; }
[data-theme="macintosh"] .progression { background: #ffffff; border: 1px solid #000000; }
[data-theme="macintosh"] .trophee__badge { background: #000000; color: #ffffff; }

/* Onglet Variables : sous-onglets en « intercalaires » noir et blanc. */
[data-theme="macintosh"] .var-sections { border-bottom: 2px solid #000000; }
[data-theme="macintosh"] .var-section-onglet {
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  border-bottom: 0;
  box-shadow: none;
  font-family: var(--police-titre);
  font-weight: 700;
}
[data-theme="macintosh"] .var-section-onglet:hover { background: #ffffff; text-decoration: underline; }
[data-theme="macintosh"] .var-section-onglet[aria-selected="true"] { background: #000000; color: #ffffff; border-color: #000000; text-decoration: none; }
[data-theme="macintosh"] .var-section-onglet[aria-selected="true"] * { color: inherit; }
[data-theme="macintosh"] .var-regles { background: #ffffff; border: 1px solid #000000; border-left-width: 4px; }
[data-theme="macintosh"] .segmente__option code { background: transparent; border: 0; color: inherit; }

/* Saisie vocale, fenêtre « Nouveautés », bouton « Nouveautés » (V11). */
[data-theme="macintosh"] .dictee-bulle--info { background: #ffffff; border: 1px solid #000000; box-shadow: 2px 2px 0 #000000; }
[data-theme="macintosh"] .dictee-corriger { box-shadow: 2px 2px 0 #000000; }
[data-theme="macintosh"] .historique-filtres { background: #ffffff; border-bottom: 1px solid #000000; }
[data-theme="macintosh"] .historique-frise__lien:hover { background: #000000; color: #ffffff; }
[data-theme="macintosh"] .historique-frise__lien:hover * { color: #ffffff; }
[data-theme="macintosh"] .historique-cat { background: #ffffff; border-color: #000000; color: #000000; }
[data-theme="macintosh"] .entete__nouveautes {
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  border-radius: 6px;
  font-family: var(--police-titre);
}
[data-theme="macintosh"] .entete__nouveautes:hover { background: #ffffff; box-shadow: 1px 1px 0 #000000; }
[data-theme="macintosh"] .entete__nouveautes:active { background: #000000; color: #ffffff; }
[data-theme="macintosh"] .entete__nouveautes-version { color: #4d4d4d; }
[data-theme="macintosh"] .trophee { background: #ffffff; border: 1px dotted #000000; box-shadow: none; }
[data-theme="macintosh"] .trophee__icone { color: #8c8c8c; opacity: 1; }
[data-theme="macintosh"] .trophee--obtenu { border: 1px solid #000000; border-left-width: 4px; box-shadow: 2px 2px 0 #000000; }
[data-theme="macintosh"] .trophee--obtenu .trophee__icone,
[data-theme="macintosh"] .trophee--obtenu .trophee__etat { color: #000000; }
[data-theme="macintosh"] .trophee__titre { font-family: var(--police-titre); font-weight: 700; }
[data-theme="macintosh"] .pied { background: transparent; border-top: 0; margin-top: 2rem; }
[data-theme="macintosh"] .pied__contenu {
  width: calc(100% - 3rem);
  max-width: calc(var(--largeur-max) - 3rem);
  margin: 0 auto 1.5rem;
}
[data-theme="macintosh"] .pied__colonne p,
[data-theme="macintosh"] .pied__liste { color: #000000; }
[data-theme="macintosh"] .pied__bas {
  max-width: none;
  background: #ffffff;
  border-top: 2px solid #000000;
  color: #000000;
}

/* --------------------------------------------------------------------------
   3.13 Ascenseurs : rail tramé à 50 %, curseur blanc, flèches creuses
   -------------------------------------------------------------------------- */
[data-theme="macintosh"] .notes__liste,
[data-theme="macintosh"] .notes__plan { scrollbar-width: auto; }
[data-theme="macintosh"]::-webkit-scrollbar,
[data-theme="macintosh"] ::-webkit-scrollbar { width: 16px; height: 16px; background: #ffffff; }
[data-theme="macintosh"]::-webkit-scrollbar-track,
[data-theme="macintosh"] ::-webkit-scrollbar-track { background: var(--mac-trame-50); border: 1px solid #000000; }
[data-theme="macintosh"]::-webkit-scrollbar-thumb,
[data-theme="macintosh"] ::-webkit-scrollbar-thumb { background: #ffffff; border: 1px solid #000000; }
[data-theme="macintosh"]::-webkit-scrollbar-button:single-button,
[data-theme="macintosh"] ::-webkit-scrollbar-button:single-button {
  display: block;
  width: 16px;
  height: 16px;
  background: #ffffff center / 14px 14px no-repeat;
  border: 1px solid #000000;
}
[data-theme="macintosh"]::-webkit-scrollbar-button:vertical:decrement,
[data-theme="macintosh"] ::-webkit-scrollbar-button:vertical:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M8 3.5L3.5 8h3v4.5h3V8h3z' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E"); }
[data-theme="macintosh"]::-webkit-scrollbar-button:vertical:increment,
[data-theme="macintosh"] ::-webkit-scrollbar-button:vertical:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M8 12.5L3.5 8h3V3.5h3V8h3z' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E"); }
[data-theme="macintosh"]::-webkit-scrollbar-button:horizontal:decrement,
[data-theme="macintosh"] ::-webkit-scrollbar-button:horizontal:decrement { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M3.5 8L8 3.5v3h4.5v3H8v3z' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E"); }
[data-theme="macintosh"]::-webkit-scrollbar-button:horizontal:increment,
[data-theme="macintosh"] ::-webkit-scrollbar-button:horizontal:increment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath d='M12.5 8L8 3.5v3H3.5v3H8v3z' fill='%23fff' stroke='%23000'/%3E%3C/svg%3E"); }
[data-theme="macintosh"]::-webkit-scrollbar-button:active,
[data-theme="macintosh"] ::-webkit-scrollbar-button:active { background-color: #000000; }
[data-theme="macintosh"]::-webkit-scrollbar-corner,
[data-theme="macintosh"] ::-webkit-scrollbar-corner { background: #ffffff; }
[data-theme="macintosh"]::-webkit-scrollbar-button:start:increment,
[data-theme="macintosh"] ::-webkit-scrollbar-button:start:increment,
[data-theme="macintosh"]::-webkit-scrollbar-button:end:decrement,
[data-theme="macintosh"] ::-webkit-scrollbar-button:end:decrement { display: none; }
@supports (-moz-appearance: none) {
  [data-theme="macintosh"],
  [data-theme="macintosh"] * { scrollbar-color: #000000 #ffffff; }
}

@media (max-width: 640px) {
  [data-theme="macintosh"] .pied__contenu { width: calc(100% - 2rem); }
  [data-theme="macintosh"] .onglet { padding: 0.55rem 0.7rem; }
}


/* ##########################################################################
   4. THÈME « CONTRASTE ÉLEVÉ »
   ##########################################################################
   Objectif WCAG AAA (7:1) pour le texte : blanc sur noir pur. Le jaune
   (#ffff00) signale ce qui est interactif ou actif : liens, focus clavier,
   boutons enfoncés, éléments choisis. Bords blancs épais, aucune ombre,
   aucune image de fond, cibles plus grandes. */

/* --------------------------------------------------------------------------
   4.1 Jetons
   -------------------------------------------------------------------------- */
[data-theme="contraste"] {
  --fond: #000000;
  --fond-carte: #000000;
  --fond-sourd: #000000;
  --fond-saisie: #000000;
  --texte: #ffffff;
  --texte-2: #ffffff;
  --texte-3: #dddddd;             /* 15:1 */
  --bordure: #ffffff;
  --bordure-forte: #ffffff;
  --accent: #ffff00;
  --accent-fort: #ffff00;
  --accent-doux: #1a1a00;
  --sur-accent: #000000;
  --danger: #ff7a7a;              /* 8:1 sur noir */
  --danger-doux: #2a0000;
  --succes: #5cff9d;
  --avertissement: #ffb347;
  --info: #00ffff;
  --fam-nettoyage: #00ffcc;
  --fam-transformation: #ff99ff;
  --fam-developpeur: #7cc4ff;
  --fam-export: #ffcc00;
  --fam-generateur: #ff8acb;
  --fam-motsVides: #ccff66;
  --fam-redaction: #ffaa55;
  --cat-rouge: #ff7a7a;
  --cat-orange: #ffaa55;
  --cat-jaune: #ffff66;
  --cat-vert: #66ff99;
  --cat-turquoise: #33ffee;
  --cat-bleu: #88bbff;
  --cat-violet: #cc99ff;
  --cat-gris: #dddddd;
  --c-voyelle: #ff8f8f;
  --c-consonne: #8fc8ff;
  --c-chiffre: #ffff00;
  --c-chiffre-fond: rgba(255, 255, 0, 0.18);
  --c-ponctuation: #ff9cff;
  --c-espace-fond: rgba(0, 255, 255, 0.35);
  --r-longue: rgba(255, 255, 0, 0.32);
  --r-tres-longue: rgba(255, 90, 90, 0.42);
  --r-adverbe: rgba(0, 200, 255, 0.36);
  --r-tournure: rgba(255, 120, 255, 0.36);
  --r-repetition: rgba(255, 170, 60, 0.38);
  --r-repetition-trait: #ffaa55;
  --r-invisible: #ff7a7a;
  --r-insecable: rgba(90, 255, 150, 0.36);
  --surligne-fond: #ffff00;
  --surligne-texte: #000000;
  --diff-suppr-fond: #3d0000;
  --diff-suppr-marque: #8a0000;
  --diff-suppr-fort: #ff7a7a;
  --diff-ajout-fond: #003d1a;
  --diff-ajout-marque: #005a26;
  --diff-ajout-fort: #5cff9d;
  --diff-modif-fond: #3a3a00;

  --rayon: 0;
  --rayon-carte: 0;
  --ombre: 0 0 0 0 transparent;
  --ombre-forte: 0 0 0 0 transparent;
  --police: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-titre: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-chiffres: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
  scrollbar-color: #ffffff #000000;

  --hc-fleche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23fff'/%3E%3C/svg%3E");
  --hc-coche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23000' stroke-width='2.6'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   4.2 Base : liens soulignés, focus jaune épais
   -------------------------------------------------------------------------- */
[data-theme="contraste"] body { background: #000000; color: #ffffff; }
[data-theme="contraste"] *,
[data-theme="contraste"] *::before,
[data-theme="contraste"] *::after { border-radius: 0; box-shadow: none; text-shadow: none; }
[data-theme="contraste"] mark.surligne { border-radius: 0; }
/* … sauf les quelques ombres qui portent une INFORMATION (pas un décor) :
   on les remet, en plus épais. */
[data-theme="contraste"] .r-repetition { box-shadow: inset 0 -3px 0 var(--r-repetition-trait); }
[data-theme="contraste"] .r-invisible { box-shadow: 0 0 0 2px var(--r-invisible); }
[data-theme="contraste"] .var-ligne--erreur td:first-child { box-shadow: inset 6px 0 0 var(--danger); }
[data-theme="contraste"] .var-ligne--avertissement td:first-child { box-shadow: inset 6px 0 0 var(--avertissement); }
[data-theme="contraste"] .deplacement-choisi { outline: 3px solid #ffff00; }
@media (max-width: 760px) {
  /* Sur téléphone, style.css marque déjà la ligne entière par un liseré. */
  [data-theme="contraste"] .var-ligne--erreur td:first-child,
  [data-theme="contraste"] .var-ligne--avertissement td:first-child { box-shadow: none; }
}
[data-theme="contraste"] ::selection { background: #ffff00; color: #000000; }
[data-theme="contraste"] a {
  color: #ffff00;
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}
[data-theme="contraste"] a:hover { color: #ffff00; text-decoration-thickness: 0.22em; }
/* Focus : contour jaune de 3 px, décalé de 3 px, sur TOUT élément. */
[data-theme="contraste"] :focus-visible,
[data-theme="contraste"] .champ:focus,
[data-theme="contraste"] .zone-texte:focus,
[data-theme="contraste"] .note-texte:focus,
[data-theme="contraste"] .note-entete__titre:focus,
[data-theme="contraste"] .note-section__titre:focus {
  outline: 3px solid #ffff00;
  outline-offset: 3px;
}
[data-theme="contraste"] .segmente__option input:focus-visible + span { outline: 3px solid #ffff00; outline-offset: 3px; }
[data-theme="contraste"] .note-section__texte:focus { outline: 3px solid #ffff00; outline-offset: -3px; }
[data-theme="contraste"] .palette__champ:focus-within { outline: 3px solid #ffff00; outline-offset: -3px; }
/* Dans une liste qui défile, le contour se dessine à l'intérieur. */
[data-theme="contraste"] .note-item__bouton:focus-visible,
[data-theme="contraste"] .plan__bouton:focus-visible,
[data-theme="contraste"] .version-item__bouton:focus-visible,
[data-theme="contraste"] .menu__item:focus-visible,
[data-theme="contraste"] .notes__stockage:focus-visible { outline-offset: -4px; }
[data-theme="contraste"] .lien-evitement { background: #ffff00; color: #000000; border: 2px solid #ffffff; }

/* --------------------------------------------------------------------------
   4.3 En-tête et onglets
   -------------------------------------------------------------------------- */
[data-theme="contraste"] .entete { background: #000000; border-bottom: 2px solid #ffffff; }
[data-theme="contraste"] .entete__titre h1 { font-weight: 700; letter-spacing: 0; }
[data-theme="contraste"] .entete__titre p,
[data-theme="contraste"] .reglage__libelle { color: #ffffff; }
[data-theme="contraste"] .onglets { border-top: 2px solid #ffffff; }
[data-theme="contraste"] .onglets__contenu { gap: 0.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
[data-theme="contraste"] .onglet {
  min-height: 2.75rem;
  border: 2px solid #ffffff;
  color: #ffffff;
  font-weight: 600;
}
[data-theme="contraste"] .onglet:hover { background: #000000; color: #ffff00; border-color: #ffff00; text-decoration: underline; }
[data-theme="contraste"] .onglet[aria-selected="true"] { background: #ffff00; border-color: #ffff00; color: #000000; text-decoration: none; }

/* --------------------------------------------------------------------------
   4.4 Cadres : bords blancs de 2 px
   -------------------------------------------------------------------------- */
[data-theme="contraste"] .carte,
[data-theme="contraste"] .panneau-repliable,
[data-theme="contraste"] .groupe,
[data-theme="contraste"] .menu__liste,
[data-theme="contraste"] .notification,
[data-theme="contraste"] .focus-barre,
[data-theme="contraste"] .barre-lecture,
[data-theme="contraste"] .bandeau-organiser,
[data-theme="contraste"] .alerte,
[data-theme="contraste"] .panneau-outil,
[data-theme="contraste"] .cmp-reglages,
[data-theme="contraste"] .barre-outils,
[data-theme="contraste"] .session__stat,
[data-theme="contraste"] .trophee,
[data-theme="contraste"] .guide__regles li,
[data-theme="contraste"] .modele,
[data-theme="contraste"] .import-apercu,
[data-theme="contraste"] .anon__table,
[data-theme="contraste"] .colonne-liste,
[data-theme="contraste"] .note-section,
[data-theme="contraste"] .versions__liste,
[data-theme="contraste"] .versions__contenu,
[data-theme="contraste"] .diff-flux__texte {
  background: #000000;
  border: 2px solid #ffffff;
}
/* Couleur de famille ou de type gardée sur un liseré épais. */
[data-theme="contraste"] .groupe { border-left: 8px solid var(--famille); }
[data-theme="contraste"] .notification { border-left: 8px solid var(--info); }
[data-theme="contraste"] .notification--succes { border-left-color: var(--succes); }
[data-theme="contraste"] .notification--avertissement { border-left-color: var(--avertissement); }
[data-theme="contraste"] .notification--erreur { border-left-color: var(--danger); }
[data-theme="contraste"] .alerte { border-left-width: 8px; }
[data-theme="contraste"] .alerte--danger { border-color: var(--danger); background: #000000; }
[data-theme="contraste"] .alerte--avertissement { border-color: var(--avertissement); background: #000000; }
[data-theme="contraste"] .alerte--info { border-color: var(--info); background: #000000; }
[data-theme="contraste"] .colonne-liste { border-top-width: 6px; }
[data-theme="contraste"] .colonne-liste--a { border-top-color: var(--diff-suppr-fort); }
[data-theme="contraste"] .colonne-liste--b { border-top-color: var(--diff-ajout-fort); }
[data-theme="contraste"] .colonne-liste--communs { border-top-color: #ffff00; }
[data-theme="contraste"] .colonne-liste--doublons { border-top-color: var(--avertissement); }
[data-theme="contraste"] .note-section { border-left-width: 6px; }
[data-theme="contraste"] .note-section--active { border-left-color: #ffff00; }
[data-theme="contraste"] .trophee--obtenu { border-left: 8px solid #ffff00; }
[data-theme="contraste"] .trophee__icone { opacity: 1; color: #bfbfbf; }
[data-theme="contraste"] .carte--limites-selection { outline: 3px solid #ffff00; outline-offset: 2px; }
[data-theme="contraste"] .titre-section,
[data-theme="contraste"] .pied__titre { font-family: var(--police-titre); font-weight: 700; letter-spacing: 0; }
[data-theme="contraste"] .carte__titre i,
[data-theme="contraste"] .perso__titre i,
[data-theme="contraste"] .panneau-outil__titre i,
[data-theme="contraste"] .notes__plan-titre i,
[data-theme="contraste"] .stat dt i,
[data-theme="contraste"] .groupe__icone { color: #ffffff; }
[data-theme="contraste"] .panneau-outil__titre i { color: var(--famille, #ffffff); }
[data-theme="contraste"] .groupe__icone { color: var(--famille); }
[data-theme="contraste"] .stat { border-bottom: 1px solid #ffffff; }
[data-theme="contraste"] .stat--principale { background: #000000; border: 2px solid #ffff00; margin-left: 0; margin-right: 0; }
[data-theme="contraste"] .stat--principale dd { color: #ffff00; }
[data-theme="contraste"] .scrabble__score,
[data-theme="contraste"] .session__stat dd { color: #ffff00; }

/* --------------------------------------------------------------------------
   4.5 Boutons : bords blancs, jaune = enfoncé, cibles de 44 px
   -------------------------------------------------------------------------- */
[data-theme="contraste"] .btn,
[data-theme="contraste"] .btn-outil,
[data-theme="contraste"] .segmente__option > span,
[data-theme="contraste"] .notification__action,
[data-theme="contraste"] .badge-alerte {
  background: #000000;
  color: #ffffff;
  border: 2px solid #ffffff;
  transition: none;
}
[data-theme="contraste"] .btn { min-height: 2.75rem; }
[data-theme="contraste"] .btn--compact { min-height: 2.5rem; }
[data-theme="contraste"] .btn--icone { width: 2.75rem; }
[data-theme="contraste"] .btn--compact.btn--icone { width: 2.5rem; }
[data-theme="contraste"] .btn-outil { min-height: 3rem; border-left: 8px solid var(--famille, #ffffff); }
[data-theme="contraste"] .segmente__option > span { min-height: 2.75rem; margin-left: 0; }
/* Survol : texte et bord jaunes. */
[data-theme="contraste"] .btn:hover,
[data-theme="contraste"] .btn-outil:hover,
[data-theme="contraste"] .segmente__option > span:hover,
[data-theme="contraste"] .notification__action:hover,
[data-theme="contraste"] .badge-alerte:hover {
  background: #000000;
  color: #ffff00;
  border-color: #ffff00;
}
[data-theme="contraste"] .btn-outil:hover { border-left-color: var(--famille, #ffff00); }
/* Enfoncé (clic, bascule active, menu ouvert, option choisie) : fond jaune. */
[data-theme="contraste"] .btn:active,
[data-theme="contraste"] .btn[aria-pressed="true"],
[data-theme="contraste"] .menu[open] > summary.btn,
[data-theme="contraste"] .note-meta-bascule[aria-expanded="true"],
[data-theme="contraste"] .btn-outil:active,
[data-theme="contraste"] .segmente__option input:checked + span,
[data-theme="contraste"] .segmente__option input:checked + span:hover {
  background: #ffff00;
  border-color: #ffff00;
  color: #000000;
}
[data-theme="contraste"] .btn:active *,
[data-theme="contraste"] .btn[aria-pressed="true"] *,
[data-theme="contraste"] .btn-outil:active *,
[data-theme="contraste"] .menu[open] > summary.btn *,
[data-theme="contraste"] .segmente__option input:checked + span * { color: inherit; }
[data-theme="contraste"] .btn-bascule[aria-pressed="true"]::after { color: inherit; }
[data-theme="contraste"] .btn-micro[aria-pressed="true"] { background: var(--danger); border-color: var(--danger); color: #000000; }
/* Bouton principal : fond blanc, texte noir (le jaune reste réservé à
   l'état enfoncé). */
[data-theme="contraste"] .btn--principal { background: #ffffff; border-color: #ffffff; color: #000000; font-weight: 700; }
[data-theme="contraste"] .btn--principal * { color: inherit; }
[data-theme="contraste"] .btn--principal:hover { background: #ffff00; border-color: #ffff00; color: #000000; }
[data-theme="contraste"] .btn--danger { color: var(--danger); border-color: var(--danger); }
[data-theme="contraste"] .btn--danger:hover { background: var(--danger); border-color: var(--danger); color: #000000; }
[data-theme="contraste"] .btn--danger:hover * { color: inherit; }
/* Bouton discret : bord en tirets (on voit toujours où cliquer). */
[data-theme="contraste"] .btn--discret,
[data-theme="contraste"] .commande,
[data-theme="contraste"] .notes__stockage,
[data-theme="contraste"] .notification__fermer {
  background: #000000;
  color: #ffffff;
  border: 2px dashed #ffffff;
}
[data-theme="contraste"] .btn--discret:hover,
[data-theme="contraste"] .commande:hover,
[data-theme="contraste"] .notes__stockage:hover,
[data-theme="contraste"] .notification__fermer:hover { color: #ffff00; border-color: #ffff00; background: #000000; }
[data-theme="contraste"] .commande { width: 2.5rem; height: 2.5rem; }
/* Désactivé : reste lisible (gris clair, 11:1) mais bord en pointillés. */
[data-theme="contraste"] .btn:disabled,
[data-theme="contraste"] .btn:disabled:hover,
[data-theme="contraste"] .btn[aria-disabled="true"] {
  opacity: 1;
  background: #000000;
  color: #bfbfbf;
  border: 2px dotted #bfbfbf;
}
[data-theme="contraste"] .btn-outil__icone,
[data-theme="contraste"] .btn-favori i { color: var(--famille, #ffffff); }
[data-theme="contraste"] .segmente__legende { color: #ffffff; font-size: 0.85rem; }

/* --------------------------------------------------------------------------
   4.6 Champs, listes déroulantes, cases (plus grandes)
   -------------------------------------------------------------------------- */
[data-theme="contraste"] .champ,
[data-theme="contraste"] .note-texte {
  background-color: #000000;
  color: #ffffff;
  border: 2px solid #ffffff;
}
/* Cibles plus hautes pour les champs d'une ligne (pas pour les zones de
   texte, qui gardent leur hauteur propre). */
[data-theme="contraste"] input.champ,
[data-theme="contraste"] select.champ { min-height: 2.75rem; }
[data-theme="contraste"] .zone-texte { border-color: #ffffff; }
[data-theme="contraste"] .zone-texte:focus,
[data-theme="contraste"] .champ:focus,
[data-theme="contraste"] .note-texte:focus { border-color: #ffff00; }
[data-theme="contraste"] .champ:hover { border-color: #ffff00; }
[data-theme="contraste"] ::placeholder { color: #c8c8c8; opacity: 1; }
[data-theme="contraste"] select.champ {
  appearance: none;
  padding-right: 2rem;
  background: #000000 var(--hc-fleche) right 0.7rem center / 0.7rem 0.42rem no-repeat;
}
[data-theme="contraste"] .case { gap: 0.6rem; min-height: 2rem; color: #ffffff; }
[data-theme="contraste"] .case input[type="checkbox"],
[data-theme="contraste"] .case input[type="radio"] {
  appearance: none;
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0;
  background: #000000;
  border: 2px solid #ffffff;
}
[data-theme="contraste"] .case input[type="checkbox"]:checked { background: #ffff00 var(--hc-coche) center / 100% 100% no-repeat; border-color: #ffff00; }
[data-theme="contraste"] .case input[type="radio"] { border-radius: 50%; }
[data-theme="contraste"] .case input[type="radio"]:checked { background: radial-gradient(circle, #000000 0 0.3rem, #ffff00 0.32rem); border-color: #ffff00; }
[data-theme="contraste"] .champ-recherche__icone,
[data-theme="contraste"] .champ-libelle { color: #ffffff; }

/* --------------------------------------------------------------------------
   4.7 Éditeur, jauges, accordéons
   -------------------------------------------------------------------------- */
[data-theme="contraste"] .barre-outils__favoris,
[data-theme="contraste"] .note-barre .barre-outils__groupe + .barre-outils__groupe:not(.barre-outils__groupe--fin) { border-left: 2px solid #ffffff; }
[data-theme="contraste"] .coloration,
[data-theme="contraste"] .note-meta,
[data-theme="contraste"] .perso__section,
[data-theme="contraste"] .notes__barre-pied,
[data-theme="contraste"] .notes__plan-aller,
[data-theme="contraste"] .limites__reglages,
[data-theme="contraste"] .succes,
[data-theme="contraste"] .dialogue__pied,
[data-theme="contraste"] .palette__aide { border-color: #ffffff; border-top-width: 2px; }
[data-theme="contraste"] .note-meta,
[data-theme="contraste"] .perso__section { border-top-width: 0; border-bottom-width: 2px; }
[data-theme="contraste"] .pastille,
[data-theme="contraste"] .pastille-categorie { border: 1px solid #ffffff; }
/* Pas d'image de fond : la légende « phrases longues » devient unie. */
[data-theme="contraste"] .pastille--longue { background: var(--r-longue); }
[data-theme="contraste"] .diff__vide { background: #262626; }
[data-theme="contraste"] .portee--selection { background: #ffff00; color: #000000; }
[data-theme="contraste"] .resume-compact { background: #000000; border: 2px solid #ffffff; color: #ffffff; }
[data-theme="contraste"] .objectif__piste,
[data-theme="contraste"] .jauge__barre,
[data-theme="contraste"] .jauge-limite__piste { height: 0.9rem; background: #000000; border: 2px solid #ffffff; }
[data-theme="contraste"] .objectif__remplissage { background: #ffff00; }
[data-theme="contraste"] .jauge-limite--depasse .jauge-limite__message { text-decoration: underline; }
[data-theme="contraste"] .suggestions,
[data-theme="contraste"] .guide__pourquoi { background: #000000; border: 2px solid #ffffff; border-left: 8px solid #ffff00; color: #ffffff; }
[data-theme="contraste"] .dictee-provisoire { background: #000000; border: 2px dashed #ffff00; color: #ffffff; }
[data-theme="contraste"] .panneau-repliable__bascule,
[data-theme="contraste"] .groupe__bascule { min-height: 3rem; color: #ffffff; }
[data-theme="contraste"] .panneau-repliable__bascule:hover,
[data-theme="contraste"] .groupe__bascule:hover { background: #000000; color: #ffff00; text-decoration: underline; }
[data-theme="contraste"] .panneau-repliable__bascule[aria-expanded="true"],
[data-theme="contraste"] .groupe__bascule[aria-expanded="true"] { border-bottom: 2px solid #ffffff; }
[data-theme="contraste"] .panneau-repliable__bascule > i:first-child,
[data-theme="contraste"] .chevron { color: #ffffff; }
[data-theme="contraste"] .groupe__description { color: #dddddd; }
[data-theme="contraste"] .liste-mots-cles li { border-bottom: 1px solid #ffffff; }
[data-theme="contraste"] .mot-cle__nombre { background: #000000; border: 1px solid #ffff00; color: #ffff00; }

/* --------------------------------------------------------------------------
   4.8 Listes, bloc-notes : élément choisi = fond jaune
   -------------------------------------------------------------------------- */
[data-theme="contraste"] .note-item__bouton[aria-current="true"],
[data-theme="contraste"] .plan__bouton[aria-current="true"],
[data-theme="contraste"] .version-item__bouton[aria-current="true"],
[data-theme="contraste"] .palette__option[aria-selected="true"],
[data-theme="contraste"] .menu__item:hover,
[data-theme="contraste"] .menu__item:focus-visible {
  background: #ffff00;
  border-left-color: #ffff00;
  color: #000000;
}
[data-theme="contraste"] .note-item__bouton[aria-current="true"] *,
[data-theme="contraste"] .plan__bouton[aria-current="true"] *,
[data-theme="contraste"] .version-item__bouton[aria-current="true"] *,
[data-theme="contraste"] .palette__option[aria-selected="true"] *,
[data-theme="contraste"] .menu__item:hover *,
[data-theme="contraste"] .menu__item:focus-visible * { color: #000000; }
[data-theme="contraste"] .palette__option[aria-selected="true"] b { text-decoration: underline; }
[data-theme="contraste"] .note-item__bouton[aria-current="true"] .pastille-categorie { border-color: #000000; }
[data-theme="contraste"] .menu__item:focus-visible,
[data-theme="contraste"] .note-item__bouton[aria-current="true"]:focus-visible,
[data-theme="contraste"] .plan__bouton[aria-current="true"]:focus-visible,
[data-theme="contraste"] .version-item__bouton[aria-current="true"]:focus-visible { outline-color: #000000; }
[data-theme="contraste"] .note-item__bouton:hover,
[data-theme="contraste"] .plan__bouton:hover,
[data-theme="contraste"] .version-item__bouton:hover { background: #000000; text-decoration: underline; }
[data-theme="contraste"] .note-item__bouton,
[data-theme="contraste"] .plan__bouton { padding-top: 0.7rem; padding-bottom: 0.7rem; }
[data-theme="contraste"] .notes__liste,
[data-theme="contraste"] .note-item,
[data-theme="contraste"] .version-item__bouton { border-color: #ffffff; }
[data-theme="contraste"] .notes__liste { border-top-width: 2px; }
[data-theme="contraste"] .menu__item { min-height: 2.75rem; color: #ffffff; }
[data-theme="contraste"] .menu__item i { color: #ffffff; }
[data-theme="contraste"] .menu__item--danger,
[data-theme="contraste"] .menu__item--danger i { color: var(--danger); }
[data-theme="contraste"] .menu__separateur { border-top: 2px solid #ffffff; }
[data-theme="contraste"] .notes__rappel { background: #000000; color: #ffffff; border-left: 6px solid var(--avertissement); }
[data-theme="contraste"] .note-entete__titre { border: 2px solid transparent; }
[data-theme="contraste"] .note-entete__titre:hover { border-color: #ffffff; }
[data-theme="contraste"] .note-section__entete { background: #000000; border-bottom: 2px solid #ffffff; }
[data-theme="contraste"] .note-section__titre:hover { background: #000000; border-color: #ffffff; }
[data-theme="contraste"] .note-section__titre:focus { background: #000000; }
[data-theme="contraste"] .note-ajouter-section { border-style: dashed; }

/* --------------------------------------------------------------------------
   4.9 Tableaux, comparaison, petits éléments
   -------------------------------------------------------------------------- */
[data-theme="contraste"] .tableau-var th,
[data-theme="contraste"] .diff th { background: #000000; color: #ffffff; border-bottom: 2px solid #ffffff; }
[data-theme="contraste"] .tableau-var td,
[data-theme="contraste"] .diff td { border-bottom: 1px solid #ffffff; }
[data-theme="contraste"] .diff__repli td { background: #000000; }
[data-theme="contraste"] .diff__deplier { color: #ffff00; text-decoration: underline; min-height: 2.5rem; }
[data-theme="contraste"] .diff__deplier:hover { background: #000000; text-decoration-thickness: 0.2em; }
[data-theme="contraste"] .diff ins,
[data-theme="contraste"] .diff-flux ins,
[data-theme="contraste"] .versions__contenu ins { border-bottom-width: 3px; }
[data-theme="contraste"] .cmp-lettre--a { background: var(--danger); color: #000000; }
[data-theme="contraste"] .cmp-lettre--b { background: var(--succes); color: #000000; }
[data-theme="contraste"] .cmp-pastille { background: #000000; border: 2px solid #ffffff; border-left-width: 8px; }
[data-theme="contraste"] .cmp-pastille--egal { border-left-color: #dddddd; }
[data-theme="contraste"] .cmp-pastille--modif { border-left-color: var(--avertissement); }
[data-theme="contraste"] .cmp-pastille--suppr { border-left-color: var(--diff-suppr-fort); }
[data-theme="contraste"] .cmp-pastille--ajout { border-left-color: var(--diff-ajout-fort); }
[data-theme="contraste"] .cmp-pastille--similarite { border-left-color: #ffff00; }
[data-theme="contraste"] .cmp-message { border: 2px dashed #ffffff; color: #ffffff; }
[data-theme="contraste"] kbd { background: #000000; border: 2px solid #ffffff; color: #ffffff; }
[data-theme="contraste"] code { background: #000000; border: 1px solid #ffffff; color: #ffffff; }
[data-theme="contraste"] .var-nom code { background: #000000; border: 1px solid #ffff00; color: #ffff00; }
[data-theme="contraste"] .badge,
[data-theme="contraste"] .etiquette-profil { border: 2px solid #ffffff; color: #ffffff; }
[data-theme="contraste"] .badge--nommee,
[data-theme="contraste"] .badge--actuelle { border-color: #ffff00; color: #ffff00; }

/* --------------------------------------------------------------------------
   4.10 Boîtes de dialogue, palette, notifications, infobulles
   -------------------------------------------------------------------------- */
[data-theme="contraste"] .dialogue { background: #000000; color: #ffffff; border: 3px solid #ffffff; }
[data-theme="contraste"] .dialogue::backdrop { background: rgba(0, 0, 0, 0.85); }
[data-theme="contraste"] .dialogue__entete { border-bottom: 2px solid #ffffff; }
[data-theme="contraste"] .dialogue__entete h2 { font-family: var(--police-titre); font-weight: 700; }
[data-theme="contraste"] .dialogue__pied { background: #000000; }
[data-theme="contraste"] .dialogue__message { color: #ffffff; }
[data-theme="contraste"] .palette__champ { border-bottom: 2px solid #ffffff; }
[data-theme="contraste"] .palette__champ > i { color: #ffffff; }
[data-theme="contraste"] .palette__option { min-height: 2.75rem; }
[data-theme="contraste"] .palette__option > i { color: var(--famille, #ffffff); }
[data-theme="contraste"] .palette__groupe { color: #ffffff; }
[data-theme="contraste"] .notification { color: #ffffff; }
[data-theme="contraste"] .infobulle {
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  outline: 2px solid #ffffff;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   4.11 Pied de page
   -------------------------------------------------------------------------- */
/* Composants ajoutés en V11 : succès, sous-onglets Variables, dictée,
   fenêtre « Nouveautés ». */
[data-theme="contraste"] .succes-resume,
[data-theme="contraste"] .var-fiche,
[data-theme="contraste"] .var-regles-teepee,
[data-theme="contraste"] .historique-item,
[data-theme="contraste"] .historique-frise,
[data-theme="contraste"] .dictee-corr__liste { background: #000000; border: 2px solid #ffffff; }
[data-theme="contraste"] .historique-item { border-left: 8px solid var(--cat-couleur); }
[data-theme="contraste"] .trophee--secret:not(.trophee--obtenu) { border-style: dashed; }
[data-theme="contraste"] .trophee__badge { border: 2px solid #ffff00; color: #ffff00; }
[data-theme="contraste"] .progression { height: 0.9rem; background: #000000; border: 2px solid #ffffff; }
[data-theme="contraste"] .var-sections { border-bottom: 2px solid #ffffff; gap: 0.5rem; }
[data-theme="contraste"] .var-section-onglet {
  min-height: 2.75rem;
  background: #000000;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-bottom: 0;
}
[data-theme="contraste"] .var-section-onglet:hover { background: #000000; color: #ffff00; border-color: #ffff00; text-decoration: underline; }
[data-theme="contraste"] .var-section-onglet[aria-selected="true"] { background: #ffff00; color: #000000; border-color: #ffff00; text-decoration: none; }
[data-theme="contraste"] .var-section-onglet[aria-selected="true"] * { color: inherit; }
[data-theme="contraste"] .var-regles { background: #000000; border: 2px solid #ffffff; border-left: 8px solid #ffff00; }
[data-theme="contraste"] .var-fiche__titre { color: #ffff00; }
[data-theme="contraste"] .var-fiche__liaison { border: 2px dashed #ffff00; color: #ffffff; }
[data-theme="contraste"] .segmente__option code { background: transparent; border: 0; color: inherit; }
[data-theme="contraste"] .dictee-bulle--info { background: #000000; border: 2px dashed #ffff00; color: #ffffff; }
[data-theme="contraste"] .historique-filtres { background: #000000; border-bottom: 2px solid #ffffff; }
[data-theme="contraste"] .historique-frise__lien:hover { background: #000000; color: #ffff00; text-decoration: underline; }
[data-theme="contraste"] .historique-cat { background: #000000; border-width: 2px; }
[data-theme="contraste"] .entete__nouveautes { min-height: 2.5rem; background: #000000; color: #ffffff; border: 2px solid #ffffff; }
[data-theme="contraste"] .entete__nouveautes:hover { background: #000000; color: #ffff00; border-color: #ffff00; }
[data-theme="contraste"] .entete__nouveautes-version { color: #dddddd; }

[data-theme="contraste"] .pied { background: #000000; border-top: 2px solid #ffffff; }
[data-theme="contraste"] .pied__bas { border-top: 2px solid #ffffff; color: #ffffff; }
[data-theme="contraste"] .pied__colonne p,
[data-theme="contraste"] .pied__liste { color: #ffffff; }

@media (max-width: 640px) {
  [data-theme="contraste"] .onglet { padding: 0.6rem 0.7rem; }
  [data-theme="contraste"] .onglets__contenu { gap: 0.35rem; }
  [data-theme="contraste"] .barre-outils__favoris { border-left: 0; }
}
@media (max-width: 560px) {
  [data-theme="contraste"] .onglets__contenu { padding-left: 0.5rem; padding-right: 0.5rem; }
}
/* Très petit écran : les boutons (plus grands dans ce thème) passent à la
   ligne au lieu de dépasser de l'écran. */
@media (max-width: 400px) {
  [data-theme="contraste"] .barre-outils__groupe { flex-wrap: wrap; row-gap: 0.35rem; }
}


/* ##########################################################################
   4 bis. COMMUN AUX 4 THÈMES : TRÈS PETITS ÉCRANS (320 px)
   ##########################################################################
   Les boutons de ces thèmes ont des bords plus épais ou une poignée : à
   320 px, le groupe de droite de la barre d'outils passe à la ligne au
   lieu de sortir de la carte. */
@media (max-width: 400px) {
  [data-theme="windows95"] .barre-outils__groupe,
  [data-theme="terminal"] .barre-outils__groupe,
  [data-theme="macintosh"] .barre-outils__groupe,
  [data-theme="contraste"] .barre-outils__groupe { flex-wrap: wrap; row-gap: 0.35rem; }
  [data-theme="windows95"] .barre-outils::before { display: none; }   /* poignée masquée */
}


/* ##########################################################################
   5. MODE « COULEURS FORCÉES » (Windows : thèmes de contraste du système)
   ##########################################################################
   Dans ce mode, le navigateur remplace nos couleurs par celles du système
   et SUPPRIME les ombres et les dégradés. Conséquences et parades :
   • les reliefs Windows 95 (faits d'ombres) disparaissent → on garde de
     vrais bords pleins sur les cadres, boutons et champs ;
   • les états « enfoncé / choisi », souvent rendus par une couleur de
     fond, deviendraient invisibles → on les remet en couleur système
     Highlight (forced-color-adjust: none) ;
   • les cases à cocher dessinées à la main reprennent leur aspect natif ;
   • le focus clavier redevient un contour épais de la couleur système. */
@media (forced-colors: active) {
  [data-theme] .carte,
  [data-theme] .panneau-repliable,
  [data-theme] .groupe,
  [data-theme] .dialogue,
  [data-theme] .menu__liste,
  [data-theme] .notification,
  [data-theme] .entete,
  [data-theme] .pied__contenu,
  [data-theme] .succes,
  [data-theme] .alerte,
  [data-theme] .panneau-outil,
  [data-theme] .barre-outils {
    border: 1px solid CanvasText;
  }
  [data-theme] .btn,
  [data-theme] .btn-outil,
  [data-theme] .segmente__option > span,
  [data-theme] .onglet,
  [data-theme] .champ,
  [data-theme] .zone-texte,
  [data-theme] .note-texte {
    border: 1px solid ButtonText;
  }
  [data-theme] .champ,
  [data-theme] .zone-texte,
  [data-theme] .note-texte { border-color: CanvasText; }
  /* Focus clavier toujours visible. */
  [data-theme] :focus-visible,
  [data-theme] .champ:focus,
  [data-theme] .zone-texte:focus,
  [data-theme] .note-texte:focus {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }
  [data-theme] .segmente__option input:focus-visible + span { outline: 3px solid Highlight; outline-offset: 2px; }
  /* États choisis : couleur système de sélection. */
  [data-theme] .btn[aria-pressed="true"],
  [data-theme] .segmente__option input:checked + span,
  [data-theme] .onglet[aria-selected="true"],
  [data-theme] .note-item__bouton[aria-current="true"],
  [data-theme] .plan__bouton[aria-current="true"],
  [data-theme] .palette__option[aria-selected="true"],
  [data-theme] .groupe__bascule[aria-expanded="true"],
  [data-theme] .panneau-repliable__bascule[aria-expanded="true"] {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
    border-color: Highlight;
  }
  [data-theme] .btn[aria-pressed="true"] *,
  [data-theme] .segmente__option input:checked + span *,
  [data-theme] .onglet[aria-selected="true"] *,
  [data-theme] .note-item__bouton[aria-current="true"] *,
  [data-theme] .plan__bouton[aria-current="true"] *,
  [data-theme] .palette__option[aria-selected="true"] *,
  [data-theme] .groupe__bascule[aria-expanded="true"] *,
  [data-theme] .panneau-repliable__bascule[aria-expanded="true"] * { color: HighlightText; }
  /* Cases à cocher : aspect natif du système. */
  [data-theme] .case input[type="checkbox"],
  [data-theme] .case input[type="radio"] { appearance: auto; }
  /* Décors inutiles dans ce mode (faux boutons, lignes de balayage). */
  [data-theme="terminal"] body::after,
  [data-theme="windows95"] .carte > .titre-section::after,
  [data-theme="windows95"] .carte > .carte__titre::after,
  [data-theme="windows95"] .carte__entete > .titre-section::after,
  [data-theme="windows95"] .notes__barre-entete::after,
  [data-theme="windows95"] .notes__plan-titre::after,
  [data-theme="windows95"] .notes__accueil > .titre-section::after,
  [data-theme="windows95"] .succes__entete .titre-section::after,
  [data-theme="windows95"] .entete__titre::after { display: none; }
  /* Listes déroulantes : flèche native. */
  [data-theme] select.champ { appearance: auto; }
}

/* Correction (intégration V11) : quand la coloration est active, le texte de
   la zone est transparent (on voit la copie colorée dessous) ; la lueur verte
   du thème Terminal laissait alors un halo flou. Pas de lueur dans ce cas. */
[data-theme="terminal"] .avec-surlignage .zone-texte { text-shadow: none; }


/* ==========================================================================
   V12 — Dictée : calque, voyant et pastille dans les thèmes « à forme »
   ========================================================================== */
[data-theme="windows95"] .dictee-voyant,
[data-theme="windows95"] .dictee-pastille,
[data-theme="windows95"] .dictee-calque__indice {
  border-radius: 0;
  border-color: #ffffff #000000 #000000 #ffffff;
  background: #c0c0c0;
  color: #000000;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf;
}
[data-theme="terminal"] .dictee-voyant,
[data-theme="terminal"] .dictee-pastille,
[data-theme="terminal"] .dictee-calque__indice { border-radius: 0; box-shadow: none; background: var(--fond); }
[data-theme="terminal"] .dictee-calque__attente { background: transparent; text-decoration-style: double; }
[data-theme="macintosh"] .dictee-voyant,
[data-theme="macintosh"] .dictee-pastille,
[data-theme="macintosh"] .dictee-calque__indice { border: 1px solid #000000; background: #ffffff; color: #000000; box-shadow: 2px 2px 0 #000000; }
[data-theme="macintosh"] .dictee-voyant__point { background: #000000; box-shadow: none; }
[data-theme="macintosh"] .dictee-calque__attente { background: transparent; text-decoration: underline solid #000000; }
[data-theme="macintosh"] .commande--dictee { background: #000000; color: #ffffff; }
[data-theme="contraste"] .dictee-voyant,
[data-theme="contraste"] .dictee-pastille,
[data-theme="contraste"] .dictee-calque__indice { border: 2px solid #ffff00; background: #000000; color: #ffffff; }
[data-theme="contraste"] .dictee-calque__attente { background: transparent; text-decoration: underline solid #ffff00; }
[data-theme="contraste"] .dictee-calque__provisoire { color: #ffffff; text-decoration-color: #ffff00; }

/* ==========================================================================
   V13 — Bulle du premier clic sur le micro, protection des données
   ========================================================================== */
[data-theme="windows95"] .dictee-astuce {
  border-radius: 0;
  border: 2px solid; border-color: #ffffff #000000 #000000 #ffffff;
  background: #c0c0c0; color: #000000;
  box-shadow: inset -1px -1px 0 #808080, inset 1px 1px 0 #dfdfdf, 3px 3px 0 rgba(0, 0, 0, 0.35);
}
[data-theme="windows95"] .dictee-astuce::before { background: #c0c0c0; border-color: #ffffff; }
[data-theme="windows95"] .dictee-astuce__vie { color: #000000; }
[data-theme="terminal"] .dictee-astuce { border-radius: 0; box-shadow: none; background: var(--fond); }
[data-theme="terminal"] .dictee-astuce::before { background: var(--fond); }
[data-theme="macintosh"] .dictee-astuce { border: 2px solid #000000; background: #ffffff; color: #000000; box-shadow: 3px 3px 0 #000000; }
[data-theme="macintosh"] .dictee-astuce::before { background: #ffffff; border-color: #000000; }
[data-theme="macintosh"] .dictee-astuce__vie, [data-theme="macintosh"] .dictee-astuce__titre .fa-microphone { color: #000000; }
[data-theme="contraste"] .dictee-astuce { border: 2px solid #ffff00; background: #000000; color: #ffffff; }
[data-theme="contraste"] .dictee-astuce::before { background: #000000; border-color: #ffff00; }
[data-theme="contraste"] .dictee-astuce__vie { color: #ffffff; }

/* V13.1 — pastilles « Nos engagements » */
[data-theme="windows95"] .engagements li { border-radius: 0; border-color: #ffffff #000000 #000000 #ffffff; border-left: 4px solid #008000; background: #c0c0c0; color: #000000; }
[data-theme="windows95"] .engagements li i { color: #008000; }
[data-theme="terminal"] .engagements li { border-radius: 0; background: var(--fond); }
[data-theme="macintosh"] .engagements li { border: 1px solid #000000; border-left: 4px solid #000000; background: #ffffff; color: #000000; }
[data-theme="macintosh"] .engagements li i { color: #000000; }
[data-theme="contraste"] .engagements li { border: 2px solid #ffff00; background: #000000; color: #ffffff; }
[data-theme="contraste"] .engagements li i { color: #ffff00; }

/* ==========================================================================
   V24 (4.8.0) — 15/11/2026 — onglet Dictionnaires dans le style du Bloc-notes
   --------------------------------------------------------------------------
   Le panneau « Dictionnaires (n) » et le dictionnaire ouvert reprennent les classes du
   Bloc-notes (carte, notes__barre-entete, notes__liste, note-item…) : leurs règles de thème,
   plus haut, s'appliquent telles quelles (barres de titre, liste creusée, ligne choisie en
   vidéo inversée). Ici, seulement ce que le Bloc-notes n'a pas :
     • la case « Dictée », posée SUR la ligne mais hors de son bouton : sur la ligne choisie
       (fond bleu marine, noir, vert ou jaune), elle ne suivrait pas la couleur du texte ;
     • les lignes « Arrive bientôt » : pas d'effet de survol (elles ne s'ouvrent pas).
   ========================================================================== */
[data-theme="windows95"] .dico-ligne--choisie > .dico-ligne__dictee,
[data-theme="macintosh"] .dico-ligne--choisie > .dico-ligne__dictee { color: #ffffff; }
[data-theme="terminal"] .dico-ligne--choisie > .dico-ligne__dictee { color: var(--sur-accent); text-shadow: none; }
[data-theme="terminal"] .dico-ligne--choisie > .dico-ligne__dictee input { border-color: var(--sur-accent); }
[data-theme="terminal"] .dico-ligne--choisie > .dico-ligne__dictee input:checked { background: var(--sur-accent); box-shadow: none; }
[data-theme="contraste"] .dico-ligne--choisie > .dico-ligne__dictee { color: #000000; }
[data-theme="contraste"] .dico-ligne--choisie > .dico-ligne__dictee input,
[data-theme="contraste"] .dico-ligne--choisie > .dico-ligne__dictee input:checked { border-color: #000000; }
[data-theme="terminal"] .dico-ligne--bientot .note-item__bouton:hover { background: transparent; }
[data-theme="macintosh"] .dico-ligne--bientot .note-item__bouton:hover { background: #ffffff; text-decoration: none; }
[data-theme="contraste"] .dico-ligne--bientot .note-item__bouton:hover { background: #000000; text-decoration: none; }
/* Ligne CHOISIE survolée : elle garde sa vidéo inversée. La règle de survol (même poids, plus bas dans le fichier)
   la remplaçait : blanc sur blanc en Macintosh, noir sur noir en Contraste élevé, vert sombre sur vert sombre en
   Terminal. Défaut vu dans l'onglet Dictionnaires, présent AUSSI depuis la V22 dans « Mes notes » du Bloc-notes, le
   plan et l'historique des versions : la correction vaut pour les quatre listes. */
[data-theme="terminal"] .note-item__bouton[aria-current="true"]:hover,
[data-theme="terminal"] .plan__bouton[aria-current="true"]:hover,
[data-theme="terminal"] .version-item__bouton[aria-current="true"]:hover { background: var(--accent); }
[data-theme="macintosh"] .note-item__bouton[aria-current="true"]:hover,
[data-theme="macintosh"] .plan__bouton[aria-current="true"]:hover,
[data-theme="macintosh"] .version-item__bouton[aria-current="true"]:hover { background: #000000; }
[data-theme="contraste"] .note-item__bouton[aria-current="true"]:hover,
[data-theme="contraste"] .plan__bouton[aria-current="true"]:hover,
[data-theme="contraste"] .version-item__bouton[aria-current="true"]:hover { background: #ffff00; }
/* (relecture n° 2, M2) Terminal : le titre monte sur le cadre ; le nombre (« (7) », « 199 mots ») restait seul au
   milieu de la ligne d'en-tête : il va à droite. (Limité à cet onglet : au Bloc-notes, sur téléphone, le bouton
   « Liste » partage cette ligne et prendrait la moitié de l'espace.) */
[data-theme="terminal"] #panneau-dictionnaires .notes__barre-entete > .notes__compte { margin-left: auto; }
/* Mode « couleurs forcées » de Windows : la ligne choisie prend la couleur de sélection du système. */
@media (forced-colors: active) {
  [data-theme] .dico-ligne--choisie > .dico-ligne__dictee { forced-color-adjust: none; color: HighlightText; }
}
