/* ============================================================================
   tuto-embed.css — styles du CONTENU des tutoriels quand ils sont injectes
   dans le site (route SPA /tutoriels).

   ⚠ TOUT est prefixe par .tuto-embed : la charte d'origine style `body`,
   `h2`, `table`… sans prefixe, l'importer telle quelle repeindrait le site
   entier. Ici rien ne fuit hors du conteneur.
   ========================================================================= */

.tuto-embed { --t-vert:#16964a; --t-vf:#136734; --t-trait:#dcdce4;
              --t-doux:#4a4a55; --t-faible:#767684; --t-fond:#f6f7f9;
              max-width: 880px; margin: 0 auto; padding: 0 4px 40px; }

.tuto-embed .fil { font-size: .8rem; color: var(--t-faible); margin: 0 0 6px; }
.tuto-embed h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.5px; margin: 0 0 10px; }
.tuto-embed .tuto-sous { font-size: 1.05rem; color: var(--t-doux); line-height: 1.55; margin: 0 0 10px; }
.tuto-embed .tuto-meta { font-size: .82rem; color: var(--t-faible);
    margin: 0 0 26px; padding-bottom: 16px; border-bottom: 1px solid var(--t-trait); }

.tuto-embed h2 { font-size: 1.35rem; font-weight: 700; margin: 34px 0 12px;
    padding-bottom: 6px; border-bottom: 2px solid var(--t-vert); scroll-margin-top: 90px; }
.tuto-embed h3 { font-size: 1.05rem; font-weight: 650; margin: 22px 0 8px; }
.tuto-embed p, .tuto-embed li { font-size: .95rem; line-height: 1.6; }
.tuto-embed ul, .tuto-embed ol { padding-left: 1.3rem; }
.tuto-embed .lien-anc { opacity: 0; font-weight: 400; padding-left: 6px; color: var(--t-faible); }
.tuto-embed h2:hover .lien-anc { opacity: 1; }

.tuto-embed code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .82em;
  background: var(--t-fond); border: 1px solid var(--t-trait); border-radius: 3px;
  padding: .05em .3em; word-break: break-word;
}
.tuto-embed .touche {
  font-size: .78em; font-weight: 600; background: #fff; border: 1px solid #b9b9c6;
  border-bottom-width: 2px; border-radius: 4px; padding: .05em .35em; white-space: nowrap;
}

.tuto-embed table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: .9rem; }
.tuto-embed th { text-align: left; font-weight: 650; background: var(--t-fond);
    border-bottom: 1.5px solid var(--t-trait); padding: 8px 10px; }
.tuto-embed td { padding: 8px 10px; border-bottom: 1px solid var(--t-trait); vertical-align: top; }

.tuto-embed .encart { border-left: 3px solid var(--t-vert); background: #f0f8f3;
    padding: 12px 15px; margin: 16px 0; border-radius: 0 6px 6px 0; font-size: .92rem; }
.tuto-embed .encart.attention { border-left-color: #b45309; background: #fff7ed; }
.tuto-embed .encart.nouveau { border-left-color: #ee2b23; background: #fff5f5; }
.tuto-embed .titre-encart { font-weight: 650; display: block; margin-bottom: 4px; }
.tuto-embed .encart p { margin: 0; }

.tuto-embed ol.etapes { list-style: none; padding-left: 0; counter-reset: te; margin: 16px 0 22px; }
.tuto-embed ol.etapes > li { counter-increment: te; position: relative;
    padding-left: 34px; margin-bottom: 12px; }
.tuto-embed ol.etapes > li::before { content: counter(te); position: absolute; left: 0; top: 1px;
    width: 23px; height: 23px; border-radius: 50%; background: var(--t-vert); color: #fff;
    font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.tuto-embed figure { margin: 18px 0 22px; text-align: center; }
.tuto-embed figure img { max-width: 100%; height: auto; border: 1px solid var(--t-trait);
    border-radius: 6px; box-shadow: 0 1px 5px rgba(0,0,0,.08); }
.tuto-embed figcaption { font-size: .8rem; color: var(--t-faible); margin-top: 8px; line-height: 1.45; }

.tuto-embed .boutons { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px; margin: 14px 0 20px; }
.tuto-embed .btn-ruban { display: flex; gap: 10px; align-items: flex-start;
    border: 1px solid var(--t-trait); border-radius: 7px; padding: 10px 12px; background: var(--t-fond); }
.tuto-embed .btn-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tuto-embed .btn-lib { font-size: .9rem; font-weight: 650; line-height: 1.25; }
.tuto-embed .btn-cmd { font-family: ui-monospace, Consolas, monospace; font-size: .75rem; color: var(--t-vf); }
.tuto-embed .btn-role { font-size: .82rem; color: var(--t-doux); line-height: 1.4; }
.tuto-embed .ico { width: 19px; height: 19px; vertical-align: -4px; margin-right: 6px; }
.tuto-embed .ico-gros { width: 36px; height: 36px; flex: 0 0 auto; }
.tuto-embed .tbl-cmds td.cell-cmd { white-space: nowrap; }

.tuto-embed .suite { display: flex; gap: 12px; margin-top: 40px; }
.tuto-embed .suite a { flex: 1; padding: 12px 15px; border: 1px solid var(--t-trait);
    border-radius: 8px; text-decoration: none; color: inherit; }
.tuto-embed .suite a span { display: block; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .4px; color: var(--t-faible); margin-bottom: 3px; }
.tuto-embed .nav-suiv { text-align: right; }

/* ── Sommaire « Sur cette page » ──────────────────────────────────────────
   Les pages statiques ont une colonne laterale ; dans la coquille du site la
   largeur est deja contrainte, on le replie donc en encadre compact au-dessus
   du corps. Le nom de classe reste `.sommaire` : recherche-spa.js s'en sert
   pour surligner la section en cours de lecture. */
.tuto-embed .sommaire { border: 1px solid var(--t-trait); border-radius: 9px;
    background: var(--t-fond); padding: 13px 16px 14px; margin: 0 0 26px; }
.tuto-embed .som-tete { font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: var(--t-faible); margin-bottom: 8px; }
.tuto-embed .sommaire ol { margin: 0; padding-left: 1.15rem; columns: 2; column-gap: 26px; }
.tuto-embed .sommaire li { font-size: .86rem; line-height: 1.5; margin-bottom: 2px;
    break-inside: avoid; }
.tuto-embed .sommaire a { text-decoration: none; color: var(--t-doux); }
.tuto-embed .sommaire a:hover, .tuto-embed .sommaire a.actif { color: var(--t-vert); }
@media (max-width: 700px) { .tuto-embed .sommaire ol { columns: 1; } }

/* ── Le hub ───────────────────────────────────────────────────────────── */
.tuto-embed .grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tuto-embed .fiche { position: relative; border: 1px solid var(--t-trait); border-radius: 10px;
    padding: 15px 16px; display: flex; flex-direction: column; gap: 6px; }
.tuto-embed .fiche:hover { border-color: var(--t-vert); }
.tuto-embed .fiche .num { font-size: .66rem; font-weight: 700; color: var(--t-vert); letter-spacing: .5px; }
.tuto-embed .fiche h3 { margin: 0; font-size: 1rem; }
.tuto-embed .fiche h3 a { text-decoration: none; color: inherit; }
.tuto-embed .fiche h3 a::after { content: ""; position: absolute; inset: 0; }
.tuto-embed .fiche p { margin: 0; font-size: .85rem; color: var(--t-doux); }
.tuto-embed .fiche .cmds { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.tuto-embed .fiche .cmds .puce { display: inline-flex; align-items: center; white-space: nowrap; }
.tuto-embed .fiche .cmds img { width: 15px; height: 15px; margin-right: 3px; }
.tuto-embed .sec-tete { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.tuto-embed .sec-tete h2 { border: 0; margin: 0; padding: 0; font-size: 1.25rem; }
.tuto-embed .sec-tete h2 a { text-decoration: none; color: inherit; }
.tuto-embed .sec-tete h2 a:hover { color: var(--t-vert); }
.tuto-embed .compte { font-size: .78rem; color: var(--t-faible); }
.tuto-embed .fil a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--t-trait); }
.tuto-embed .fil a:hover { color: var(--t-vert); border-bottom-color: var(--t-vert); }
.tuto-embed .sec-intro { color: var(--t-doux); font-size: .9rem; margin: 0 0 16px; }
.tuto-embed section.bloc { margin-bottom: 38px; }
.tuto-embed .filtres { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.tuto-embed .filtre { font-size: .82rem; font-weight: 600; padding: 6px 14px; border-radius: 20px;
    border: 1px solid var(--t-trait); background: transparent; color: var(--t-doux); cursor: pointer; }
.tuto-embed .filtre.on { background: var(--t-vert); border-color: var(--t-vert); color: #fff; }

/* ── Recherche ────────────────────────────────────────────────────────── */
.tuto-embed .tuto-q { position: relative; margin: 0 0 24px; }
.tuto-embed .tuto-q input { width: 100%; box-sizing: border-box; padding: 12px 15px;
    font-size: 1rem; font-family: inherit; border: 1px solid var(--t-trait);
    border-radius: 9px; background: var(--t-fond); color: inherit; }
.tuto-embed .tuto-q input:focus { outline: none; border-color: var(--t-vert);
    box-shadow: 0 0 0 3px rgba(22,150,74,.15); }
.tuto-embed .site-res { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
    max-height: 60vh; overflow-y: auto; background: #fff; border: 1px solid var(--t-trait);
    border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.14); padding: 6px; }
.tuto-embed .res-item { display: block; padding: 9px 11px; border-radius: 7px; text-decoration: none; }
.tuto-embed .res-item:hover, .tuto-embed .res-item.actif { background: #f0f8f3; }
.tuto-embed .res-sec { font-size: .66rem; font-weight: 700; color: var(--t-vert); text-transform: uppercase; }
.tuto-embed .res-tit { display: block; font-size: .92rem; font-weight: 620; color: #111114; margin: 1px 0 2px; }
.tuto-embed .res-txt { display: block; font-size: .8rem; color: var(--t-faible); line-height: 1.4; }
.tuto-embed .res-item mark { background: #fff2a8; color: inherit; }
.tuto-embed .res-vide { padding: 13px; font-size: .85rem; color: var(--t-faible); }

/* ── Thème sombre du site ─────────────────────────────────────────────── */
[data-theme="dark"] .tuto-embed,
body.dark .tuto-embed {
  --t-trait: #2c2f3a; --t-doux: #b9bdc9; --t-faible: #8c92a3; --t-fond: #1c1f28;
}
[data-theme="dark"] .tuto-embed .encart, body.dark .tuto-embed .encart { background: #16241c; }
[data-theme="dark"] .tuto-embed .encart.attention, body.dark .tuto-embed .encart.attention { background: #2a1f10; }
[data-theme="dark"] .tuto-embed .encart.nouveau, body.dark .tuto-embed .encart.nouveau { background: #2a1414; }
[data-theme="dark"] .tuto-embed .site-res, body.dark .tuto-embed .site-res { background: #1c1f28; }
[data-theme="dark"] .tuto-embed .res-tit, body.dark .tuto-embed .res-tit { color: #e8eaf0; }
[data-theme="dark"] .tuto-embed .touche, body.dark .tuto-embed .touche { background: #262a35; border-color: #3a3f4d; }

/* ⚠ 02.08.2026 — sur un telephone, la 1re colonne d'un tableau se faisait
   ecraser par la seconde et tombait a UN MOT PAR LIGNE (« Etat des /
   donnees »). Un min-width sur la colonne de libelle + une typo resserree
   rendent le tableau lisible sans le restructurer. */
@media (max-width: 560px) {
  .tuto-embed table { font-size: .82rem; }
  .tuto-embed th, .tuto-embed td { padding: 7px 8px; }
  .tuto-embed th:first-child, .tuto-embed td:first-child { min-width: 7.5em; }
}

@media (max-width: 700px) {
  .tuto-embed h1 { font-size: 1.5rem; }
  .tuto-embed .boutons, .tuto-embed .grille { grid-template-columns: 1fr; }
  .tuto-embed .suite { flex-direction: column; }
  .tuto-embed .nav-suiv { text-align: left; }
  .tuto-embed table { display: block; overflow-x: auto; }
  .tuto-embed td, .tuto-embed th { white-space: normal; }
  .tuto-embed .tbl-cmds td.cell-cmd { white-space: normal; }
}
