/* ==========================================================================
   PARAGRAPHS - COULEURS
   ========================================================================== */

/*
 * Pour les Paragraphs possédant leur propre field_color.
 *
 * Ne pas utiliser paragraph-color-text sur fond-deco :
 * fond-deco est un conteneur pouvant contenir d'autres Paragraphs.
 */


/* ==========================================================================
   FONDS
   ========================================================================== */

.paragraph-color-text.uco {
  background-color: var(--color-blue-uco);
  color: var(--color-white);
}

.paragraph-color-text.dark {
  background-color: var(--color-blue-uco-dark);
  color: var(--color-white);
}

.paragraph-color-text.beige {
  /*background-color: var(--color-beige);*/
  color: var(--color-blue-uco-dark);
}


/* ==========================================================================
   CONTENUS SUR FONDS BLEUS
   ========================================================================== */

.paragraph-color-text.uco .text-formatted,
.paragraph-color-text.dark .text-formatted,
.paragraph-color-text.uco .field__item,
.paragraph-color-text.dark .field__item {
  color: var(--color-white);
}

.paragraph-color-text.uco .text-formatted p,
.paragraph-color-text.dark .text-formatted p,
.paragraph-color-text.uco .text-formatted h2,
.paragraph-color-text.dark .text-formatted h2,
.paragraph-color-text.uco .text-formatted li,
.paragraph-color-text.dark .text-formatted li,
.paragraph-color-text.uco .text-formatted h3,
.paragraph-color-text.dark .text-formatted h3,
.paragraph-color-text.uco .text-formatted h4,
.paragraph-color-text.dark .text-formatted h4,
.paragraph-color-text.uco .text-formatted h5,
.paragraph-color-text.dark .text-formatted h5,
.paragraph-color-text.uco .text-formatted h6,
.paragraph-color-text.dark .text-formatted h6 {
  color: var(--color-white);
}


/* ==========================================================================
   LIENS SIMPLES SUR FONDS BLEUS
   ========================================================================== */

.paragraph-color-text.uco .text-formatted a:not([class]),
.paragraph-color-text.dark .text-formatted a:not([class]) {
  color: var(--color-white);
}

.paragraph-color-text.uco .text-formatted a:not([class]):hover,
.paragraph-color-text.uco .text-formatted a:not([class]):focus-visible,
.paragraph-color-text.dark .text-formatted a:not([class]):hover,
.paragraph-color-text.dark .text-formatted a:not([class]):focus-visible {
  color: var(--color-yellow);
}


/* ==========================================================================
   LISTES À PUCES SUR FONDS BLEUS
   ========================================================================== */

.paragraph-color-text.uco .text-formatted ul > li::before,
.paragraph-color-text.dark .text-formatted ul > li::before {
  background-color: var(--color-white);
}


/* Niveau 2 : puce creuse */

.paragraph-color-text.uco .text-formatted ul ul > li::before,
.paragraph-color-text.dark .text-formatted ul ul > li::before {
  background: transparent;
  border-color: var(--color-white);
}


/* Niveau 3 : puce pleine */

.paragraph-color-text.uco .text-formatted ul ul ul > li::before,
.paragraph-color-text.dark .text-formatted ul ul ul > li::before {
  border: 0;
  background-color: var(--color-white);
}


/* ==========================================================================
   LISTES NUMÉROTÉES SUR FONDS BLEUS
   ========================================================================== */

.paragraph-color-text.uco .text-formatted ol > li::marker,
.paragraph-color-text.dark .text-formatted ol > li::marker {
  color: var(--color-white);
}


/* Listes sur fonds foncés : picto cercle + coche blanc */
.paragraph-color-text.uco .text-formatted ul > li::before,
.paragraph-color-text.dark .text-formatted ul > li::before {
  background-color: transparent;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 2.5 2.5L16 9'/%3E%3C/svg%3E");
}

/* Sous-listes sur fonds foncés */
.paragraph-color-text.uco .text-formatted ul ul > li::before,
.paragraph-color-text.dark .text-formatted ul ul > li::before {
  background-image: none;
  background-color: transparent;
  border-color: #fff;
}

.paragraph-color-text.uco .text-formatted ul ul ul > li::before,
.paragraph-color-text.dark .text-formatted ul ul ul > li::before {
  background-image: none;
  background-color: #fff;
  border: 0;
}


/* ==========================================================================
   FOND BEIGE
   ========================================================================== */

.paragraph-color-text.beige,
.paragraph-color-text.beige .text-formatted,
.paragraph-color-text.beige .field__item,
.paragraph-color-text.beige > .text-formatted p,
.paragraph-color-text.beige > .text-formatted h2,
.paragraph-color-text.beige > .text-formatted h3,
.paragraph-color-text.beige > .text-formatted h4,
.paragraph-color-text.beige > .text-formatted h5,
.paragraph-color-text.beige > .text-formatted h6 {
  color: var(--color-blue-uco-dark);
}

/* ==========================================================================
   TABLEAUX
   ========================================================================== */

.paragraph-color-text.uco .table,
.paragraph-color-text.dark .table {
  --bs-table-color: var(--color-white);
  --bs-table-striped-color: var(--color-white);
}

.paragraph-color-text.uco .tablefield caption,
.paragraph-color-text.dark .tablefield caption {
  color: var(--color-white);
}

.paragraph-color-text.beige .table {
  --bs-table-color: var(--color-blue-uco-dark);
  --bs-table-striped-color: var(--color-blue-uco-dark);
}

.paragraph-color-text.beige .tablefield caption {
  color: var(--color-blue-uco-dark);
}

/* FAQ : H2 visibles sur fond blanc */
.pageRubrique .accordion .paragraph-color-text.uco .text-formatted h2,
.pageRubrique .accordion .paragraph-color-text.dark .text-formatted h2 {
  color: var(--color-blue-uco) !important;
}

/* H2 blancs sur les fonds bleu UCO et bleu foncé */
/* Titres H2 des paragraphes Texte simple :
   cartouche blanc et texte bleu UCO */

body .section__texte.paragraph-color-text.uco .text-formatted h2,
body .section__texte.paragraph-color-text.dark .text-formatted h2 {
  background-color: #ffffff !important;
  color: #00173c !important;
  -webkit-text-fill-color: #00173c !important;
}

/* Conserver la couleur sur les éléments internes du titre */
body .section__texte.paragraph-color-text.uco .text-formatted h2 *,
body .section__texte.paragraph-color-text.dark .text-formatted h2 * {
  color: #00173c !important;
  -webkit-text-fill-color: #00173c !important;
}
/* Le fond et la couleur du texte s'appliquent aussi aux éléments éditoriaux. */
.section__texte.paragraph-color-text.uco,
.section__texte.paragraph-color-text.dark { color: var(--color-white); }
.section__texte.paragraph-color-text.uco :is(p, span, strong, em, h2, h3, h4, h5, h6, li),
.section__texte.paragraph-color-text.dark :is(p, span, strong, em, h2, h3, h4, h5, h6, li) { color: inherit; }
.section__texte.paragraph-color-text.uco .container-xxl,
.section__texte.paragraph-color-text.dark .container-xxl { background-color: transparent; }
