/* CE Apparence — mode nuit. Actif quand <html data-theme="dark">. */
html[data-theme="dark"]{color-scheme:dark}
html[data-theme="dark"]:root{
--ce-bleu:#A5C0FF;--ce-bleu-fonce:#B5CBFF;--ce-nuit:#F2F5FB;--ce-nuit-fond:#17477F;--ce-clair:#1F5492;--ce-ligne:#3A6CAA;--ce-gris:#B4C4DE;--ce-iris:#95B2DC;--ce-encre:#F2F5FB;
--theme-palette-color-1:#A5C0FF;--theme-palette-color-2:#B5CBFF;--theme-palette-color-3:#F2F5FB;--theme-palette-color-4:#D5E0F2;--theme-palette-color-5:#3A6CAA;--theme-palette-color-6:#1F5492;--theme-palette-color-7:#17477F;--theme-palette-color-8:#95B2DC;
--theme-text-color:#D5E0F2;--theme-headings-color:#F2F5FB;--theme-link-initial-color:#A5C0FF;--theme-link-hover-color:#B5CBFF;--theme-border-color:#3A6CAA;
--theme-button-background-initial-color:#2F5BFF;--theme-button-background-hover-color:#4A72FF;--theme-button-text-initial-color:#FFFFFF;--theme-button-text-hover-color:#FFFFFF;
--theme-form-text-initial-color:#F2F5FB;--theme-form-text-focus-color:#FFFFFF;--theme-form-field-border-initial-color:#5C87BE;--theme-form-field-border-focus-color:#A5C0FF;--theme-form-field-background-initial-color:#1F5492;--theme-form-field-background-focus-color:#1F5492;
--wp--preset--color--ce-bleu:#A5C0FF;--wp--preset--color--ce-bleu-fonce:#B5CBFF;--wp--preset--color--ce-nuit:#F2F5FB;--wp--preset--color--ce-gris:#B4C4DE;--wp--preset--color--ce-ligne:#3A6CAA;--wp--preset--color--ce-clair:#1F5492;--wp--preset--color--ce-encre:#F2F5FB}
html[data-theme="dark"] body{background-color:#17477F;color:#D5E0F2}

/* En-tete, menu, pied de page */
html[data-theme="dark"]:root .ct-header [data-row]{background-color:#17477F !important;border-bottom-color:#3A6CAA}
html[data-theme="dark"]:root .ct-header{--theme-icon-color:#E6ECF8;--theme-icon-hover-color:#A5C0FF}
html[data-theme="dark"]:root .ct-header [data-id="menu"]>ul>li>a{--theme-link-initial-color:#E6ECF8;--theme-link-hover-color:#A5C0FF;--theme-link-active-color:#A5C0FF}
html[data-theme="dark"]:root .ct-header [data-id="menu"] .sub-menu{--dropdown-background-color:#1F5492;--dropdown-background-hover-color:#265C9C;--dropdown-divider:1px solid #3A6CAA;background-color:#1F5492 !important;border-color:#3A6CAA}
html[data-theme="dark"]:root .ct-header [data-id="menu"] .sub-menu .ct-menu-link{--theme-link-initial-color:#E6ECF8;--theme-link-hover-color:#A5C0FF;--theme-link-active-color:#A5C0FF;color:#E6ECF8 !important}
html[data-theme="dark"]:root .ct-header [data-id="menu"] .sub-menu li:hover>.ct-menu-link,html[data-theme="dark"]:root .ct-header [data-id="menu"] .sub-menu .ct-menu-link:hover{color:#A5C0FF !important;background-color:#265C9C !important}
/* Logo : version nuit (texte et flèche en blanc, blanc de l'œil en bleu) à la place de l'image claire */
html[data-theme="dark"] .site-logo-container{background:url(logo-nuit.png) left center/contain no-repeat}
html[data-theme="dark"] .site-logo-container img{opacity:0}
html[data-theme="dark"] .ct-footer [data-row]{background-color:#103763 !important;border-color:#3A6CAA !important;color:#B4C4DE}
html[data-theme="dark"] .ct-panel .ct-panel-inner,html[data-theme="dark"] #search-modal{background-color:#17477F}

/* Boutons, formulaires, code */
html[data-theme="dark"] .wp-block-button__link,html[data-theme="dark"] .wp-element-button,html[data-theme="dark"] .entry-content button[type="submit"]{background-color:#2F5BFF;color:#FFFFFF}
html[data-theme="dark"] .wp-block-button__link:hover,html[data-theme="dark"] .wp-element-button:hover{background-color:#4A72FF;color:#FFFFFF}
html[data-theme="dark"] .ce-btn-primary{background-color:#2F5BFF;border-color:#2F5BFF}
html[data-theme="dark"] .is-style-outline>.wp-block-button__link{background-color:transparent;color:#E6ECF8;border-color:#5C87BE}
html[data-theme="dark"] .entry-content input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),html[data-theme="dark"] .entry-content textarea,html[data-theme="dark"] .entry-content select{background-color:#1F5492;color:#F2F5FB;border-color:#5C87BE}
html[data-theme="dark"] .wp-block-code,html[data-theme="dark"] .entry-content pre{background-color:#1F5492;color:#E6ECF8;border-color:#3A6CAA}
html[data-theme="dark"] .entry-content code{color:#E6ECF8}
html[data-theme="dark"] .ce-meta-bar span{background:#265C9C;color:#D5E0F2}
html[data-theme="dark"] .ce-seal circle,html[data-theme="dark"] .ce-seal path{stroke:#A5C0FF}

/* Accueil */
html[data-theme="dark"] .cx{background:#17477F;color:#D5E0F2}
html[data-theme="dark"] .cx h1,html[data-theme="dark"] .cx h2,html[data-theme="dark"] .cx h3{color:#F2F5FB}
html[data-theme="dark"] .cx-line{border-top-color:#3A6CAA}
html[data-theme="dark"] .cx-alt{background:#1B4D88}
html[data-theme="dark"] .cx-eyebrow{color:#A5C0FF}
html[data-theme="dark"] .cx-head p a{color:#A5C0FF}
html[data-theme="dark"] .cx-btn{background:#2F5BFF;border-color:#2F5BFF}
html[data-theme="dark"] .cx-btn:hover{background:#4A72FF;border-color:#4A72FF}
html[data-theme="dark"] .cx-btn--ghost{background:transparent;color:#F2F5FB !important;border-color:#5C87BE}
html[data-theme="dark"] .cx-btn--ghost:hover{background:#265C9C;border-color:#A5C0FF}
html[data-theme="dark"] .cx-hero-text h1 em{color:#A5C0FF}
html[data-theme="dark"] .cx-pipe{background:#1F5492}
html[data-theme="dark"] .cx-step b{color:#F2F5FB}
html[data-theme="dark"] .cx-step small{color:#B4C4DE}
html[data-theme="dark"] .cx-dot{background:#17477F;color:#A5C0FF}
html[data-theme="dark"] .cx-dot svg circle{fill:#17477F}
html[data-theme="dark"] .cx-dot--on{background:#2F5BFF;color:#FFFFFF}
html[data-theme="dark"] .cx-pipe .cx-dot{animation-name:cx-on-nuit}
@media (prefers-reduced-motion:no-preference){html[data-theme="dark"] .cx-pipe .cx-dot.cx-dot--on{background:#17477F;color:#A5C0FF}}
html[data-theme="dark"] .cx-link{background:#5C87BE}
html[data-theme="dark"] .cx-pipe .cx-link::after{background:#A5C0FF}
@keyframes cx-on-nuit{0%,22%{background:#2F5BFF;color:#FFFFFF;box-shadow:0 0 0 6px rgba(143,176,255,.18)}32%,100%{background:#17477F;color:#A5C0FF;box-shadow:0 0 0 0 rgba(143,176,255,0)}}
html[data-theme="dark"] .cx-card{background:#1F5492;border-color:#3A6CAA}
html[data-theme="dark"] .cx-num{color:#A5C0FF}
html[data-theme="dark"] .cx h3 a:hover{color:#A5C0FF}
html[data-theme="dark"] .cx-tags span{background:#265C9C;color:#D5E0F2}
html[data-theme="dark"] .cx-list{background:#1F5492}
html[data-theme="dark"] .cx-row{border-bottom-color:#3A6CAA}
html[data-theme="dark"] .cx-row-num{color:#7C9DCB}
html[data-theme="dark"] .cx-row:first-child .cx-row-num{color:#A5C0FF}
html[data-theme="dark"] .cx-badge{background:#2F5BFF}
html[data-theme="dark"] .cx-meta{color:#B4C4DE}
html[data-theme="dark"] .cx-col{border-top-color:#E6ECF8}
html[data-theme="dark"] .cx-blue{background:#103763;color:#E3EBFA}
html[data-theme="dark"] .cx-blue .cx-eyebrow{color:#C4D6F2}
html[data-theme="dark"] .cx-blue .cx-col{border-top-color:rgba(255,255,255,.35)}
html[data-theme="dark"] .cx-assist{background:#1F5492}
html[data-theme="dark"] .cx-os a{background:#17477F;border-color:#3A6CAA;color:#F2F5FB}
html[data-theme="dark"] .cx-os a:hover{border-color:#A5C0FF;color:#A5C0FF}
html[data-theme="dark"] .cx-os a span{color:#B4C4DE}
html[data-theme="dark"] .cx .wp-block-post .ce-post{background:#1F5492}
html[data-theme="dark"] .cx .ce-post .wp-block-post-date{color:#A5C0FF}
html[data-theme="dark"] .cx .ce-post .wp-block-post-excerpt{color:#D5E0F2}
html[data-theme="dark"] .cx-cta{background:#225796}
html[data-theme="dark"] .cx-cta p{color:#D5E0F2}

/* Bouton jour / nuit */
.ce-theme-toggle{appearance:none;-webkit-appearance:none;width:44px;height:44px;flex:none;display:inline-flex;align-items:center;justify-content:center;margin-left:12px;padding:0;border:1px solid #DCE5F3;border-radius:50%;background:transparent;color:#0B1533;cursor:pointer;transition:border-color .15s,color .15s}
.ce-theme-toggle:hover{border-color:#002BB4;color:#002BB4}
.ce-theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ce-theme-toggle .ce-moon{display:block}
.ce-theme-toggle .ce-sun{display:none}
html[data-theme="dark"] .ce-theme-toggle{border-color:#5C87BE;color:#E6ECF8}
html[data-theme="dark"] .ce-theme-toggle:hover{border-color:#A5C0FF;color:#A5C0FF}
html[data-theme="dark"] .ce-theme-toggle .ce-moon{display:none}
html[data-theme="dark"] .ce-theme-toggle .ce-sun{display:block}
.ce-theme-toggle.ce-floating{position:fixed;right:16px;bottom:16px;z-index:9999;margin:0;background:#FFFFFF;box-shadow:0 6px 20px rgba(11,21,51,.18)}
html[data-theme="dark"] .ce-theme-toggle.ce-floating{background:#1F5492}

/* === Bascule jour / nuit : le nouveau thème se diffuse depuis le bouton === */
html.ce-vt::view-transition-old(root),html.ce-vt::view-transition-new(root){animation:none;mix-blend-mode:normal}
html.ce-vt::view-transition-new(root){animation:ce-reveal .55s ease-out}
@keyframes ce-reveal{from{clip-path:circle(0 at var(--ce-x,50%) var(--ce-y,0))}to{clip-path:circle(150vmax at var(--ce-x,50%) var(--ce-y,0))}}
