:root {
  --marque: #0b5d33; --encre: #1a1a1a; --gris-m: #7a7a7a; --fond: #e9e9e9; --carte: #fff; --texte: #1a1a1a;
  --gris: #5f5f5f; --ligne: #d9d9d9; --vert: #1e7d43; --orange: #c46a00; --rouge: #b3261e; --bleu: #1d5fa8;
  --surligne: #ffe58a; --fs: 16px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", Arial, sans-serif; font-size: 15px;
  background: var(--fond); color: var(--texte); display: flex; flex-direction: column; }
.entete { background: var(--marque); color: #fff; display: flex; align-items: center; gap: 18px; padding: 8px 18px; }
.logos { background: #fff; border-radius: 6px; padding: 4px 8px; display: flex; gap: 8px; }
.logos img { height: 36px; }
.entete h1 { margin: 0; font-size: 21px; }
.sous { opacity: .85; font-size: 13px; }
.barre { background: var(--encre); display: flex; flex-wrap: wrap; gap: 2px; padding: 0 12px; }
.barre a { color: #fff; text-decoration: none; padding: 9px 14px; font-weight: 600; }
.barre a:hover, .barre a.actif { background: rgba(255,255,255,.15); }
.compte { background: var(--gris-m); border-radius: 10px; padding: 0 7px; font-size: 12px; }
.compte:empty { display: none; }
main { flex: 1; min-height: 0; padding: 12px 14px 34px; }
main[hidden] { display: none; }
.deux { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; grid-template-rows: minmax(0, 1fr); gap: 14px;
  overflow: hidden; }
.colonne { display: flex; flex-direction: column; min-height: 0; gap: 10px; }
.etat { position: fixed; bottom: 0; inset-inline: 0; background: #e1e1e1; color: var(--gris); font-size: 12px;
  padding: 4px 14px; border-top: 1px solid var(--ligne); }
h2 { color: var(--marque); margin: 4px 0 10px; font-size: 20px; }
h3 { color: var(--encre); margin: 18px 0 8px; font-size: 16px; }
.carte { background: var(--carte); border: 1px solid var(--ligne); border-radius: 8px; padding: 12px 14px; }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid #b5b5b5; border-radius: 5px; background: #fff;
  color: var(--texte); max-width: 100%; }
input[type=checkbox] { padding: 0; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
button, .btn { font: inherit; padding: 6px 13px; border: 0; border-radius: 5px; background: var(--marque); color: #fff;
  cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; }
button.sec, .btn.sec { background: #fff; color: var(--marque); border: 1px solid var(--marque); }
button.danger { background: #fff; color: var(--rouge); border: 1px solid var(--rouge); }
button.petit, .btn.petit { padding: 2px 9px; font-size: 13px; }
button:disabled { opacity: .45; cursor: default; }

/* ---- recherche ---- */
.recherche { display: flex; flex-direction: column; gap: 8px; }
.champ { display: flex; gap: 6px; }
.champ input { flex: 1; font-size: 17px; padding: 8px 10px; border: 2px solid var(--marque); }
.options, .filtres { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--gris); }
.options label, .filtres label { display: flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.filtres select { flex: 1 1 45%; min-width: 0; }
.onglets { display: flex; align-items: center; gap: 4px; border-bottom: 2px solid var(--ligne); }
.onglets a { padding: 5px 12px; cursor: pointer; font-weight: 600; color: var(--gris); border-bottom: 3px solid transparent;
  margin-bottom: -2px; }
.onglets a.actif { color: var(--marque); border-bottom-color: var(--marque); }
.onglets select { margin-inline-start: auto; font-size: 12px; padding: 2px 4px; border: 0; color: var(--gris); }
.liste { flex: 1; min-height: 0; overflow: auto; background: #fff; border: 1px solid var(--ligne); border-radius: 8px; }
.res { display: block; padding: 8px 12px; border-bottom: 1px solid #e8e8e8; cursor: pointer; color: inherit; text-decoration: none;
  border-inline-start: 4px solid transparent; }
.res:hover { background: #f5f5f5; }
.res.actif { background: #e3f1e8; border-inline-start-color: var(--marque); }
.res b { color: var(--encre); }
.res .tit { font-weight: 600; }
.res .ext { font-size: 13px; color: var(--gris); line-height: 1.6; margin-top: 2px; }
.res .meta { font-size: 12px; color: var(--gris); display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.vide { padding: 22px 14px; color: var(--gris); text-align: center; }
mark { background: var(--surligne); color: inherit; border-radius: 2px; padding: 0 1px; }
.pastille { display: inline-block; padding: 1px 8px; border-radius: 11px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: #ececec; color: var(--encre); cursor: pointer; border: 0; }
.pastille.imp { background: var(--marque); color: #fff; }
.pastille.reg { background: var(--gris-m); color: #fff; }
.pastille.abroge { background: #eee; color: #888; cursor: default; }

/* ---- sommaire ---- */
.sommaire { padding: 6px 10px; font-size: 14px; }
.sommaire details { margin-inline-start: 10px; }
.sommaire summary { cursor: pointer; padding: 3px 0; font-weight: 600; color: var(--encre); }
.sommaire summary small { color: var(--gris); font-weight: 400; }
.sommaire a { display: block; padding: 2px 6px; margin-inline-start: 16px; color: var(--texte); text-decoration: none;
  border-radius: 4px; }
.sommaire a:hover { background: #f5f5f5; }
.sommaire a.actif { background: #e3f1e8; font-weight: 600; }

/* ---- lecteur ---- */
.lecteur { background: #fff; border: 1px solid var(--ligne); border-radius: 8px; overflow: auto; min-height: 0; padding: 12px 20px 26px; }
.fil { font-size: 12.5px; color: #4d5756; line-height: 1.5; }
.fil span + span::before { content: " ‹ "; color: var(--gris-m); }
.art-tete { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; border-bottom: 2px solid var(--marque); padding-bottom: 8px;
  margin: 6px 0 10px; }
.art-tete h2 { margin: 0; flex: 1 1 320px; font-size: 20px; line-height: 1.4; }
.art-tete h2 small { display: block; font-size: 17px; color: #111; font-weight: 700; margin-top: 2px; }
.outils { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.classes { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.texte { font-family: "Segoe UI", "Sakkal Majalla", "Noto Naskh Arabic", Tahoma, sans-serif; color: #111;
  -webkit-font-smoothing: antialiased; }
.texte p { margin: 0 0 6px; line-height: 1.65; font-size: 16px; font-weight: 500; text-align: right; }
.texte p.g { font-weight: 700; color: var(--encre); margin: 12px 0 5px; font-size: 16.5px; }
.texte p.c { text-align: center; }
.texte p.n1 { padding-inline-start: 18px; } .texte p.n2 { padding-inline-start: 36px; } .texte p.n3 { padding-inline-start: 30px; }
.texte sup { line-height: 0; font-size: 11px; }
.texte sup a { color: var(--bleu); text-decoration: none; font-weight: 700; padding: 0 1px; }
.texte a.ref { color: var(--bleu); text-decoration: none; border-bottom: 1px dotted var(--bleu); }
.notes { border-top: 1px solid var(--ligne); margin-top: 14px; padding-top: 6px; font-size: 13px; color: #2b3332; line-height: 1.45; }
.notes div { display: flex; gap: 6px; padding: 2px 4px; border-radius: 4px; }
.notes div.cible { background: var(--surligne); }
.notes b { color: var(--bleu); min-width: 24px; }
body.sans-notes .notes, body.sans-notes .texte sup { display: none; }
.accueil { color: var(--gris); line-height: 2; padding: 30px 10px; max-width: 720px; margin: auto; }
.accueil b { color: var(--encre); }

/* ---- سجل ---- */
.registre { margin-top: 22px; border-top: 3px solid var(--gris-m); padding-top: 4px; }
.registre h3 { display: flex; align-items: center; gap: 10px; }
.entree { border: 1px solid var(--ligne); border-inline-start: 4px solid var(--gris-m); border-radius: 6px; padding: 9px 12px;
  margin-bottom: 9px; background: #fff; }
.entree .ligne1 { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.entree .date { color: var(--encre); font-weight: 700; font-variant-numeric: tabular-nums; direction: ltr; }
.entree .objet { font-weight: 700; flex: 1; }
.entree .refd { color: var(--gris); font-size: 13px; }
.entree .corps { white-space: pre-wrap; line-height: 1.9; margin: 6px 0; }
.entree .mots { font-size: 12px; color: var(--gris); }
.pieces { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.piece { background: #eef3f8; border: 1px solid #c9d8ea; border-radius: 5px; padding: 2px 8px; font-size: 13px; display: inline-flex;
  gap: 6px; align-items: center; }
.piece a { color: var(--bleu); text-decoration: none; }
.piece small { color: var(--gris); }
.piece button { background: none; color: var(--rouge); padding: 0 2px; font-weight: 700; }
.formulaire { background: #fafafa; border: 1px dashed var(--marque); border-radius: 6px; padding: 12px; margin-bottom: 10px; }
.grille { display: grid; grid-template-columns: 170px 1fr 1fr; gap: 10px 14px; }
.grille label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--gris); font-weight: 600; }
.grille .large { grid-column: 1 / -1; }
.formulaire .actions { display: flex; gap: 8px; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { border-bottom: 1px solid var(--ligne); padding: 7px 8px; text-align: right; vertical-align: top; }
th { background: #ececec; color: var(--encre); font-size: 13px; position: sticky; top: 0; }
tr.clic:hover td { background: #f5f5f5; cursor: pointer; }
td.date { white-space: nowrap; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
td.long { white-space: pre-wrap; max-width: 520px; }
.vue-reg { max-width: 1400px; margin: auto; overflow: auto; height: 100%; }
#toast { position: fixed; bottom: 34px; left: 20px; background: var(--encre); color: #fff; padding: 10px 16px;
  border-radius: 6px; display: none; z-index: 9; }
#toast.err { background: var(--rouge); }

@media (max-width: 900px) {
  body { display: block; }
  .deux { display: block; overflow: visible; }
  .liste { max-height: 45vh; margin-bottom: 12px; }
  .grille { grid-template-columns: 1fr; }
}
@media print {
  .entete, .barre, .etat, .colonne, .outils, .toolbar, .aller, .formulaire, button, .classes, #toast { display: none !important; }
  body { background: #fff; display: block; } main { padding: 0; } .deux { display: block; }
  .lecteur, .liste { border: 0; overflow: visible; padding: 0; }
  mark { background: none; }
}

/* connexion / mode anonyme (déploiement public) */
#btn-session { margin: 6px auto 6px 0; align-self: center; }
.anonyme label:has(#o-reg), .anonyme label:has(#f-reg) { display: none; }

/* ================= charte « Légifrance » : fond gris, panneaux blancs, rouge + noir ================= */
.entete { background: #fff; color: var(--encre); border-bottom: 4px solid var(--marque); }
.logos { padding: 0; border-radius: 0; }
.entete h1 { font-size: 22px; letter-spacing: .2px; }
.sous { color: var(--gris); opacity: 1; }
.barre { background: #fff; border-bottom: 1px solid var(--ligne); align-items: center; }
.barre a { color: var(--encre); border-bottom: 3px solid transparent; padding: 10px 16px 7px; }
.barre a:hover { background: #f5f5f5; }
.barre a.actif { background: none; color: var(--marque); border-bottom-color: var(--marque); }
.compte { background: var(--marque); color: #fff; }
button, .btn { background: var(--marque); border-radius: 3px; }
button.sec, .btn.sec { background: #f2f2f2; color: var(--encre); border: 1px solid #cfcfcf; }
button.sec:hover, .btn.sec:hover { background: #e6e6e6; }
button.danger { color: var(--rouge); border-color: var(--rouge); }
input, select, textarea { border-radius: 3px; }
.champ input { border: 2px solid var(--encre); border-radius: 3px; }
.champ input:focus { outline: 0; border-color: var(--marque); }
.carte, .liste, .lecteur { border: 0; border-radius: 0; }
.res.actif { border-inline-start-color: var(--marque); }
.res b { color: var(--marque); }
.pastille { background: #ececec; color: var(--encre); border-radius: 3px; }
.pastille.imp { background: var(--encre); }
.pastille.reg { background: var(--marque); }
th { background: #f2f2f2; color: var(--encre); }
.entree { border-inline-start-color: var(--marque); }
.formulaire { border-color: var(--gris-m); }
.registre { border-top: 0; margin-top: 26px; }
.registre h3 { background: #f2f2f2; color: var(--gris); padding: 12px 16px; margin: 0 0 10px; font-size: 17px; }
.sommaire summary { color: var(--encre); }
#toast { background: var(--encre); }

/* barre d'outils à icônes */
.lecteur { padding: 0; background: #fff; }
.toolbar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: var(--fond); padding: 8px; position: sticky; top: 0; z-index: 3; }
.toolbar button { background: #fff; color: var(--encre); border-radius: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; gap: 8px; padding: 14px 4px 10px; font-size: 12.5px; white-space: normal; text-align: center; line-height: 1.25; min-height: 84px; }
.toolbar button:hover { background: #f5f5f5; color: var(--marque); }
.toolbar svg { width: 28px; height: 28px; fill: currentColor; }
.toolbar .aa { font: 700 20px/28px Georgia, serif; height: 28px; }
.toolbar .aa sup { color: var(--marque); font-size: 9px; }
.contenu { padding: 18px 28px 34px; }
.cadre-code { border: 1px solid var(--marque); text-align: center; font-weight: 700; padding: 8px; margin: 6px 0 22px; font-size: 16px; }
.fil { margin-bottom: 4px; }
.fil span + span::before { color: var(--marque); }
.art-tete { border-bottom: 0; padding: 0; margin: 12px 0 14px; display: block; }
.art-tete h2 { font-size: 21px; font-weight: 700; color: var(--encre); line-height: 1.55; margin: 0; }
.art-tete h2 .num { color: var(--marque); font-weight: 400; margin-inline-end: 10px; }
.art-tete h2 small { display: inline; font-size: inherit; }
.outils { margin-top: 10px; }
.art-ref { color: var(--marque); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.art-ref i { color: var(--gris); font-weight: 400; margin-inline-start: 8px; }
.texte p { font-size: var(--fs); text-align: justify; font-weight: 400; line-height: 1.8; }
.texte p.g { color: var(--encre); }
.lien-art { display: flex; justify-content: flex-end; margin: 24px 0 0; }
.aller { display: flex; align-items: stretch; width: 100%; max-width: 250px; border: 1px solid #cfcfcf; background: #fff; }
.aller select { flex: 1; border: 0; background: #fff; font-weight: 600; color: var(--gris); font-size: 12.5px; min-width: 0; }
body.sz1 { --fs: 14px; } body.sz3 { --fs: 18.5px; } body.sz4 { --fs: 21px; }
body.large .deux { grid-template-columns: 1fr; } body.large .colonne { display: none; }
@media (max-width: 700px) { .toolbar { grid-template-columns: repeat(4, 1fr); } .contenu { padding: 14px; } }

/* en-tête : nom seul, sans logos */
.entete .nom { font-weight: 800; font-size: 20px; color: var(--marque); padding-inline-end: 18px; border-inline-end: 2px solid var(--ligne); white-space: nowrap; }
.logos { display: none; }

/* page article « blog » : tout le contenu rattaché à la suite */
.bandeau { background: #fff4e5; border: 1px solid #f0c27a; padding: 8px 12px; margin: 0 0 12px; font-size: 14px; }
.barre-bas { display: flex; align-items: stretch; gap: 8px; margin: 26px 0 0; flex-wrap: wrap; position: sticky; bottom: 0; background: #fff; padding: 8px 0; z-index: 2; border-top: 1px solid var(--ligne); }
.onglets-art { display: flex; gap: 8px; flex-wrap: wrap; }
.onglets-art button { background: #f2f2f2; color: #9a9a9a; border-radius: 0; padding: 12px 18px; font-weight: 700; font-size: 15px; }
.onglets-art button.plein { color: var(--encre); }
.onglets-art button:hover { background: var(--marque); color: #fff; }
.onglets-art small { background: var(--marque); color: #fff; border-radius: 9px; padding: 0 6px; margin-inline-start: 4px; }
.versions { margin-inline-start: auto; display: flex; border: 0; background: #8c8c8c; }
.versions select { background: #8c8c8c; color: #fff; border: 0; font-weight: 700; font-size: 13px; padding: 0 12px; min-width: 190px; border-radius: 0; }
.versions select option { color: #111; background: #fff; }
.registre { margin-top: 8px; }
.sect { margin-top: 18px; }
.sect h3 { display: flex; align-items: center; gap: 10px; }
.sect h3 button { margin-inline-start: auto; }

/* contenu public (jurisprudence, textes complémentaires) */
.entree.pub { background: #fafafa; border-inline-start-color: var(--encre); }
.entree .fr { direction: ltr; text-align: left; color: #333; margin: 6px 0; line-height: 1.7; font-size: 14px; border-top: 1px dashed var(--ligne); padding-top: 6px; }
.compl .corps { white-space: normal; line-height: 1.7; font-size: 14px; }
.compl .corps p { margin: 0 0 8px; }
.compl details summary { cursor: pointer; color: var(--marque); font-weight: 700; margin: 6px 0; }
.compl .ligne1 .objet { text-align: left; }

/* numéro d'article dans le cadre rouge ; interligne resserré ; verset en en-tête */
.cadre-code { font-size: 19px; color: var(--marque); padding: 7px; }
.art-tete h2 { font-size: 22px; }
.texte p { line-height: 1.5; margin: 0 0 4px; }
.texte p.g { margin: 8px 0 3px; }
.entete { position: relative; }
.verset { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; white-space: nowrap;
  font: 400 27px/1.6 "Amiri Quran", "Amiri", "Scheherazade New", "Traditional Arabic", "Noto Naskh Arabic", "Sakkal Majalla", serif;
  color: #1a1a1a; }
@media (max-width: 1100px) { .entete { flex-wrap: wrap; } .verset { position: static; transform: none; order: 10; flex: 1 0 100%; font-size: 20px; white-space: normal; text-align: center; } }
@media print { .verset { display: none; } }

/* impression : adresse du site en haut de chaque page imprimée */
@media print {
  body::before { content: "www.droit.ma"; display: block; text-align: center; direction: ltr; font: 700 18px/1.4 "Segoe UI", Arial, sans-serif;
    color: #0b5d33; border-bottom: 2px solid #0b5d33; padding-bottom: 6px; margin-bottom: 14px; }
}

/* cadre rouge : numéro (rouge) + intitulé de l'article (noir) */
.cadre-code { color: var(--encre); font-size: 19px; line-height: 1.6; padding: 9px 12px; }
.cadre-code .num { color: var(--marque); }
.art-tete { margin: 0 0 10px; }

/* cadre rouge : numéro + intitulé à l'extrémité droite, liste « النسخة » à l'extrémité gauche */
.cadre-code { display: flex; align-items: center; gap: 12px; text-align: start; padding: 6px 10px; }
.cadre-code .cadre-titre { flex: 1; min-width: 0; }
.cadre-code .versions { margin: 0; flex: 0 0 auto; align-self: stretch; display: flex; }
.cadre-code .versions select { min-width: 170px; max-width: 230px; padding: 4px 10px; font-size: 12.5px; }
@media (max-width: 700px) { .cadre-code { flex-wrap: wrap; } .cadre-code .versions { flex: 1 1 100%; } }

/* 8 outils (avec WhatsApp) */
.toolbar { grid-template-columns: repeat(8, 1fr); }
.toolbar button[data-action="whatsapp"]:hover { color: #1ea952; }
@media (max-width: 700px) { .toolbar { grid-template-columns: repeat(4, 1fr); } }

/* nom + qualité professionnelle */
.entete .nom { line-height: 1.25; text-align: center; }
.entete .nom small { display: block; font-size: 12.5px; font-weight: 600; color: var(--encre); letter-spacing: .2px; margin-top: 2px; }

/* page اجتهاد قضائي */
#vue-juris .entree { margin-bottom: 10px; }
#vue-juris .mots a.ref { color: var(--bleu); text-decoration: none; border-bottom: 1px dotted var(--bleu); }

.notes span.nt { white-space: pre-line; }
.sommaire a small { color: var(--gris); font-weight: 400; margin-inline-start: 6px; }

/* ---- قرار 1314.25 : وعاء الاشتراك ---- */
.as .carte { margin-bottom: 12px; padding: 14px 18px; }
.as h2 { margin: 0 0 8px; font-size: 19px; }
.as-obj { line-height: 1.8; margin: 4px 0; }
.mots { font-size: 12.5px; color: var(--gris); line-height: 1.7; }
.as-calc label { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; margin-bottom: 8px; }
.as-calc input { width: 140px; font-size: 16px; }
.as-calc td[data-k] { font-weight: 700; color: var(--marque); white-space: nowrap; text-align: left; }
.cn-barre { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cn-barre input { flex: 1 1 260px; font-size: 16px; padding: 8px 10px; border: 2px solid var(--encre); border-radius: 3px; }
.cn-barre button.actif { background: var(--marque); color: #fff; border-color: var(--marque); }
.as-bab { background: #f2f2f2; color: var(--gris); padding: 10px 16px; margin: 18px 0 10px; font-size: 16px; }
.bnd h4 { margin: 0 0 8px; font-size: 16.5px; line-height: 1.6; }
.bnd .num { display: inline-block; min-width: 30px; text-align: center; background: var(--marque); color: #fff; border-radius: 3px; padding: 0 6px; margin-inline-end: 6px; }
.bnd .plafond { background: #e3f1e8; border-inline-start: 4px solid var(--marque); padding: 6px 12px; margin-bottom: 8px; line-height: 1.7; }
.bnd .texte p.n3 { padding-inline-start: 22px; }
.as-table tr.bab td { background: #f2f2f2; font-weight: 700; color: var(--gris); }
.as-table a, .as-calc a { color: var(--bleu); font-weight: 700; text-decoration: none; }

.as-calc { margin: 14px 0; padding: 12px 14px; background: #f7f7f7; }
.as-calc h3 { margin: 0 0 8px; }
.as-acc h3 { margin: 18px 0 8px; }
.lecteur .as-table { margin-top: 6px; }

/* ---- محاكاة التعويضات ---- */
.sim-form, .sim-recap { margin-bottom: 12px; padding: 14px 18px; }
.sim-grille-f { grid-template-columns: repeat(3, 1fr); }
.sim-grille-f input { width: 100%; }
.sim-chk { flex-direction: row !important; align-items: center; gap: 8px !important; grid-column: 1 / -1; }
.sim-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.sim-c { padding: 12px 16px; border-inline-start: 4px solid var(--marque); }
.sim-c h3 { margin: 0 0 6px; font-size: 16px; }
.sim-val { font-size: 20px; font-weight: 700; color: var(--marque); margin-bottom: 6px; }
.sim-c ul { margin: 0 0 6px; padding-inline-start: 18px; font-size: 13.5px; line-height: 1.7; color: #2b3332; }
.sim-c a.ref { color: var(--bleu); text-decoration: none; }
@media (max-width: 900px) { .sim-grille-f { grid-template-columns: 1fr; } }

#sa-t { margin: 12px 0; } #sa-t td { vertical-align: middle; } #sa-t input { width: 110px; }
#sa-t td[data-cap], #sa-t td[data-exo], #sa-t td[data-sou] { white-space: nowrap; text-align: left; }
.sa-sou { color: var(--rouge); font-weight: 700; }
.sa-total { background: #e3f1e8; }
.sa-avert { margin: 4px 0; color: var(--orange); }

#sa-t td[data-fcap], #sa-t td[data-exo], #sa-t td[data-sou], #sa-t td[data-fexo], #sa-t td[data-fsou] { white-space: nowrap; text-align: left; }
#sa-t th:nth-child(n+7) { background: #e3f1e8; }
.fi-cap { white-space: nowrap; text-align: left; font-weight: 700; color: var(--marque); }
.cp-diff td { background: #fff7e6; }
.cp-t td, .fi-liste td { vertical-align: top; }
.vue-reg { overflow-x: auto; }

/* ---- اجتهاد قضائي ---- */
.entree.pub { border-inline-start-color: var(--bleu); }
.entree.pub.cite { border-inline-start-style: dashed; background: #fafafa; }
.entree .pastille { text-decoration: none; margin-inline-end: 4px; }
.jur-ban { background: #e3f1e8; font-weight: 600; color: var(--marque); }

.entete .contact { margin-inline-start: auto; font-size: 12.5px; line-height: 1.5; color: var(--encre); text-align: left; max-width: 260px; }
.entete .contact a { color: var(--marque); font-weight: 800; text-decoration: none; white-space: nowrap; }
.entete .contact a:hover { text-decoration: underline; }
@media (max-width: 1100px) { .entete { flex-wrap: wrap; } .entete .contact { margin-inline-start: 0; max-width: none; } }

/* ---- مساطر · جزاءات · عقوبات (repris du modèle cgi_web) ---- */
#vue-fisc { padding: 0; }
.vue-fisc { max-width: 1180px; margin: auto; height: 100%; overflow: auto; padding: 12px 14px 40px; }
.vue-fisc .carte { margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.chip { background: #fff; border: 1px solid var(--ligne); border-radius: 16px; padding: 4px 12px; color: var(--encre); font-weight: 600; text-decoration: none; cursor: pointer; font: inherit; }
.chip:hover, .chip.on { background: var(--marque); color: #fff; border-color: var(--marque); }
.schema { width: 100%; height: auto; color: #555; }
.schema text { direction: rtl; }
.schema .ttl { font-size: 13px; font-weight: 700; fill: var(--marque); text-anchor: start; }
.schema .sg-n { cursor: pointer; }
.schema .sg-n rect { fill: #fff; stroke: #999; stroke-width: 1.2; }
.schema .sg-n.a rect { stroke: var(--marque); }
.schema .sg-n:hover rect { fill: #e3f1e8; }
.schema .t1 { font-size: 11.5px; font-weight: 700; text-anchor: middle; fill: #1a1a1a; }
.schema .t2 { font-size: 9.5px; text-anchor: middle; fill: #666; }
.schema .t3 { font-size: 10px; fill: #888; }
.schema .sg-a { stroke: currentColor; stroke-width: 1.4; }
.schema .dash { stroke-dasharray: 4 3; }
.proc h3, .pen h3 { margin-top: 0; color: var(--marque); }
.refs { font-size: 12.5px; font-weight: 400; margin-inline-start: 8px; }
.ref { display: inline-block; background: #f3f3f3; border: 1px solid var(--ligne); border-radius: 4px; padding: 0 6px; font-size: 12px; color: var(--encre); text-decoration: none; margin-inline-end: 4px; }
a.ref:hover { background: var(--marque); color: #fff; }
.resume { color: var(--gris); margin: 0 0 10px; }
.fl { display: flex; flex-direction: column; align-items: stretch; }
.fl-box { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--ligne); border-inline-start: 4px solid var(--marque); border-radius: 8px; padding: 8px 12px; background: #fff; }
.fl-box.br { border-inline-start-color: var(--orange); background: #fff8ee; }
.fl-box .no { background: var(--marque); color: #fff; border-radius: 50%; width: 24px; height: 24px; flex: none; text-align: center; line-height: 24px; font-size: 13px; font-weight: 700; }
.fl-box.br .no { background: var(--orange); }
.fl-c p { margin: 3px 0 6px; line-height: 1.8; }
.fl-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.delai { background: #fff1cc; border: 1px solid #e9c46a; border-radius: 4px; padding: 0 8px; font-size: 12.5px; font-weight: 600; }
.fl-ar { text-align: center; color: var(--marque); font-size: 16px; line-height: 1.2; }
.notes-p { margin: 12px 0 0; padding-inline-start: 20px; color: var(--gris); line-height: 1.9; font-size: 14px; }
.tb { width: 100%; border-collapse: collapse; font-size: 14px; }
.tb th { background: #f3f3f3; text-align: start; padding: 6px 10px; border-bottom: 2px solid var(--marque); }
.tb td { padding: 7px 10px; border-bottom: 1px solid #eee; vertical-align: top; line-height: 1.8; }
.tb td.jr { font-weight: 700; color: var(--marque); white-space: nowrap; }
.tb td.tx { font-weight: 700; white-space: normal; }
.grey { color: var(--gris); font-weight: 400; }
.deux-c { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.calc label { display: block; margin: 6px 0; font-size: 13px; }
.calc input, .calc select { width: 100%; margin-top: 2px; }
.res { background: #f7f7f7; border-radius: 6px; padding: 8px 12px; margin-top: 8px; line-height: 2; }
.note-p, .avert { color: var(--gris); font-size: 13px; }
@media print { #vue-fisc .chips { display: none; } }

.sim .sim-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 14px; }
.sim fieldset { border: 1px solid var(--ligne); border-radius: 6px; margin: 10px 0; padding: 6px 12px 10px; }
.sim legend { font-weight: 700; color: var(--marque); padding: 0 6px; }
.ck { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.ck input[type=number] { width: 150px; margin: 0; }
.ck select { width: auto; margin: 0; }
td.num { text-align: left; white-space: nowrap; font-variant-numeric: tabular-nums; direction: ltr; }
.tb tfoot td { border-top: 2px solid var(--marque); background: #fafafa; }

.dls { white-space: nowrap; }
.frm { display: inline-flex; gap: 4px; align-items: center; background: #f7f7f7; border: 1px solid var(--ligne); border-radius: 5px; padding: 1px 6px; margin: 1px 0; font-size: 12.5px; }
.dl { display: inline-block; background: var(--marque); color: #fff; border-radius: 4px; padding: 0 7px; text-decoration: none; font-weight: 700; font-size: 12px; margin-inline-start: 3px; }
.dl.x { background: #333; padding: 0 5px; }
.dl:hover { filter: brightness(1.15); }

.gt { margin: 14px 0 4px; color: var(--encre); border-inline-start: 4px solid var(--marque); padding-inline-start: 8px; }

/* ---- المساطر : قائمة على اليمين + مسطرة واحدة في كل صفحة */
.proc-lay { display: grid; grid-template-columns: 270px 1fr; gap: 14px; max-width: 1280px; margin: auto; height: 100%; padding: 12px 14px; }
.proc-side { background: #fff; border: 1px solid var(--ligne); border-radius: 8px; padding: 8px; align-self: start; position: sticky; top: 0; max-height: 100%; overflow: auto; }
.proc-side .ps-t { color: var(--marque); font-weight: 700; padding: 6px 8px 8px; border-bottom: 2px solid var(--marque); margin-bottom: 4px; }
.proc-side a { display: flex; gap: 8px; align-items: center; padding: 8px 10px; color: var(--encre); text-decoration: none; border-radius: 6px; border-bottom: 1px solid #f0f0f0; line-height: 1.5; }
.proc-side a:hover { background: #f5f5f5; }
.proc-side a.actif { background: #e3f1e8; border-inline-start: 4px solid var(--marque); font-weight: 700; }
.proc-side .n { background: var(--marque); color: #fff; border-radius: 50%; width: 22px; height: 22px; flex: none; text-align: center; line-height: 22px; font-size: 12px; }
.proc-main { overflow: auto; min-width: 0; padding-bottom: 40px; }
.proc-main > .carte { margin-bottom: 14px; }
@media (max-width: 820px) { .proc-lay { grid-template-columns: 1fr; height: auto; } .proc-side { position: static; } }

.schema .sg-n.ok rect { stroke: #1e7d43; fill: #eefaf1; stroke-width: 1.8; }
.schema .sg-n.ko rect { stroke: #c62828; fill: #fdecea; stroke-width: 1.8; }
.schema .sg-n.ok:hover rect { fill: #d9f2e1; }
.schema .sg-n.ko:hover rect { fill: #f9d6d2; }
.lgd { font-size: 13px; color: var(--gris); margin: 0 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lgd .k { display: inline-block; width: 16px; height: 16px; border-radius: 3px; border: 2px solid; vertical-align: middle; }
.lgd .k.ok { border-color: #1e7d43; background: #eefaf1; }
.lgd .k.ko { border-color: #c62828; background: #fdecea; margin-inline-start: 14px; }

/* ---- bouton d'impression des modules + mise en page imprimée */
.pbtn { font: inherit; font-size: 13px; font-weight: 600; background: #fff; color: var(--encre); border: 1px solid #999; border-radius: 5px; padding: 2px 10px; margin-inline-start: 10px; cursor: pointer; vertical-align: middle; }
.pbtn:hover { background: var(--encre); color: #fff; }
.pbar { text-align: end; margin-bottom: 6px; }
@media print {
  html, body { height: auto !important; }
  body { display: block !important; }
  main, .vue-fisc, .vue-reg, .proc-lay, .proc-main, .lecteur, #pv-lecteur, #vue-juris, #vue-preuve { height: auto !important; overflow: visible !important; max-width: none !important; }
  .proc-lay { display: block !important; padding: 0 !important; }
  .proc-side, .pbtn, .pbar, .chips, .pv-nav, #vue-preuve aside, .barre, .entete, .etat { display: none !important; }
  .calc.sim { break-inside: avoid; }
  .carte, .fl-box, .tb tr, svg.schema { break-inside: avoid; }
  .schema, .lgd .k, .delai, .fl-box, .fl-box .no, .tb th, .pastille, .ref, .dl, .frm, .res, .schema rect { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .vue-fisc, .proc-main { padding: 0 !important; }
}
#vue-proc { padding: 0; } #vue-proc .vue-fisc { overflow: auto; }

#vue-imprimes, #vue-controle { padding: 0; }
.ck-list { list-style: none; padding: 0; margin: 0; }
.ck-list .ck { cursor: pointer; line-height: 1.8; }
.dls .frm { margin: 2px 4px 2px 0; text-decoration: none; color: var(--encre); }

/* carte mentale des procédures (modèle 2) */
.schema.mm .mm-l { fill: none; stroke-width: 1.5; opacity: .65; }
.schema.mm rect { stroke-width: 1.2; }
.schema.mm .t1 { font-size: 13px; }
.schema.mm .mm-r rect { fill: #f1efe8; stroke: #5f5e5a; }
.schema.mm .mm-a rect { fill: #e1f5ee; stroke: #0f6e56; }
.schema.mm .mm-b rect { fill: #faece7; stroke: #993c1d; }
.schema.mm .mm-c rect { fill: #eeedfe; stroke: #534ab7; }
.schema.mm .sg-n:hover rect { filter: brightness(.94); stroke-width: 2; }

.schema.mm .t2 { font-size: 10.5px; }
.schema.mm .no { font-size: 11px; font-weight: 700; text-anchor: middle; fill: #fff; }
.schema.mm .mm-a circle { fill: #0f6e56; } .schema.mm .mm-b circle { fill: #993c1d; } .schema.mm .mm-c circle { fill: #534ab7; }
