/* ==========================================================================
   Ornagora — thème clair, aéré, arrondi (voir charte §5).
   Palette : verts du logo Orna + blanc/gris/bleu de la charte OrnaStyle.
   Structure inspirée des wikis de documentation : navigation latérale, colonne de
   lecture centrée, sommaire flottant. Maquette de référence : dossier /maquette.
   Bootstrap 5 reste chargé (formulaires, grille, admin) ; ses variables sont
   alignées sur ce thème dans la section "Compatibilité Bootstrap" en bas.
   Badges de catégorie : couleur dynamique (categorie.s_couleur), jamais fixe.
   ========================================================================== */

:root {
  /* Verts du logo */
  --vert-900: #2f4d24;
  --vert-700: #487537;   /* logo : anneau */
  --vert-600: #5a8f45;
  --vert-500: #73bc42;   /* logo : tirets */
  --vert-100: #e4f0da;
  --vert-50:  #f3f8ee;

  /* Bleu OrnaStyle (accent secondaire : focus, liens actifs) */
  --bleu-600: #1883d7;
  --bleu-500: #009de0;
  --bleu-50:  #eaf4fc;

  /* Neutres (OrnaStyle : blanc, #F4F4F4, bordure #D0D2D6) */
  --encre:    #1f2522;
  --texte:    #394039;
  --discret:  #68706b;
  --bordure:  #e2e5e0;
  --bordure-forte: #d0d2d6;
  --fond:     #f8f9f6;
  --carte:    #ffffff;
  --survol:   #f1f4ee;

  /* Alertes douces */
  --ambre-bg: #fff6e0;
  --ambre:    #a86a00;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --ombre-s: 0 1px 2px rgba(31, 37, 34, .05);
  --ombre-m: 0 1px 2px rgba(31, 37, 34, .04), 0 8px 24px rgba(31, 37, 34, .07);
  --police-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --police-texte: "Source Serif 4", Georgia, "Times New Roman", serif;
  --police-code: ui-monospace, "Cascadia Code", Consolas, monospace;
  --hauteur-barre: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --encre: #eef2ec;  --texte: #cfd6cd;  --discret: #98a29a;
    --bordure: #2b332d;  --bordure-forte: #3a443d;
    --fond: #141815;  --carte: #1b211d;  --survol: #232b25;
    --vert-700: #8fd05f;  --vert-600: #7cc24d;  --vert-100: #243a1c;  --vert-50: #1c2a17;
    --bleu-600: #52b0f0;  --bleu-50: #16283a;
    --ambre-bg: #2f2713;  --ambre: #f0b84d;
    --ombre-m: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hauteur-barre) + 24px); }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 400 16px/1.6 var(--police-ui);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--vert-700); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--bleu-600) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--encre); line-height: 1.25; letter-spacing: -.01em; font-weight: 700; }
.carte h3, .une h2, .section-titre h2, .commentaires h2, .formulaire h3, .sommaire h2 { margin: 0; }

/* ---------- Barre de progression de lecture ---------- */
.progression { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: transparent; }
.progression span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--vert-500), var(--vert-700)); border-radius: 0 3px 3px 0; }

/* ---------- Barre supérieure ---------- */
.barre {
  position: sticky; top: 0; z-index: 50; height: var(--hauteur-barre);
  display: flex; align-items: center; gap: 20px; padding: 0 28px;
  background: color-mix(in srgb, var(--carte) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--bordure);
}
.marque { display: flex; align-items: center; gap: 12px; color: var(--encre); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.marque:hover { text-decoration: none; }
.marque img { width: 38px; height: 38px; }
.marque small { display: block; font-size: 11px; font-weight: 500; color: var(--discret); letter-spacing: .02em; margin-top: -3px; }
.recherche { flex: 1; max-width: 520px; margin: 0 auto 0 28px; position: relative; }
.recherche input {
  width: 100%; height: 44px; padding: 0 16px 0 44px; border-radius: 999px;
  border: 1px solid var(--bordure-forte); background: var(--fond); color: var(--encre);
  font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.recherche input::placeholder { color: var(--discret); }
.recherche input:focus { outline: none; background: var(--carte); border-color: var(--bleu-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bleu-600) 16%, transparent); }
.recherche svg { position: absolute; left: 15px; top: 12px; width: 20px; height: 20px; color: var(--discret); }
.recherche kbd { position: absolute; right: 12px; top: 10px; font: 500 12px var(--police-ui); color: var(--discret); border: 1px solid var(--bordure-forte); border-radius: 6px; padding: 2px 8px; background: var(--carte); }
.nav { display: flex; gap: 4px; }
.nav a { padding: 9px 16px; border-radius: 999px; color: var(--texte); font-weight: 500; font-size: 15px; }
.nav a:hover { background: var(--survol); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--vert-100); color: var(--vert-700); }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--bordure-forte); background: var(--carte); color: var(--encre); cursor: pointer; }

/* ---------- Structure ---------- */
.cadre { display: grid; grid-template-columns: 288px minmax(0, 1fr); max-width: 1440px; margin: 0 auto; }
.lateral {
  position: sticky; top: var(--hauteur-barre); height: calc(100vh - var(--hauteur-barre)); overflow-y: auto;
  padding: 28px 20px 40px 28px; border-right: 1px solid var(--bordure);
}
.lateral h2 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--discret); margin: 26px 12px 10px; }
.lateral h2:first-child { margin-top: 0; }
.arbre { list-style: none; margin: 0; padding: 0; }
.arbre a, .arbre summary {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-s);
  color: var(--texte); font-size: 15px; font-weight: 500; cursor: pointer; list-style: none;
}
.arbre summary::-webkit-details-marker { display: none; }
.arbre a:hover, .arbre summary:hover { background: var(--survol); text-decoration: none; }
.arbre [aria-current="page"] { background: var(--vert-100); color: var(--vert-700); font-weight: 600; }
.arbre .pt { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.arbre .nb { margin-left: auto; font-size: 12px; color: var(--discret); font-weight: 500; }
.arbre .chev { width: 16px; height: 16px; flex: none; color: var(--discret); transition: transform .15s; }
details[open] > summary .chev { transform: rotate(90deg); }
.arbre ul { list-style: none; margin: 2px 0 6px 21px; padding: 0 0 0 10px; border-left: 2px solid var(--bordure); }
.arbre ul a { font-weight: 400; font-size: 14px; padding: 7px 10px; color: var(--discret); }
.arbre ul a[aria-current="page"] { color: var(--vert-700); font-weight: 600; }
.nuage { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px; }

.principal { padding: 44px clamp(24px, 4vw, 64px) 96px; min-width: 0; }

/* ---------- Pastilles / badges ---------- */
.pastille {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--couleur, var(--vert-700));
}
.tag {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--texte); background: var(--carte); border: 1px solid var(--bordure-forte);
}
.tag:hover { background: var(--vert-50); border-color: var(--vert-500); text-decoration: none; color: var(--vert-700); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px;
  border: 1px solid transparent; font: 600 15px var(--police-ui); cursor: pointer; text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .1s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-plein { background: var(--vert-700); color: #fff; box-shadow: 0 1px 2px rgba(31,37,34,.12); }
.btn-plein:hover { background: var(--vert-900); color: #fff; }
.btn-clair { background: var(--carte); color: var(--vert-700); border-color: var(--bordure-forte); }
.btn-clair:hover { background: var(--vert-50); border-color: var(--vert-500); }
@media (prefers-color-scheme: dark) { .btn-plein { color: #102008; } .btn-plein:hover { background: #a3e07a; color: #102008; } }

/* ---------- Accueil ---------- */
.intro { max-width: 760px; margin-bottom: 44px; }
.intro .surtitre { color: var(--vert-700); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.intro h1 { font-size: clamp(34px, 4.2vw, 48px); margin: 10px 0 16px; font-weight: 700; letter-spacing: -.03em; }
.intro p { font-size: 19px; color: var(--discret); margin: 0 0 24px; max-width: 62ch; }
.intro .actions { display: flex; gap: 12px; flex-wrap: wrap; }

.une {
  display: grid; grid-template-columns: 1.1fr 1fr; background: var(--carte); border: 1px solid var(--bordure);
  border-radius: var(--r-l); overflow: hidden; box-shadow: var(--ombre-m); margin-bottom: 40px;
}
.une .visuel { min-height: 320px; }
.une .texte { padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.une h2 { font-size: 28px; letter-spacing: -.02em; }
.une p { margin: 0; color: var(--discret); font-size: 16.5px; }

.visuel { background: linear-gradient(135deg, var(--c1, #cfe6bd), var(--c2, #e9f4df)); position: relative; overflow: hidden; }
.visuel::before, .visuel::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.35); }
.visuel::before { width: 220px; height: 220px; right: -50px; top: -60px; }
.visuel::after  { width: 120px; height: 120px; left: 12%; bottom: -40px; background: rgba(255,255,255,.25); }

.section-titre { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 20px; }
.section-titre h2 { font-size: 22px; }
.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.carte {
  display: flex; flex-direction: column; background: var(--carte); border: 1px solid var(--bordure);
  border-radius: var(--r-m); overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.carte:hover { transform: translateY(-3px); box-shadow: var(--ombre-m); border-color: var(--bordure-forte); }
.carte .visuel { height: 150px; }
.carte .corps { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.carte h3 { font-size: 19px; }
.carte h3 a { color: inherit; }
.carte p { margin: 0; color: var(--discret); font-size: 15px; flex: 1; }
.meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--discret); flex-wrap: wrap; }
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; }
.pagination a { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--bordure-forte); background: var(--carte); color: var(--texte); font-weight: 500; }
.pagination a:hover { text-decoration: none; background: var(--vert-50); }
.pagination a[aria-current="page"] { background: var(--vert-700); color: #fff; border-color: var(--vert-700); }
@media (prefers-color-scheme: dark) { .pagination a[aria-current="page"] { color: #102008; } }

/* ---------- Article ---------- */
.fil { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--discret); margin-bottom: 28px; flex-wrap: wrap; }
.fil a { color: var(--discret); }
.fil a:hover { color: var(--vert-700); }
.mise-en-page { display: grid; grid-template-columns: minmax(0, 740px) 232px; gap: 64px; justify-content: center; align-items: start; }
.entete h1 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -.03em; margin: 16px 0 20px; font-weight: 700; }
.auteur { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--bordure); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--vert-100); color: var(--vert-700); display: grid; place-items: center; font-weight: 700; }
.auteur strong { color: var(--encre); font-weight: 600; display: block; line-height: 1.3; }
.auteur span { font-size: 13.5px; color: var(--discret); }
.couverture { height: 300px; border-radius: var(--r-l); margin-bottom: 40px; }

.contenu { font-family: var(--police-texte); font-size: 19px; line-height: 1.8; color: var(--texte); }
.contenu > * + * { margin-top: 1.35em; }
.contenu .chapeau { font-size: 22px; line-height: 1.65; color: var(--encre); }
.contenu h2 { font-family: var(--police-ui); font-size: 27px; margin-top: 2.1em; letter-spacing: -.02em; }
.contenu h3 { font-family: var(--police-ui); font-size: 21px; margin-top: 1.8em; }
.contenu a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--vert-700) 40%, transparent); text-underline-offset: 3px; }
.contenu ul, .contenu ol { padding-left: 1.3em; }
.contenu li + li { margin-top: .5em; }
.contenu li::marker { color: var(--vert-500); }
.contenu blockquote {
  margin-left: 0; margin-right: 0; padding: 6px 0 6px 24px; border-left: 4px solid var(--vert-500);
  font-style: italic; color: var(--encre); font-size: 21px;
}
.contenu code { font-family: var(--police-code); font-size: .84em; background: var(--vert-50); border: 1px solid var(--vert-100); padding: 2px 7px; border-radius: 6px; color: var(--vert-900); }
@media (prefers-color-scheme: dark) { .contenu code { color: var(--vert-700); } }
.contenu pre {
  font-family: var(--police-code); font-size: 14.5px; line-height: 1.7; background: var(--carte);
  border: 1px solid var(--bordure-forte); border-radius: var(--r-m); padding: 20px 24px; overflow-x: auto; color: var(--encre);
}
.contenu pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.contenu figure { margin: 2em 0; }
.contenu figure .visuel { height: 260px; border-radius: var(--r-m); }
.contenu figcaption { font-family: var(--police-ui); font-size: 14px; color: var(--discret); text-align: center; margin-top: 12px; }

.encadre { display: flex; gap: 16px; padding: 20px 24px; border-radius: var(--r-m); font-family: var(--police-ui); font-size: 16px; line-height: 1.65; border: 1px solid transparent; }
.encadre .ico { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; color: #fff; margin-top: 1px; }
.encadre strong { display: block; color: var(--encre); margin-bottom: 2px; }
.encadre.info { background: var(--bleu-50); border-color: color-mix(in srgb, var(--bleu-600) 22%, transparent); }
.encadre.info .ico { background: var(--bleu-600); }
.encadre.astuce { background: var(--vert-50); border-color: var(--vert-100); }
.encadre.astuce .ico { background: var(--vert-700); }
.encadre.attention { background: var(--ambre-bg); border-color: color-mix(in srgb, var(--ambre) 25%, transparent); }
.encadre.attention .ico { background: var(--ambre); }

.pied-article { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--bordure); }
.pied-article .nuage { padding: 0; }
.voisins { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.voisin { display: block; padding: 20px 24px; background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--r-m); transition: border-color .15s, box-shadow .15s; }
.voisin:hover { text-decoration: none; border-color: var(--vert-500); box-shadow: var(--ombre-m); }
.voisin small { color: var(--discret); font-size: 13px; }
.voisin strong { display: block; color: var(--encre); font-weight: 600; margin-top: 4px; }
.voisin.suivant { text-align: right; }

.commentaires { margin-top: 64px; }
.commentaires h2 { font-size: 22px; margin-bottom: 24px; }
.commentaire { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--bordure); }
.commentaire p { margin: 4px 0 0; }
.commentaire strong { color: var(--encre); font-weight: 600; }
.commentaire time { font-size: 13px; color: var(--discret); margin-left: 8px; }
.formulaire { margin-top: 32px; background: var(--carte); border: 1px solid var(--bordure); border-radius: var(--r-l); padding: 28px; display: grid; gap: 16px; }
.formulaire h3 { font-size: 18px; }
.formulaire label { font-size: 14px; font-weight: 600; color: var(--encre); display: grid; gap: 6px; }
.formulaire input, .formulaire textarea {
  font: inherit; color: var(--encre); background: var(--fond); border: 1px solid var(--bordure-forte);
  border-radius: 12px; padding: 12px 16px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.formulaire textarea { min-height: 130px; resize: vertical; }
.formulaire input:focus, .formulaire textarea:focus { outline: none; background: var(--carte); border-color: var(--bleu-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bleu-600) 16%, transparent); }
.formulaire .ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.formulaire .btn { justify-self: start; }

/* ---------- Sommaire flottant ---------- */
.sommaire { position: sticky; top: calc(var(--hauteur-barre) + 32px); font-size: 14px; }
.sommaire h2 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .09em; color: var(--discret); margin-bottom: 14px; }
.sommaire ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--bordure); }
.sommaire a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--discret); line-height: 1.45; }
.sommaire a:hover { color: var(--vert-700); text-decoration: none; }
.sommaire a.actif { color: var(--vert-700); border-left-color: var(--vert-700); font-weight: 600; }
.sommaire .sous a { padding-left: 30px; font-size: 13.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .mise-en-page { grid-template-columns: minmax(0, 740px); }
  .sommaire { display: none; }
}
@media (max-width: 900px) {
  .barre { padding: 0 16px; gap: 12px; }
  .burger { display: grid; place-items: center; }
  .nav { display: none; }
  .recherche { margin-left: 0; }
  .recherche kbd { display: none; }
  .cadre { grid-template-columns: 1fr; }
  .lateral {
    position: fixed; z-index: 55; top: var(--hauteur-barre); left: 0; width: min(320px, 86vw); height: calc(100vh - var(--hauteur-barre));
    background: var(--carte); transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--ombre-m);
  }
  body.menu-ouvert .lateral { transform: none; }
  .principal { padding: 28px 16px 72px; }
  .une { grid-template-columns: 1fr; }
  .une .visuel { min-height: 180px; }
  .une .texte { padding: 26px 22px; }
  .voisins, .formulaire .ligne { grid-template-columns: 1fr; }
  .contenu { font-size: 18px; }
}
@media (max-width: 520px) {
  .marque small { display: none; }
  .marque span { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }


/* ==========================================================================
   Pages réelles : compléments au-delà de la maquette
   ========================================================================== */
.cadre-simple { grid-template-columns: minmax(0, 1fr); }
.cadre-simple .principal { width: 100%; max-width: 920px; margin: 0 auto; }
.principal > h1:first-child, .principal .page-titre { font-size: clamp(30px, 3.6vw, 40px); letter-spacing: -.03em; margin-bottom: 18px; }
.principal .lead { font-size: 19px; color: var(--discret); max-width: 62ch; }
.vide { padding: 36px; text-align: center; color: var(--discret); background: var(--carte); border: 1px dashed var(--bordure-forte); border-radius: var(--r-m); }
.lateral .liste-recents a { display: block; padding: 8px 12px; border-radius: var(--r-s); color: var(--texte); font-size: 14.5px; line-height: 1.4; font-weight: 500; }
.lateral .liste-recents a:hover { background: var(--survol); text-decoration: none; }
.reseaux { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 12px; }
.reseaux a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--survol); border: 1px solid var(--bordure); transition: transform .15s, border-color .15s; }
.reseaux a:hover { transform: translateY(-2px); border-color: var(--vert-500); }
.reseaux img { width: 22px; height: 22px; }
.pied-site { border-top: 1px solid var(--bordure); padding: 32px 24px; text-align: center; color: var(--discret); font-size: 14px; }
.pied-site a { color: var(--discret); }
.pied-site a:hover { color: var(--vert-700); }
.avatar-img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.sommaire[hidden] { display: none; }
.contenu h1 { font-family: var(--police-ui); font-size: 30px; margin-top: 2.1em; letter-spacing: -.02em; }
.contenu img { height: auto; border-radius: var(--r-m); }
.contenu table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-family: var(--police-ui); font-size: 15px; }
.contenu th, .contenu td { border: 1px solid var(--bordure-forte); padding: 10px 14px; }
.contenu iframe, .contenu video { max-width: 100%; border-radius: var(--r-m); }
.formulaire .form-label { font-size: 14px; font-weight: 600; color: var(--encre); margin-bottom: 6px; }
.formulaire .mb-2, .formulaire .mb-3 { margin-bottom: 0 !important; }
.formulaire .alert { margin: 0; }

/* Alias hérités : anciens noms de classes (pages et administration) */
.ornagora-badge-categorie { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.ornagora-badge-categorie:hover { color: #fff; text-decoration: none; filter: brightness(.95); }
.ornagora-btn-lire { display: inline-flex; align-items: center; height: 44px; padding: 0 22px; border-radius: 999px; background: var(--vert-700); color: #fff; font: 600 15px var(--police-ui); text-decoration: none; cursor: pointer; }
.ornagora-btn-lire:hover { background: var(--vert-900); color: #fff; text-decoration: none; }
.ornagora-meta { color: var(--discret); font-size: 13.5px; }
@media (prefers-color-scheme: dark) { .ornagora-btn-lire, .ornagora-btn-lire:hover { color: #102008; } .ornagora-btn-lire:hover { background: #a3e07a; } }

/* ==========================================================================
   Compatibilité Bootstrap : alignement des variables et composants sur le thème
   (formulaires, alertes, tableaux, boutons — surtout utilisés par l'administration)
   ========================================================================== */
:root {
  --bs-body-bg: var(--fond);
  --bs-body-color: var(--texte);
  --bs-body-font-family: var(--police-ui);
  --bs-border-color: var(--bordure-forte);
  --bs-link-color: var(--vert-700);
  --bs-link-hover-color: var(--vert-900);
  --bs-primary: var(--vert-700);
  --bs-primary-rgb: 72, 117, 55;
  --bs-border-radius: 12px;
  --bs-border-radius-lg: 18px;
}
.text-muted { color: var(--discret) !important; }
.text-danger { color: #c0392b !important; }

.form-control, .form-select {
  border-radius: 12px; border-color: var(--bordure-forte); background-color: var(--carte); color: var(--encre);
  padding: .7rem 1rem; transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--bleu-600); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bleu-600) 16%, transparent); background-color: var(--carte); color: var(--encre);
}
.input-group > .form-control { border-radius: 12px 0 0 12px; }
.input-group > .btn { border-radius: 0 12px 12px 0; }

.btn { border-radius: 999px; font-weight: 600; padding: .6rem 1.4rem; }
.btn-sm { padding: .35rem .9rem; font-size: .875rem; }
.btn-primary { --bs-btn-bg: var(--vert-700); --bs-btn-border-color: var(--vert-700); --bs-btn-hover-bg: var(--vert-900); --bs-btn-hover-border-color: var(--vert-900); --bs-btn-active-bg: var(--vert-900); --bs-btn-active-border-color: var(--vert-900); --bs-btn-disabled-bg: var(--vert-700); --bs-btn-disabled-border-color: var(--vert-700); }
.btn-outline-primary { --bs-btn-color: var(--vert-700); --bs-btn-border-color: var(--vert-700); --bs-btn-hover-bg: var(--vert-700); --bs-btn-hover-border-color: var(--vert-700); --bs-btn-active-bg: var(--vert-700); }
.btn-outline-secondary { --bs-btn-color: var(--texte); --bs-btn-border-color: var(--bordure-forte); --bs-btn-hover-bg: var(--survol); --bs-btn-hover-color: var(--encre); --bs-btn-hover-border-color: var(--bordure-forte); }
.btn:focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bleu-600) 28%, transparent); }
@media (prefers-color-scheme: dark) { .btn-primary { --bs-btn-color: #102008; --bs-btn-hover-color: #102008; --bs-btn-hover-bg: #a3e07a; --bs-btn-hover-border-color: #a3e07a; } }

.alert { border-radius: var(--r-m); border-width: 1px; }
.card { border-radius: var(--r-m); border-color: var(--bordure); background: var(--carte); box-shadow: var(--ombre-s); }
.table { --bs-table-bg: transparent; --bs-table-color: var(--texte); --bs-table-border-color: var(--bordure); }
.table > thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--discret); font-weight: 600; }
.badge { border-radius: 999px; }
.modal-content, .dropdown-menu { border-radius: var(--r-m); border-color: var(--bordure); }
hr { border-color: var(--bordure); opacity: 1; }

/* Administration : barre claire et arrondie, même famille que le site public */
.ornagora-admin-nav { background: var(--carte); border-bottom: 1px solid var(--bordure); padding: .6rem 0; }
.ornagora-admin-nav .navbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--encre); letter-spacing: -.02em; }
.ornagora-admin-nav .navbar-brand img { width: 32px; height: 32px; }
.ornagora-admin-nav .nav-link { color: var(--texte); font-weight: 500; border-radius: 999px; padding: .5rem 1rem; }
.ornagora-admin-nav .nav-link:hover { background: var(--survol); }
.ornagora-admin-nav .navbar-toggler { border-color: var(--bordure-forte); }
.ornagora-admin-nav .btn-link { text-decoration: none; }
