/* Modèle de mise en forme du contenu des pages (session 37, 25/11/2026 — demande client : « je donne le contenu
   Word, un modèle s'applique aux titres, sous-titres et tableaux »). S'applique SEUL au champ المحتوى des pages
   (conteneur .rich-content.page-content de front/page.blade.php) : aucune classe ni couleur à saisir dans le contenu.
   Charte : #125875 / #FF7350, police Cairo héritée. Chargé AVANT app.css → sélecteurs à deux classes pour primer. */
.rich-content.page-content{--pc-brand:#125875;--pc-dark:#0a3346;--pc-accent:#ff7350;--pc-pale:#eef5f8;--pc-line:#dbe7ed;--pc-muted:#5b7584;line-height:1.9}

/* Titres : h2 = titre de partie (barre orange dessous) ; h3 = sous-titre en bandeau ; h4 = intertitre */
.rich-content.page-content h2{font-size:clamp(1.45rem,2.6vw,1.9rem);font-weight:800;color:var(--pc-brand);line-height:1.4;margin:2.4rem 0 1.1rem;padding-bottom:.7rem;position:relative}
.rich-content.page-content h2::after{content:"";position:absolute;inset-inline-start:0;bottom:0;width:72px;height:4px;border-radius:4px;background:var(--pc-accent)}
.rich-content.page-content > h2:first-child{margin-top:0}
.rich-content.page-content h3{font-size:clamp(1.05rem,1.9vw,1.25rem);font-weight:800;color:var(--pc-brand);line-height:1.6;margin:2rem 0 .9rem;padding:.65rem 1rem;
  background:linear-gradient(100deg,var(--pc-pale),#f8fbfc);border:1px solid var(--pc-line);border-inline-start:5px solid var(--pc-accent);border-radius:12px}
.rich-content.page-content h4{font-size:1.05rem;font-weight:800;color:var(--pc-dark);margin:1.4rem 0 .5rem}
.rich-content.page-content h4::before{content:"";display:inline-block;width:.55rem;height:.55rem;border-radius:50%;background:var(--pc-accent);margin-inline-end:.5rem;vertical-align:middle}

/* Listes et citations */
.rich-content.page-content ul{list-style:disc}
.rich-content.page-content li::marker{color:var(--pc-accent)}
.rich-content.page-content li > ul,.rich-content.page-content li > ol{margin:.35rem 0}
.rich-content.page-content blockquote{margin:1rem 0;padding:.6rem 1rem;background:#fff7f4;border-inline-start:4px solid var(--pc-accent);border-radius:10px;color:var(--pc-muted);font-size:.95rem}
.rich-content.page-content hr{border:0;border-top:1px solid var(--pc-line);margin:2rem 0}

/* Tableaux : en-tête pétrole, lignes alternées, coins arrondis ; cellules fusionnées en hauteur (libellé d'un
   groupe de lignes, ex. « الفصل الأول ») mises en avant. Largeurs fixes → colonnes égales, texte qui passe à la ligne. */
.rich-content.page-content table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;margin:1.1rem 0 1.8rem;background:#fff;
  border:1px solid var(--pc-line);border-radius:14px;overflow:hidden;box-shadow:0 10px 30px rgba(18,88,117,.06)}
.rich-content.page-content th,.rich-content.page-content td{border:0;border-bottom:1px solid var(--pc-line);border-inline-start:1px solid var(--pc-line);
  padding:.7rem .9rem;text-align:start;vertical-align:middle;overflow-wrap:anywhere;line-height:1.7}
.rich-content.page-content tr > :first-child{border-inline-start:0}
.rich-content.page-content tbody tr:last-child > *{border-bottom:0}
.rich-content.page-content thead th{background:var(--pc-brand);color:#fff;font-weight:800;border-bottom:0;border-inline-start-color:rgba(255,255,255,.22)}
.rich-content.page-content tbody tr:nth-child(even) > td:not([rowspan]){background:#f8fbfc}
.rich-content.page-content tbody tr:hover > td:not([rowspan]){background:#eef5f8}
.rich-content.page-content tbody th,.rich-content.page-content td[rowspan]{background:var(--pc-pale);color:var(--pc-brand);font-weight:800;text-align:center}
/* Colonne-libellé (cellule fusionnée) : étroite. La 1ʳᵉ ligne d'en-tête fixe les largeurs (table-layout:fixed). */
.rich-content.page-content table:has(td[rowspan]:first-child) thead th:first-child{width:7.5rem}
.rich-content.page-content table:has(td[rowspan]:first-child):has(td[rowspan]:nth-child(3)) thead th:nth-child(3){width:7.5rem}

@media (max-width:640px){
  .rich-content.page-content th,.rich-content.page-content td{padding:.5rem .45rem;font-size:.82rem;line-height:1.6}
  .rich-content.page-content table:has(td[rowspan]:first-child) thead th:first-child,
  .rich-content.page-content table:has(td[rowspan]:first-child):has(td[rowspan]:nth-child(3)) thead th:nth-child(3){width:3.6rem}
  .rich-content.page-content h3{padding:.55rem .8rem}
}
@media print{.rich-content.page-content table{box-shadow:none}.rich-content.page-content tr{break-inside:avoid}.rich-content.page-content thead th{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
