/* ==========================================================================
 XXI — Couleurs des 15 domaines de politiques publiques
 Gammes harmonisées arrêtées par Didier Supplisson le 22 octobre 2026.
 Sites : avocats.xxi.legal · formations.xxi.legal · XXI Institut
 À charger APRÈS la feuille principale du site. Ne modifie pas l'identité
 commune (--pri, --acc, --band, axes) hors des éléments marqués d'un domaine.
 ========================================================================== */

:root {
  --or-xxi: #d5a13c;        /* accent commun : décoratif uniquement (2,3:1 sur blanc) */
  --or-xxi-clair: #fdeed6;
}

/* 01 · Institutions, démocratie et État de droit — bleu roi */
[data-domaine="01"] { --dom: #2f5492; --dom-fonce: #112c59; --dom-clair: #edf4ff; }
/* 02 · État et administration publique — émeraude */
[data-domaine="02"] { --dom: #03654e; --dom-fonce: #023729; --dom-clair: #e8f8f1; }
/* 03 · Décentralisation et collectivités territoriales — bordeaux */
[data-domaine="03"] { --dom: #88373e; --dom-fonce: #51161c; --dom-clair: #feefef; }
/* 04 · Environnement et transition écologique — vert forêt */
[data-domaine="04"] { --dom: #196632; --dom-fonce: #013916; --dom-clair: #ebf7ed; }
/* 05 · Énergie — anthracite */
[data-domaine="05"] { --dom: #4d5566; --dom-fonce: #282e3a; --dom-clair: #f1f3f9; }
/* 06 · Agriculture, alimentation et forêt — olive */
[data-domaine="06"] { --dom: #615604; --dom-fonce: #352e00; --dom-clair: #f6f4e6; }
/* 07 · Urbanisme, logement et infrastructures — terre cuite */
[data-domaine="07"] { --dom: #863d1a; --dom-fonce: #4f1b01; --dom-clair: #fff0ea; }
/* 08 · Économie, industrie et innovation — vert mousse */
[data-domaine="08"] { --dom: #43600e; --dom-fonce: #223500; --dom-clair: #f0f6e9; }
/* 09 · Emploi, travail et formation professionnelle — châtaigne */
[data-domaine="09"] { --dom: #7c4603; --dom-fonce: #452501; --dom-clair: #fdf1e7; }
/* 10 · Numérique et intelligence artificielle — prune */
[data-domaine="10"] { --dom: #713e79; --dom-fonce: #411c47; --dom-clair: #f9f0fb; }
/* 11 · Santé et solidarités — bleu pétrole */
[data-domaine="11"] { --dom: #01606e; --dom-fonce: #00343d; --dom-clair: #e7f7fb; }
/* 12 · Éducation, enseignement supérieur et recherche — violet */
[data-domaine="12"] { --dom: #5b468b; --dom-fonce: #332254; --dom-clair: #f4f1ff; }
/* 13 · Culture, patrimoine, médias et sport — framboise */
[data-domaine="13"] { --dom: #81385e; --dom-fonce: #4c1734; --dom-clair: #feeff5; }
/* 14 · Sécurité, défense et relations internationales — bleu acier */
[data-domaine="14"] { --dom: #035b88; --dom-fonce: #01314c; --dom-clair: #e9f5ff; }
/* 15 · Union européenne — outremer */
[data-domaine="15"] { --dom: #4a4c90; --dom-fonce: #272658; --dom-clair: #f1f3fe; }

/* --- Application dans un contexte de domaine ---------------------------- */
/* Dans une page ou un bloc de domaine, la couleur de l'axe « politiques
   publiques » prend la couleur du domaine. Navigation, pied de page et
   boutons d'action gardent --pri (identité XXI). */
[data-domaine] { --ax-pp: var(--dom); --ax-pp-tint: var(--dom-clair); }

/* Bandeau d'en-tête de la page du domaine, de ses politiques et de sa Lettre */
[data-domaine] .dom-bandeau {
  background: linear-gradient(135deg, var(--dom), var(--dom-fonce));
  color: #fff;            /* contraste 7:1 à 14:1 selon le domaine */
}
[data-domaine] .dom-bandeau a { color: #fff; text-decoration: underline; }

/* Titres de section : filet or XXI */
[data-domaine] .dom-titre { border-bottom: 3px solid var(--or-xxi); padding-bottom: .25em; }

/* Encadré « À retenir » / chapô mis en valeur */
[data-domaine] .dom-encadre {
  background: var(--dom-clair);
  border-left: 4px solid var(--dom);
  color: var(--text, #3a3a3a);
}

/* Liens dans le contenu d'une page de domaine */
[data-domaine] main .editorial-prose a:not([class*="btn"]),
[data-domaine] main .prose a:not([class*="btn"]) {
  color: var(--dom-fonce);
  text-decoration: underline;
}

/* Carte ou vignette d'un domaine sur les pages d'index (politiques-publiques, Lettres, formations) */
.dom-carte[data-domaine] { border-top: 4px solid var(--dom); }
.dom-carte[data-domaine] .dom-numero { color: var(--dom); font-weight: 700; }

/* Pastille de renvoi vers un domaine depuis une page transversale (secteur, territoire, profil) */
.dom-pastille[data-domaine] {
  display: inline-block; padding: .1em .55em; border-radius: 999px;
  background: var(--dom-clair); color: var(--dom-fonce); border: 1px solid var(--dom);
}

/* Adaptation to the existing XXI Avocats page and index components. */
[data-domaine] .dom-bandeau,
[data-domaine] main .dom-bandeau {
  background: linear-gradient(135deg, var(--dom), var(--dom-fonce));
  color: #fff;
}
[data-domaine] .dom-bandeau h1,
[data-domaine] .dom-bandeau p,
[data-domaine] .dom-bandeau a { color: #fff; }
[data-domaine] .dom-bandeau a { text-decoration: underline; }
[data-domaine] main .dom-titre { border-bottom: 3px solid var(--or-xxi); }
.pp-entry .dom-carte[data-domaine] { border-top: 4px solid var(--dom); }
.pp-entry .dom-carte[data-domaine] .dom-numero { color: var(--dom); }

/* Les publications éditoriales reçoivent un repère dans leur contenu. */
.card.dom-carte[data-domaine] { border-top: 4px solid var(--dom); }
.article.dom-publication[data-domaine] { border-top: 4px solid var(--dom); }
.article.dom-publication[data-domaine] .summary {
  border-left-color: var(--dom);
  background: var(--dom-clair);
}
.article.dom-publication[data-domaine] .body a { color: var(--dom-fonce); text-decoration: underline; }
.article.dom-publication[data-domaine] .body h2 { border-bottom: 3px solid var(--or-xxi); }
