/* Mode sombre (par défaut) des pages refaites : html[data-theme="sombre"], posé avant l'affichage par inc/theme.php.
   Les pages encore faites avec Elementor ne sont pas concernées. */
html[data-theme="sombre"] :is(.acaf-page, .acaf-equipe, .acaf-faq, .acaf-club, .acaf-flotte) {
	--fort: #fff;
	--fond: #071037; /* même bleu nuit que l'en-tête, la vague et la barre de sections */
	--bande: #111b4d; /* blocs bleus (encadrés, cartes) : un ton plus clair que le fond */
	--encre: #e7ebf7;
	--brume: #a3adcc;
	--trait: #222d5e;
	--ciel: #131c47;
	color-scheme: dark;
}
html[data-theme="sombre"] body:has(:is(.acaf-page, .acaf-equipe, .acaf-faq, .acaf-club, .acaf-flotte)) { background: #071037; }
html[data-theme="sombre"] :is(.acaf-page, .acaf-equipe, .acaf-faq, .acaf-club, .acaf-flotte) { background: var(--fond); }

/* Rouge des petits libellés, éclairci pour rester lisible sur fond sombre */
html[data-theme="sombre"] :is(.acaf-accueil__surtitre, .acaf-news__corps time, .acaf-news__suite span, .acaf-flotte__plus, .acaf-accueil__news time, .acaf-postppl__possible) { color: #ff6a4d; }

/* Boutons ronds blancs (fiches avion), cartes, survols */
html[data-theme="sombre"] .acaf-flotte :is(.acaf-flotte__fleche, .acaf-flotte__fermer),
html[data-theme="sombre"] .acaf-flotte :is(.acaf-flotte__fleche, .acaf-flotte__fermer):is(:hover, :focus) { background: rgba(14,24,70,.92); color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.5), 0 0 0 1px #2a3770; }
html[data-theme="sombre"] .acaf-flotte__fiche { background: #0b1233; }
html[data-theme="sombre"] .acaf-flotte__fiche::backdrop { background: rgba(0,0,0,.72); }
html[data-theme="sombre"] .acaf-flotte__indispo { background: #4a1408; color: #ffb4a3; }
html[data-theme="sombre"] :is(.acaf-flotte__lien, .acaf-news__carte a):hover { border-color: #3a4785; box-shadow: 0 10px 28px -14px rgba(0,0,0,.8); }
html[data-theme="sombre"] .acaf-page .acaf-tarifs__avions tbody tr:hover > * { background-color: #0d1538; }
html[data-theme="sombre"] .acaf-equipe__initiales { background: #1a2457; color: #cfd6ef; }
html[data-theme="sombre"] .acaf-page .acaf-page__bouton--clair:hover { background: #fff; color: #071037; }
html[data-theme="sombre"] .acaf-news__entete .acaf-page__vague path { fill: var(--fond); }

/* Logos des moyens de paiement : faits pour un fond blanc, présentés en carte blanche arrondie */
html[data-theme="sombre"] .acaf-bapteme__paiement img { background: #fff; padding: 14px 18px; border-radius: 10px; }

/* Formulaires WPForms */
html[data-theme="sombre"] .acaf-page .wpforms-container {
	--wpforms-field-background-color: #0d1538;
	--wpforms-field-text-color: #e7ebf7;
	--wpforms-field-menu-color: #0d1538;
	--wpforms-label-color: #fff;
	--wpforms-label-sublabel-color: #a3adcc;
	--wpforms-label-error-color: #ff8a73;
}
html[data-theme="sombre"] .acaf-page .wpforms-container :is(input, textarea, select)::placeholder { color: #7480a6; }
html[data-theme="sombre"] .acaf-page .wpforms-container :is(input, textarea, select):focus { border-color: #8d9bd0; box-shadow: 0 0 0 1px #8d9bd0; }
html[data-theme="sombre"] .acaf-page .wpforms-container .wpforms-uploader { background: #0d1538; border-color: #2a3770; color: #cfd6ef; }
html[data-theme="sombre"] .acaf-page .wpforms-page-indicator-page-progress-wrap { background: #1a2457; }
html[data-theme="sombre"] .acaf-page .iti__country-list { background: #0d1538; color: #e7ebf7; }

/* Séparateur léger au-dessus du pied de page (fond et pied sont du même bleu nuit en mode sombre) */
body:has(:is(.acaf-page, .acaf-equipe, .acaf-faq, .acaf-club, .acaf-flotte)) [data-elementor-type="footer"] { border-top: 1px solid rgba(255,255,255,.12); }

/* Bouton de bascule : petit, rond, discret, en bas à droite */
.acaf-theme { position: fixed; right: 16px; bottom: 16px; z-index: 9990; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; opacity: .7; transition: opacity .2s, transform .2s; background: rgba(255,255,255,.92); color: #071037; box-shadow: 0 4px 16px -4px rgba(7,16,55,.45); }
.acaf-theme:hover, .acaf-theme:focus-visible { opacity: 1; transform: scale(1.06); }
.acaf-theme:focus-visible { outline: 2px solid #e22701; outline-offset: 3px; }
.acaf-theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acaf-theme .acaf-theme__lune { display: none; }
html[data-theme="sombre"] .acaf-theme { background: rgba(22,32,90,.92); color: #fff; box-shadow: 0 4px 16px -4px rgba(0,0,0,.7), 0 0 0 1px #2a3770; }
html[data-theme="sombre"] .acaf-theme .acaf-theme__soleil { display: block; }
html:not([data-theme="sombre"]) .acaf-theme .acaf-theme__soleil { display: none; }
html:not([data-theme="sombre"]) .acaf-theme .acaf-theme__lune { display: block; }
/* Au-dessus du badge reCAPTCHA (formulaires, documentation) */
body:has(.grecaptcha-badge) .acaf-theme { bottom: 86px; }
/* L'iframe de Google est en schéma clair : sans ceci, Chrome peint un fond blanc opaque derrière elle en mode sombre. */
.g-recaptcha, .grecaptcha-badge { color-scheme: light; }
@media print { .acaf-theme { display: none; } }

/* Vague et barre de sections : de la couleur exacte du fond, la page se prolonge sans changement de teinte */
html[data-theme="sombre"] :is(.acaf-page__vague, .acaf-equipe__vague, .acaf-flotte__vague, .acaf-club__vague) path { fill: var(--fond); }
html[data-theme="sombre"] :is(.acaf-page__sections, .acaf-equipe__sections, .acaf-flotte__sections, .acaf-club__sections) { background: var(--fond); box-shadow: 0 1px 0 var(--trait); }
html[data-theme="sombre"] .acaf-news__entete { background: var(--fond); }
