/*
Theme Name: Claire Le Bras
Template: blankslate
Description: Thème enfant généré automatiquement pour Claire Le Bras.
Version: 1.0.0
Author: Franck
*/

/* ==========================================================================
   Claire Le Bras — compléments au design system Elementor
   Toutes les valeurs passent par les variables V4 (couleurs, tailles,
   espacements) : modifier une variable dans Elementor suffit.
   Les éléments atomiques sont stylés par les classes globales ; ce fichier
   ne gère que la mise en place de l'en-tête et les widgets classiques (V3).
   ========================================================================== */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }

/* Les widgets classiques héritent de la couleur de la section (pas de la couleur Kit) */
body .elementor-widget-text-editor,
body .elementor-widget-shortcode { color: inherit; }
body .elementor-widget-text-editor p:last-child { margin-bottom: 0; }
/* Blank Slate remet tout à zéro : on rétablit gras, italique et listes dans les textes riches (WYSIWYG) */
body .elementor-widget-text-editor strong, body .elementor-widget-text-editor b { font-weight: 700; }
body .elementor-widget-text-editor em, body .elementor-widget-text-editor i { font-style: italic; }
body .elementor-widget-text-editor ul { list-style: disc; padding-left: 20px; }
body .elementor-widget-text-editor ol { list-style: decimal; padding-left: 20px; }
body .elementor-widget-text-editor a { color: var(--lien); }

/* --------------------------------------------------------------------------
   En-tête : barre collante. Sur ordinateur, page d'accueil : la barre est
   collée en bas du premier écran (sous le hero) puis remonte en haut au défilement.
   -------------------------------------------------------------------------- */
body .elementor-location-header { position: sticky; top: 0; z-index: 100; }
body.admin-bar .elementor-location-header { top: var(--wp-admin--admin-bar--height, 32px); }

@media (min-width: 1025px) {
  body.home .elementor-location-header { margin-top: calc(100svh - var(--hauteur-menu)); }
  body.home [data-elementor-type="wp-page"] { margin-top: -100svh; }
  body.home #devis { margin-bottom: var(--hauteur-menu); }
}

/* Menu WordPress (barre) */
/* Menu aligné à gauche : le texte du 1er lien tombe sur le bord du contenu (compense le padding de 16 px) */
body .clb-menu { grid-column: 1; grid-row: 1; justify-self: start; margin-inline-start: -16px; }
/* Taille identique au repos et au survol (Elementor change padding et interligne au :hover) */
body .e-con .clb-menu .elementor-nav-menu--main .elementor-nav-menu a.elementor-item,
body .e-con .clb-menu .elementor-nav-menu--main .elementor-nav-menu a.elementor-item:hover,
body .e-con .clb-menu .elementor-nav-menu--main .elementor-nav-menu a.elementor-item:focus,
body .e-con .clb-menu .elementor-nav-menu--main .elementor-nav-menu a.elementor-item.highlighted {
  color: var(--blanc);
  fill: var(--blanc);
  font-family: var(--police-texte), sans-serif;
  font-weight: 500;
  font-size: var(--texte-m);
  line-height: 1.6;
  padding: 8px 16px;
  border-radius: var(--arrondi);
  overflow: hidden;
}
body .clb-menu .elementor-nav-menu--main .elementor-item:hover,
body .clb-menu .elementor-nav-menu--main .elementor-item:focus,
body .clb-menu .elementor-nav-menu--main .elementor-item.elementor-item-active { color: var(--blanc); }
body .e-con .clb-menu .elementor-nav-menu--main.e--pointer-background:not(.e--pointer-framed) .elementor-item::before { background-color: var(--fond-fonce); border-radius: var(--arrondi); inset: 0; }
body .e-con .clb-menu .elementor-nav-menu--layout-horizontal .elementor-nav-menu > li > a { margin-inline: 0; isolation: isolate; }
/* Pas de surlignage permanent de l'ancre active : seulement au survol */
body .e-con .clb-menu .elementor-nav-menu--main.e--pointer-background .elementor-item.elementor-item-active:not(:hover):not(:focus)::before { opacity: 0; }

/* Burger (tablette et mobile) */
body .clb-burger { grid-column: 1; grid-row: 1; justify-self: start; }
body .e-con .clb-burger .elementor-icon { color: var(--blanc); fill: var(--blanc); font-size: 28px; display: flex; }
body .e-con .clb-burger .elementor-icon svg { fill: var(--blanc);  width: 28px; height: 28px; }

/* Menu du popup mobile */
body .clb-menu-mobile .elementor-nav-menu--main .elementor-nav-menu { gap: 8px; }
body .e-con .clb-menu-mobile .elementor-nav-menu--main .elementor-nav-menu a.elementor-item,
body .e-con .clb-menu-mobile .elementor-nav-menu--main .elementor-nav-menu a.elementor-item:hover,
body .e-con .clb-menu-mobile .elementor-nav-menu--main .elementor-nav-menu a.elementor-item:focus {
  color: var(--blanc);
  font-family: var(--police-titres), sans-serif;
  font-weight: 700;
  font-size: var(--titre-5);
  line-height: 1.2;
  padding: 12px 16px;
  justify-content: center;
  text-align: center;
}
body .clb-menu-mobile .elementor-nav-menu--main .elementor-item:hover,
body .clb-menu-mobile .elementor-nav-menu--main .elementor-item:focus { color: var(--lien); }
body .clb-menu-mobile .elementor-nav-menu--main .elementor-item.elementor-item-active { color: var(--blanc); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
body .e-con .hero-intro.elementor-widget { max-width: 520px; margin-block-end: 32px; }
body .hero-intro p { font-size: var(--texte-l); line-height: 1.6; margin: 0; }

/* Téléphone + e-mail (liste d'icônes) */
body .clb-contacts { width: auto; }
body .clb-contacts .elementor-icon-list-items { display: grid; gap: 8px; }
body .clb-contacts .elementor-icon-list-item { margin: 0 !important; padding: 0 !important; }
body .clb-contacts .elementor-icon-list-item a { display: flex; align-items: center; gap: 8px; text-decoration: none; }
body .clb-contacts .elementor-icon-list-icon { width: auto; padding: 0 !important; }
body .clb-contacts .elementor-icon-list-icon i { font-size: 16px; }
body .clb-contacts .elementor-icon-list-icon svg { width: 16px; height: 16px; }
body .clb-contacts .elementor-icon-list-text { font-size: var(--texte-m); padding: 0 !important; transition: color .2s; }

body .clb-contacts-hero .elementor-icon-list-icon i { color: var(--lien); }
body .clb-contacts-hero .elementor-icon-list-icon svg { fill: var(--lien); }
body .clb-contacts-hero .elementor-icon-list-text { color: var(--blanc); }
body .clb-contacts-hero a:hover .elementor-icon-list-text { color: var(--lien); }

body .clb-contacts-pied .elementor-icon-list-icon i { color: var(--texte-fonce); }
body .clb-contacts-pied .elementor-icon-list-icon svg { fill: var(--texte-fonce); }
body .clb-contacts-pied .elementor-icon-list-text { color: var(--lien); }
body .clb-contacts-pied a:hover .elementor-icon-list-text { color: var(--texte-fonce); }

/* Formulaire de devis */
body .clb-formulaire .elementor-field-group { margin-bottom: 16px; }
body .clb-formulaire .elementor-field-label {
  color: var(--texte-fonce);
  font-family: var(--police-texte), sans-serif;
  font-size: var(--texte-s);
  font-weight: 500;
  margin-bottom: 4px;
}
body .clb-formulaire .elementor-field-textual,
body .clb-formulaire .elementor-select-wrapper select {
  color: var(--texte-fonce);
  background-color: var(--blanc);
  border: 1px solid #d9dcdf;
  border-radius: var(--arrondi);
  font-family: var(--police-texte), sans-serif;
  font-size: var(--texte-m);
  padding: 8px 16px;
  min-height: 42px;
}
body .clb-formulaire .elementor-field-textual:focus,
body .clb-formulaire .elementor-select-wrapper select:focus {
  outline: 2px solid var(--lien);
  outline-offset: 1px;
  border-color: transparent;
  box-shadow: none;
}
body .clb-formulaire .elementor-button {
  background-color: var(--bouton);
  color: var(--blanc);
  font-family: var(--police-texte), sans-serif;
  font-weight: 500;
  font-size: var(--texte-m);
  padding: 12px 24px;
  border-radius: var(--arrondi);
  margin-top: 8px;
  transition: background-color .2s;
}
body .clb-formulaire .elementor-button:hover,
body .clb-formulaire .elementor-button:focus { background-color: var(--bouton-survol); color: var(--blanc); }
body .clb-formulaire .elementor-message { font-weight: 700; }
body .clb-formulaire .elementor-mark-required .elementor-field-label::after { color: inherit; }
body .texte-mention a { color: var(--lien); }

/* --------------------------------------------------------------------------
   Cartes et sections de services
   -------------------------------------------------------------------------- */
body .texte-carte { flex-grow: 1; }
body .texte-carte p { margin: 0; }
body .lien-fleche a, body a.lien-fleche { color: var(--lien); text-decoration: none; }

body .texte-service p { margin: 0 0 16px; }
body .texte-service ul { padding-left: 20px; margin: 0 0 16px; }
body .texte-service li { margin-bottom: 8px; }
body .texte-entete p { margin: 0; }

/* Diaporama « Après » : remplit le cadre 3:4 */
body .e-con .clb-diapo { position: absolute !important; inset: 0; z-index: 1; width: 100%; height: 100%; }
body .e-con .clb-diapo .elementor-widget-container,
body .e-con .clb-diapo .elementor-image-carousel-wrapper,
body .e-con .clb-diapo .elementor-image-carousel,
body .e-con .clb-diapo .swiper-slide,
body .e-con .clb-diapo .swiper-slide-inner { height: 100%; }
body .e-con .clb-diapo .swiper-slide-image { width: 100%; height: 100%; object-fit: cover; }
body .e-con .clb-diapo .elementor-swiper-button {
  top: auto;
  bottom: 12px;
  transform: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--texte-fonce);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
body .e-con .clb-diapo .elementor-swiper-button svg { fill: var(--texte-fonce); width: 14px; height: 14px; }
body .e-con .clb-diapo .elementor-swiper-button-prev { left: calc(50% - 64px); }
body .e-con .clb-diapo .elementor-swiper-button-next { right: calc(50% - 64px); }
body .e-con .clb-diapo .swiper-pagination { bottom: 24px !important; }
body .e-con .clb-diapo .swiper-pagination-bullet { background: var(--blanc); opacity: .5; width: 8px; height: 8px; }
body .e-con .clb-diapo .swiper-pagination-bullet-active { opacity: 1; }
body .e-con .clb-diapo .swiper-button-lock,
body .e-con .clb-diapo .swiper-pagination-lock { display: none !important; }

/* Galerie des réalisations : grille 3:4, arrondi */
body .e-con .clb-galerie .e-gallery-item { border-radius: var(--arrondi); overflow: hidden; }
body .e-con .clb-galerie .e-gallery-container { --aspect-ratio: 133.3333% !important; }

/* Téléphone protégé sans JavaScript : écrit à l'envers dans le code, affiché à l'endroit */
.contact-protege-texte[data-inverse] { unicode-bidi: bidi-override; direction: rtl; }

/* Mentions légales : rubriques H2/H3 plus discrètes que les titres de section */
body .texte-legal h2 { font-size: var(--titre-4); margin: 48px 0 16px; }
body .texte-legal h3 { font-size: var(--titre-5); margin: 32px 0 12px; }
body .texte-legal h2:first-child { margin-top: 0; }

/* --------------------------------------------------------------------------
   FAQ en accordéon (shortcode [faq], inc/faq.php + js/faq-accordion.js)
   Repris du site artpsy, couleurs et typos branchées sur les variables du kit.
   Balisage : h3.accordion-title > button.accordion-trigger > span.faq-question + span.accordion-icon
   -------------------------------------------------------------------------- */
body .elementor-widget-shortcode,
body .elementor-widget-shortcode .elementor-shortcode { width: 100%; }

body .accordion-wrapper { width: 100%; display: flex; justify-content: center; }

body .accordion-list {
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  background: var(--blanc);
  border: 1px solid var(--gris-clair);
  border-radius: var(--arrondi);
  overflow: hidden;
}

body .accordion-item {
  background: var(--blanc);
  margin: 0 0 14px;
  overflow: hidden;
  border-bottom: 1px solid var(--gris-clair);
}
body .accordion-item:last-child { margin-bottom: 0; border-bottom: none; }

/* Le titre porte la sémantique (h3), le bouton la taille et l'interaction */
body h3.accordion-title { margin: 0; font-size: 1em !important; font-weight: normal !important; line-height: 1.4; }

body .accordion-trigger {
  all: unset;
  box-sizing: border-box;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  text-align: left;
  color: var(--texte-fonce);
  font-family: var(--police-titres), sans-serif;
  transition: color .2s;
}
body .accordion-trigger:focus-visible { outline: 2px solid var(--lien); outline-offset: -2px; }

body .accordion-trigger .faq-question { color: var(--texte-fonce); transition: color .2s; }
body .accordion-trigger:hover .faq-question,
body .accordion-trigger:focus-visible .faq-question { color: var(--lien); }

/* Icône + / − */
body .accordion-icon {
  flex-shrink: 0;
  font-family: var(--police-texte), sans-serif;
  font-size: 30px;
  font-weight: normal;
  line-height: 1;
  color: var(--lien);
  transition: color .2s;
}
body .accordion-trigger:hover .accordion-icon { color: var(--bouton-survol); }

/* Panneau */
body .accordion-panel { padding: 0 20px 18px; }

body .accordion-content {
  font-family: var(--police-texte), sans-serif;
  font-size: var(--texte-m);
  font-weight: 400;
  line-height: 1.6;
  color: var(--texte-fonce);
}
body .accordion-content p { margin: 0 0 16px; }
body .accordion-content p:last-child { margin-bottom: 0; }

/* Léger retour visuel sur la question ouverte */
body .accordion-item.is-open .accordion-trigger { opacity: 0.95; }
