/* Feuille de styles de TBScreen : socle, barres, fenêtres et widgets */

/* Couleurs et réglages communs à toute l'application */
:root {
  --barre-fond: #1f2a37;
  --barre-texte: #f1f5f9;
  --barre-survol: #334155;
  --accent: #2a9d8f;
  --zone-fond: #111827;
  --fenetre-fond: #ffffff;
  --fenetre-entete: #264653;
  --fenetre-entete-texte: #ffffff;
  --texte: #1f2937;
  --ombre: 0 8px 24px rgba(0, 0, 0, .25);
  --rayon: 10px;
  /* Menus sombres : ils se détachent nettement du tableau blanc */
  --menu-fond: #263445;
  --menu-fond-sous: #1c2733;
  --menu-bord: #3b4b5e;
  --menu-texte: #f1f5f9;
  --menu-survol: #36485c;
  --menu-choisi: rgba(42, 157, 143, .35);
  font-family: system-ui, "Segoe UI", Roboto, Ubuntu, Cantarell, sans-serif;
}

/* Mise en page générale : barre en haut, scène dessous (la colonne des écrans flotte sur le bord droit) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--zone-fond); color: var(--texte); }
body { display: flex; flex-direction: column; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* Barre d'outils supérieure */
.barre { display: flex; align-items: center; gap: .4rem; padding: .35rem .6rem; background: var(--barre-fond); color: var(--barre-texte); flex-wrap: wrap; position: relative; z-index: 10; }
.marque { font-weight: 800; letter-spacing: .03em; margin-right: .6rem; font-size: 1.1rem; }
.marque span { color: var(--accent); }
/* Numéro de version, discret, à côté du titre */
.version { font-size: .72rem; opacity: .55; margin: .35rem .8rem 0 -.5rem; align-self: flex-start; font-variant-numeric: tabular-nums; }
.barre button { background: transparent; color: inherit; border: 1px solid transparent; border-radius: 6px; padding: .35rem .6rem; }
.barre button:hover { background: var(--barre-survol); }
.barre button[aria-pressed="true"] { background: var(--accent); }
.groupe { position: relative; display: flex; align-items: center; gap: .2rem; }
.espace { flex: 1; }
.etat-sauvegarde { font-size: .8rem; opacity: .7; }
.separateur { width: 1px; align-self: stretch; background: #475569; margin: 0 .3rem; }

/* Menus déroulants de la barre */
.menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--menu-fond); color: var(--menu-texte); border: 1px solid var(--menu-bord); border-radius: 8px; box-shadow: var(--ombre); padding: .4rem; display: flex; flex-direction: column; gap: .15rem; z-index: 20; }
.menu.droite { left: auto; right: 0; }
.barre .menu button { color: var(--menu-texte); text-align: left; display: flex; gap: .6rem; align-items: center; }
.barre .menu button:hover { background: var(--menu-survol); }
.barre .menu button[aria-pressed="true"] { background: var(--menu-choisi); box-shadow: inset 3px 0 0 var(--accent); }
.titre-menu { font-size: .75rem; text-transform: uppercase; opacity: .6; padding: .4rem .5rem 0; }

/* Pastilles de couleur (fond et dessin) */
.nuancier { display: flex; flex-wrap: wrap; gap: .3rem; padding: .2rem .4rem; }
.barre .pastille { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #cbd5e1; padding: 0; }
.barre .pastille[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 1px; background-clip: padding-box; }

/* Outils de dessin */
.outils-dessin, .outils-dessin-liste { display: flex; align-items: center; gap: .25rem; }
.outils-dessin-liste select { font: inherit; border-radius: 6px; padding: .2rem; }

/* Zone centrale et scène 1920×1080 mise à l'échelle */
.zone { flex: 1; position: relative; overflow: hidden; }
.scene { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; background-color: #fff; box-shadow: 0 0 40px rgba(0, 0, 0, .5); overflow: hidden; }
.fenetres { position: absolute; inset: 0; z-index: 0; isolation: isolate; }
.calque { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; z-index: 1; pointer-events: none; touch-action: none; }
.calque.actif { pointer-events: auto; cursor: crosshair; }

/* Navigation des écrans : colonne translucide sur le bord droit, opaque au survol */
.nav-ecrans { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .35rem .25rem; max-height: calc(100% - 20px); background: rgba(31, 42, 55, .55); color: var(--barre-texte); border-radius: 12px; opacity: .3; transition: opacity .2s, background-color .2s, box-shadow .2s; }
/* Au survol (ou au toucher) : colonne pleinement opaque, fond plein et ombre pour bien la détacher de la scène */
.nav-ecrans:hover, .nav-ecrans:focus-within, .nav-ecrans.ouverte { opacity: 1; background: var(--barre-fond); box-shadow: var(--ombre); }
.nav-ecrans button { width: 38px; height: 38px; padding: 0; display: flex; align-items: center; justify-content: center; background: transparent; color: inherit; border: 1px solid #64748b; border-radius: 8px; font-size: 1rem; font-variant-numeric: tabular-nums; touch-action: none; }
.nav-ecrans button:hover:not(:disabled) { background: var(--barre-survol); }
.nav-ecrans button:disabled { opacity: .35; cursor: default; }
.nav-ecrans .ne-outil { border-color: transparent; }
.nav-ecrans .ne-ajout { font-size: 1.3rem; }
.nav-ecrans .ne-ecran.actif { background: var(--accent); border-color: var(--accent); font-weight: 700; }
/* Liste des numéros : défile quand les écrans sont nombreux */
.ne-liste { display: flex; flex-direction: column; gap: .35rem; padding: 6px 6px 3px; overflow-y: auto; min-height: 0; scrollbar-width: none; }
.ne-case { position: relative; }
.ne-case.glisse { z-index: 2; opacity: .8; }
.ne-ecran { cursor: grab; }
.ne-case.glisse .ne-ecran { cursor: grabbing; }
/* Croix de suppression : toujours visible sur l'écran affiché, au survol pour les autres (comme Firefox) */
.nav-ecrans .ne-fermer { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #64748b; background: var(--barre-fond); color: #e2e8f0; font-size: 13px; line-height: 1; opacity: 0; pointer-events: none; transition: opacity .15s; }
.ne-case:hover .ne-fermer, .ne-case.actif .ne-fermer, .ne-fermer:focus-visible { opacity: 1; pointer-events: auto; }
.nav-ecrans .ne-fermer:hover:not(:disabled) { background: #dc2626; border-color: #dc2626; color: #fff; }
.ne-ecran.cible-avant { box-shadow: 0 -3px 0 var(--accent); }
.ne-ecran.cible-apres { box-shadow: 0 3px 0 var(--accent); }
/* Menu ⋯ : s'ouvre à gauche de la colonne */
.ne-bloc-menu { position: relative; }
.ne-menu { position: absolute; right: calc(100% + 8px); bottom: 0; min-width: 220px; background: var(--menu-fond); color: var(--menu-texte); border: 1px solid var(--menu-bord); border-radius: 8px; box-shadow: var(--ombre); padding: .4rem; display: flex; flex-direction: column; gap: .15rem; }
.nav-ecrans .ne-menu button { width: auto; height: auto; justify-content: flex-start; padding: .45rem .6rem; border: none; color: var(--menu-texte); white-space: nowrap; }
.nav-ecrans .ne-menu button:hover { background: var(--menu-survol); }

/* Mode présentation : la barre passe par-dessus la scène, cachée, et revient près du bord haut */
.reveler-barre { display: none; }
body.presentation .reveler-barre { display: block; position: absolute; left: 0; right: 0; top: 0; height: 14px; z-index: 6; }
body.presentation .barre { position: fixed; left: 0; right: 0; top: 0; transform: translateY(-100%); transition: transform .2s; z-index: 30; box-shadow: var(--ombre); }
body.presentation.barre-visible .barre { transform: none; }

/* Fenêtres de widgets */
.fenetre { position: absolute; display: flex; flex-direction: column; background: var(--fenetre-fond); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.fenetre.reduite { height: auto !important; }
.fenetre.reduite .fenetre-corps { display: none; }
/* Fenêtre réduite : seule la largeur reste réglable */
.fenetre.reduite .bord-n, .fenetre.reduite .bord-s, .fenetre.reduite .bord-ne, .fenetre.reduite .bord-no, .fenetre.reduite .bord-se, .fenetre.reduite .bord-so { display: none; }
.fenetre-entete { display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem .4rem .8rem; background: var(--fenetre-entete); color: var(--fenetre-entete-texte); cursor: grab; user-select: none; touch-action: none; font-size: 1.2rem; height: 46px; flex: none; }
.fenetre-entete:active { cursor: grabbing; }
.fenetre-titre { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fenetre-entete button { background: rgba(255, 255, 255, .15); border: none; color: inherit; border-radius: 6px; width: 36px; height: 32px; font-size: 1.1rem; }
.fenetre-entete button:hover { background: rgba(255, 255, 255, .3); }
.fenetre-corps { flex: 1; position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
/* Zones de redimensionnement invisibles sur les bords (12 px) et les coins (24 px) */
.fenetre-bord { position: absolute; z-index: 5; touch-action: none; }
.bord-n { top: 0; left: 24px; right: 24px; height: 10px; cursor: ns-resize; }
.bord-s { bottom: 0; left: 24px; right: 24px; height: 12px; cursor: ns-resize; }
.bord-e { right: 0; top: 24px; bottom: 24px; width: 12px; cursor: ew-resize; }
.bord-o { left: 0; top: 24px; bottom: 24px; width: 12px; cursor: ew-resize; }
.bord-ne { top: 0; right: 0; width: 24px; height: 10px; cursor: nesw-resize; }
.bord-no { top: 0; left: 0; width: 24px; height: 10px; cursor: nwse-resize; }
.bord-se { bottom: 0; right: 0; width: 24px; height: 24px; cursor: nwse-resize; }
.bord-so { bottom: 0; left: 0; width: 24px; height: 24px; cursor: nesw-resize; }
.fenetre.reduite .bord-e, .fenetre.reduite .bord-o { top: 0; bottom: 0; }
.widget-message { margin: auto; padding: 1rem; text-align: center; opacity: .75; font-size: 1.2rem; }

/* Éléments communs aux widgets */
.w-barre { display: flex; gap: .3rem; padding: .4rem; flex-wrap: wrap; align-items: center; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; font-size: 1rem; }
.w-bouton { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: .3rem .7rem; font-size: 1.1rem; color: var(--texte); }
.w-bouton:hover { background: #e2e8f0; }
.w-bouton[aria-pressed="true"] { background: #d1fae5; border-color: var(--accent); }
.w-bouton.principal { background: var(--accent); color: #fff; border-color: var(--accent); font-size: 1.5rem; padding: .5rem 1.4rem; }
.w-bouton.principal:hover { filter: brightness(1.1); }
.w-vide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; text-align: center; padding: 1rem; border: 3px dashed #cbd5e1; margin: .6rem; border-radius: 8px; font-size: 1.2rem; color: #64748b; }
.fenetre-corps.survol .w-vide, .fenetre-corps.survol { border-color: var(--accent); background: #ecfdf5; }
.w-ligne { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: center; }
.w-espace { flex: 1; }

/* Widget Texte */
.w-texte { flex: 1; width: 100%; border: none; resize: none; padding: .8rem 1rem; background: transparent; font-family: inherit; line-height: 1.3; color: #1f2937; outline: none; }

/* Widget Minuteur */
.w-minuteur { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; padding: .6rem; }
.w-affichage { font-size: 5.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.w-progression { width: 90%; height: 20px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
.w-progression > div { height: 100%; width: 100%; background: #2a9d8f; transition: width .25s linear, background-color .3s; }
.w-minuteur.fini .w-affichage { color: #e63946; animation: tb-clignote 1s steps(2) infinite; }
@keyframes tb-clignote { 50% { opacity: .2; } }

/* Widget Tirage au sort */
.w-tirage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; padding: .6rem; text-align: center; }
.w-nom { font-size: 3.8rem; font-weight: 800; min-height: 1.2em; color: #264653; overflow-wrap: anywhere; }
.w-nom.roule { color: #94a3b8; }
.w-info { color: #64748b; font-size: 1.1rem; }
.w-editeur { flex: 1; display: flex; flex-direction: column; gap: .4rem; padding: .6rem; min-height: 0; }
.w-editeur textarea { flex: 1; font: inherit; font-size: 1.15rem; padding: .5rem; border: 1px solid #cbd5e1; border-radius: 6px; resize: none; }
.w-editeur label { display: flex; gap: .4rem; align-items: center; font-size: 1.05rem; }

/* Widgets Image et PDF */
.w-image { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #f8fafc; display: block; }
.w-pdf { flex: 1; border: none; width: 100%; min-height: 0; background: #525659; display: block; }
.w-nom-fichier { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #475569; }

/* Widget Horloge */
.w-horloge { flex: 1; display: flex; align-items: center; justify-content: center; gap: 1.2rem; padding: .6rem; min-height: 0; }
.w-horloge svg { height: 100%; max-height: 100%; max-width: 50%; aspect-ratio: 1 / 1; }
.w-horloge.analogique svg { max-width: 100%; }
.w-numerique { display: flex; flex-direction: column; align-items: center; }
.w-heure { font-size: 4.2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.w-date { font-size: 1.5rem; color: #475569; }
.w-date::first-letter { text-transform: uppercase; }

/* Widget Sonomètre */
.w-sono { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .7rem; padding: .6rem; overflow: auto; min-height: 0; }
.w-visage { font-size: 5rem; line-height: 1; }
.w-jauge { position: relative; width: 90%; height: 36px; background: #e2e8f0; border-radius: 18px; overflow: hidden; }
.w-jauge-niveau { height: 100%; width: 0; background: #2a9d8f; transition: width .1s linear, background-color .2s; }
.w-jauge-seuil { position: absolute; top: 0; bottom: 0; width: 4px; margin-left: -2px; background: #1f2937; }
.w-reglage { display: flex; align-items: center; gap: .5rem; width: 90%; font-size: 1.05rem; }
.w-reglage input { flex: 1; }
.w-sono-valeurs { font-size: 1rem; color: #475569; font-variant-numeric: tabular-nums; text-align: center; }
.w-sono-valeurs.probleme { color: #b91c1c; font-weight: 700; }
.w-sono-micro { max-width: 70%; }
.w-sono-diagnostic { display: flex; flex-direction: column; gap: .3rem; align-items: center; width: 95%; padding: .4rem; border: 1px dashed #94a3b8; border-radius: 8px; background: #f8fafc; }
.w-sono-trace { width: 100%; height: 80px; background: #0f172a; border-radius: 6px; }
.w-sono-infos { white-space: pre-line; font-size: .85rem; color: #334155; font-family: "DejaVu Sans Mono", Consolas, monospace; align-self: stretch; }
.w-sono.alerte { animation: tb-alerte .6s steps(2) infinite; }
@keyframes tb-alerte { 50% { background: #fde2e4; } }

/* Notification temporaire en bas de l'écran */
.notification { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); background: #1f2937; color: #fff; padding: .7rem 1.2rem; border-radius: 8px; box-shadow: var(--ombre); z-index: 50; max-width: 90vw; }
.notification.erreur { background: #b91c1c; }
.notification.succes { background: #15803d; }

/* Champ de saisie commun et liens présentés comme des boutons */
.w-champ { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; padding: .4rem .6rem; border: 1px solid #cbd5e1; border-radius: 6px; }
.w-large { width: 100%; flex-wrap: nowrap; }
a.w-bouton { text-decoration: none; display: inline-block; }
select.w-bouton { padding: .3rem .4rem; }

/* Widget Vidéo */
.w-video { flex: 1; min-height: 0; width: 100%; background: #000; display: block; }

/* Widget Feu tricolore */
.w-feu { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; padding: .8rem; min-height: 0; }
.w-boitier { display: flex; flex-direction: column; align-items: center; justify-content: space-around; gap: 4%; flex: 1; min-height: 0; aspect-ratio: 1 / 2.6; max-width: 100%; padding: 6% 0; background: #1f2937; border-radius: 28px; box-shadow: inset 0 0 0 4px #374151, 0 6px 16px rgba(0, 0, 0, .3); }
.w-lampe { width: 72%; aspect-ratio: 1; border-radius: 50%; border: 4px solid #111827; padding: 0; transition: background-color .2s, box-shadow .2s; }
.w-lampe.allumee { box-shadow: 0 0 28px 6px currentColor; }
.w-lampe[data-feu="rouge"] { color: #ef233c; }
.w-lampe[data-feu="orange"] { color: #fb8500; }
.w-lampe[data-feu="vert"] { color: #2dc653; }
.w-feu-texte { font-size: 2.8rem; font-weight: 800; text-align: center; min-height: 1.2em; overflow-wrap: anywhere; }
.w-feu-pastille { width: 24px; height: 24px; border-radius: 50%; flex: none; }

/* Nuancier commun : palette de couleurs et sélecteur libre */
.tb-nuancier { display: grid; grid-template-columns: repeat(7, 30px); gap: 6px; padding: .3rem .5rem; align-items: center; }
.tb-pastille { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #cbd5e1; padding: 0; cursor: pointer; }
.tb-pastille[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.tb-couleur-libre { width: 30px; height: 30px; padding: 0; border: 2px dashed #94a3b8; border-radius: 50%; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: pointer; }
.tb-couleur-libre::-webkit-color-swatch-wrapper { padding: 0; }
.tb-couleur-libre::-webkit-color-swatch { border: none; border-radius: 50%; opacity: 0; }
.tb-couleur-libre::-moz-color-swatch { border: none; border-radius: 50%; opacity: 0; }
.w-barre .tb-nuancier { grid-template-columns: repeat(14, 26px); gap: 4px; padding: 0; flex-basis: 100%; }
.w-barre .tb-pastille, .w-barre .tb-couleur-libre { width: 26px; height: 26px; }

/* Palette flottante d'un widget (bouton 🎨) */
.tb-palette-flottante { position: absolute; z-index: 999999; width: 360px; background: #fff; border-radius: 10px; box-shadow: var(--ombre); padding: .5rem; display: flex; flex-direction: column; gap: .4rem; font-size: 1.1rem; }

/* Barre de titre de hauteur fixe (sert de repère au mode épuré) */
.btn-epure[aria-pressed="true"] { background: var(--accent) !important; }

/* Mode épuré : ni barre de titre, ni menus ; le contenu prend toute la place */
.fenetre.epuree .fenetre-entete, .fenetre.epuree .fenetre-corps > .w-barre, .fenetre.epuree .w-commande { display: none !important; }
/* Mini-barre en haut à droite : visible quand la souris est dans le widget (ou après un appui au doigt) */
.fenetre-mini { display: none; position: absolute; top: 6px; right: 6px; z-index: 6; gap: 4px; padding: 3px; background: rgba(31, 41, 55, .78); border-radius: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.fenetre.epuree:hover .fenetre-mini, .fenetre.epuree.touche .fenetre-mini { display: flex; }
.fenetre-mini-poignee, .fenetre-mini-epingle { width: 40px; height: 36px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 7px; background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.2rem; touch-action: none; user-select: none; }
.fenetre-mini-poignee { cursor: grab; font-size: 1.5rem; }
.fenetre-mini-poignee:active { cursor: grabbing; }
.fenetre-mini-poignee:hover, .fenetre-mini-epingle:hover { background: rgba(255, 255, 255, .3); }
/* Un widget épuré ET réduit garde sa barre de titre, sinon il deviendrait invisible */
.fenetre.epuree.reduite .fenetre-entete { display: flex !important; }
/* Palette dépliée dans la barre d'un widget : elle passe sur sa propre ligne */

/* Widget Cahier Seyès : la zone de saisie porte le lignage, qui défile avec le texte */
.w-seyes { flex: 1; width: 100%; min-height: 0; border: none; resize: none; outline: none; background-color: transparent; overflow-y: auto; white-space: pre-wrap; }

/* Bloc centré commun (dés, compteur) */
.w-centre { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; padding: .6rem; min-height: 0; }
.w-nombre { flex: none; width: 5em; }

/* Widget Dés */
.w-des { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; cursor: pointer; }
.w-de { width: 110px; height: 110px; border-radius: 18px; background: #fff; border: 3px solid #264653; box-shadow: 0 4px 0 #264653; display: flex; align-items: center; justify-content: center; font-size: 3.4rem; font-weight: 800; color: #264653; }
.w-de.points { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 14px; gap: 4px; }
.w-de.points span { border-radius: 50%; }
.w-de.points span.point { background: #264653; }

/* Widget Groupes */
.w-groupes-vue { flex: 1; overflow: auto; padding: .6rem; min-height: 0; }
.w-groupes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .7rem; }
.w-groupe { background: #f1f5f9; border-radius: 10px; padding: .5rem .8rem; border-top: 6px solid var(--accent); }
.w-groupe:nth-child(4n+2) { border-top-color: #f4a261; }
.w-groupe:nth-child(4n+3) { border-top-color: #e76f51; }
.w-groupe:nth-child(4n+4) { border-top-color: #7b2cbf; }
.w-groupe-titre { font-weight: 800; font-size: 1.2rem; margin-bottom: .2rem; }
.w-groupe ul { margin: 0; padding-left: 1.2rem; font-size: 1.35rem; }

/* Widget Chronomètre : temps intermédiaires */
.w-tours { margin: 0; max-height: 30%; overflow: auto; font-size: 1.2rem; font-variant-numeric: tabular-nums; color: #475569; }
.w-affichage[title] { cursor: pointer; }

/* Widget Date du jour */
.w-date-bloc { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: .4rem; padding: .6rem 1.2rem; min-height: 0; overflow: hidden; }
.w-date-jour { color: #1f2937; line-height: 1.5; }
.w-date-autre { color: #64748b; line-height: 1.5; }

/* Widget Compteur */
.w-compteur-libelle { font-size: 2rem; font-weight: 700; color: #475569; text-align: center; }
.w-compteur { align-items: center; flex-wrap: nowrap; gap: 1rem; }
.w-compteur-valeur { font-size: 6rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 1.5em; text-align: center; line-height: 1; }
.w-compteur .principal { font-size: 2.4rem; width: 70px; height: 70px; padding: 0; border-radius: 50%; }

/* Widget Liste */
.w-liste-bloc { flex: 1; display: flex; flex-direction: column; gap: .5rem; padding: .6rem 1rem; min-height: 0; overflow: auto; }
.w-liste-titre { font-size: 2rem; font-weight: 800; color: #264653; }
.w-liste { list-style: none; margin: 0; padding: 0; }
.w-liste li { display: flex; align-items: center; gap: .6rem; padding: .25rem 0; border-bottom: 1px dashed #e2e8f0; cursor: pointer; }
.w-liste li.fait .w-liste-texte { text-decoration: line-through; color: #94a3b8; }
.w-liste-texte { flex: 1; }
.w-case { color: var(--accent); }
.w-liste-outils { display: flex; gap: .2rem; }
.w-liste-outils .w-bouton { font-size: .9rem; padding: .1rem .45rem; }

/* Zones de texte enrichi (Texte et Cahier Seyès) */
.tb-riche { white-space: pre-wrap; overflow-wrap: anywhere; overflow-y: auto; outline: none; min-height: 0; cursor: text; }
.w-texte.tb-riche { display: block; }
.tb-riche:empty::before { content: attr(data-placeholder); color: #94a3b8; pointer-events: none; }
/* Outils de mise en forme de la sélection */
.tb-outils-texte { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.tb-outil { min-width: 2.1em; font-family: Georgia, serif; }
.tb-separateur { width: 1px; align-self: stretch; background: #cbd5e1; margin: 0 .15rem; }
.w-site { background: #fff; }
.w-groupes-nombre { font-size: 1.4rem; font-weight: 800; min-width: 1.6em; text-align: center; }

/* Bouton « A » de couleur du texte et sa palette dépliante */
.tb-a-boite { position: relative; display: inline-flex; }
.tb-a-couleur { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; padding-top: .25rem; padding-bottom: .2rem; font-weight: 800; }
.tb-a-trait { display: block; width: 1.3em; height: 5px; border-radius: 2px; margin-top: 2px; }
.tb-palette-texte { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; background: #fff; border-radius: 10px; box-shadow: var(--ombre); padding: .4rem; }
.tb-palette-texte .tb-nuancier { grid-template-columns: repeat(7, 30px); gap: 6px; flex-basis: auto; }
.tb-palette-texte .tb-pastille, .tb-palette-texte .tb-couleur-libre { width: 30px; height: 30px; }

/* Glisser-déposer des onglets d'écran */

/* Plein écran d'un widget : barres de TBScreen et autres widgets cachés, widget zoomé sur toute la scène */
body.widget-plein .barre, body.widget-plein .nav-ecrans, body.widget-plein .reveler-barre { display: none; }
body.widget-plein .calque { display: none; }
body.widget-plein .fenetre:not(.plein) { display: none; }
.fenetre.plein { transform-origin: 0 0; box-shadow: none; }
.fenetre.plein .fenetre-bord { display: none; }
.fenetre.plein .btn-plein { background: var(--accent) !important; }
/* En plein écran, seuls les boutons ⛶ restent dans la barre de titre et la mini-barre */
.fenetre.plein .fenetre-entete button:not(.btn-plein), .fenetre.plein .btn-couleur { display: none; }
.fenetre.plein .fenetre-entete { cursor: default; }
.fenetre.plein .fenetre-mini-poignee, .fenetre.plein .fenetre-mini-epingle:not(.btn-plein) { display: none; }

/* Menu « ＋ Widget » rangé par catégories, en colonnes */
.menu.menu-widgets { flex-direction: row; align-items: stretch; gap: 0; padding: 0; max-height: calc(100vh - 120px); }
/* Colonne des thèmes */
.menu-themes { display: flex; flex-direction: column; gap: .1rem; padding: .4rem; min-width: 210px; }
/* Recherche et récents du menu Widget */
.menu-recherche { font: inherit; margin: 0 0 .35rem; padding: .45rem .6rem; border-radius: 6px; border: 1px solid var(--menu-bord); background: var(--menu-fond-sous); color: var(--menu-texte); outline: none; }
.menu-recherche::placeholder { color: #94a3b8; }
.menu-recherche:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(42, 157, 143, .35); }
.menu-trait { height: 1px; background: var(--menu-bord); margin: .25rem .3rem; }
.menu-vide { margin: .4rem .5rem; color: #94a3b8; font-style: italic; }
.barre .menu .menu-theme { display: flex; align-items: center; gap: .6rem; }
.menu-theme-nom { flex: 1; font-weight: 600; white-space: nowrap; }
.menu-theme-nombre { font-size: .75rem; background: var(--menu-bord); border-radius: 999px; padding: 0 .45rem; color: #cbd5e1; }
.menu-theme-fleche { color: #94a3b8; }
.barre .menu .menu-theme[aria-pressed="true"] { background: var(--menu-choisi); }
.barre .menu .menu-theme[aria-pressed="true"] .menu-theme-fleche { color: var(--accent); }
/* Colonne des widgets du thème choisi */
.menu-sous { display: flex; flex-direction: column; gap: .1rem; padding: .4rem; min-width: 230px; border-left: 1px solid var(--menu-bord); background: var(--menu-fond-sous); border-radius: 0 8px 8px 0; overflow-y: auto; }
/* Sous-menu sur deux colonnes quand un thème a beaucoup de widgets */
.menu-sous.large { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); align-content: start; column-gap: .4rem; min-width: 500px; }
.menu-sous.large button { white-space: nowrap; }
.menu-sous.large .titre-menu { grid-column: 1 / -1; }

/* ===== Widgets de la v0.7.0 ===== */

/* Éléments communs */
.w-petit { font-size: .9rem; padding: .15rem .45rem; }
.w-puces { display: flex; flex-wrap: wrap; gap: .3rem; padding: .3rem 0; }
.w-puce { border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 999px; padding: .25rem .8rem; font-size: 1.05rem; color: var(--texte); }
.w-puce:hover { background: #e0f2f1; border-color: var(--accent); }
.w-deux-colonnes { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; min-height: 0; }
.w-colonne-edition { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; min-height: 0; }
.w-colonne-edition textarea { flex: 1; font: inherit; font-weight: 400; font-size: 1.1rem; padding: .5rem; border: 1px solid #cbd5e1; border-radius: 6px; resize: none; }

/* Droite numérique */
.w-droite { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: .3rem; }
.w-droite-svg { flex: 1; width: 100%; min-height: 0; }
.w-droite-zone { cursor: pointer; }
.w-droite-zone:hover { fill: rgba(42, 157, 143, .1); }
.w-droite .w-info { text-align: right; }

/* Tableau de numération */
.w-numeration-bloc { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: .5rem; gap: .5rem; }
.w-numeration { flex: 1; display: flex; gap: .4rem; min-height: 0; }
.w-colonne { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; background: #f8fafc; border-radius: 8px; border-top: 8px solid #94a3b8; padding: .3rem; min-width: 0; }
.w-colonne.decimale { background: #f0f9ff; }
.w-colonne.trop { background: #fee2e2; }
.w-colonne-titre { font-size: 1.6rem; font-weight: 800; }
.w-jetons { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 6px; min-height: 0; overflow: hidden; }
.w-jeton { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.w-colonne-chiffre { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.w-colonne.trop .w-colonne-chiffre { color: #dc2626; font-size: 1.4rem; }
.w-numeration-nombre { text-align: center; font-size: 3.4rem; font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; }

/* Horloge à manipuler */
.w-horloge-bloc { flex: 1; display: flex; align-items: center; justify-content: center; gap: 1.2rem; padding: .6rem; min-height: 0; flex-wrap: wrap; }
.w-horloge-manip { height: 100%; max-height: 100%; max-width: 60%; aspect-ratio: 1; touch-action: none; cursor: grab; }
.w-heure-lettres { font-size: 1.8rem; color: #264653; font-weight: 700; text-align: center; max-width: 16em; }

/* Monnaie */
.w-reserve { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .5rem; border-bottom: 2px dashed #cbd5e1; background: #f8fafc; }
.w-plateau { flex: 1; position: relative; min-height: 0; overflow: hidden; }
.w-espece { display: flex; align-items: center; justify-content: center; font-weight: 800; color: #1f2937; cursor: grab; user-select: none; touch-action: none; box-shadow: 0 3px 6px rgba(0, 0, 0, .3); font-size: 1rem; }
.w-espece.piece { border-radius: 50%; border: 2px solid rgba(0, 0, 0, .25); }
.w-espece.billet { width: 120px; height: 62px; border-radius: 6px; border: 2px solid rgba(0, 0, 0, .25); font-size: 1.4rem; }
.w-plateau .w-espece { position: absolute; }
.w-espece.saisie { cursor: grabbing; z-index: 10; box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.w-monnaie-total { text-align: center; font-size: 2.4rem; font-weight: 800; padding: .3rem; border-top: 1px solid #e2e8f0; cursor: pointer; }

/* Fractions */
.w-fractions-bloc { flex: 1; display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: .6rem; min-height: 0; }
.w-fractions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; flex: 1; min-height: 0; height: 100%; }
.w-fraction-figure.w-forme-disque { height: 90%; max-height: 260px; aspect-ratio: 1; }
.w-fraction-figure.w-forme-barre { width: 100%; max-width: 520px; }
.w-fraction-part { cursor: pointer; }
.w-fraction-part:hover { opacity: .85; }
.w-fraction { display: flex; flex-direction: column; align-items: center; font-size: 4rem; font-weight: 800; line-height: 1.1; }
.w-fraction-num { border-bottom: 6px solid #1f2937; padding: 0 .2em; }

/* Calcul flash */
.w-calcul-op { font-size: 5rem; font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; text-align: center; }
.w-calcul-op.cachee { color: #cbd5e1; }

/* Table de Pythagore */
.w-pythagore-bloc { flex: 1; display: flex; align-items: center; justify-content: center; padding: .4rem; min-height: 0; }
.w-pythagore { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; width: 100%; height: 100%; max-width: 100%; aspect-ratio: 1; }
.w-pythagore > * { display: flex; align-items: center; justify-content: center; border: none; border-radius: 4px; font-size: 1.4rem; font-weight: 700; padding: 0; }
.w-py-coin { background: #264653; color: #fff; }
.w-py-tete { background: #264653; color: #fff; cursor: pointer; }
.w-py-tete.choisie { background: #e76f51; }
.w-py-case { background: #f1f5f9; color: #1f2937; cursor: pointer; }
.w-py-case.carre { background: #e2e8f0; }
.w-py-case.surlignee { background: #fde68a; }
.w-py-case.cachee { background: #cbd5e1; }

/* Étiquettes-mots */
.w-etiquettes-bloc { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: .6rem; padding: .8rem; min-height: 0; }
.w-etiquettes { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.w-etiquette { background: #fff8c4; border: 2px solid #e9c46a; border-radius: 10px; padding: .2em .5em; cursor: grab; user-select: none; touch-action: none; box-shadow: 0 3px 6px rgba(0, 0, 0, .15); line-height: 1.4; }
.w-etiquette.saisie { cursor: grabbing; position: relative; z-index: 5; box-shadow: 0 10px 20px rgba(0, 0, 0, .25); }
.w-etiquettes.resolu .w-etiquette { background: #d1fae5; border-color: #2a9d8f; }
.w-etiquettes-bravo { text-align: center; font-size: 2rem; font-weight: 800; color: #2a9d8f; min-height: 1.3em; }

/* Mot éclair */
.w-eclair { min-height: 1.4em; text-align: center; cursor: pointer; color: #1f2937; line-height: 1.3; }
.w-eclair.vide { color: #cbd5e1; }

/* Lecture à voix haute */
.w-lecture-texte { flex: 1; width: 100%; min-height: 0; border: none; resize: none; padding: .8rem 1rem; font-family: inherit; line-height: 1.5; outline: none; overflow-y: auto; white-space: pre-wrap; }
.w-lecture-suivi mark { background: #fde047; border-radius: 4px; padding: 0 .1em; }
.w-lecture-boutons { padding: .4rem; border-top: 1px solid #e2e8f0; }

/* Conseil de coopérative */
.w-conseil { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding: .5rem; min-height: 0; }
.w-conseil-colonne { display: flex; flex-direction: column; gap: .3rem; background: #f8fafc; border-radius: 8px; border-top: 8px solid #94a3b8; padding: .4rem; min-height: 0; }
.w-conseil-titre { font-weight: 800; font-size: 1.15em; }
.w-conseil-liste { flex: 1; margin: 0; padding-left: 1.4em; overflow: auto; }
.w-conseil-liste li, .w-qdn-file li, .w-aide-file li { cursor: pointer; padding: .1em 0; }
.w-aide-file li { display: flex; align-items: center; gap: .3rem; }
.w-conseil-liste li .w-bouton { float: right; }
.w-conseil-liste li.fait .w-liste-texte, .w-qdn-file li.fait .w-liste-texte { text-decoration: line-through; color: #94a3b8; }

/* Quoi de neuf ? */
.w-qdn { flex: 1; display: grid; grid-template-columns: 3fr 2fr; gap: .6rem; padding: .6rem; min-height: 0; }
.w-qdn-scene { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; }
.w-qdn-nom { font-size: 3rem; font-weight: 800; color: #264653; text-align: center; }
.w-qdn-temps { font-size: 3.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.w-qdn-cote { display: flex; flex-direction: column; gap: .3rem; min-height: 0; overflow: auto; }
.w-qdn-file { margin: 0; padding-left: 1.4em; font-size: 1.3rem; }
.w-qdn-file li.courant { font-weight: 800; color: #e76f51; }

/* File d'aide */
.w-aide { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .6rem; min-height: 0; overflow: auto; }
.w-aide-premier { font-size: 2.8rem; font-weight: 800; color: #264653; text-align: center; }
.w-aide-premier.vide { color: #94a3b8; font-size: 2rem; }
.w-aide-file { margin: 0; font-size: 1.5rem; align-self: stretch; padding-left: 2em; counter-reset: aide 1; }
.w-aide-inscription { align-self: stretch; }

/* Vote */
.w-vote-bloc { flex: 1; display: flex; flex-direction: column; gap: .5rem; padding: .6rem; min-height: 0; overflow: auto; }
.w-vote-question { font-size: 2rem; font-weight: 800; text-align: center; color: #264653; }
.w-vote { display: flex; flex-direction: column; gap: .5rem; }
.w-vote-ligne { display: flex; align-items: center; gap: .4rem; font-size: 1.4rem; }
.w-vote-libelle { width: 9em; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-vote-barre { flex: 1; height: 34px; background: #f1f5f9; border-radius: 8px; overflow: hidden; }
.w-vote-barre > div { height: 100%; transition: width .3s; }
.w-vote-voix { width: 2.2em; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Compte à rebours de dates */
.w-dates { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: .5rem; padding: .6rem 1rem; min-height: 0; overflow: auto; }
.w-date-ligne { display: flex; align-items: baseline; gap: .5em; flex-wrap: wrap; }
.w-date-nombre { font-size: 2em; font-weight: 800; color: #e76f51; font-variant-numeric: tabular-nums; }
.w-date-texte { font-weight: 700; }
.w-date-champ { flex: none; width: auto; }

/* Emploi du temps */
.w-onglets { display: flex; gap: .2rem; padding: .3rem .4rem 0; border-bottom: 2px solid #e2e8f0; }
.w-onglet { border: 1px solid #cbd5e1; border-bottom: none; background: #f8fafc; border-radius: 8px 8px 0 0; padding: .3rem .7rem; font-size: 1rem; }
.w-onglet.aujourdhui { font-weight: 800; }
.w-onglet.actif { background: var(--accent); color: #fff; border-color: var(--accent); }
.w-emploi { flex: 1; display: flex; flex-direction: column; gap: .3rem; padding: .5rem; min-height: 0; overflow: auto; }
.w-creneau { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em .8em; padding: .3em .5em; border-radius: 8px; background: #f8fafc; border-left: 6px solid #cbd5e1; touch-action: none; cursor: grab; user-select: none; }
.w-creneau-heure { font-variant-numeric: tabular-nums; color: #64748b; font-size: .8em; min-width: 7.5em; }
.w-creneau-libelle { font-weight: 700; flex: 1; }
.w-creneau.passe { opacity: .45; }
.w-creneau.encours { background: #ecfdf5; border-left-color: var(--accent); }
.w-creneau-reste { font-size: .75em; color: var(--accent); font-weight: 700; }
.w-creneau-jauge { flex-basis: 100%; height: 6px; background: #d1fae5; border-radius: 3px; overflow: hidden; }
.w-creneau-jauge > div { height: 100%; background: var(--accent); }
.w-creneau-edition { display: flex; gap: .3rem; align-items: center; font-size: 1rem; }
.w-heure-champ { flex: none; width: 7.5em; }

/* Métiers de la classe */
.w-metiers-bloc { flex: 1; padding: .5rem; min-height: 0; overflow: auto; }
.w-metiers { display: flex; flex-direction: column; gap: .3rem; }
.w-metier { display: flex; justify-content: space-between; gap: 1em; padding: .25em .6em; border-radius: 8px; background: #f8fafc; }
.w-metier:nth-child(odd) { background: #eef2f7; }
.w-metier-nom { color: #475569; }
.w-metier-eleve { font-weight: 800; color: #264653; }

/* Minuteur visuel */
.w-disque-bloc { gap: .5rem; }
.w-disque-cadre { position: relative; height: 70%; max-height: 100%; aspect-ratio: 1; flex: none; }
.w-disque { position: absolute; inset: 9%; border-radius: 50%; border: 6px solid #1f2937; cursor: pointer; box-shadow: inset 0 0 0 4px #fff; }
.w-disque-graduations span { position: absolute; transform: translate(-50%, -50%); font-weight: 800; font-size: 1.3rem; color: #1f2937; }
.w-disque-centre { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(255, 255, 255, .9); border-radius: 10px; padding: .1em .4em; font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; }
.w-disque-cadre.fini .w-disque { animation: tb-clignote 1s steps(2) infinite; }

/* Menu « Copier / Déplacer vers… » d'un widget */
.tb-envoyer .titre-menu { margin-top: .2rem; }
.tb-envoyer-ligne { display: flex; flex-wrap: wrap; gap: .3rem; }
/* En plein écran, le bouton ⧉ est caché comme les autres (règle générale des boutons de la barre) */
.w-temps { flex: none; width: 4.5em; text-align: center; }

/* ===== Widgets de la v0.9.0 ===== */

/* QR code */
.w-qr-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .5rem; min-height: 0; }
.w-qr { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.w-qr-image { height: 100%; max-width: 100%; aspect-ratio: 1; }
.w-qr-legende { font-size: 1.1rem; color: #334155; text-align: center; overflow-wrap: anywhere; max-width: 100%; }

/* Audio */
.w-audio-lire { font-size: 2.6rem; width: 96px; height: 96px; border-radius: 50%; padding: 0; }
.w-audio-avance { width: 90%; }
.w-audio-temps { font-size: 1.3rem; font-variant-numeric: tabular-nums; color: #475569; }

/* Texte à trous */
.w-trous-bloc { flex: 1; display: flex; flex-direction: column; gap: .4rem; padding: .6rem 1rem; min-height: 0; overflow: auto; }
.w-trous { white-space: pre-wrap; color: #1f2937; }
.w-trou { display: inline-block; min-height: 1.1em; vertical-align: baseline; border: none; border-bottom: 3px solid #264653; background: #e0f2f1; border-radius: 6px 6px 0 0; font: inherit; padding: 0 .2em; margin: 0 .1em; cursor: pointer; color: #264653; }
.w-trou.vu { background: #fde68a; font-weight: 700; }
.w-trou-champ { font: inherit; border: none; border-bottom: 3px solid #264653; background: #f1f5f9; border-radius: 6px 6px 0 0; padding: 0 .2em; margin: 0 .1em; color: #1e3a8a; }
.w-trou-champ.juste { background: #d1fae5; border-color: #16a34a; }
.w-trou-champ.faux { background: #fee2e2; border-color: #dc2626; }
.w-trous-bilan { font-size: 1.3rem; font-weight: 700; }

/* Nuage de mots */
.w-nuage-bloc { flex: 1; display: flex; flex-direction: column; padding: .6rem; min-height: 0; }
.w-nuage { flex: 1; display: flex; flex-wrap: wrap; align-items: center; align-content: center; justify-content: center; gap: .1em .5em; overflow: hidden; line-height: 1.1; }
.w-nuage-mot { font-weight: 800; white-space: nowrap; }

/* Tableau de tri */
.w-tri-bloc { flex: 1; display: flex; flex-direction: column; gap: .5rem; padding: .5rem; min-height: 0; }
.w-tri { flex: 1; display: flex; gap: .5rem; min-height: 0; }
.w-tri-colonne { flex: 1; display: flex; flex-direction: column; background: #f8fafc; border-radius: 8px; border-top: 8px solid #94a3b8; min-width: 0; }
.w-tri-titre { font-weight: 800; font-size: 1.4rem; text-align: center; padding: .3rem; }
.w-tri-zone { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: .4rem; padding: .4rem; overflow: auto; }
.w-tri-reserve { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem; min-height: 3.2rem; border: 2px dashed #cbd5e1; border-radius: 8px; align-items: center; }
.w-tri-etiquette { background: #fff8c4; border: 2px solid #e9c46a; border-radius: 8px; padding: .1em .45em; cursor: grab; user-select: none; touch-action: none; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }
.w-tri-etiquette.saisie { cursor: grabbing; position: relative; z-index: 5; box-shadow: 0 10px 20px rgba(0, 0, 0, .25); }
.w-tri-etiquette.juste { background: #d1fae5; border-color: #16a34a; }
.w-tri-etiquette.faux { background: #fee2e2; border-color: #dc2626; }

/* Emploi du temps : glisser-déposer des créneaux */
.w-creneau.saisie { cursor: grabbing; position: relative; z-index: 5; box-shadow: 0 8px 18px rgba(0, 0, 0, .25); opacity: .95; }
.w-creneau.cible-avant { box-shadow: 0 -4px 0 0 var(--accent); }
.w-creneau.cible-apres { box-shadow: 0 4px 0 0 var(--accent); }

/* ===== Widgets de la v0.10.0 : français ===== */

/* Phrase du jour */
.w-phrase-bloc { flex: 1; display: flex; flex-direction: column; gap: .6rem; padding: .8rem 1rem; min-height: 0; overflow: auto; }
.w-phrase { flex: 1; display: flex; flex-wrap: wrap; align-items: flex-start; align-content: center; justify-content: center; line-height: 1.2; color: #1f2937; }
.w-phrase-sep { white-space: pre; }
.w-phrase-mot { display: inline-flex; flex-direction: column; align-items: center; cursor: pointer; border-radius: 8px; padding: 0 .08em; border-bottom: .12em solid transparent; user-select: none; }
.w-phrase-mot:hover { background: #f1f5f9; }
.w-phrase-mot.colore { color: var(--couleur); border-bottom-color: var(--couleur); background: color-mix(in srgb, var(--couleur) 10%, transparent); }
.w-phrase-mot.enchaine { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: -.3em; padding-right: .38em; }
.w-phrase-abr { font-size: .35em; font-weight: 800; min-height: 1.2em; }
.w-phrase-legende { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.w-phrase-cat { border: 2px solid var(--couleur, #94a3b8); color: var(--couleur, #475569); background: #fff; border-radius: 999px; padding: .25rem .8rem; font-size: 1.05rem; font-weight: 700; }
.w-phrase-cat[aria-pressed="true"] { background: var(--couleur, #475569); color: #fff; }
.w-phrase-champ { font-size: 1.6rem !important; }

/* Chasse aux sons */
.w-sons-bloc { flex: 1; display: flex; flex-direction: column; gap: .5rem; padding: .6rem 1rem; min-height: 0; }
.w-sons { flex: 1; white-space: pre-wrap; line-height: 1.5; overflow: auto; color: #1f2937; }
.w-sons-mot { cursor: pointer; border-radius: 6px; user-select: none; }
.w-sons-mot.touche { outline: 3px solid #2563eb; outline-offset: 1px; }
.w-sons-mot.juste { outline: 3px solid #16a34a; background: #dcfce7; }
.w-sons-mot.oubli { outline: 3px dashed #ea580c; }
.w-sons-mot.faux { outline: 3px solid #dc2626; background: #fee2e2; }
.w-sons-graphie { border-radius: 4px; }
.w-sons-legende { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; min-height: 2rem; }
.w-sons-cle { padding: .15rem .6rem; border-radius: 6px; font-weight: 700; font-size: 1.1rem; }

/* Syllabes */
.w-syllabes { flex: 1; white-space: pre-wrap; line-height: 1.6; padding: .6rem 1rem; overflow: auto; color: #1f2937; }
.w-syl-mot { cursor: pointer; border-radius: 6px; }
.w-syl-mot:hover { background: #f1f5f9; }
.w-syl.paire { color: #dc2626; }
.w-syl.impaire { color: #2563eb; }
.w-syllabes.arcs .w-syl { color: inherit; display: inline-block; border-bottom: .07em solid #dc2626; border-radius: 0 0 50% 50% / 0 0 .35em .35em; padding-bottom: .05em; margin: 0 .02em; line-height: 1.2; }
.w-syllabes.arcs .w-syl.impaire { border-bottom-color: #2563eb; }
.w-syl-muette { color: #a3a3a3 !important; }

/* Ordre alphabétique */
.w-alpha-bloc { flex: 1; display: flex; flex-direction: column; gap: .6rem; padding: .8rem; min-height: 0; }
.w-alpha { flex: 1; display: flex; flex-wrap: wrap; gap: .6rem; align-content: center; justify-content: center; }
.w-alpha-mot { background: #fff8c4; border: 2px solid #e9c46a; border-radius: 10px; padding: .1em .5em; cursor: grab; user-select: none; touch-action: none; box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }
.w-alpha-mot.saisie { cursor: grabbing; position: relative; z-index: 5; box-shadow: 0 10px 20px rgba(0, 0, 0, .25); }
.w-alpha-mot.juste { background: #d1fae5; border-color: #16a34a; }
.w-alpha-mot.faux { background: #fee2e2; border-color: #dc2626; }

/* Dés à histoires */
.w-histoires { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; width: 100%; }
.w-histoire-de { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; width: 200px; min-height: 200px; padding: .6rem; border: 4px solid var(--couleur); border-radius: 18px; background: #fff; box-shadow: 0 4px 0 var(--couleur); cursor: pointer; }
.w-histoire-nom { font-size: 1rem; font-weight: 800; color: var(--couleur); text-transform: uppercase; letter-spacing: .05em; }
.w-histoire-emoji { font-size: 4.5rem; line-height: 1.1; }
.w-histoire-texte { font-size: 1.5rem; font-weight: 700; text-align: center; color: #1f2937; }
.w-histoire-reglages { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; min-height: 0; }

/* Carte de mots */
.w-carte { flex: 1; position: relative; min-height: 0; margin: .5rem; }
.w-carte-traits { position: absolute; inset: 0; width: 100%; height: 100%; }
.w-carte-centre { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #264653; color: #fff; font-weight: 800; font-size: 1.5em; padding: .4em .9em; border-radius: 999px; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); text-align: center; max-width: 40%; }
.w-carte-branche { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: .1em; max-width: 30%; padding: .3em .7em; border: 3px solid var(--couleur); border-radius: 16px; background: #fff; font: inherit; color: #1f2937; cursor: pointer; text-align: center; }
.w-carte-branche strong { color: var(--couleur); font-size: .8em; }
.w-carte-branche.cachee span { color: var(--couleur); font-weight: 800; }

/* ===== Widgets de la v0.10.0 : maths ===== */

/* Nombre du jour */
.w-nombre-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: .8rem; min-height: 0; overflow: auto; }
.w-nombre-jour { font-size: 5rem; font-weight: 800; width: 7.5em; text-align: center; border: 3px solid #264653; border-radius: 16px; color: #264653; font-variant-numeric: tabular-nums; }
.w-nombre-fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; width: 100%; }
.w-nombre-fiche { display: flex; flex-direction: column; gap: .2rem; align-items: center; justify-content: center; min-height: 100px; padding: .5rem; border: 2px solid #cbd5e1; border-radius: 12px; background: #f8fafc; cursor: pointer; }
.w-nombre-fiche.ouverte { background: #ecfdf5; border-color: var(--accent); }
.w-nombre-titre { font-size: 1rem; font-weight: 800; color: #64748b; text-transform: uppercase; }
.w-nombre-valeur { font-size: 1.6rem; font-weight: 700; color: #1f2937; text-align: center; }
.w-nombre-reglages { display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding: .4rem .8rem; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.w-nombre-reglages label { display: flex; gap: .3rem; align-items: center; }

/* Tableau de conversion */
.w-conv-bloc { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1rem; padding: 1rem; min-height: 0; }
.w-conv { display: grid; border: 3px solid #264653; border-radius: 10px; overflow: hidden; }
.w-conv-colonne { display: flex; flex-direction: column; border-left: 2px solid #94a3b8; }
.w-conv-colonne:first-child { border-left: none; }
.w-conv-tete { border: none; border-bottom: 3px solid #264653; background: #e0f2f1; font-size: 1.7rem; font-weight: 800; padding: .4rem; color: #264653; cursor: pointer; }
.w-conv-tete.depart { background: #fde68a; }
.w-conv-tete.cible { background: #264653; color: #fff; }
.w-conv-case { position: relative; height: 6rem; display: flex; align-items: center; justify-content: center; font-size: 3.6rem; font-weight: 800; color: #1e3a8a; font-variant-numeric: tabular-nums; }
.w-conv-case.unite { background: #fffbeb; }
.w-conv-case.ajoute { color: #ea580c; }
.w-conv-virgule { position: absolute; right: -.2em; bottom: .2rem; color: #dc2626; font-size: 4rem; line-height: 1; z-index: 1; }
.w-conv-phrase { font-size: 2.2rem; font-weight: 700; text-align: center; color: #1f2937; }
.w-conv-champ { max-width: 9rem; font-size: 1.4rem; text-align: right; }

/* Instruments de géométrie : fenêtre transparente, seul l'instrument et la barre attrapent la souris */
.fenetre:has(.w-instruments) { background: transparent; box-shadow: none; pointer-events: none; overflow: visible; }
.fenetre:has(.w-instruments) > .fenetre-corps { overflow: visible; pointer-events: none; }
.fenetre:has(.w-instruments) > * { pointer-events: auto; }
.fenetre:has(.w-instruments) .fenetre-corps > .w-barre { pointer-events: auto; }
.fenetre:not(.epuree):has(.w-instruments) > .fenetre-corps { outline: 2px dashed rgba(100, 116, 139, .5); outline-offset: -2px; }
.w-instruments { flex: 1; width: 100%; min-height: 0; overflow: visible; pointer-events: none; }
.w-instrument { pointer-events: visiblePainted; cursor: move; touch-action: none; user-select: none; }
.w-instrument text { pointer-events: none; font-family: system-ui, sans-serif; }
.w-instrument-poignee { cursor: alias; }

/* Géoplan */
.w-geoplan-bloc { flex: 1; display: flex; min-height: 0; padding: .4rem; }
.w-geoplan { width: 100%; height: 100%; }
.w-geoplan-planche { fill: #fdf6e3; stroke: #d6b98c; stroke-width: .04; }
.w-geoplan-elastique { stroke-width: .1; stroke-linejoin: round; stroke-linecap: round; fill-opacity: .18; cursor: pointer; }
.w-geoplan-elastique.choisi { stroke-dasharray: .25 .15; stroke-width: .14; }
.w-geoplan-elastique.encours { stroke-dasharray: .2 .1; }
.w-geoplan-clou { cursor: pointer; }
.w-geoplan-clou .prise { fill: transparent; }
.w-geoplan-clou circle:not(.prise) { fill: #475569; }
.w-geoplan-clou:hover .prise { fill: rgba(42, 157, 143, .2); }
.w-geoplan-clou.premier .prise { fill: rgba(220, 38, 38, .25); }

/* Symétrie */
.w-sym-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .6rem; min-height: 0; }
.w-sym { position: relative; display: grid; max-width: 100%; max-height: 100%; height: 100%; border: 2px solid #64748b; touch-action: none; user-select: none; background: #fff; }
.w-sym-case { border: 1px solid #cbd5e1; cursor: pointer; }
.w-sym-case.reponse { background-color: #f8fafc; }
.w-sym-case.fantome { opacity: .35; }
.w-sym-case.juste { box-shadow: inset 0 0 0 3px #16a34a; }
.w-sym-case.faux { box-shadow: inset 0 0 0 3px #dc2626; }
.w-sym-case.oubli { box-shadow: inset 0 0 0 3px #ea580c; outline: 2px dashed #ea580c; outline-offset: -6px; }
.w-sym-axe { position: absolute; pointer-events: none; background: #dc2626; }
.w-sym.axe-vertical .w-sym-axe { left: calc(50% - 2px); top: -12px; bottom: -12px; width: 4px; }
.w-sym.axe-horizontal .w-sym-axe { top: calc(50% - 2px); left: -12px; right: -12px; height: 4px; }
.w-sym.axe-diagonale .w-sym-axe { left: 0; top: 0; width: 141.42%; height: 4px; margin-top: -2px; transform-origin: 0 50%; transform: rotate(45deg); }

/* Repérage */
.w-rep-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; padding: .5rem; min-height: 0; }
.w-rep { display: grid; grid-auto-rows: 1fr; max-width: 100%; height: calc(100% - 3rem); gap: 0; }
.w-rep-repere { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem; color: #264653; padding: 0 .3rem; }
.w-rep-case { border: 1px solid #94a3b8; background: #fff; margin: 0; padding: 0; font-size: 1.6rem; cursor: pointer; min-width: 0; min-height: 0; }
.w-rep-case:hover { background: #ecfdf5; }
.w-rep-case.juste { background: #86efac; }
.w-rep-case.faux { background: #fca5a5; }
.w-rep-case.attendue { outline: 4px solid #16a34a; outline-offset: -4px; }
.w-rep-case.bateau { background: #cbd5e1; }
.w-rep-case.coule { background: #475569; }
.w-rep-message { font-size: 1.6rem; font-weight: 700; color: #1f2937; text-align: center; }
.w-rep-pinceau { font-size: 1rem; line-height: 1; }
.w-rep-champ { max-width: 5rem; text-transform: uppercase; }

/* Diagramme */
.w-diag-bloc { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: .4rem; }
.w-diag { flex: 1; width: 100%; min-height: 0; font-family: system-ui, sans-serif; }
.w-diag-titre { font-size: 32px; font-weight: 800; fill: #1f2937; }
.w-diag-nom { font-size: 22px; font-weight: 700; fill: #1f2937; }
.w-diag-valeur { font-size: 22px; font-weight: 800; fill: #334155; }
.w-diag-axe { font-size: 18px; fill: #64748b; }
.w-diag-grille { stroke: #e2e8f0; stroke-width: 1; }
.w-diag-axes { fill: none; stroke: #1f2937; stroke-width: 3; }
.w-diag-compteurs { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; padding: .3rem; }
.w-diag-compteur { display: flex; gap: .3rem; align-items: center; font-weight: 700; background: #f1f5f9; border-radius: 8px; padding: .2rem .4rem; }

/* Matériel base 10 */
.w-b10-bloc { flex: 1; display: flex; flex-direction: column; gap: .4rem; padding: .5rem; min-height: 0; }
.w-b10-total { text-align: center; font-size: 2.6rem; font-weight: 800; color: #264653; font-variant-numeric: tabular-nums; }
.w-b10 { flex: 1; display: grid; gap: .4rem; min-height: 0; }
.w-b10-colonne { display: flex; flex-direction: column; border: 2px solid #cbd5e1; border-radius: 10px; min-height: 0; background: #f8fafc; }
.w-b10-colonne.trop { border-color: #ea580c; }
.w-b10-tete { display: flex; align-items: center; justify-content: space-between; gap: .3rem; padding: .3rem; border-bottom: 2px solid #cbd5e1; }
.w-b10-nom { font-weight: 800; font-size: 1.2rem; text-align: center; }
.w-b10-pieces { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: calc(6px * var(--k, 1)); padding: .5rem; overflow: auto; min-height: 0; }
.w-b10-grouper { margin: .3rem; font-size: 1.1rem !important; padding: .3rem .6rem !important; }
.w-b10-piece { padding: 0; border: none; cursor: pointer; background: none; }
.w-b10-piece.u { width: calc(22px * var(--k, 1)); height: calc(22px * var(--k, 1)); background: #fde047; border: 1px solid #a16207; border-radius: 3px; }
.w-b10-piece.d { display: grid; grid-template-rows: repeat(10, 1fr); width: calc(22px * var(--k, 1)); height: calc(200px * var(--k, 1)); border: 1px solid #1d4ed8; background: #60a5fa; }
.w-b10-piece.d span { border-bottom: 1px solid #1d4ed8; }
.w-b10-piece.c { display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(10, 1fr); width: calc(120px * var(--k, 1)); height: calc(120px * var(--k, 1)); border: 1px solid #15803d; background: #4ade80; }
.w-b10-piece.c span { border-right: 1px solid #15803d; border-bottom: 1px solid #15803d; }
.w-b10-piece.m { width: calc(120px * var(--k, 1)); height: calc(120px * var(--k, 1)); background: linear-gradient(135deg, #fda4af 0 30%, #f43f5e 30% 100%); border: 2px solid #9f1239; border-radius: 4px; box-shadow: calc(8px * var(--k, 1)) calc(-8px * var(--k, 1)) 0 #fb7185; margin: calc(8px * var(--k, 1)) calc(8px * var(--k, 1)) 0 0; }

/* ===== Widgets de la v0.11.0 : maths ===== */

/* Opération posée : une case par chiffre, retenues et annotations en rouge */
.w-op-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .6rem; min-height: 0; overflow: auto; }
.w-op-cadre { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; width: 100%; overflow: hidden; }
.w-op { display: grid; font-family: "TB Andika", system-ui, sans-serif; color: #1e293b; font-variant-numeric: tabular-nums; }
.w-op-case { position: relative; display: flex; align-items: center; justify-content: center; line-height: 1; }
.w-op-case.donnee, .w-op-case.ajoute, .w-op-case.signe { font-weight: 600; }
.w-op-case.ajoute { color: #ea580c; }
.w-op-case.resultat { color: #1d4ed8; font-weight: 700; }
.w-op-case.petite { font-size: .5em; align-items: flex-end; }
.w-op-case.retenue { color: #dc2626; font-weight: 800; }
.w-op-case.retenue.ligne1 { color: #9333ea; }
.w-op-case.retenue.ligne2 { color: #0891b2; }
.w-op-case.retenue.addition { color: #16a34a; }
.w-op-case.decale { color: #94a3b8; }
.w-op-case.trait { border-top: .06em solid #1e293b; }
.w-op-case.souligne { border-bottom: .05em solid #1e293b; }
.w-op-case.potence-v { border-left: .06em solid #1e293b; }
.w-op-case.potence-h { border-bottom: .06em solid #1e293b; }
.w-op-case.partiel { box-shadow: inset 0 -.1em 0 #f59e0b; }
.w-op-case.abaisse { color: #0f766e; }
.w-op-case.barree::after { content: ""; position: absolute; left: 12%; right: 12%; top: 50%; border-top: .07em solid #dc2626; transform: rotate(-55deg); }
.w-op-deco { position: absolute; color: #dc2626; font-weight: 800; line-height: 1; }
.w-op-deco.dessus { top: -.5em; left: 50%; transform: translateX(-50%); font-size: .5em; }
.w-op-deco.avant { left: -.12em; top: .05em; font-size: .45em; }
.w-op-deco.sous { left: -.3em; bottom: -.22em; font-size: .4em; }
.w-op-virgule { position: absolute; right: -.18em; bottom: .02em; font-weight: 800; color: #dc2626; }
.w-op-case.donnee .w-op-virgule, .w-op-case.ajoute .w-op-virgule { color: #1e293b; }
.w-op-saisie { width: .9em; height: 1.1em; font: inherit; font-weight: 700; text-align: center; border: 2px dashed #94a3b8; border-radius: 6px; padding: 0; color: #1d4ed8; background: #f8fafc; }
.w-op-case.petite .w-op-saisie { font-size: 1em; border-width: 1px; color: #dc2626; }
.w-op-saisie.juste { border: 2px solid #16a34a; background: #dcfce7; }
.w-op-saisie.faux { border: 2px solid #dc2626; background: #fee2e2; }
.w-op-message { font-size: 1.5rem; font-weight: 600; text-align: center; color: #1f2937; min-height: 2.2em; max-width: 60rem; }
.w-op-commandes .w-bouton.principal { font-size: 1.3rem; padding: .3rem 1rem; }
.w-op-champ { max-width: 14rem; min-width: 9rem; font-size: 1.3rem; }

/* Tableau des nombres */
.w-cent-bloc { flex: 1; display: flex; align-items: center; justify-content: center; padding: .5rem; min-height: 0; }
.w-cent { display: grid; grid-template-columns: repeat(10, 1fr); grid-template-rows: repeat(10, 1fr); height: 100%; aspect-ratio: 1.3; max-width: 100%; border: 2px solid #64748b; }
.w-cent-case { border: 1px solid #cbd5e1; background: #fff; font: inherit; font-weight: 700; color: #1f2937; padding: 0; min-width: 0; min-height: 0; cursor: pointer; }
.w-cent-case:nth-child(10n+5) { border-right: 2px solid #94a3b8; }
.w-cent-case:nth-child(n+41):nth-child(-n+50) { border-bottom: 2px solid #94a3b8; }
.w-cent-case.cachee { background: #e2e8f0 !important; color: #64748b; }
.w-cent-case.retrouvee { color: #16a34a; text-decoration: underline; }

/* Cadre à dix */
.w-dix { display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; }
.w-dix-cadre { display: grid; grid-template-columns: repeat(5, 70px); grid-template-rows: repeat(2, 70px); border: 4px solid #1f2937; border-radius: 6px; background: #fff; }
.w-dix-case { border: 2px solid #94a3b8; background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.w-dix-jeton { width: 52px; height: 52px; border-radius: 50%; box-shadow: inset -4px -6px 0 rgba(0, 0, 0, .2); }
.w-dix-ecriture { font-size: 2.6rem; font-weight: 800; color: #1f2937; }
.w-dix-ecriture .r { color: #dc2626; }
.w-dix-ecriture .b { color: #2563eb; }
.w-dix-manque { font-size: 1.6rem; color: #64748b; font-weight: 600; }

/* Le compte est bon */
.w-cb-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: .8rem; min-height: 0; overflow: auto; }
.w-cb-cible { font-size: 4.5rem; font-weight: 800; color: #fff; background: #264653; border-radius: 16px; padding: .1rem 1.6rem; font-variant-numeric: tabular-nums; }
.w-cb-plaques { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.w-cb-plaque { min-width: 4.5rem; font-size: 2.4rem; font-weight: 800; padding: .3rem .8rem; border: 3px solid #e9c46a; border-radius: 12px; background: #fff8c4; cursor: pointer; }
.w-cb-plaque.choisie { border-color: #2563eb; background: #dbeafe; transform: translateY(-4px); }
.w-cb-plaque.gagne { border-color: #16a34a; background: #d1fae5; }
.w-cb-op { font-size: 2rem; min-width: 3.5rem; }
.w-cb-calculs { font-size: 1.6rem; font-weight: 600; text-align: center; }
.w-cb-bravo { color: #16a34a; font-weight: 800; font-size: 2rem; }
.w-cb-solution-titre { margin-top: .4rem; color: #b45309; }
.w-cb-solution { color: #b45309; }

/* Suites et furet */
.w-suite-bloc { flex: 1; display: flex; align-items: center; padding: .8rem; min-height: 0; overflow: auto; }
.w-suite { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem; width: 100%; }
.w-suite-nombre { font-size: 2.2rem; font-weight: 800; padding: .3rem .8rem; border: 3px solid #2a9d8f; border-radius: 999px; background: #fff; color: #1f2937; cursor: pointer; font-variant-numeric: tabular-nums; }
.w-suite-nombre.futur { border-style: dashed; color: #94a3b8; }
.w-suite-nombre.trou { background: #fef3c7; border-color: #f59e0b; color: #b45309; }
.w-suite-nombre.retrouve { background: #d1fae5; }
.w-suite-fleche { font-size: 1.1rem; font-weight: 700; color: #2a9d8f; }
.w-suite-fleche.cachee { visibility: hidden; }

/* Disposition rectangulaire */
.w-rect-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .5rem; min-height: 0; }
.w-rect { flex: 1; width: 100%; min-height: 0; }
.w-rect-zone { stroke-width: .04; }
.w-rect-zone.a { fill: #dbeafe; stroke: #2563eb; }
.w-rect-zone.b { fill: #fee2e2; stroke: #dc2626; }
.w-rect-objet { fill: #1d4ed8; }
.w-rect-objet.b { fill: #dc2626; }
.w-rect-coupe { fill: transparent; cursor: pointer; }
.w-rect-coupe:hover { fill: rgba(0, 0, 0, .08); }
.w-rect-coupe.active { fill: #1f2937; transform: scaleX(1); }
.w-rect-cote { font-size: .55px; font-weight: 800; fill: #1f2937; }
.w-rect-cote.a { fill: #1d4ed8; }
.w-rect-cote.b { fill: #dc2626; }
.w-rect-ecriture { font-size: 2.2rem; font-weight: 800; color: #1f2937; }
.w-rect-ecriture .a { color: #1d4ed8; }
.w-rect-ecriture .b { color: #dc2626; }

/* Schéma en barres */
.w-bar-bloc { flex: 1; display: flex; flex-direction: column; gap: .4rem; padding: .6rem; min-height: 0; }
.w-bar-enonce { font-size: 1.5rem; font-weight: 600; color: #1f2937; text-align: center; }
.w-bar { flex: 1; width: 100%; min-height: 0; font-family: system-ui, sans-serif; }
.w-bar-seg { stroke: #1f2937; stroke-width: 3; }
.w-bar-seg.pointille { stroke-dasharray: 10 8; }
.w-bar-valeur { font-size: 34px; font-weight: 800; fill: #1f2937; }
.w-bar-valeur.inconnue { fill: #dc2626; }
.w-bar-nom { font-size: 26px; font-weight: 700; fill: #334155; }
.w-bar-accolade { fill: none; stroke: #1f2937; stroke-width: 3; }
.w-bar-editeur label { flex-wrap: wrap; }

/* Balance */
.w-bal-bloc { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: .4rem; }
.w-bal { flex: 1; width: 100%; min-height: 0; font-family: system-ui, sans-serif; }
.w-bal-pied { fill: #64748b; }
.w-bal-fleau { stroke: #475569; stroke-width: 12; stroke-linecap: round; }
.w-bal-axe { fill: #1f2937; }
.w-bal-aiguille { stroke: #dc2626; stroke-width: 5; stroke-linecap: round; }
.w-bal-aiguille.equilibre { stroke: #16a34a; }
.w-bal-fil { stroke: #94a3b8; stroke-width: 2; }
.w-bal-plateau { fill: #cbd5e1; stroke: #64748b; stroke-width: 3; cursor: pointer; }
.w-bal-plateau.actif { fill: #a7f3d0; stroke: #059669; }
.w-bal-element { cursor: pointer; }
.w-bal-masse { fill: #78716c; stroke: #44403c; stroke-width: 2; }
.w-bal-masse-texte { font-size: 12px; font-weight: 800; fill: #fff; }
.w-bal-total { font-size: 28px; font-weight: 800; fill: #1f2937; }
.w-bal-etat { font-size: 30px; font-weight: 800; fill: #1f2937; }
.w-bal-reserve { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; padding: .3rem; }
.w-bal-ajout.objet { background: #fef3c7; }

/* Lecture d'instruments */
.w-lec-bloc { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: .4rem; }
.w-lec { flex: 1; width: 100%; min-height: 0; font-family: system-ui, sans-serif; }
.w-lec-trait { stroke: #1f2937; stroke-width: 1.5; }
.w-lec-trait.grand { stroke-width: 3; }
.w-lec-nombre { font-size: 24px; font-weight: 700; fill: #1f2937; }
.w-lec-unite { font-size: 30px; font-weight: 800; fill: #475569; }
.w-lec-tube { fill: #f8fafc; stroke: #64748b; stroke-width: 3; }
.w-lec-bulbe { fill: #dc2626; stroke: #64748b; stroke-width: 3; }
.w-lec-mercure { fill: #dc2626; }
.w-lec-verre { fill: rgba(241, 245, 249, .6); stroke: #64748b; stroke-width: 4; }
.w-lec-eau { fill: rgba(59, 130, 246, .45); }
.w-lec-regle { fill: #fef9c3; stroke: #a16207; stroke-width: 3; }
.w-lec-objet { fill: #2a9d8f; }
.w-lec-repere { fill: #dc2626; }
.w-lec-cadran { fill: #fff; stroke: #475569; stroke-width: 6; }
.w-lec-aiguille { stroke: #dc2626; stroke-width: 6; stroke-linecap: round; }
.w-lec-message { font-size: 1.8rem; font-weight: 700; text-align: center; color: #1f2937; min-height: 1.5em; }
.w-lec-reglages { display: flex; flex-wrap: wrap; gap: .4rem 1rem; padding: .4rem .8rem; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.w-lec-reglages label { display: flex; align-items: center; gap: .3rem; }

/* Durées */
.w-dur-bloc { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: .4rem; }
.w-dur { flex: 1; width: 100%; min-height: 0; font-family: system-ui, sans-serif; }
.w-dur-axe { stroke: #1f2937; stroke-width: 4; }
.w-dur-trait { stroke: #1f2937; stroke-width: 3; }
.w-dur-heure { font-size: 22px; font-weight: 700; fill: #475569; }
.w-dur-point { stroke: #fff; stroke-width: 3; }
.w-dur-point.debut { fill: #16a34a; }
.w-dur-point.fin { fill: #dc2626; }
.w-dur-borne { font-size: 30px; font-weight: 800; }
.w-dur-borne.debut { fill: #16a34a; }
.w-dur-borne.fin { fill: #dc2626; }
.w-dur-bond { fill: none; stroke-width: 4; }
.w-dur-bond.c0 { stroke: #2563eb; }
.w-dur-bond.c1 { stroke: #9333ea; }
.w-dur-bond.c2 { stroke: #ea580c; }
.w-dur-duree { font-size: 26px; font-weight: 800; }
.w-dur-duree.c0 { fill: #2563eb; }
.w-dur-duree.c1 { fill: #9333ea; }
.w-dur-duree.c2 { fill: #ea580c; }
.w-dur-phrase { font-size: 2rem; font-weight: 800; text-align: center; color: #1f2937; }

/* Aires et périmètres */
.w-aires-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .5rem; min-height: 0; }
.w-aires { display: grid; height: calc(100% - 4rem); max-width: 100%; border: 1px solid #94a3b8; touch-action: none; user-select: none; background: #fff; }
.w-aires-case { border: 1px solid #e2e8f0; cursor: pointer; }
.w-aires-case.h { border-top: 3px solid #1f2937; }
.w-aires-case.b { border-bottom: 3px solid #1f2937; }
.w-aires-case.g { border-left: 3px solid #1f2937; }
.w-aires-case.d { border-right: 3px solid #1f2937; }
.w-aires-mesures { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: center; font-size: 1.3rem; font-weight: 700; }
.w-aires-ligne { display: flex; gap: .8rem; align-items: center; }
.w-aires-pastille { width: 1.2rem; height: 1.2rem; border-radius: 4px; border: 2px solid #1f2937; }

/* Tangram et pentominos */
.w-tan-bloc { flex: 1; display: flex; min-height: 0; padding: .3rem; }
.w-tan { width: 100%; height: 100%; background: #f8fafc; border-radius: 8px; }
.w-tan-modele { fill: #94a3b8; stroke: #94a3b8; stroke-width: .03; }
.w-tan-piece { cursor: grab; touch-action: none; }
.w-tan-piece polygon { stroke: #1f2937; stroke-width: .06; stroke-linejoin: round; }
.w-tan-piece.choisie polygon { stroke: #fff; stroke-width: .12; filter: drop-shadow(0 0 .15px #1f2937); }

/* Solides */
.w-sol-bloc { flex: 1; display: flex; gap: .5rem; padding: .4rem; min-height: 0; }
.w-sol-scene { flex: 1; display: flex; gap: .5rem; min-width: 0; min-height: 0; }
.w-sol, .w-sol-patron { flex: 1; min-width: 0; height: 100%; touch-action: none; }
.w-sol { cursor: grab; }
.w-sol-face { stroke-linejoin: round; }
.w-sol-arete { stroke: #1f2937; stroke-width: 3; stroke-linecap: round; fill: none; }
.w-sol-arete.cachee { stroke-dasharray: 9 8; stroke-width: 2; }
.w-sol-arete.surlignee { stroke: #ea580c; stroke-width: 7; }
.w-sol-arete.surlignee.cachee { stroke-width: 4; stroke-dasharray: 10 9; }
.w-sol-sommet { fill: #dc2626; stroke: #fff; stroke-width: 3; }
.w-sol-patron-face { stroke: #1f2937; stroke-width: .04; }
.w-sol-sans { font-size: 24px; fill: #64748b; }
.w-sol-comptes { display: flex; flex-direction: column; gap: .5rem; justify-content: center; }
.w-sol-compte { display: flex; flex-direction: column; align-items: center; min-width: 7rem; padding: .4rem; border: 2px solid #cbd5e1; border-radius: 10px; background: #f8fafc; font-size: 1.1rem; cursor: pointer; }
.w-sol-compte strong { font-size: 2.2rem; }
.w-sol-compte.ouvert { border-color: var(--accent); background: #ecfdf5; }

/* ===== Widgets de la v0.12.0 : français ===== */

/* Conjugaison */
.w-conj-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: .8rem; min-height: 0; overflow: auto; }
.w-conj-titre { font-size: 1.5rem; color: #475569; }
.w-conj-titre strong { color: #1f2937; font-size: 1.9rem; }
.w-conj { display: grid; grid-template-columns: auto auto; gap: .15em .5em; align-items: baseline; }
.w-conj-ligne { display: contents; cursor: pointer; }
.w-conj-pronom { text-align: right; color: #64748b; }
.w-conj-forme { font-weight: 700; color: #1f2937; }
.w-conj-fin.couleur { color: #dc2626; }
.w-conj-aux.couleur { color: #2563eb; }
.w-conj-trou { color: #cbd5e1; }
.w-conj-champ { font: inherit; font-weight: 700; width: 9em; padding: 0 .2em; border: 2px dashed #94a3b8; border-radius: 8px; color: #1d4ed8; }
.w-conj-champ.juste { border: 2px solid #16a34a; background: #dcfce7; }
.w-conj-champ.faux { border: 2px solid #dc2626; background: #fee2e2; }
.w-conj-correction { grid-column: 2; font-size: .55em; color: #16a34a; font-weight: 700; margin-top: -.3em; }
.w-conj-verbe { max-width: 12rem; min-width: 9rem; font-size: 1.3rem; }

/* Fluence */
.w-flu-bloc { flex: 1; display: flex; flex-direction: column; gap: .5rem; padding: .6rem 1rem; min-height: 0; }
.w-flu-tete { justify-content: space-between; align-items: center; }
.w-flu-chrono { font-size: 2.2rem; font-weight: 800; color: #264653; font-variant-numeric: tabular-nums; }
.w-flu-chrono.alerte { color: #dc2626; font-size: 1.6rem; }
.w-flu-resultat { display: flex; gap: 1rem; align-items: center; font-size: 1.3rem; }
.w-flu-score { font-size: 2.2rem; font-weight: 800; color: #16a34a; }
.w-flu-texte { flex: 1; overflow: auto; line-height: 1.7; color: #1f2937; }
.w-flu-mot { cursor: pointer; border-radius: 6px; padding: 0 .05em; }
.w-flu-mot:hover { background: #f1f5f9; }
.w-flu-mot.erreur { color: #dc2626; text-decoration: line-through 3px; }
.w-flu-mot.non-lu { color: #cbd5e1; }
.w-flu-mot.dernier { background: #fde68a; box-shadow: 0 0 0 3px #f59e0b; }
.w-flu-texte.choix-fin .w-flu-mot:hover { background: #fde68a; }
.w-flu-mesures { max-height: 9rem; overflow: auto; border-top: 1px solid #e2e8f0; font-size: 1.05rem; }
.w-flu-mesures-titre { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.w-flu-mesure { color: #334155; }

/* Mot du jour */
.w-motj-mot { display: flex; gap: 1rem; align-items: center; font-size: 4.2rem; font-weight: 800; color: #264653; }
.w-motj-image { font-size: 4.5rem; }
.w-motj-valeur { font-size: 1.5rem; font-weight: 600; color: #1f2937; text-align: center; }
.w-motj-editeur { overflow: auto; }
.w-motj-editeur label { align-items: flex-start; }
.w-motj-libelle { min-width: 9rem; font-weight: 700; }
.w-motj-editeur textarea { flex: 1; font: inherit; font-size: 1.05rem; padding: .3rem .5rem; border: 1px solid #cbd5e1; border-radius: 6px; resize: none; }

/* Transformations de phrases */
.w-tr-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .8rem; min-height: 0; overflow: auto; }
.w-tr-groupes { display: flex; flex-wrap: wrap; gap: .4em; justify-content: center; }
.w-tr-groupe { position: relative; display: flex; flex-direction: column; align-items: center; padding: .1em .45em; border: 3px solid #94a3b8; border-radius: 12px; background: #fff; cursor: pointer; touch-action: none; user-select: none; color: #1f2937; }
.w-tr-groupe.verbe { border-color: #dc2626; color: #b91c1c; }
.w-tr-groupe.cc { border-color: #ea580c; border-style: dashed; }
.w-tr-groupe.supprime { opacity: .45; text-decoration: line-through 3px #dc2626; }
.w-tr-groupe.remplace { background: #ecfdf5; border-color: #16a34a; }
.w-tr-groupe.saisie { z-index: 5; box-shadow: 0 10px 20px rgba(0, 0, 0, .25); }
.w-tr-avant { font-size: .4em; color: #64748b; text-decoration: line-through; }
.w-tr-fleche { font-size: 1.6rem; color: #94a3b8; }
.w-tr-resultat { font-size: 2.2rem; font-weight: 700; color: #1f2937; text-align: center; }
.w-tr-versions { font-size: 1.3rem; color: #475569; align-self: stretch; }

/* Chaînes d'accord */
.w-acc-bloc { flex: 1; display: flex; flex-direction: column; gap: .4rem; padding: .6rem; min-height: 0; overflow: auto; }
.w-acc-cadre { flex: 1; display: flex; align-items: center; justify-content: center; }
.w-acc-phrase { position: relative; padding-top: 2.2em; display: flex; flex-direction: column; gap: .8em; }
.w-acc-fleches { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.w-acc-fleche { fill: none; stroke-width: 3; }
.w-acc-ligne { display: flex; flex-wrap: wrap; gap: .1em .35em; align-items: baseline; color: #1f2937; }
.w-acc-ligne.transformee { border-top: 2px dashed #cbd5e1; padding-top: .4em; }
.w-acc-mot { cursor: pointer; border-radius: 6px; padding: 0 .08em; }
.w-acc-mot.donneur { color: var(--couleur); font-weight: 800; box-shadow: inset 0 -.12em 0 var(--couleur); }
.w-acc-mot.receveur { color: var(--couleur); }
.w-acc-marque { color: #dc2626; font-weight: 800; background: #fee2e2; border-radius: 4px; }
.w-acc-ponct { color: #64748b; margin-left: -.3em; }

/* Homophones */
.w-hom-bloc { flex: 1; display: flex; flex-direction: column; gap: .4rem; padding: .5rem 1rem; min-height: 0; }
.w-hom-liste { flex: 1; overflow: auto; margin: 0; padding-left: 1.8em; line-height: 1.9; color: #1f2937; }
.w-hom-trou { display: inline-flex; gap: .15em; padding: .05em .15em; border-bottom: 3px solid #94a3b8; border-radius: 8px; background: #f8fafc; vertical-align: baseline; }
.w-hom-trou.juste { background: #dcfce7; border-color: #16a34a; }
.w-hom-trou.faux { background: #fee2e2; border-color: #dc2626; }
.w-hom-choix { font: inherit; font-size: .8em; padding: 0 .35em; border: 2px solid #cbd5e1; border-radius: 8px; background: #fff; color: #64748b; cursor: pointer; }
.w-hom-trou.rempli .w-hom-choix:not(.choisi) { opacity: .35; }
.w-hom-choix.choisi { border-color: #2563eb; color: #1d4ed8; font-weight: 800; }
.w-hom-pied { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: 1.2rem; }
.w-hom-astuce { color: #b45309; }
.w-hom-bilan { font-size: 1.5rem; }

/* Ponctuation */
.w-pon-cadre { flex: 1; display: flex; flex-direction: column; gap: .5rem; padding: .8rem 1rem; min-height: 0; overflow: auto; }
.w-pon { display: flex; flex-wrap: wrap; align-items: baseline; row-gap: .4em; color: #1f2937; line-height: 1.5; }
.w-pon-bloc { display: inline-flex; align-items: baseline; }
.w-pon-mot { cursor: pointer; border-radius: 6px; padding: 0 .05em; }
.w-pon-mot.juste { box-shadow: inset 0 -.12em 0 #16a34a; }
.w-pon-mot.faux { box-shadow: inset 0 -.12em 0 #dc2626; }
.w-pon-mot.oubli { box-shadow: inset 0 -.12em 0 #ea580c; }
.w-pon-mot.indice { box-shadow: inset 0 -.06em 0 #cbd5e1; }
.w-pon-fente { font: inherit; font-weight: 800; min-width: .9em; padding: 0 .12em; margin: 0 .08em; border: none; border-radius: 6px; background: transparent; color: #cbd5e1; cursor: pointer; }
.w-pon-fente.rempli { color: #1d4ed8; }
.w-pon-fente:hover { background: #f1f5f9; }
.w-pon-fente.juste { background: #dcfce7; color: #16a34a; }
.w-pon-fente.faux { background: #fee2e2; color: #dc2626; }
.w-pon-fente.oubli { background: #ffedd5; color: #ea580c; }

/* Fabrique de mots */
.w-fab-bloc { flex: 1; display: flex; flex-direction: column; gap: .6rem; padding: .6rem; min-height: 0; overflow: auto; }
.w-fab-colonnes { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: .6rem; }
.w-fab-colonne { border-radius: 10px; padding: .4rem; background: #f8fafc; border-top: 6px solid #94a3b8; }
.w-fab-colonne.prefixes { border-top-color: #2563eb; }
.w-fab-colonne.suffixes { border-top-color: #dc2626; }
.w-fab-titre { font-weight: 800; text-align: center; margin-bottom: .3rem; }
.w-fab-etiquettes { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: center; }
.w-fab-etiquette { font-size: 1.3rem; padding: .15rem .6rem; border: 2px solid #cbd5e1; border-radius: 8px; background: #fff; cursor: pointer; }
.w-fab-etiquette.choisie { border-color: #16a34a; background: #dcfce7; font-weight: 800; }
.w-fab-resultat { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; min-height: 4rem; }
.w-fab-mot { font-size: 3.4rem; font-weight: 800; }
.w-fab-mot .p { color: #2563eb; }
.w-fab-mot .r { color: #1f2937; }
.w-fab-mot .s { color: #dc2626; }
.w-fab-verdict { font-size: 1.4rem; font-weight: 700; color: #b45309; }
.w-fab-verdict.oui { color: #16a34a; }
.w-fab-trouves { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.w-fab-trouve { padding: .1rem .5rem; border-radius: 999px; background: #dcfce7; font-weight: 700; }
.w-fab-trouve.douteux { background: #fef3c7; }
.w-fab-edition { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; min-height: 0; }

/* Mot mystère */
.w-mm-bloc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .6rem; min-height: 0; overflow: auto; }
.w-mm-message { font-size: 1.4rem; font-weight: 700; color: #1f2937; min-height: 1.4em; }
.w-mm-grille { display: grid; gap: 5px; }
.w-mm-case { width: 3.4rem; height: 3.4rem; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; border: 2px solid #94a3b8; background: #1e3a8a; color: #fff; }
.w-mm-case.saisie { background: #dbeafe; color: #1e3a8a; }
.w-mm-case.bien { background: #dc2626; }
.w-mm-case.mal { background: #1e3a8a; position: relative; z-index: 0; color: #1f2937; }
.w-mm-case.mal::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #facc15; z-index: -1; }
.w-mm-champ { flex: none; max-width: 18rem; text-transform: uppercase; font-size: 1.4rem; text-align: center; }
.w-mm-clavier { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.w-mm-rangee { display: flex; gap: 4px; }
.w-mm-touche { min-width: 2.4rem; height: 2.6rem; font-size: 1.2rem; font-weight: 700; border: 1px solid #cbd5e1; border-radius: 6px; background: #f1f5f9; cursor: pointer; }
.w-mm-touche.large { min-width: 3.6rem; }
.w-mm-touche.bien { background: #dc2626; color: #fff; }
.w-mm-touche.mal { background: #facc15; }
.w-mm-touche.non { background: #64748b; color: #fff; }

/* Mots mêlés */
.w-mel-bloc { flex: 1; display: flex; gap: .8rem; padding: .6rem; min-height: 0; }
.w-mel-plateau { position: relative; height: 100%; aspect-ratio: 1; max-width: 70%; }
.w-mel-grille { display: grid; width: 100%; height: 100%; border: 2px solid #64748b; border-radius: 8px; background: #fff; touch-action: none; user-select: none; }
.w-mel-case { display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; color: #1f2937; cursor: pointer; }
.w-mel-traits { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.w-mel-trouve { stroke: rgba(34, 197, 94, .45); stroke-width: .75; stroke-linecap: round; }
.w-mel-selection { stroke: rgba(59, 130, 246, .45); stroke-width: .75; stroke-linecap: round; }
.w-mel-liste { flex: 1; display: flex; flex-direction: column; flex-wrap: wrap; gap: .3rem; align-content: flex-start; font-size: 1.4rem; font-weight: 700; }
.w-mel-mot.trouve { color: #16a34a; text-decoration: line-through; }
.w-mel-bravo { color: #16a34a; }

/* Lettres mélangées */
.w-ana-lettres, .w-ana-cases { display: flex; flex-wrap: wrap; gap: .25em; justify-content: center; }
.w-ana-lettre { width: 1.3em; height: 1.4em; font: inherit; font-weight: 800; border: 3px solid #e9c46a; border-radius: 12px; background: #fff8c4; cursor: pointer; padding: 0; }
.w-ana-lettre.utilisee { visibility: hidden; }
.w-ana-case { width: 1.3em; height: 1.4em; font: inherit; font-weight: 800; border: 3px dashed #94a3b8; border-radius: 12px; background: #fff; color: #1d4ed8; cursor: pointer; padding: 0; }
.w-ana-case.remplie { border-style: solid; }
.w-ana-case.aide { color: #b45309; }
.w-ana-case.juste { border-color: #16a34a; background: #dcfce7; }
.w-ana-case.faux { border-color: #dc2626; background: #fee2e2; }
.w-ana-message { font-size: 1.5rem; font-weight: 700; color: #1f2937; }

/* Mise au point du texte libre */
.w-tl-bloc { flex: 1; display: flex; flex-direction: column; gap: .4rem; padding: .5rem 1rem; min-height: 0; }
.w-tl-outils { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.w-tl-texte { flex: 1; overflow: auto; line-height: 2.3; color: #1f2937; }
.w-tl-mot { position: relative; cursor: pointer; border-radius: 6px; padding: 0 .05em; }
.w-tl-mot:hover { background: #f1f5f9; }
.w-tl-mot.t-barre { text-decoration: line-through 3px #dc2626; color: #94a3b8; }
.w-tl-mot.t-ortho { text-decoration: underline 3px #dc2626; text-underline-offset: .15em; }
.w-tl-mot.t-sens { text-decoration: underline wavy 2px #2563eb; text-underline-offset: .2em; }
.w-tl-mot.t-corrige .w-tl-ancien { text-decoration: line-through 2px #dc2626; color: #94a3b8; }
.w-tl-correction { position: absolute; left: 0; bottom: 1.05em; font-size: .7em; color: #16a34a; font-weight: 800; white-space: nowrap; line-height: 1; }
.w-tl-fente { font: inherit; font-size: .7em; border: none; background: transparent; color: #cbd5e1; padding: 0 .1em; cursor: pointer; vertical-align: super; }
.w-tl-fente.remplie { color: #16a34a; font-weight: 800; }
.w-tl-insere { background: #dcfce7; border-radius: 6px; padding: 0 .2em; }
.w-tl-comparer { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; overflow: auto; }
.w-tl-entete { font-weight: 800; color: #64748b; font-size: .7em; text-transform: uppercase; margin-bottom: .3rem; }
.w-tl-version { white-space: pre-wrap; line-height: 1.6; color: #1f2937; }
.w-tl-colonne:first-child .w-tl-version { color: #64748b; }
.w-tl-finale { flex: 1; overflow: auto; white-space: pre-wrap; color: #1f2937; padding: .35em .2em .6em; }

/* ===== v0.13.2 : petit menu « Modifier » du widget Date du jour ===== */
.w-date-reglages { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; padding: .5rem .8rem; background: #f8fafc; border-bottom: 1px solid #e2e8f0; font-size: 1.1rem; }
.w-date-option { display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.w-date-option input { width: 1.2em; height: 1.2em; accent-color: var(--accent); }

/* ===== v0.14.0 : page d'aide ===== */
.aide { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 2rem; background: rgba(15, 23, 42, .6); }
.aide-boite { display: flex; flex-direction: column; width: min(1100px, 100%); max-height: 100%; background: var(--menu-fond); color: var(--menu-texte); border: 1px solid var(--menu-bord); border-radius: 14px; box-shadow: var(--ombre); overflow: hidden; }
.aide-entete { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1.2rem; border-bottom: 1px solid var(--menu-bord); }
.aide-entete h2 { margin: 0; font-size: 1.4rem; }
.aide-entete button { background: transparent; color: inherit; border: 1px solid var(--menu-bord); border-radius: 8px; width: 40px; height: 40px; font-size: 1.4rem; }
.aide-entete button:hover { background: #dc2626; border-color: #dc2626; }
.aide-contenu { overflow-y: auto; padding: 1rem 1.2rem 1.4rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem 1.6rem; }
.aide-contenu h3 { margin: 0 0 .4rem; font-size: 1.1rem; color: #7dd3c8; }
.aide-contenu ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .35rem; line-height: 1.4; }
.aide-contenu b { color: #fff; }
.aide-raccourcis { border-collapse: collapse; width: 100%; }
.aide-raccourcis td { padding: .25rem .4rem; border-bottom: 1px solid var(--menu-bord); vertical-align: top; }
.aide-raccourcis td:first-child { white-space: nowrap; }
.aide kbd { display: inline-block; min-width: 1.6em; padding: .05em .4em; border: 1px solid #64748b; border-bottom-width: 2px; border-radius: 5px; background: var(--menu-fond-sous); font: .85em/1.3 ui-monospace, monospace; text-align: center; }

/* ===== v0.14.0 : aimantation des widgets (lignes repères pendant le déplacement) ===== */
.guide-aimant { position: absolute; z-index: 999999; pointer-events: none; background: #e76f51; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); }
.guide-aimant-v { top: 0; bottom: 0; width: 2px; margin-left: -1px; }
.guide-aimant-h { left: 0; right: 0; height: 2px; margin-top: -1px; }

/* ===== v0.14.1 : joints entre widgets aimantés (dans la gouttière de 10 px) ===== */
.joints-aimant { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.joint-aimant { position: absolute; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 2px rgba(255, 255, 255, .8), 0 1px 4px rgba(0, 0, 0, .25); }
.joint-v { width: 6px; margin-left: -3px; }
.joint-h { height: 6px; margin-top: -3px; }
body.widget-plein .joints-aimant { display: none; }
