/* CARP RUSH TV / GoWatch PHP8 TEST37
   Choix Clair/Sombre dans le menu lateral de l'en-tete personnalise.
   Defaut CLAIR, pas de mode automatique. Applicable site + future PWA.
   Les images, players, publicites et SVG/logos ne sont pas recolores.
   Tous les selecteurs sombres sont conditionnes par html.crtv-theme-dark.
*/

/* Selecteur d'apparence, discret et accessible, sous les liens du menu. */
#header .airkit_header-style5.gw-h5-custom .airkit_sidebar-menu:not(.airkit_fullscreen-menu) .navbar-default {
  /* menu et sous-menus conservent leurs transitions historiques */
  box-sizing:border-box;
}
#header .airkit_header-style5.gw-h5-custom .airkit_sidebar-menu:not(.airkit_fullscreen-menu) .navbar-default > .navbar-collapse {
  /* Laisser visible le selecteur meme quand la liste de liens defile. */
  max-height:calc(100vh - 120px);
  max-height:calc(100dvh - 120px);
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  padding-bottom:25px !important;
}
#header .airkit_header-style5.gw-h5-custom .airkit_sidebar-menu:not(.airkit_fullscreen-menu) .crtv-appearance-control {
  position:absolute;
  bottom:calc(14px + env(safe-area-inset-bottom,0px));
  left:18px;
  right:18px;
  z-index:1003;
  box-sizing:border-box;
  border-top:1px solid rgba(220,236,247,.19);
  padding:13px 2px 0;
  color:#eaf2f7;
  background:#142d3d;
}
#header .airkit_header-style5.gw-h5-custom .crtv-appearance-control *,
#header .airkit_header-style5.gw-h5-custom .crtv-appearance-control *::before,
#header .airkit_header-style5.gw-h5-custom .crtv-appearance-control *::after {box-sizing:border-box;}
#header .airkit_header-style5.gw-h5-custom .crtv-appearance-label {
  display:block;
  margin:0 0 8px;
  color:#c4d5df;
  font-size:10px;
  font-weight:750;
  text-transform:uppercase;
  letter-spacing:.1em;
  line-height:1.3;
}
#header .airkit_header-style5.gw-h5-custom .crtv-appearance-options {
  display:flex;
  width:max-content;
  max-width:100%;
  gap:2px;
  padding:3px;
  border-radius:999px;
  background:#0f2432;
  border:1px solid #446071;
}
#header .airkit_header-style5.gw-h5-custom .crtv-appearance-options .crtv-theme-option {
  appearance:none;
  -webkit-appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:31px;
  min-width:74px;
  padding:5px 13px;
  margin:0;
  border:0;
  border-radius:999px;
  box-shadow:none;
  background:transparent;
  color:#d9e5ed;
  font-size:12px;
  line-height:1.2;
  font-family:inherit;
  font-weight:700;
  text-transform:none;
  letter-spacing:0;
  cursor:pointer;
  transition:background-color .14s ease,color .14s ease;
}
#header .airkit_header-style5.gw-h5-custom .crtv-appearance-options .crtv-theme-option[aria-pressed="true"] {
  background:#d11a3a;
  color:#fff;
}
#header .airkit_header-style5.gw-h5-custom .crtv-appearance-options .crtv-theme-option:focus-visible {
  outline:2px solid #fff;
  outline-offset:2px;
}
@media(hover:hover) and (pointer:fine){
  #header .airkit_header-style5.gw-h5-custom .crtv-appearance-options .crtv-theme-option:hover:not([aria-pressed="true"]) {
    background:#29475b;
    color:#fff;
  }
}
@media(max-width:480px){
  #header .airkit_header-style5.gw-h5-custom .airkit_sidebar-menu:not(.airkit_fullscreen-menu) .crtv-appearance-control{left:14px;right:14px;}
}

/* Palette globale tres circonscrite et sans effet en mode clair. */
html.crtv-theme-dark {
  color-scheme:dark;
  --crtv-night-bg:#101b27;
  --crtv-night-panel:#1b2b39;
  --crtv-night-panel-2:#223747;
  --crtv-night-ink:#eaf1f6;
  --crtv-night-muted:#b3c4d0;
  --crtv-night-border:#395062;
  --crtv-night-link:#a9cfeb;
}
html.crtv-theme-dark body,
html.crtv-theme-dark #wrapper,
html.crtv-theme-dark #main {
  background-color:var(--crtv-night-bg) !important;
  color:var(--crtv-night-ink) !important;
}
html.crtv-theme-dark #main :is(h1,h2,h3,h4,h5,h6),
html.crtv-theme-dark #main .post-title,
html.crtv-theme-dark #main .page-title,
html.crtv-theme-dark #main .archive-title,
html.crtv-theme-dark #main .entry-title {
  color:var(--crtv-night-ink);
}
/* Ne PAS repeindre les titres sur images, les cartes video sombres ou les pub. */
html.crtv-theme-dark #main :is(.post-content,.entry-content,.comment-content) {
  color:var(--crtv-night-ink);
}
html.crtv-theme-dark #main :is(.post-content,.comment-content) p,
html.crtv-theme-dark #main :is(.post-content,.comment-content) li {
  color:var(--crtv-night-ink);
}
html.crtv-theme-dark #main :is(.entry-meta,.entry-meta-date,.post-meta,.post-meta-author,.post-meta-date,.entry-date,time,.post-subtitle) {
  color:var(--crtv-night-muted);
}
html.crtv-theme-dark #main .post-content a:not(.button):not(.btn),
html.crtv-theme-dark #main .comment-content a:not(.button):not(.btn) {
  color:var(--crtv-night-link);
}
html.crtv-theme-dark #main :is(.post-footer,.post-related,.single-post-navigation) {
  border-color:var(--crtv-night-border);
}
/* Cartes de listes/archives : pas d'inversion sur les images et overlays. */
html.crtv-theme-dark #main article:not(.over-image):not(.below-image):not(.above-image) {
  border-color:var(--crtv-night-border);
}
html.crtv-theme-dark #main article:not(.over-image) .entry-excerpt,
html.crtv-theme-dark #main article:not(.over-image) .entry-meta {
  color:var(--crtv-night-muted);
}
/* Profils publics, tableau de bord utilisateur et formulaires */
html.crtv-theme-dark #main :is(.tszf-author-inside,.tszf-author-content,.tszf-profile,.tszf-form,.tszf-author-sort-posts,.airkit_frontend-forms),
html.crtv-theme-dark .airkit_frontend-dashboard .tszf-author-content {
  background-color:var(--crtv-night-bg);
  color:var(--crtv-night-ink);
}
html.crtv-theme-dark #main :is(.tszf-author-inside,.tszf-author-content,.tszf-profile,.tszf-form) :is(h1,h2,h3,h4,p,label) {
  color:var(--crtv-night-ink);
}
html.crtv-theme-dark #main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),textarea,select) {
  background-color:#203343;
  border-color:#4e6576;
  color:#f1f6f9;
}
html.crtv-theme-dark #main :is(input,textarea)::placeholder {color:#b5c6d2;opacity:1;}
html.crtv-theme-dark #main :is(.modal-content,.dropdown-menu,.popover-content,.tszf-author-tabs) {
  background-color:var(--crtv-night-panel);
  color:var(--crtv-night-ink);
  border-color:var(--crtv-night-border);
}
html.crtv-theme-dark #main .tszf-author-tabs .nav li > a {color:var(--crtv-night-ink);}
/* Menu de compte : auparavant force en blanc par TEST09, l'adapter lui aussi. */
html.crtv-theme-dark #header .airkit_header-style5.gw-h5-custom .user-element .user-dropdown {
  background:#203748 !important;
  border-color:#476477 !important;
  color:#edf4f9 !important;
}
html.crtv-theme-dark #header .airkit_header-style5.gw-h5-custom .user-element .user-dropdown .user-info,
html.crtv-theme-dark #header .airkit_header-style5.gw-h5-custom .user-element .user-dropdown .user-info .role,
html.crtv-theme-dark #header .airkit_header-style5.gw-h5-custom .user-element .user-dropdown .user-info a,
html.crtv-theme-dark #header .airkit_header-style5.gw-h5-custom .user-element .user-dropdown .user-menu li a,
html.crtv-theme-dark #header .airkit_header-style5.gw-h5-custom .user-element .user-dropdown .user-menu li a i {
  color:#edf4f9 !important;
}
html.crtv-theme-dark #header .airkit_header-style5.gw-h5-custom .user-element .user-dropdown .user-menu li a:hover,
html.crtv-theme-dark #header .airkit_header-style5.gw-h5-custom .user-element .user-dropdown .user-menu li a:focus-visible {
  background:#2d4a5c !important;
  color:#fff !important;
}

/* BE Mag GoWatch : ses couleurs sont isolees, donc override intentionnel. */
html.crtv-theme-dark .begm-root {
  --begm-ink:#edf4f9;
  --begm-soft:#b8c9d4;
  --begm-border:#3c5668;
  --begm-paper:#223a4b;
}
html.crtv-theme-dark .begm-root .begm-intro :is(h2,p,.begm-kicker),
html.crtv-theme-dark .begm-root .begm-parthead h3 {
  color:var(--begm-ink);
}
html.crtv-theme-dark .begm-root .begm-articles {
  background:#1e3647;
  border-color:#405a6c;
}
html.crtv-theme-dark .begm-root .begm-articles .begm-card {
  background:#243e50;
  border-color:#466175;
  box-shadow:none;
}
html.crtv-theme-dark .begm-root .begm-cardbody :is(h4,p,time),
html.crtv-theme-dark .begm-root .begm-more,
html.crtv-theme-dark .begm-root .begm-source,
html.crtv-theme-dark .begm-root .begm-newsitem :is(strong,time),
html.crtv-theme-dark .begm-root .begm-external {
  color:#eaf1f6;
}
html.crtv-theme-dark .begm-root .begm-cardbody :is(p,time),
html.crtv-theme-dark .begm-root .begm-newsitem time,
html.crtv-theme-dark .begm-root .begm-external {color:#becfda;}
html.crtv-theme-dark .begm-root .begm-news {
  background:#29323b;
  border-color:#495662;
}
html.crtv-theme-dark .begm-root .begm-newsitem {
  background:#303e49;
  border-color:#586b78;
  color:#f0f5fa !important;
}
html.crtv-theme-dark .begm-root button.begm-arrow {
  background:#263e50;
  border-color:#526c7d;
  color:#f3f7fa;
}
html.crtv-theme-dark .begm-root .begm-categories-label {color:#e9f2f7;}
/* La barre Rubriques reste bleu nuit et ses pastilles claires restent contrastees. */

/* BE Vidéos : garder les rubriques initialement SOMBRES, adapter les CLAIRES. */
html.crtv-theme-dark .begw-section.begw-responsive.begw-skin--clair {
  --begw-row-bg:#1e3444 !important;
  --begw-row-text:#edf4f9 !important;
  --begw-row-heading:#f4f7fa !important;
}
html.crtv-theme-dark .begw-section.begw-light {
  background-color:#1e3444;
  color:#edf4f9;
}
html.crtv-theme-dark .begw-section.begw-light .begw-card--fil {
  background:#253c4c;
  border-color:#455d6b;
}
html.crtv-theme-dark .begw-section.begw-responsive.begw-skin--clair .begw-card-title,
html.crtv-theme-dark .begw-section.begw-responsive.begw-skin--clair .begw-meta {
  color:#edf4f9 !important;
}

@media(prefers-reduced-motion:reduce){
  #header .airkit_header-style5.gw-h5-custom .crtv-appearance-options .crtv-theme-option{transition:none;}
}


/* CARP RUSH TV TEST38 : finitions du mode sombre pour l'accueil.
   Cause : le Layout Builder GoWatch imprime des background-color directement
   sur les rangées « site-section » et les colonnes, qui résistent au fond body.
   Ne modifier QUE les surfaces claires du constructeur ; les fonds de rangées
   sombres/rouges définis par l'utilisateur, images et publicités restent intacts.
   Zéro changement en mode clair. */

/* Barre « Explorer » / raccourcis : gris clair -> panneau sombre. */
html.crtv-theme-dark body.home .crtv-home-shortcuts {
  background:#1e3343 !important;
  color:#edf4f8 !important;
  border-color:#3b5567 !important;
  box-shadow:none;
}
html.crtv-theme-dark body.home .crtv-home-shortcuts .crtv-home-shortcuts__label {
  color:#d1e0e9 !important;
}
html.crtv-theme-dark body.home .crtv-home-shortcuts ul.crtv-home-shortcuts__list > li > a:focus-visible {
  outline-color:#dcebf4;
}

/* Les rangées claires du Layout Builder, dont les espaces des publicités :
   GoWatch encode exactement « background-color: <valeur> » en attribut style.
   On cible les valeurs blanches, jamais les couleurs arbitraires des rangées. */
html.crtv-theme-dark body.home #main .site-section:is(
  [style*="background-color: #fff" i],
  [style*="background-color: rgb(255" i],
  [style*="background-color: rgba(255" i],
  [style*="background-color: white" i],
  [style*="background-color: #fafafa" i],
  [style*="background-color: #f8f8f8" i],
  [style*="background-color: #f7f7f7" i]
) {
  background-color:var(--crtv-night-bg) !important;
}
/* Même cas pour les colonnes de GoWatch, sans toucher aux cartes ou vidéos. */
html.crtv-theme-dark body.home #main .site-section > .container > .row > [class*="col-"] > div:is(
  [style*="background-color: #fff" i],
  [style*="background-color: rgb(255" i],
  [style*="background-color: rgba(255" i],
  [style*="background-color: white" i],
  [style*="background-color: #fafafa" i],
  [style*="background-color: #f8f8f8" i],
  [style*="background-color: #f7f7f7" i]
),
html.crtv-theme-dark body.home #main .site-section > .row > [class*="col-"] > div:is(
  [style*="background-color: #fff" i],
  [style*="background-color: rgb(255" i],
  [style*="background-color: rgba(255" i],
  [style*="background-color: white" i],
  [style*="background-color: #fafafa" i],
  [style*="background-color: #f8f8f8" i],
  [style*="background-color: #f7f7f7" i]
) {
  background-color:var(--crtv-night-bg) !important;
}

/* Le conteneur du Mag garde la nuance nuit ; les cartes sont traitées
   séparément par les règles déjà présentes dans la TEST37. */
html.crtv-theme-dark body.home #main .begm-root {
  background:transparent !important;
  color:var(--crtv-night-ink);
}
html.crtv-theme-dark body.home #main .begm-root .begm-intro :is(h2,p,.begm-kicker) {
  color:var(--crtv-night-ink) !important;
}
html.crtv-theme-dark body.home #main .begm-root .begm-intro p {
  color:var(--crtv-night-muted) !important;
}
html.crtv-theme-dark body.home #main .begm-root .begm-categories-label {
  color:#e6f0f5 !important;
}
/* Espace avant le Mag moins massif, sans retirer la respiration du site. */
@media(max-width:700px){
  html.crtv-theme-dark body.home #main .begm-root {
    margin-top:12px;
    margin-bottom:22px;
  }
}


/* CARP RUSH TV TEST39 — contraste des fleches des rangees BE Videos en mode sombre.
   Les rangées qui étaient initialement claires (« Dernières vidéos », « Les plus vues »,
   Korda, Nash...) conservent des règles du plugin en bleu foncé, incompatibles avec
   le fond bleu nuit de la TEST37. Cela devient surtout visible apres un défilement,
   lorsque l'état :disabled de chaque flèche change.
   Ne jamais modifier disabled, display, les evenements JS ou les dimensions. */
html.crtv-theme-dark body.home .begw-section.begw-responsive.begw-skin--clair .begw-arrow,
html.crtv-theme-dark body.home .begw-section.begw-responsive.begw-skin--sombre .begw-arrow {
  color:#f1f7fb !important;
  border-color:rgba(207,228,241,.78) !important;
  background:rgba(219,238,248,.10) !important;
  opacity:1 !important;
}
html.crtv-theme-dark body.home .begw-section.begw-responsive.begw-skin--clair .begw-arrow:not(:disabled),
html.crtv-theme-dark body.home .begw-section.begw-responsive.begw-skin--sombre .begw-arrow:not(:disabled) {
  color:#f1f7fb !important;
  border-color:rgba(207,228,241,.78) !important;
  background:rgba(219,238,248,.10) !important;
  opacity:1 !important;
}
/* Une flèche temporairement indisponible reste identifiable sans simuler un lien actif. */
html.crtv-theme-dark body.home .begw-section.begw-responsive.begw-skin--clair .begw-arrow:disabled,
html.crtv-theme-dark body.home .begw-section.begw-responsive.begw-skin--sombre .begw-arrow:disabled {
  color:#b8cbd9 !important;
  border-color:rgba(184,203,217,.44) !important;
  background:rgba(184,203,217,.05) !important;
  opacity:.52 !important;
  cursor:default;
}
@media(hover:hover) and (pointer:fine){
  html.crtv-theme-dark body.home .begw-section.begw-responsive.begw-skin--clair .begw-arrow:hover:not(:disabled),
  html.crtv-theme-dark body.home .begw-section.begw-responsive.begw-skin--sombre .begw-arrow:hover:not(:disabled) {
    color:#fff !important;
    border-color:#ff8498 !important;
    background:rgba(210,27,59,.22) !important;
  }
}
/* Les liens « Tout voir » des rangées anciennement claires doivent aussi
   rester lisibles lorsque leur fond devient bleu nuit. */
html.crtv-theme-dark body.home .begw-section.begw-responsive.begw-skin--clair .begw-more,
html.crtv-theme-dark body.home .begw-section.begw-responsive.begw-skin--sombre .begw-more {
  color:#ff9eaf !important;
}


/* CARP RUSH TV TEST40 : fiches video et articles en mode sombre.
   Pas de changement en mode clair. Categories rouges, images, play/pause,
   carrousels et fonctionnalites JS conserves. */

/* Mots-cles : l'ancien theme impose du texte bleu/noir transparent sur
   une pastille gris sombre, invisible sur la palette bleu nuit. */
html.crtv-theme-dark body:is(.single-video,.single-post) .single-post-tags h5 {
  color:#d9e6ee !important;
  border-color:#567084 !important;
  background:rgba(255,255,255,.04);
}
html.crtv-theme-dark body:is(.single-video,.single-post) .single-post-tags .tags-container a[rel="tag"] {
  color:#eaf2f7 !important;
  background:#253b4d !important;
  border:1px solid #445d70 !important;
  text-decoration:none;
  opacity:1 !important;
}
@media(hover:hover) and (pointer:fine){
  html.crtv-theme-dark body:is(.single-video,.single-post) .single-post-tags .tags-container a[rel="tag"]:hover {
    color:#fff !important;
    border-color:#ed5874 !important;
    background:#344f64 !important;
  }
}

/* Suggestions sous les fiches : couleur du titre heritee du mode clair. */
html.crtv-theme-dark body:is(.single-video,.single-post) .post-related :is(.entry-title,.entry-title a,.post-title,.post-title a) {
  color:#f1f6fa !important;
}
@media(hover:hover) and (pointer:fine){
  html.crtv-theme-dark body:is(.single-video,.single-post) .post-related :is(.entry-title,.post-title) a:hover {
    color:#ff9bb0 !important;
  }
}
html.crtv-theme-dark body:is(.single-video,.single-post) .post-related .entry-excerpt,
html.crtv-theme-dark body:is(.single-video,.single-post) .post-related .entry-meta-date {
  color:#c0d0db !important;
}
html.crtv-theme-dark body:is(.single-video,.single-post) .post-related .arrows-above.carousel-wrapper ul.carousel-nav > li {
  background:#274052 !important;
  color:#edf5fa !important;
  border:1px solid #526b7b !important;
  border-radius:7px;
  box-shadow:none !important;
}
html.crtv-theme-dark body:is(.single-video,.single-post) .post-related .arrows-above.carousel-wrapper ul.carousel-nav > li.slick-disabled {
  color:#b8cbd6 !important;
  opacity:.48;
}
@media(hover:hover) and (pointer:fine){
  html.crtv-theme-dark body:is(.single-video,.single-post) .post-related .arrows-above.carousel-wrapper ul.carousel-nav > li:hover:not(.slick-disabled) {
    color:#fff !important;
    border-color:#ff9daf !important;
    background:#345369 !important;
  }
}

/* Popover du partage : en mode sombre, le fond clair du popover historique
   n'etait pas adapte. La croix est reutilisee depuis la TEST12. */
html.crtv-theme-dark body:is(.single-video,.single-post) .post-meta-actions .tooltip-sharing .airkit_sharing .popover {
  background:#243b4c !important;
  border:1px solid #537082 !important;
  color:#edf5fa !important;
  box-shadow:0 8px 25px rgba(0,0,0,.35);
}
html.crtv-theme-dark body:is(.single-video,.single-post) .post-meta-actions .popover-content,
html.crtv-theme-dark body:is(.single-video,.single-post) .post-meta-actions .popover-content .entry-meta-description,
html.crtv-theme-dark body:is(.single-video,.single-post) .post-meta-actions .popover-content-footer a {
  color:#edf5fa !important;
}
html.crtv-theme-dark body:is(.single-video,.single-post) .post-meta-actions .popover-content-footer {
  border-color:#4d6779 !important;
}
html.crtv-theme-dark body:is(.single-video,.single-post) .post-meta-actions .carprush-share-close {
  background:#334e61;
  border-color:#6b8494;
  color:#fff;
}
html.crtv-theme-dark body:is(.single-video,.single-post) .post-meta-actions .popover-content-footer textarea {
  color:#edf5fa;
  background:#142b3b;
  border-color:#4f6a7c;
}

/* Selection de playlists : la fenetre est en dehors de #main, donc les
   regles globales des formulaires n'y etaient pas toujours appliquees. */
html.crtv-theme-dark #add-to-playlist-modal .modal-content,
html.crtv-theme-dark #add-to-playlist-modal .modal-header,
html.crtv-theme-dark #add-to-playlist-modal .modal-body,
html.crtv-theme-dark #add-to-playlist-modal .modal-footer {
  background:#203747 !important;
  border-color:#476174 !important;
  color:#edf5fa !important;
}
html.crtv-theme-dark #add-to-playlist-modal :is(h3,h4,h5,label,p,.modal-title,.modal-header,.modal-body,.modal-footer) {
  color:#edf5fa !important;
}
html.crtv-theme-dark #add-to-playlist-modal .modal-content .close {
  color:#f4f7fa !important;
  opacity:1;
  text-shadow:none;
}
html.crtv-theme-dark #add-to-playlist-modal .modal-body ul li label,
html.crtv-theme-dark #add-to-playlist-modal #create-playlist-form > label {
  color:#edf5fa !important;
  opacity:1;
}
html.crtv-theme-dark #add-to-playlist-modal .crtv-playlist-guide,
html.crtv-theme-dark #add-to-playlist-modal .modal-body li.active,
html.crtv-theme-dark #add-to-playlist-modal span[aria-response] {
  background:#2b475a !important;
  border-color:#516b7c !important;
  color:#eaf3f8 !important;
}
html.crtv-theme-dark #add-to-playlist-modal #create-playlist-form > input {
  background:#122939 !important;
  border-color:#607b8b !important;
  color:#fff !important;
}
html.crtv-theme-dark #add-to-playlist-modal #create-playlist-form > input::placeholder {
  color:#c0cfda;
}
html.crtv-theme-dark #add-to-playlist-modal #create-playlist-form > button {
  color:#f6f8fa !important;
}


/* CARP RUSH TV TEST41 — Pages internes, sommaires et categories.
   UNIQUEMENT mode sombre; les images et le mode clair conservent leur rendu.
   Les titres du Layout Builder comportent parfois des couleurs INLINE noires,
   donc ces styles doivent avoir une priorite explicite mais rester cibles. */
html.crtv-theme-dark body.page #main .block-title .block-title-container > :is(h1,h2,h3,h4,h5,h6),
html.crtv-theme-dark body.page #main .block-title .block-title-container > :is(h1,h2,h3,h4,h5,h6) a {
  color:#edf5fa !important;
}
/* Sous-titres volontairement rouges / roses inchanges; ceux definis en noir
   dans le Builder deviennent lisibles. */
html.crtv-theme-dark body.page #main .block-title-description:is(
 [style*="color: #000" i], [style*="color:#000" i],
 [style*="color: rgb(0" i], [style*="color: rgba(0" i],
 [style*="color: black" i]
) {color:#becfda !important;}
html.crtv-theme-dark body.page #main .site-section :is(h1,h2,h3,h4,h5,h6)[style*="color: #000" i],
html.crtv-theme-dark body.page #main .site-section :is(h1,h2,h3,h4,h5,h6)[style*="color:#000" i],
html.crtv-theme-dark body.page #main .site-section :is(h1,h2,h3,h4,h5,h6)[style*="color: rgb(0" i],
html.crtv-theme-dark body.page #main .site-section :is(h1,h2,h3,h4,h5,h6)[style*="color: rgba(0" i] {
 color:#edf5fa !important;
}
/* Couleur de texte sans inline : utilisee par plusieurs widgets anciens. */
html.crtv-theme-dark body.page #main .airkit_widget :is(.widget-title,.block-title),
html.crtv-theme-dark body.page #main :is(.airkit-archive-title,.airkit-archive-content > h1,.airkit-archive-content > h2) {
  color:#edf5fa !important;
}
/* Le constructeur imprime des fonds et des bordures blancs sur les pages
   sommaire / categories / a l'affiche. Seules les rangées dont la couleur
   inline est explicitement blanche sont harmonisees. */
html.crtv-theme-dark body.page #main .site-section:is(
 [style*="background-color: #fff" i],
 [style*="background-color: rgb(255" i],
 [style*="background-color: rgba(255" i],
 [style*="background-color: white" i],
 [style*="background-color: #fafafa" i],
 [style*="background-color: #f7f7f7" i]
) {background-color:var(--crtv-night-bg) !important;}
html.crtv-theme-dark body.page #main :is(.site-section,.block-title,.block-title-container) {
 border-color:var(--crtv-night-border);
}
/* Interne: ne pas changer les logos, miniatures et panneaux volontairement
   clairs dans le moteur de recherche (lisibles en texte fonce). */


/* CARP RUSH TV TEST42 – trois pages internes + retour en haut.
 * Tous les correctifs sont actifs UNIQUEMENT sous html.crtv-theme-dark.
 * Aucune modification de la mise en page, du mode clair ou du contenu WP.
 */

/* Le bouton GoWatch a une surface blanche fixe et une fleche heritant du
 * texte clair : la fleche etait donc invisible en theme sombre. */
html.crtv-theme-dark #airkit_back-to-top {
    background-color:#263e50 !important;
    color:#f4f8fc !important;
    border:1px solid #6c8798 !important;
    box-shadow:0 3px 12px rgba(0,0,0,.34) !important;
    opacity:.96;
}
html.crtv-theme-dark #airkit_back-to-top .icon-up,
html.crtv-theme-dark #airkit_back-to-top .icon-up::before {
    color:#f4f8fc !important;
    opacity:1 !important;
}
html.crtv-theme-dark #airkit_back-to-top:hover,
html.crtv-theme-dark #airkit_back-to-top:focus-visible {
    background-color:#b90a30 !important;
    border-color:#f5a7b9 !important;
    color:#fff !important;
    opacity:1;
}
html.crtv-theme-dark #airkit_back-to-top:focus-visible {
    outline:2px solid #fff !important;
    outline-offset:3px;
}

/* À L'AFFICHE : titres de vignettes et boutons auparavant noirs sur bleu nuit.
 * Pas de retouche des vignettes en surimpression, ni des miniatures. */
html.crtv-theme-dark body.crtv-page-featured #main article:not(.over-image) :is(.entry-title,.entry-title a,.post-title,.post-title a) {
    color:#eff5fa !important;
}
html.crtv-theme-dark body.crtv-page-featured #main article :is(.entry-excerpt,.entry-meta,.entry-meta-date,time) {
    color:#bbccda !important;
}
html.crtv-theme-dark body.crtv-page-featured #main article .entry-categories a {
    color:#ff97ad !important;
}
html.crtv-theme-dark body.crtv-page-featured #main article .read-more {
    color:#ffd7e0 !important;
    background:rgba(199,21,55,.14) !important;
    border:1px solid #d84c70 !important;
    border-radius:4px;
    text-decoration:none !important;
}
@media(hover:hover) and (pointer:fine) {
    html.crtv-theme-dark body.crtv-page-featured #main article .read-more:hover {
        color:#fff !important;
        background:#b90a30 !important;
        border-color:#ed7d96 !important;
    }
}
html.crtv-theme-dark body.crtv-page-featured #main .carousel-wrapper ul.carousel-nav > li {
    background:#284252 !important;
    color:#f0f6fa !important;
    border:1px solid #648093 !important;
    box-shadow:none !important;
}
html.crtv-theme-dark body.crtv-page-featured #main .carousel-wrapper ul.carousel-nav > li :is(i,span),
html.crtv-theme-dark body.crtv-page-featured #main .carousel-wrapper ul.carousel-nav > li :is(i,span)::before {
    color:#f0f6fa !important;
}
html.crtv-theme-dark body.crtv-page-featured #main .carousel-wrapper ul.carousel-nav > li.slick-disabled {
    opacity:.5;
}
html.crtv-theme-dark body.crtv-page-featured #main article .entry-content-footer {
    border-color:#455d6c !important;
}

/* CONNEXION/INSCRIPTION : le panneau blanc provient de .form-container::before
 * sur PC et du background .form-container sur mobile. Le champ sombre etait
 * deja present, rendant la superposition illisible. Conserver les transitions. */
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container,
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container::before {
    background:#203444 !important;
    color:#eaf2f7 !important;
}
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container::before {
    box-shadow:0 10px 24px rgba(0,0,0,.25) !important;
}
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container :is(.form-title,h3,h4,.tszf-label label,.forgetmenot label,.tszf-description) {
    color:#eff5fa !important;
}
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-title::after {
    background:rgba(227,242,250,.21) !important;
}
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container :is(input[type="text"],input[type="email"],input[type="password"],input[type="number"],textarea) {
    background:#142b3a !important;
    border-color:#577084 !important;
    color:#f8fbfd !important;
}
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container input::placeholder {
    color:#b8cedb !important;
}
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container a:not(.toggle-form) {
    color:#ffa7ba !important;
}
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container .tszf-error {
    color:#ffdbe4 !important;
}
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container .tszf-error a {
    color:#ffc2cf !important;
}

/* QUI SOMMES-NOUS : trois anciens blocs de demonstration blancs du Builder
 * (Icon Box), placés sur une grande rangée gris clair. Conserver les icônes,
 * les liens et les animations ; changer uniquement leurs surfaces et textes. */
html.crtv-theme-dark body.crtv-page-about #main .site-section:has(.airkit_icon-box) {
    background-color:#182b3a !important;
}
html.crtv-theme-dark body.crtv-page-about #main .airkit_icon-box figure {
    background:#243b4b !important;
    border:1px solid #4b697c !important;
    box-shadow:none !important;
    color:#eaf3f8 !important;
}
html.crtv-theme-dark body.crtv-page-about #main .airkit_icon-box :is(.title,.title a,figcaption,p,figure header>i) {
    color:#eaf3f8 !important;
}
html.crtv-theme-dark body.crtv-page-about #main .airkit_icon-box figure header>i {
    color:#fa7795 !important;
}
html.crtv-theme-dark body.crtv-page-about #main .airkit_icon-box figure :is(p,figcaption) {
    color:#c4d3dd !important;
}
html.crtv-theme-dark body.crtv-page-about #main .site-section:has(.airkit_icon-box) :is(h2,h3) {
    color:#edf5fa !important;
}


/* CARP RUSH TV TEST43 : retouches appliquees exclusivement en mode sombre.
   Aucun changement du mode clair ni des actions des formulaires. */

/* Connexion sur grand ecran : le formulaire interne conservait un panneau
   plus sombre qui s'arretait au champ mot de passe. Harmoniser les deux
   surfaces et redonner de l'espace aux options sous le champ. */
@media (min-width:1200px) {
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.login-form.active {
    padding-bottom:76px !important;
    min-height:470px;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.login-form .tszf-login-form,
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.login-form ul.tszf-form,
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.login-form #tszf-login-form {
    background:transparent !important;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.login-form ul.tszf-form {
    display:flow-root;
    padding-bottom:12px;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.login-form #tszf-user_pass {
    margin-bottom:12px;
  }
}

/* Qui sommes-nous ? : le texte libre du constructeur (sous le slogan)
   conservait des couleurs noires dans ses paragraphes imbriques. Ne pas
   toucher aux titres rouges des widgets ni aux contenus des autres pages. */
html.crtv-theme-dark body.crtv-page-about #main .text-element {
  color:#edf4f9 !important;
}
html.crtv-theme-dark body.crtv-page-about #main .text-element :is(p,span,strong,em,li,h2,h3,h4,h5,h6) {
  color:#edf4f9 !important;
}
html.crtv-theme-dark body.crtv-page-about #main .text-element a {
  color:#ff9caf !important;
}


/* CARP RUSH TV TEST44 - detail formulaire inscription + pages A-Z.
   Retouches limitees au mode SOMBRE : le mode clair garde son rendu. */

/* Sur PC, le formulaire d'inscription est en position absolue. La taille
   minimale historique du conteneur parent est de 500px, insuffisante apres
   l'ajout du captcha et des champs de confirmation : la zone d'action se
   retrouve trop pres du bas. Reserver la hauteur dans la mise en page, sans
   bloquer la hauteur du formulaire, ni toucher au formulaire mobile. */
@media (min-width:1200px) {
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page:has(.form-container.register-form.active) {
    min-height:820px !important;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active {
    min-height:710px !important;
    height:auto !important;
    justify-content:flex-start;
    padding-bottom:74px !important;
    overflow:visible;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active :is(.tszf-submit,.submit) {
    margin-top:16px;
    margin-bottom:20px;
    padding-bottom:12px;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active :is(input[type="submit"],button[type="submit"]) {
    position:relative;
    z-index:1;
  }
}

/* Les textes descriptifs de ces pages d'index proviennent de l'ancien
   Layout Builder. Certains paragraphes restent noirs en mode sombre. On
   limite la correction aux pages identifiees, aux blocs de texte, en
   conservant le rose des liens et les images/logos des marques. */
html.crtv-theme-dark body:is(.crtv-page-brand-tags,.crtv-page-brand-hub) #main :is(.text-element,.airkit_text-element,.airkit_text) {
  color:#eaf3f9 !important;
}
html.crtv-theme-dark body:is(.crtv-page-brand-tags,.crtv-page-brand-hub) #main :is(.text-element,.airkit_text-element,.airkit_text) :is(p,span,strong,em,li,h2,h3,h4) {
  color:#eaf3f9 !important;
}
html.crtv-theme-dark body:is(.crtv-page-brand-tags,.crtv-page-brand-hub) #main :is(.text-element,.airkit_text-element,.airkit_text) a {
  color:#ff9aaf !important;
}
/* Sous-titres de presentation explicitement noirs dans les reglages du
   constructeur, hors blocs de logo et miniatures. */
html.crtv-theme-dark body:is(.crtv-page-brand-tags,.crtv-page-brand-hub) #main .site-section p:is([style*="color: #000" i],[style*="color:#000" i],[style*="color: rgb(0" i],[style*="color: black" i]) {
  color:#eaf3f9 !important;
}


/* CARP RUSH TV TEST45 : inscription allegée et galeries de logos en sombre. */
/* L'inscription : retirer les DEUX rectangles sombres superposes.
   Ne jamais toucher au panneau connexion, que le client a valide. */
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form,
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active,
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form form.tszf-form-add,
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form ul.tszf-form {
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  border-color:transparent !important;
}
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form::before,
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active::before {
  display:none !important;
  content:none !important;
  box-shadow:none !important;
}
/* Ni l'inscription ni le captcha ne doivent etre coupes sous le formulaire. */
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active {
  overflow:visible !important;
}

/* Captcha fourni par register_form : meme alignement Bootstrap que les autres
   champs. S'applique en CLAIR et SOMBRE, sans changer le calcul ni sa validation. */
body.crtv-page-auth #main .airkit_register-page .register-form .crtv-register-extra {
  clear:both;
  list-style:none;
  width:100%;
  box-sizing:border-box;
  padding-left:20px;/* TEST46 : alignement de l'intitule sur les champs natifs */
  padding-right:15px;
  margin:4px 0 18px;
}
body.crtv-page-auth #main .airkit_register-page .register-form .crtv-register-extra > :first-child {
  margin-left:0 !important;
}
body.crtv-page-auth #main .airkit_register-page .register-form .crtv-register-extra :is(input[type="text"],input[type="number"]) {
  display:inline-block !important;
  vertical-align:middle;
  width:70px !important;
  max-width:100%;
  height:38px;
  line-height:38px;
  margin:0 5px;
  text-align:center;
}
html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .register-form .crtv-register-extra {
  color:#eaf3f9;
}

/* Galeries de logos : fond blanc casse individuel, UNIQUEMENT en mode sombre
   dans les trois pages demandees, pas les vignettes des videos ni le A-Z. */
html.crtv-theme-dark body.crtv-page-logo-gallery #main .ts-clients-view .item > div > a {
  background:#f9fafc !important;
  border-radius:12px;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
  border:1px solid #d7e1e8;
  box-sizing:border-box;
}
html.crtv-theme-dark body.crtv-page-logo-gallery #main .ts-clients-view .item > div > a {
  min-height:108px;
  padding:12px;
  display:flex;
  justify-content:center;
  align-items:center;
}
html.crtv-theme-dark body.crtv-page-logo-gallery #main .ts-clients-view .item img {
  max-height:102px;
  max-width:100%;
  width:auto;
  height:auto;
  object-fit:contain;
}
/* Certains blocs de logos anciens sont des images du Layout Builder liees aux
   tags et non un element Clients. La selection reste strictement limitee
   aux images CLiquables vers les archives de tags. */
html.crtv-theme-dark body.crtv-page-logo-gallery #main .content-block a:is([href*="/tag/"],[href*="/tags/"],[href*="?tag="]):has(img) {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  vertical-align:middle;
  max-width:100%;
  min-height:104px;
  padding:14px 18px;
  margin:5px;
  background:#f9fafc !important;
  border:1px solid #d7e1e8;
  border-radius:12px;
  box-shadow:0 2px 9px rgba(0,0,0,.13);
  box-sizing:border-box;
}
html.crtv-theme-dark body.crtv-page-logo-gallery #main .content-block a:is([href*="/tag/"],[href*="/tags/"],[href*="?tag="]):has(img) img {
  display:block;
  width:auto;
  max-width:100%;
  max-height:110px;
  height:auto;
  object-fit:contain;
}
@media(max-width:767px) {
  html.crtv-theme-dark body.crtv-page-logo-gallery #main .ts-clients-view .item > div > a,
  html.crtv-theme-dark body.crtv-page-logo-gallery #main .content-block a:is([href*="/tag/"],[href*="/tags/"],[href*="?tag="]):has(img) {
    min-height:85px;
    padding:10px;
  }
}


/* CARP RUSH TV TEST46 — correctif de securite visuelle du panneau inscription.
   Le formulaire actif de GoWatch est superpose en position absolue sur PC.
   TEST45 a rendu son fond transparent ET masque son ecran ::before : les
   éléments en dessous réapparaissaient. Ne pas toucher a Connexion ni mobile. */
@media (min-width:1200px) {
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active {
    /* Meme surface que le fond global : l'ecran n'a plus l'air d'un bloc pose. */
    background:var(--crtv-night-bg, #101b27) !important;
    box-shadow:none !important;
    position:absolute;
    isolation:isolate;
    z-index:3;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active::before {
    /* Retablir le cache qui protege le formulaire de l'ancien panneau. */
    content:'' !important;
    display:block !important;
    position:absolute;
    inset:0;
    background:var(--crtv-night-bg, #101b27) !important;
    box-shadow:none !important;
    border:0 !important;
    opacity:1;
    animation:none !important;
    -webkit-animation:none !important;
    z-index:0;
    pointer-events:none;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active > .inside,
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active > div,
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.register-form.active > form {
    position:relative;
    z-index:1;
  }
}


/* CARP RUSH TV TEST48 — transition INSCRIPTION -> CONNEXION en mode sombre.
 * Sur grand ecran, le script historique GoWatch donne a chacun des deux
 * panneaux la hauteur du formulaire actif au chargement. Apres passage de
 * l'inscription (haute) a la connexion (courte), la hauteur en pixels reste
 * sur la connexion et son fond se prolonge jusque dans le footer Chrome.
 * Les dimensions et l'animation ne sont donc corrigees QUE sur la page
 * d'authentification, en mode sombre et sur PC. Mode clair intact. */
@media (min-width:1200px) {
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.login-form {
    /* Neutralise la hauteur inline heritee de l'inscription longue. */
    height:auto !important;
    min-height:450px;
    max-height:none !important;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.login-form .mCustomScrollBox {
    /* GoWatch/mCustomScrollbar pouvait conserver lui aussi l'ancienne hauteur. */
    height:auto !important;
    max-height:none !important;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.login-form.active:not(.visible)::before {
    /* Supprime le rebond du masque sous Chrome ; la bascule reste immediate. */
    animation:none !important;
    -webkit-animation:none !important;
    transform:none !important;
    -webkit-transform:none !important;
  }
  html.crtv-theme-dark body.crtv-page-auth #main .airkit_register-page .form-container.login-form::before {
    transition:none !important;
    -webkit-transition:none !important;
  }
}

/* CARP RUSH TV TEST52 — chiffres des statistiques du profil, mode sombre uniquement. */
html.crtv-theme-dark .airkit_frontend-dashboard .tszf-author .author-stats > li > strong {
  color: #f2f7fc !important;
}


/* CARP RUSH TV TEST53 : titres de sections du formulaire de profil (capture mode sombre).
 * Nom, Contact, A propos, Medias et Reseaux sociaux sont tous des <legend>.
 * Aucun effet en mode clair, ni sur les champs ou les fonctions du profil. */
html.crtv-theme-dark #main.airkit_frontend-dashboard .tszf-profile fieldset > legend {
  color:#eef5fb !important;
  opacity:1 !important;
  font-weight:650;
}
