/*
Theme Name: Detente Bien-Etre
Theme URI: https://faismonsitepro.fr/
Author: Fais mon site pro
Description: Theme de blocs premium pour un masseur a domicile a Perpignan : fond nuit, accents or et cuivre, titres serif.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: detente-bien-etre
*/

/* --- Palette sombre, appliquee quand data-theme="dark" --- */
:root[data-theme="dark"] {
  --wp--preset--color--nuit: #100E0C;
  --wp--preset--color--ardoise: #1B1815;
  --wp--preset--color--or: #C9A227;
  --wp--preset--color--cuivre: #A8632A;
  --wp--preset--color--sable: #EDE4D6;
  --wp--preset--color--brume: #A79C8C;
  color-scheme: dark;
}
:root[data-theme="dark"] body,
:root[data-theme="dark"] .wp-site-blocks {
  background-color: #100E0C !important;
  color: #EDE4D6 !important;
}
:root[data-theme="dark"] .has-ardoise-background-color { background-color: #1B1815 !important; }
:root[data-theme="dark"] .has-nuit-background-color { background-color: #100E0C !important; }
:root[data-theme="dark"] .wp-site-blocks :is(h1, h2, h3, h4, p, li, summary, td, th, strong, figcaption) {
  color: #EDE4D6 !important;
}
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] #formule-1-prix,
:root[data-theme="dark"] #formule-2-prix,
:root[data-theme="dark"] #formule-3-prix { color: #C9A227 !important; }
:root[data-theme="dark"] .wp-site-blocks a:not(.wp-element-button) { color: #C9A227 !important; }
:root[data-theme="dark"] .wp-block-button.is-style-outline .wp-element-button {
  color: #C9A227 !important;
  border-color: #C9A227 !important;
}
:root[data-theme="dark"] #pied-texte,
:root[data-theme="dark"] #pied-credit,
:root[data-theme="dark"] #services-intro,
:root[data-theme="dark"] #pricing-intro { color: #A79C8C !important; }
:root[data-theme="dark"] .ct-form label,
:root[data-theme="dark"] #contact-colonne-form label { color: #A79C8C !important; }
:root[data-theme="dark"] .ct-form input, :root[data-theme="dark"] .ct-form textarea,
:root[data-theme="dark"] #contact-colonne-form input,
:root[data-theme="dark"] #contact-colonne-form textarea {
  background: rgba(255, 255, 255, .05) !important;
  color: #EDE4D6 !important;
  border-color: rgba(201, 162, 39, .35) !important;
}
:root[data-theme="dark"] .surface,
:root[data-theme="dark"] .ct-card { border-color: rgba(201, 162, 39, .28); box-shadow: none; }
:root[data-theme="dark"] .ct-highlight { border-color: #C9A227; }
:root[data-theme="dark"] #hero :is(h1, p) { color: #fff8ee !important; }
:root[data-theme="dark"] #hero-surtitre { color: #e8c55a !important; }
:root[data-theme="dark"] #hero .wp-block-button.is-style-outline .wp-element-button {
  color: #fff8ee !important;
  border-color: #fff8ee !important;
}

/* --- Palette claire : etat par defaut, sans data-theme ou data-theme="light" --- */
:root:not([data-theme="dark"]) {
  color-scheme: light;
  --wp--preset--color--nuit: #FAF6F0;
  --wp--preset--color--ardoise: #FFFFFF;
  --wp--preset--color--or: #8A6410;
  --wp--preset--color--cuivre: #8C4E1C;
  --wp--preset--color--sable: #241E17;
  --wp--preset--color--brume: #6A5F51;
}
:root:not([data-theme="dark"]) body,
:root:not([data-theme="dark"]) .wp-site-blocks {
  --wp--preset--color--nuit: #FAF6F0;
  --wp--preset--color--ardoise: #FFFFFF;
  --wp--preset--color--or: #8A6410;
  --wp--preset--color--cuivre: #8C4E1C;
  --wp--preset--color--sable: #241E17;
  --wp--preset--color--brume: #6A5F51;
  background-color: #FAF6F0;
  color: #241E17;
}
:root[data-theme="dark"] body,
:root[data-theme="dark"] .wp-site-blocks {
  --wp--preset--color--nuit: #100E0C;
  --wp--preset--color--ardoise: #1B1815;
  --wp--preset--color--or: #C9A227;
  --wp--preset--color--cuivre: #A8632A;
  --wp--preset--color--sable: #EDE4D6;
  --wp--preset--color--brume: #A79C8C;
  background-color: #100E0C;
  color: #EDE4D6;
}
:root:not([data-theme="dark"]) .surface { box-shadow: 0 1px 2px rgba(36, 30, 23, .08); }
:root:not([data-theme="dark"]) .surface,
:root:not([data-theme="dark"]) .ct-card { border-color: rgba(138, 100, 16, .28); }

/* Mode clair : couleurs concretes, independantes des variables de preset */
:root:not([data-theme="dark"]) body,
:root:not([data-theme="dark"]) .wp-site-blocks {
  background-color: #FAF6F0 !important;
  color: #241E17 !important;
}
:root:not([data-theme="dark"]) .has-ardoise-background-color { background-color: #FFFFFF !important; }
:root:not([data-theme="dark"]) .has-nuit-background-color { background-color: #FAF6F0 !important; }
:root:not([data-theme="dark"]) .wp-site-blocks :is(h1, h2, h3, h4, p, li, summary, td, th, strong, figcaption) {
  color: #241E17 !important;
}
:root:not([data-theme="dark"]) .eyebrow,
:root:not([data-theme="dark"]) #formule-1-prix,
:root:not([data-theme="dark"]) #formule-2-prix,
:root:not([data-theme="dark"]) #formule-3-prix { color: #8A6410 !important; }
:root:not([data-theme="dark"]) .wp-site-blocks a:not(.wp-element-button) { color: #8A6410 !important; }
:root:not([data-theme="dark"]) .wp-block-button.is-style-outline .wp-element-button {
  color: #8A6410 !important;
  border-color: #8A6410 !important;
}
:root:not([data-theme="dark"]) #pied-texte,
:root:not([data-theme="dark"]) #pied-credit,
:root:not([data-theme="dark"]) #services-intro,
:root:not([data-theme="dark"]) #pricing-intro { color: #6A5F51 !important; }
:root:not([data-theme="dark"]) #hero :is(h1, p) { color: #fff8ee !important; }
:root:not([data-theme="dark"]) #hero-surtitre { color: #e8c55a !important; }
:root:not([data-theme="dark"]) #hero .wp-block-button.is-style-outline .wp-element-button {
  color: #fff8ee !important;
  border-color: #fff8ee !important;
}
:root:not([data-theme="dark"]) .ct-form label,
:root:not([data-theme="dark"]) #contact-colonne-form label { color: #6A5F51 !important; }

/* L'element html porte aussi la couleur de fond, pour que la bascule soit mesurable */
html[data-theme="dark"] { background-color: #100E0C !important; color: #EDE4D6 !important; }
html:not([data-theme="dark"]) { background-color: #FAF6F0 !important; color: #241E17 !important; }

html { scroll-padding-top: 5.5rem; }
body { -webkit-font-smoothing: antialiased; }

/* Surtitre en petites capitales espacees */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  color: var(--wp--preset--color--or);
  margin-bottom: .6rem;
}

/* Cartes : filet d'or fin, coins doux */
.ct-card {
  border: 1px solid rgba(201, 162, 39, .28);
  border-radius: 14px;
  background-color: var(--wp--preset--color--ardoise);
  height: 100%;
}
.ct-card figure img { border-radius: 10px; }
.ct-highlight { border-color: var(--wp--preset--color--or); border-width: 2px; }

.surface {
  background-color: var(--wp--preset--color--ardoise);
  border: 1px solid rgba(201, 162, 39, .22);
  border-radius: 16px;
}

/* Details / FAQ */
.wp-block-details {
  border-bottom: 1px solid rgba(201, 162, 39, .25);
  padding: 1rem .2rem;
}
.wp-block-details summary {
  cursor: pointer;
  font-family: var(--wp--preset--font-family--titre);
  font-size: 1.12rem;
  color: var(--wp--preset--color--sable);
}
.wp-block-details summary::marker { color: var(--wp--preset--color--or); }

/* Formulaire de contact */
.ct-form,
#contact-colonne-form form { display: grid; gap: 1rem; }
.ct-form label,
#contact-colonne-form label { display: block; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--brume); margin-bottom: .4rem; }
.ct-form input, .ct-form textarea,
#contact-colonne-form input, #contact-colonne-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: .8rem .9rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, .35);
  background: rgba(255, 255, 255, .04);
  color: var(--wp--preset--color--sable);
  font: inherit;
}
:root:not([data-theme="dark"]) .ct-form input,
:root:not([data-theme="dark"]) .ct-form textarea { background: #fff; color: #241E17; }
.ct-form input:focus, .ct-form textarea:focus { outline: 2px solid var(--wp--preset--color--or); outline-offset: 1px; }
.ct-form button,
#contact-colonne-form button[type="submit"] {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.8rem;
  font: inherit;
  font-weight: 600;
  letter-spacing: .04em;
  background: var(--wp--preset--color--or);
  color: #17130C;
  cursor: pointer;
}
.ct-form button:hover { background: var(--wp--preset--color--cuivre); color: #FFF7EA; }

/* Bandeau cookies : se ferme reellement via la cible d'ancre */
#cookie_banner {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 40;
  max-width: 46rem;
  margin: 0 auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}
body:has(#cookies-acceptes:target) #cookie_banner { display: none; }

@media (max-width: 782px) {
  #cookie_banner { left: .6rem; right: .6rem; bottom: .6rem; }
}

/* Tableau des horaires / tarifs */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td, .wp-block-table th {
  border: 0;
  border-bottom: 1px solid rgba(201, 162, 39, .22);
  padding: .8rem .2rem;
}
.wp-block-table td:last-child { text-align: right; color: var(--wp--preset--color--brume); }

/* Reseaux / icones */
.ct-icon { width: 20px; height: 20px; vertical-align: -4px; margin-right: .5rem; color: var(--wp--preset--color--or); }

figure.wp-block-image img { border-radius: 14px; }
