/* Genere par 06-Matrices/construire_matrices.ps1 : ne pas modifier ici. */
/* Styles communs du module Matrices et de l'outil (reprennent la charte et les classes « p- » du module TND). */
:root {
  --fond: #fffdf9; --fond-doux: #f1e6d8; --texte: #24211f; --texte-doux: #5a524c;
  --accent: #a3461b; --accent-fonce: #7d3412; --accent-doux: #f8dfd0;
  --vert: #3f5f3a; --vert-doux: #e2ebdd; --bord: #c9b8a6; --rayon: 14px;
}

#psy { padding-top: 1.5rem; }
#psy h3 { font-size: 1.3rem; line-height: 1.3; margin: 0 0 0.5rem; }
#psy [hidden] { display: none !important; }
#psy section { scroll-margin-top: 1rem; margin-bottom: 2.5rem; }
.p-texte { max-width: 46rem; }

.p-pastille {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 3rem; height: 3rem; border-radius: 46% 54% 52% 48% / 56% 44% 56% 44%;
  background: var(--accent-doux); color: var(--accent-fonce);
}
.p-pastille.p-vert { background: var(--vert-doux); color: var(--vert); border-radius: 55% 45% 48% 52% / 46% 56% 44% 54%; }
.p-pastille svg { width: 66%; height: 66%; }

.p-grille { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.85rem; grid-template-columns: 1fr; }
.p-grille li { margin: 0; }
@media (min-width: 600px) { .p-grille { grid-template-columns: repeat(2, 1fr); } .p-grille > li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 900px) { .p-grille { grid-template-columns: repeat(3, 1fr); } .p-grille > li:last-child:nth-child(odd) { grid-column: auto; } .p-grille > li:last-child:nth-child(3n+1) { grid-column: 1 / -1; } }
.p-porte {
  display: grid; grid-template-columns: 3rem 1fr; gap: 0.1rem 0.85rem; align-items: start; height: 100%;
  background: #fff; color: var(--texte); border: 2px solid var(--bord); border-radius: var(--rayon); padding: 0.95rem 1.1rem; text-decoration: none;
}
a.p-porte:hover { border-color: var(--accent); }
.p-porte .p-pastille { grid-row: span 2; }
.p-porte .p-lib { font-weight: 700; font-size: 1.08rem; }
.p-porte .p-desc { font-size: 0.98rem; color: var(--texte-doux); line-height: 1.45; }

.p-bref { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.2rem 1.4rem 0.3rem; margin-bottom: 1rem; }
.p-etiquette { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--vert); display: block; margin-bottom: 0.3rem; }
#psy details.p-loin { background: var(--fond-doux); border-radius: var(--rayon); padding: 0.2rem 1.4rem; margin: 0 0 1.8rem; }
#psy details.p-loin[open] { padding-bottom: 0.6rem; }
#psy details.p-loin > summary { cursor: pointer; font-weight: 700; color: var(--accent-fonce); padding: 0.7rem 0; }
.p-sources { font-size: 0.92rem; color: var(--texte-doux); border-top: 1px solid var(--bord); padding-top: 0.6rem; }
.p-sources ul { padding-left: 1.2rem; margin-bottom: 0.4rem; }
.p-encadre { border-left: 5px solid var(--vert); background: var(--vert-doux); padding: 1rem 1.25rem; border-radius: 0 var(--rayon) var(--rayon) 0; margin: 0 0 1.5rem; max-width: 46rem; }
.p-encadre p:last-child { margin-bottom: 0; }
.p-question { border: 2px dashed var(--accent); background: #fff; border-radius: var(--rayon); padding: 0.9rem 1.2rem; margin: 0 0 1.2rem; max-width: 46rem; }
.p-question .p-etiquette { color: var(--accent-fonce); }
.p-question p:last-child { margin-bottom: 0; }

.p-bouton { display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--accent); color: #fff; border: 2px solid var(--accent); padding: 0.6rem 1.2rem; border-radius: 999px; line-height: 1.3; font-size: 1rem; }
.p-bouton:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: #fff; }
.p-bouton.p-second { background: transparent; color: var(--accent); }
.p-bouton.p-second:hover { background: var(--fond-doux); color: var(--accent-fonce); }
.p-licence { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--bord); font-size: 0.92rem; color: var(--texte-doux); }
.p-tableau { border-collapse: collapse; width: 100%; max-width: 46rem; margin: 0 0 1.2rem; background: #fff; font-size: 1rem; }
.p-tableau th, .p-tableau td { border: 1px solid var(--bord); padding: 0.55rem 0.75rem; vertical-align: top; text-align: left; }
.p-tableau thead th { background: var(--fond-doux); }
table > caption.p-etiquette { display: table-caption; caption-side: top; text-align: left; }
@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .p-bref, #psy details.p-loin { padding-left: 1rem; padding-right: 1rem; }
}

/* Propre à l'outil (classes « m- ») */
.m-large { max-width: 92rem; }
.m-atelier { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .m-atelier { grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); } .m-droite { position: sticky; top: 0.5rem; max-height: calc(100vh - 1rem); overflow: auto; } }
/* Trois repères visuels : champ blanc = ce qu'on écrit ; texte discret = une action ; vert pointillé = ajouter */
.p-bandeau { padding: 1.1rem 0 0.9rem; }
.p-bandeau h1 { font-size: 1.7rem; }
.p-bandeau p { font-size: 1rem; margin-top: 0.2rem; max-width: none; }
.m-carte { background: #fbf7f1; border-radius: var(--rayon); padding: 0.95rem 1rem; margin-bottom: 0.8rem; }
.m-carte h2 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; margin: 0 0 0.7rem; color: var(--texte); }
#psy h3.m-sec { font-size: 0.88rem; color: var(--texte-doux); margin: 0.2rem 0 0.35rem; }
.m-num { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; flex-shrink: 0; font-size: 0.88rem; background: var(--accent-doux); color: var(--accent-fonce); border-radius: 46% 54% 52% 48% / 56% 44% 56% 44%; }
.m-champ { display: block; margin-bottom: 0.65rem; font-size: 0.88rem; font-weight: 600; color: var(--texte-doux); }
.m-champ > input, .m-champ > select, .m-champ > textarea { display: block; margin-top: 0.15rem; font-weight: 400; }
input[type=text], input[type=number], input[type=time], select, textarea { font: inherit; font-size: 0.98rem; line-height: 1.35; width: 100%; padding: 0.35rem 0.5rem; border: 1px solid #8d8177; border-radius: 6px; background: #fff; color: var(--texte); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
textarea { display: block; resize: none; overflow: hidden; }
.m-deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 0 0.7rem; }
.m-coche { display: flex; gap: 0.45rem; align-items: flex-start; font-size: 0.93rem; margin-bottom: 0.4rem; }
.m-coche input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; margin-top: 0.2rem; flex-shrink: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 0.7rem; }
legend { font-weight: 600; font-size: 0.88rem; color: var(--texte-doux); padding: 0; margin-bottom: 0.2rem; }
.m-aide { font-size: 0.88rem; color: var(--texte-doux); margin-bottom: 0.55rem; line-height: 1.45; }
.m-boutons { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.m-rang { display: flex; gap: 0.5rem; align-items: center; }
.m-rang select { flex: 1; min-width: 0; }

/* Boutons */
button.m-lien, label.m-lien { font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer; background: none; border: 0; color: var(--accent-fonce); padding: 0.3rem 0.45rem; border-radius: 6px; line-height: 1.3; text-decoration: underline; text-underline-offset: 0.18em; white-space: nowrap; }
button.m-lien:hover, label.m-lien:hover { background: var(--accent-doux); }
button.m-lien.m-efface { font-weight: 400; color: var(--texte-doux); }
button.m-lien.m-efface:hover { color: #8a2c14; background: #f9e4dc; }
.m-ic { font: inherit; font-size: 1rem; line-height: 1; width: 1.85rem; height: 1.85rem; flex-shrink: 0; cursor: pointer; background: none; border: 0; border-radius: 6px; color: var(--texte-doux); }
.m-ic:hover:not(:disabled) { background: #efe6db; color: var(--accent-fonce); }
.m-ic.m-efface:hover { background: #f9e4dc; color: #8a2c14; }
.m-ic:disabled { color: #d3c9be; cursor: default; }
.m-plus { font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; display: block; width: 100%; text-align: left; background: none; border: 1px dashed var(--vert); border-radius: 6px; color: var(--vert); padding: 0.3rem 0.55rem; margin-top: 0.15rem; }
.m-plus:hover { background: var(--vert-doux); }

/* Guidage en trois choix */
.m-seg { display: flex; background: #efe6db; border-radius: 8px; padding: 3px; gap: 2px; }
.m-seg label { flex: 1; position: relative; text-align: center; font-size: 0.9rem; cursor: pointer; }
.m-seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.m-seg span { display: block; padding: 0.25rem 0.3rem; border-radius: 6px; }
.m-seg input:checked + span { background: #fff; font-weight: 700; color: var(--accent-fonce); box-shadow: 0 1px 2px rgba(60,40,20,0.2); }
.m-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Repère de lecture */
.m-legende { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; font-size: 0.84rem; color: var(--texte-doux); margin: 0 0 0.7rem; }
.m-legende span { white-space: nowrap; }
.m-ex { display: inline-block; width: 1.5rem; height: 0.95rem; background: #fff; border: 1px solid #8d8177; border-radius: 3px; vertical-align: -0.1rem; margin-right: 0.2rem; }

/* Blocs */
.m-bloc-ed { background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--bord); margin-bottom: 0.45rem; }
.m-bloc-ed.m-masque { background: transparent; }
.m-tete { display: flex; align-items: center; gap: 0.1rem; padding-right: 0.3rem; }
.m-ouvrir { font: inherit; flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.55rem; cursor: pointer; background: none; border: 0; border-radius: 10px; color: var(--texte); text-align: left; padding: 0.4rem 0.3rem 0.4rem 0.55rem; }
.m-ouvrir:hover .m-tete-titre { color: var(--accent-fonce); }
.m-chev { color: var(--texte-doux); transition: transform 0.15s; flex-shrink: 0; width: 0.7rem; }
.m-ouvrir[aria-expanded=true] .m-chev { transform: rotate(90deg); }
.m-pict { width: 1.25rem; height: 1.25rem; color: var(--vert); flex-shrink: 0; }
.m-pict svg { width: 100%; height: 100%; display: block; }
.m-tete-txt { flex: 1; min-width: 0; }
.m-tete-titre { display: block; font-weight: 600; font-size: 0.96rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-tete-info { display: block; font-size: 0.8rem; color: var(--texte-doux); line-height: 1.25; }
.m-dot { width: 0.8rem; height: 0.8rem; border-radius: 50%; flex-shrink: 0; border: 1px solid #8d8177; }
.m-dot.m-sans { visibility: hidden; }
.c-jaune { background: #fff3b0; } .c-orange { background: #fbe2cc; } .c-vert { background: #d9efd2; } .c-bleu { background: #d6e6f7; } .c-rose { background: #f9dbe6; } .c-aucune { background: #fff; }
.m-bloc-corps { padding: 0.35rem 0.7rem 0.6rem; border-top: 1px solid var(--bord); }
.m-sec { font-size: 0.8rem; font-weight: 700; color: var(--texte-doux); margin: 0 0 0.3rem; }

/* Lignes */
.m-ligne { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 0 0.1rem; align-items: start; margin-bottom: 0.4rem; }
.m-ligne .m-case { width: 1.05rem; height: 1.05rem; margin: 0.45rem 0.35rem 0 0; accent-color: var(--vert); cursor: pointer; }
.m-ligne textarea { margin-right: 0.2rem; }
.m-ligne select { grid-column: 2 / -1; width: auto; justify-self: start; border: 0; background-color: transparent; font-size: 0.78rem; color: var(--texte-doux); padding: 0.05rem 0.2rem 0.05rem 0; cursor: pointer; }
.m-paire { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.25rem; margin-bottom: 0.3rem; align-items: start; }

/* Réglages du bloc */
.m-regl { margin-top: 0.75rem; padding-top: 0.55rem; border-top: 1px dotted #c9bdb0; }
.m-regl-rang { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; align-items: flex-end; }
.m-regl .m-champ { margin-bottom: 0.3rem; font-size: 0.8rem; }
.m-regl input[type=number] { width: 4.5rem; }
.m-regl select { width: auto; font-size: 0.88rem; }
.m-nuancier { display: flex; gap: 0.3rem; padding: 0.2rem 0; border: 0; margin: 0; }
.m-nuancier legend { font-size: 0.8rem; margin-bottom: 0.1rem; }
.m-nuancier label { position: relative; display: block; width: 1.4rem; height: 1.4rem; cursor: pointer; }
.m-nuancier input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.m-nuancier span { display: block; width: 100%; height: 100%; border-radius: 50%; border: 1px solid #8d8177; }
.m-nuancier input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.m-nuancier input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; }
.m-pied-bloc { display: flex; justify-content: flex-end; margin-top: 0.3rem; }

/* Ajouter un bloc */
.m-palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: 0.4rem; }
.m-tuile { font: inherit; display: grid; grid-template-columns: 1.3rem 1fr; gap: 0 0.5rem; align-items: start; text-align: left; cursor: pointer; background: none; border: 1px dashed var(--vert); border-radius: 8px; color: var(--texte); padding: 0.45rem 0.55rem; }
.m-tuile:hover { background: var(--vert-doux); }
.m-tuile .m-pict { grid-row: span 2; margin-top: 0.1rem; }
.m-tuile b { font-size: 0.9rem; font-weight: 600; color: var(--vert); line-height: 1.25; }
.m-tuile small { font-size: 0.78rem; color: var(--texte-doux); line-height: 1.3; }

/* Message avec « Annuler » */
.m-barre { position: fixed; z-index: 10; left: 50%; bottom: 1rem; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); display: flex; align-items: center; gap: 0.7rem; background: var(--texte); color: #fff; border-radius: 10px; padding: 0.45rem 0.5rem 0.45rem 0.9rem; font-size: 0.93rem; box-shadow: 0 3px 12px rgba(40,25,10,0.3); }
.m-barre-annuler { font: inherit; font-weight: 700; cursor: pointer; background: #fff; color: var(--accent-fonce); border: 0; border-radius: 6px; padding: 0.25rem 0.7rem; }
.m-barre-annuler:hover { background: var(--accent-doux); }
.m-barre .m-ic { color: #fff; }
.m-barre .m-ic:hover:not(:disabled) { background: #5a524c; color: #fff; }
.m-barre :focus-visible { outline-color: #fff; }

/* Colonne de droite */
.m-vigil { font-size: 0.86rem; color: var(--texte-doux); margin-bottom: 0.7rem; line-height: 1.4; }
.m-vigil.m-alerte { color: var(--texte); padding: 0.5rem 0.7rem; background: var(--accent-doux); border-radius: 8px; }
.m-vigil ul { margin: 0; padding: 0; list-style: none; }
.m-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.m-actions .p-bouton { font-size: 0.95rem; padding: 0.42rem 1rem; }

/* La matrice (aperçu, impression, Word) */
#apercu { background: #fff; color: #000; border: 1px solid #b9ada1; box-shadow: 0 2px 8px rgba(60,40,20,0.12); padding: 12mm; width: 100%; max-width: 210mm; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-size: 11.5pt; line-height: 1.35; }
.mx-titre { font-size: 16pt; font-weight: 700; margin: 0 0 2pt; }
.mx-infos { font-size: 10.5pt; margin: 0 0 8pt; }
.mx-bloc { width: 100%; border-collapse: collapse; margin: 0 0 6pt; page-break-inside: avoid; break-inside: avoid; }
.mx-bloc > tbody > tr > td { border: 1px solid #000; padding: 4pt 6pt; vertical-align: top; }
.mx-temps { width: 17mm; font-size: 10pt; font-weight: 700; }
.mx-temps span { display: block; font-weight: 400; font-size: 9pt; }
.mx-h { font-size: 12pt; font-weight: 700; margin: 0 0 3pt; }
.mx-p { width: 1.45em; height: 1.45em; vertical-align: -0.35em; margin-right: 0.2em; color: #000; }
.m-pictos { margin: 0.35rem 0 0; }
.m-pictos legend { font-size: 0.8rem; margin-bottom: 0.1rem; }
.m-pictos label { position: relative; display: block; width: 2rem; height: 2rem; cursor: pointer; }
.m-pictos input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.m-pictos span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 6px; color: var(--texte-doux); }
.m-pictos svg { width: 1.35rem; height: 1.35rem; }
.m-pictos label:hover span { background: #efe6db; }
.m-pictos input:checked + span { background: var(--accent-doux); color: var(--accent-fonce); box-shadow: inset 0 0 0 2px var(--accent); }
.m-pictos input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.mx-l { margin: 0 0 3pt; padding-left: 1.35em; text-indent: -1.35em; }
.mx-n { margin: 0 0 3pt; }
.mx-int { width: 100%; border-collapse: collapse; margin: 2pt 0; }
.mx-int th, .mx-int td { border: 1px solid #555; padding: 3pt 5pt; vertical-align: top; text-align: left; font-size: 10.5pt; }
.mx-int th { font-weight: 700; }
.mx-pied { font-size: 8pt; color: #333; margin: 6pt 0 0; }
.mx-jaune > tbody > tr > td.mx-c { background: #fff3b0; } .mx-vert > tbody > tr > td.mx-c { background: #d9efd2; }
.mx-bleu > tbody > tr > td.mx-c { background: #d6e6f7; } .mx-rose > tbody > tr > td.mx-c { background: #f9dbe6; }
.mx-orange > tbody > tr > td.mx-c { background: #fbe2cc; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11.5pt; }
  .m-sans-imp, .p-maquette, .p-bandeau, .titre-page, .evitement, header, footer, nav { display: none !important; }
  main { padding: 0; }
  .conteneur, .m-large { max-width: none; padding: 0; margin: 0; }
  #psy { padding: 0; }
  .m-atelier { display: block; }
  .m-droite { position: static; max-height: none; overflow: visible; }
  #apercu { border: 0; box-shadow: none; padding: 0; max-width: none; }
  #apercu, #apercu * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 760px) { #apercu { padding: 5mm; font-size: 10.5pt; } .m-paire { grid-template-columns: 1fr; } }

/* Version 3 de l'interface (04/11/2026), d'après la maquette « Créer une matrice v2 » */
.m-outils { position: sticky; top: 0; z-index: 6; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; background: var(--fond-doux); border-bottom: 2px solid var(--bord); margin: 0 -1rem 1.2rem; padding: 0.55rem 1rem; }
.m-etat { margin: 0; font-size: 0.86rem; color: var(--texte-doux); min-height: 1.2em; }
.m-outils .m-boutons { gap: 0.45rem; }
.m-outils .p-bouton { font-size: 0.95rem; padding: 0.45rem 1.05rem; border-radius: 8px; }
button.m-bt, label.m-bt { font: inherit; font-size: 0.93rem; cursor: pointer; background: var(--fond); color: var(--texte); border: 1px solid var(--bord); border-radius: 8px; padding: 0.4rem 0.75rem; line-height: 1.3; }
button.m-bt:hover, label.m-bt:hover { border-color: var(--accent); background: #fff; }
@media (min-width: 1100px) { .m-droite { top: 4.4rem; max-height: calc(100vh - 5rem); } }
.m-carte-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.m-carte-tete h2 { margin: 0; }
.m-meta { font-size: 0.84rem; color: var(--texte-doux); font-weight: 400; }
.m-sous { margin: 0.35rem 0 0; }
#psy .m-h2-btn { margin: 0; }
.m-replier { font: inherit; font-size: 1.05rem; font-weight: 700; width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; background: none; border: 0; padding: 0; cursor: pointer; color: var(--texte); text-align: left; }
.m-replier .m-chev2 { display: inline-block; margin-left: 0.4rem; color: var(--accent); transition: transform 0.15s; }
.m-replier[aria-expanded=false] .m-chev2 { transform: rotate(-90deg); }
#regl-corps { margin-top: 0.75rem; }
.m-deux2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0 0.7rem; }
.m-option { display: flex; gap: 0.65rem; align-items: flex-start; cursor: pointer; padding: 0.6rem 0.75rem; margin: 0 0 0.6rem; border: 1.5px solid #c9b8a6; border-radius: 10px; background: var(--fond); }
.m-option input { accent-color: var(--accent); width: 1.15rem; height: 1.15rem; margin: 0.15rem 0 0; flex-shrink: 0; }
.m-option b { display: block; font-size: 0.97rem; }
.m-option small { display: block; font-size: 0.84rem; color: var(--texte-doux); line-height: 1.35; }
.m-option:has(input:checked) { border-color: var(--accent); background: var(--accent-doux); }
.m-option:has(input:checked) b { color: var(--accent-fonce); }
.m-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.m-pilules { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.m-pilule { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; font-size: 0.9rem; padding: 0.3rem 0.75rem; border: 1px solid #c9b8a6; border-radius: 999px; background: var(--fond); }
.m-pilule input { accent-color: var(--accent); width: 0.95rem; height: 0.95rem; margin: 0; }
.m-pilule:has(input:checked) { border-color: var(--accent); background: var(--accent-doux); }
.m-pilule:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.m-budget { font-size: 0.86rem; font-weight: 700; color: var(--texte-doux); text-align: right; }
.m-budget.m-juste { color: var(--vert); }
.m-budget.m-trop { color: #a3241b; }
.m-poignee { cursor: grab; color: #a8998b; font-size: 1rem; letter-spacing: -0.15em; padding: 0 0.1rem 0 0.45rem; user-select: none; line-height: 1; }
.m-poignee:active { cursor: grabbing; }
.m-bloc-ed.m-choisi { box-shadow: 0 0 0 2px var(--accent); }
.m-bloc-ed.m-cible { box-shadow: 0 -3px 0 0 var(--accent), 0 0 0 1px var(--bord); }
.m-bloc-ed.m-cible-bas { box-shadow: 0 3px 0 0 var(--accent), 0 0 0 1px var(--bord); }
.m-bloc-ed.m-glisse { opacity: 0.45; }
.m-tete .m-ouvrir { padding-left: 0.25rem; }
.m-pas { display: flex; align-items: center; border: 1px solid var(--bord); border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #fff; }
.m-pas button { font: inherit; width: 1.7rem; height: 1.85rem; border: 0; background: var(--fond-doux); color: var(--texte); cursor: pointer; font-size: 1rem; line-height: 1; }
.m-pas button:hover { background: #e9dccd; color: var(--accent-fonce); }
.m-pas-val { min-width: 3.4rem; text-align: center; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.m-actions-bloc { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem; margin-top: 0.7rem; padding-top: 0.55rem; border-top: 1px solid var(--bord); }
.m-actions-bloc button { font: inherit; font-size: 0.86rem; cursor: pointer; background: #fff; border: 1px solid var(--bord); border-radius: 7px; padding: 0.25rem 0.6rem; color: var(--texte); }
.m-actions-bloc button:hover:not(:disabled) { border-color: var(--accent); }
.m-actions-bloc button:disabled { color: #c4b8ac; cursor: default; }
.m-actions-bloc .m-suppr { color: var(--accent-fonce); }
#ajout-apres { font-weight: 400; }
.m-garder { font-size: 0.88rem; color: var(--texte-doux); padding: 0 0.3rem; }
.m-garder p { margin: 0 0 0.35rem; }
.m-garder .m-coche { margin: 0 0.6rem 0 0; }
#feuille-cadre { width: 100%; overflow: hidden; }
#apercu { width: 210mm; max-width: none; box-sizing: border-box; }
#apercu .mx-bloc { cursor: pointer; }
#apercu .mx-bloc.m-choisi { outline: 3px solid rgba(163, 70, 27, 0.55); outline-offset: 3px; }
@media print {
  #feuille-cadre { overflow: visible; }
  #apercu { zoom: 1 !important; width: auto; }
  #apercu .mx-bloc.m-choisi { outline: 0; }
  .m-outils { display: none !important; }
}
@media (max-width: 760px) { .m-deux2 { grid-template-columns: 1fr; } .m-outils { position: static; } }
