/*!
Theme Name: Sunarea
Template: Divi
Description: Thème enfant Divi 5 — SUNAREA, énergie photovoltaïque (conception, installation, SAV). Créé par Bleuebuzz.
Version: 1.0.0
Author: Bleuebuzz
Author URI: https://www.bleuebuzz.fr
Text Domain: sunarea
*/

/* =========================================================
   Jetons SUNAREA
   Les couleurs sont alignées sur les couleurs globales Divi
   (gcid-*) : les modifier dans le builder met à jour le thème
   enfant. Les valeurs après la virgule sont les secours.
   ========================================================= */
:root {
  --sa-anthracite:   var(--gcid-heading-color, #1D232B);
  --sa-texte:        var(--gcid-body-color,    #3A4049);
  --sa-orange:       var(--gcid-link-color,    #E94E21);
  --sa-orange-fonce: #C23D14;
  --sa-saumon:       #F6AE8A;
  --sa-gris:         #6B7079;
  --sa-gris-logo:    #939292;
  --sa-surface:      #FFF5F0;
  --sa-blanc:        #FFFFFF;

  --sa-titre:   'Lexend', 'Helvetica Neue', Arial, sans-serif;
  --sa-courant: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

/* Accents dans les titres (*mot* dans les contenus) */
.sa-accent       { color: var(--sa-orange); }
.sa-accent-light { color: var(--sa-saumon); }

/* ALL */
.home .et_pb_section { overflow: hidden; }
#page-container { overflow: hidden; }
body.overflow { overflow: hidden; }

.et_parallax_bg { position: absolute; bottom: 0; left: 0; width: 100%; height: 900px; background-repeat: no-repeat; background-position: top center; background-size: cover; }
.et_pb_section_parallax .et_pb_parallax_css, .et_pb_slides .et_parallax_bg.et_pb_parallax_css { background-attachment: fixed; }


/* ====================
   LOGO SVG (couleurs pilotées par classes)
   lg-a = « sun » + toit / lg-b = « area » / lg-c = baseline grise
   ======================= */
#logo_header .lg-a, #logo_footer .lg-a, #blason_header .lg-a { fill: var(--sa-orange); }
#logo_header .lg-b, #logo_footer .lg-b { fill: var(--sa-saumon); }
#logo_footer .lg-c { fill: var(--sa-gris-logo); }

/* ====================
   HEADER
   ======================= */
.logo { max-width: 220px; display: flex; flex-direction: row; justify-content: start; margin-left: 30px; }
.logo a { display: block; line-height: 0; }
.logo a svg { width: 220px; height: auto; }

/* Par défaut (hero sombre) : logo blanc + « area » saumon */
#page-container .logo #logo_header .lg-a { fill: #FFFFFF; }
#page-container .logo #logo_header .lg-b { fill: var(--sa-saumon); }

/* Pages à fond clair : logo en couleurs */
.blog #page-container .logo #logo_header .lg-a,
.single #page-container .logo #logo_header .lg-a,
.archive #page-container .logo #logo_header .lg-a,
.search #page-container .logo #logo_header .lg-a,
.error404 #page-container .logo #logo_header .lg-a,
.page-slug-mentions-legales #page-container .logo #logo_header .lg-a,
.page-slug-politique-de-confidentialite #page-container .logo #logo_header .lg-a { fill: var(--sa-orange); }

@media screen and (max-width: 480px) {
  .logo { max-width: 150px; margin-left: 20px; margin-right: 0; }
  .logo a svg { width: 150px; }
}

/*  BLASON (picto affiché au scroll)
========================================== */
.blas { width: 70px; height: 50px; position: fixed; top: 22px; left: 24px; z-index: 11; display: none; }
.blas a { display: block; line-height: 0; }
.blas svg { width: 100%; height: auto; }
@media screen and (max-width: 480px) {
  .blas { width: 50px; height: 36px; }
}

/*  BOUTON « Demander une étude »
========================================== */
.header-cta { position: fixed; top: 20px; right: 190px; z-index: 10; height: 50px; display: inline-flex; align-items: center; padding: 0 26px; border-radius: 30px; border: 1px solid #FFFFFF; color: #FFFFFF !important; font-family: var(--sa-titre); font-size: 15px; font-weight: 500; letter-spacing: .02em; transition: all .3s ease; }
.header-cta:hover { background: #FFFFFF; color: var(--sa-anthracite) !important; }
.blog .header-cta, .single .header-cta, .archive .header-cta, .search .header-cta, .error404 .header-cta,
.page-slug-mentions-legales .header-cta, .page-slug-politique-de-confidentialite .header-cta,
.header-cta.on-light { border-color: var(--sa-anthracite); color: var(--sa-anthracite) !important; background: rgba(255,255,255,.85); }
.header-cta.on-light:hover { background: var(--sa-anthracite); color: #FFFFFF !important; }
@media screen and (max-width: 820px) { .header-cta { display: none; } }

/*  BURGER
========================================== */
.burger { width: 150px; height: 50px; position: fixed; top: 20px; right: 20px; z-index: 10; border: 1px solid var(--sa-orange); border-radius: 30px; background-color: var(--sa-orange); transition: background-color .3s ease, border-color .3s ease, width .3s ease; }
.burger:hover { background-color: var(--sa-orange-fonce); border-color: var(--sa-orange-fonce); cursor: pointer; }
.burger-title { position: absolute; top: 28%; left: 15%; font-family: var(--sa-titre); font-size: 15px; letter-spacing: 0.12em; color: #FFFFFF; font-weight: 600; }
.burger span { -webkit-user-select: none; user-select: none; position: absolute; top: 50%; left: 70%; margin-left: -15px; margin-top: -1.5px; }
.burger span, .burger span::before, .burger span::after { display: block; width: 30px; height: 3px; background-color: #FFFFFF; outline: 1px solid transparent; transition-property: background-color, transform; transition-duration: 0.3s; }
.burger span::before, .burger span::after { position: absolute; content: ""; }
.burger span::before { top: -9px; }
.burger span::after { top: 9px; }
.burger.clicked { width: 50px; border: 1px solid #FFFFFF; }
.burger.clicked .burger-title { display: none; }
.burger.clicked span { background-color: transparent; left: 50%; }
.burger.clicked span::before { transform: translateY(9px) rotate(45deg); }
.burger.clicked span::after { transform: translateY(-9px) rotate(-45deg); }
.burger.clicked span:before, .burger.clicked span:after { background-color: #FFFFFF; }

@media screen and (max-width: 480px) {
  .burger { width: 50px; }
  .burger-title { display: none; }
  .burger span { left: 55%; }
  .burger span, .burger span::before, .burger span::after { width: 25px; }
}

/*  MENU (panneau latéral)
========================================== */
.menu-header-container { display: flex; flex-direction: row; align-items: center; background-color: var(--sa-orange); position: fixed; z-index: 9; top: 0; right: 0; height: 100%; max-width: 40vw; width: 100%; padding: 0 40px 100px 40px; overflow-y: auto; transform: translateX(100%); transition: transform 0.55s cubic-bezier(0.785, 0.135, 0.15, 0.86); }
.menu-header-container::before { content: ""; position: absolute; top: auto; bottom: 40px; left: 60px; width: 120px; aspect-ratio: 328 / 127; background-color: var(--sa-saumon);
  -webkit-mask: url(/wp-content/themes/sunarea/assets/picto-sunarea.svg) no-repeat center / contain;
  mask: url(/wp-content/themes/sunarea/assets/picto-sunarea.svg) no-repeat center / contain;
}
@media screen and (max-width: 480px) { .menu-header-container::before { width: 90px; } }

.menu-header-container.show { transform: translateX(0px); }
.menu-header-container.show ul.main li { transform: translateX(0px); opacity: 1; }
.menu-header-container.show ul.main li:nth-child(1) { transition-delay: 0.15s; }
.menu-header-container.show ul.main li:nth-child(2) { transition-delay: 0.3s; }
.menu-header-container.show ul.main li:nth-child(3) { transition-delay: 0.45s; }
.menu-header-container.show ul.main li:nth-child(4) { transition-delay: 0.6s; }
.menu-header-container.show ul.main li:nth-child(5) { transition-delay: 0.75s; }
.menu-header-container.show ul.main li:nth-child(6) { transition-delay: 0.9s; }
.menu-header-container.show ul.main li:nth-child(7) { transition-delay: 1.05s; }
.menu-header-container.show ul.main li:nth-child(8) { transition-delay: 1.2s; }
.menu-header-container.show ul.main li:nth-child(9) { transition-delay: 1.35s; }
.menu-header-container ul.main { list-style-type: none; padding: 0; }
.menu-header-container ul.main li { margin-bottom: 10px; transform: translateX(40px); opacity: 0; transition: all 0.3s ease; }
.menu-header-container ul.main li:last-of-type { margin-bottom: 0px; }
.menu-header-container ul.main li a { color: #FFFFFF; font-family: var(--sa-titre); text-decoration: none; font-size: 2.2rem; display: block; font-weight: 500; line-height: 1.15em; padding: 10px 0; transition: all 0.3s ease; }
.menu-header-container ul.main li a span { color: var(--sa-saumon); }
.menu-header-container ul.main li a:hover,
.menu-header-container ul.main li.current-menu-item > a { color: var(--sa-saumon); }
@media screen and (max-width: 820px) {
  .menu-header-container { max-width: 80vw; padding: 70px 30px 40px 30px; }
}
@media screen and (max-width: 480px) {
  .menu-header-container { max-width: 95vw; padding: 70px 30px 40px 30px; }
  .menu-header-container ul.main li a { font-size: 1.5rem; line-height: 1em; }
}

/*  MENU > sous-menu (expertises)
========================================== */
.menu-header-container.show ul.main li ul.sub-menu { list-style-type: none; padding: 4px 0 8px 0; border-left: 2px solid var(--sa-orange); padding-left: 16px; margin-top: 4px; }
.menu-header-container.show ul.main li ul.sub-menu li { margin-bottom: 0; }
.menu-header-container.show ul.main li ul.sub-menu li a { font-family: var(--sa-courant); font-size: 18px; font-weight: 400; text-transform: none; padding: 6px 0; color: rgba(255,255,255,.85); }
.menu-header-container.show ul.main li ul.sub-menu li a:hover { color: var(--sa-saumon); }
@media screen and (max-width: 480px) {
  .menu-header-container.show ul.main li ul.sub-menu { padding-top: 10px; }
  .menu-header-container.show ul.main li ul.sub-menu li { margin-bottom: 6px; }
}

/*  OVERLAY
========================================== */
.overlay { background-color: rgba(29,35,43,0.6); position: fixed; top: 0; left: 0; z-index: 1; width: 100%; height: 100%; transition: all 0.3s ease-in-out; opacity: 0; visibility: hidden; }
.overlay.show { opacity: 1; visibility: visible; }


/* =========================================================
   FOOTER
   ========================================================= */
#logo_footer { max-width: 260px; height: auto; }
#logo_footer, #logo_footer * { color: inherit; }
.logo-footer img { max-width: 250px; }

[id^="menu-footer-fr"] { padding: 0; list-style-type: none!important; }
[id^="menu-footer-fr"] li { text-align: right; margin-bottom: 5px; }
[id^="menu-footer-fr"] li a { opacity: 0.55; color: var(--sa-anthracite); font-family: var(--sa-titre); text-decoration: none; font-size: 2rem; display: block; font-weight: 500; padding: 8px 0; transition: all 0.3s ease; }
[id^="menu-footer-fr"] li a:hover { opacity: 1; color: var(--sa-orange); }

[id^="menu-mentions"] { padding: 0; list-style-type: none; display: flex; flex-direction: row; flex-wrap: wrap; }
[id^="menu-mentions"] li { margin-right: 15px; }
[id^="menu-mentions"] li a { font-size: 14px; color: var(--sa-anthracite) !important; }
[id^="menu-mentions"] li a:hover { text-decoration: underline; }

@media screen and (max-width: 480px) {
  .logo-footer img, #logo_footer { max-width: 170px; }
  [id^="menu-footer-fr"] li { text-align: left; }
  [id^="menu-footer-fr"] li a { font-size: 1.6rem; }
  [id^="menu-mentions"] { flex-direction: column; justify-content: center; }
  [id^="menu-mentions"] li { margin-right: 0; }
}


/* =========================================================
   ARTICLES (contenu Gutenberg)
   ========================================================= */
h2.wp-block-heading { margin: 30px 0 10px; }
h3.wp-block-heading { margin: 25px 0 8px; }
h4.wp-block-heading { margin: 20px 0 6px; }
h5.wp-block-heading, h6.wp-block-heading { margin: 15px 0 6px; }
.wp-block-image { margin: 20px 0; }
.wp-block-image img { border-radius: 12px; }

ul.wp-block-latest-posts__list li { margin-bottom: 30px; }
ul.wp-block-latest-posts__list li .wp-block-latest-posts__post-date { font-weight: 300; }
ul.wp-block-latest-posts__list li .wp-block-latest-posts__featured-image a img { border-radius: 10px; }

:root :where(.wp-block-image figcaption) { font-size: 12px; font-weight: 400; font-family: var(--sa-courant); }
.wp-block-separator { margin: 50px auto; }

.wp-block-latest-posts__featured-image { width: 200px; height: 140px; overflow: hidden; margin-bottom: 5px; }
.wp-block-latest-posts__featured-image a { display: block; width: 100%; height: 100%; }
.wp-block-latest-posts__featured-image img { width: 200px !important; height: 140px !important; object-fit: cover; object-position: center; display: block; }


/* =========================================================
   CARROUSEL ACTUS (accueil) + GRILLE (page actualités)
   ========================================================= */
.actu-wrapper { display: flex; flex-direction: column; width: 100%; }
.actu-img { width: 100%; min-height: 360px; background-size: cover !important; background-position: center center !important; border-radius: 20px; }
.actu-content { width: 100%; padding: 20px 0; padding-right: 15px; }
.actu-cat { font-size: 13px; font-family: var(--sa-courant); text-transform: uppercase; letter-spacing: .06em; color: #FFFFFF; font-weight: 600; line-height: normal; background-color: var(--sa-orange); border-radius: 30px; margin-bottom: 16px; padding: 6px 12px; display: inline-block; }
.actu-title { font-size: 22px; font-family: var(--sa-titre); color: var(--sa-anthracite); font-weight: 600; line-height: 1.25; margin-bottom: 14px; }
.actu a:hover .actu-title { color: var(--sa-orange); }
.actu-extrait { font-size: 16px; font-family: var(--sa-courant); color: var(--sa-texte); line-height: 1.6; margin-bottom: 14px; }
.actu-date { font-size: 14px; font-family: var(--sa-courant); color: var(--sa-gris); line-height: 1.6; margin-bottom: 6px; }

.actucar .swiper-btn { position: absolute; width: 10%; top: auto; bottom: 0; }
.actucar .swiper-btn .swiper-button-prev:after { content: url(/wp-content/themes/sunarea/assets/left-arrow.svg); }
.actucar .swiper-btn .swiper-button-next:after { content: url(/wp-content/themes/sunarea/assets/right-arrow.svg); }

@media screen and (max-width: 640px) {
  .actucar .swiper-btn { width: 30%; }
  .actu-img { min-height: 300px; border-radius: 16px; }
  .actu-content { padding: 20px 0; padding-right: 0; }
  .actu-cat { font-size: 12px; }
  .actu-title { font-size: 20px; }
}

.actu-grid .dp-dfg-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 60px 40px; }
.actu-grid .dp-dfg-item { width: auto !important; float: none !important; margin: 0 !important; }
.actu-grid .actu-content { padding-right: 0; }
@media screen and (max-width: 1024px) { .actu-grid .dp-dfg-items { grid-template-columns: repeat(2, 1fr); } }
@media screen and (max-width: 820px) { .actu-grid .dp-dfg-items { grid-template-columns: 1fr; gap: 40px; } }


/* =========================================================
   ACTUALITÉ À LA UNE / GRILLES (carnet-*)
   ========================================================= */
.carnet-single .dp-dfg-container { font-size: 16px !important; line-height: normal; }
.csingle-img { height: 520px; background-size: cover !important; background-position: center !important; border-radius: 15px; }
.csingle-img .csingle-cat { padding: 6px 12px; color: #FFFFFF; position: relative; display: inline-block; top: 20px; left: 20px; border-radius: 30px; font-size: 13px; font-family: var(--sa-courant); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; line-height: normal; background-color: var(--sa-orange); }
.carnet-single article .csingle-content { padding: 20px 0; }
.carnet-single article .csingle-content .csingle-text { font-family: var(--sa-courant); padding-bottom: 20px; margin-bottom: 20px; }
.carnet-single article .csingle-content a.csingle-cta { font-family: var(--sa-titre); font-weight: 500; font-size: 17px; border: 1px solid var(--sa-orange); background-color: var(--sa-orange); color: #FFFFFF; padding: 16px 30px; border-radius: 60px; transition: all ease 0.4s; }
.carnet-single article .csingle-content a.csingle-cta:hover { background-color: transparent; color: var(--sa-orange); }
.carnet-single article .csingle-title { font-size: 44px; line-height: 1.1em; font-family: var(--sa-titre); font-weight: 600; }

@media screen and (max-width: 820px) {
  .csingle-img { height: 400px; }
  .carnet-single article .csingle-content { padding: 20px; }
}
@media screen and (max-width: 480px) {
  .csingle-img .csingle-cat { font-size: 12px; top: 10px; left: 10px; }
  .carnet-single article .csingle-content .csingle-text { font-size: 14px; }
  .csingle-img { height: 250px; }
  .carnet-single article .csingle-content { padding: 20px 10px; }
  .carnet-single article .csingle-title { font-size: 28px !important; }
}

.carnet-all .dp-dfg-container, .carnet-ren .dp-dfg-container { font-size: 16px !important; line-height: normal; }
.carnet-all .csingle-img { height: 400px; }
.carnet-ren .csingle-img { height: 420px; }
.carnet-all article .csingle-content, .carnet-ren article .csingle-content { padding: 20px 0; margin-bottom: 60px; }
.carnet-all .csingle-title { font-size: 30px; line-height: 1.2; font-family: var(--sa-titre); font-weight: 600; }
.carnet-ren .csingle-title { font-size: 24px; line-height: 1.2; font-family: var(--sa-titre); font-weight: 600; }
@media screen and (max-width: 820px) {
  .carnet-all .csingle-img, .carnet-ren .csingle-img { height: 360px; }
  .carnet-all article .csingle-content, .carnet-ren article .csingle-content { padding: 20px; margin-bottom: 40px; }
}
@media screen and (max-width: 480px) {
  .carnet-all .dp-dfg-container, .carnet-ren .dp-dfg-container { padding: 10px; }
  .carnet-all .csingle-img, .carnet-ren .csingle-img { height: 200px; }
  .carnet-all .csingle-title, .carnet-ren .csingle-title { font-size: 20px; }
  .carnet-all article .csingle-content, .carnet-ren article .csingle-content { padding: 10px; margin-bottom: 20px; }
}


/* =========================================================
   PAGES — compléments
   ========================================================= */
/* Listes dans les modules texte : puces orange */
.et_pb_text ul { list-style: none; padding-left: 0; }
.et_pb_text ul li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.et_pb_text ul li::before { content: ""; position: absolute; left: 0; top: .6em; width: 12px; height: 3px; border-radius: 2px; background: var(--sa-orange); }

/* Page contact */
.sa-coords h2 { margin-bottom: 20px; }
.sa-coords p strong { font-family: var(--sa-titre); color: var(--sa-anthracite); text-transform: uppercase; font-size: 13px; letter-spacing: .1em; }
.sa-coords a { color: var(--sa-orange); }
.sa-form h3 { margin-bottom: 20px; }


/* =========================================================
   FORMULAIRES (Contact Form 7)
   ========================================================= */
.form-contact { display: flex; justify-content: space-between; flex-wrap: wrap; width: 100%; max-width: 620px; }
.form-contact .row-50 { width: 48%; margin-bottom: 20px; }
.form-contact .row-100 { width: 100%; margin-bottom: 20px; }
.form-contact label.sa-label { display: block; font-size: 14px; font-weight: 600; color: var(--sa-anthracite); margin-bottom: 6px; }
.form-contact select,
.form-contact textarea,
.form-contact input[type="email"],
.form-contact input[type="tel"],
.form-contact input[type="text"] { border-radius: 25px; width: 100%; border: solid 1px rgba(29,35,43,.35); box-sizing: border-box; padding: 12px 20px; font-size: 16px; font-weight: 400; color: var(--sa-texte); background: var(--sa-blanc); transition: border-color .2s ease; }
.form-contact textarea { border-radius: 18px; }
.form-contact select:focus,
.form-contact textarea:focus,
.form-contact input:focus { outline: none; border-color: var(--sa-orange); }
.form-contact select option { font-weight: 400; color: var(--sa-texte); }
.form-contact .row-select { position: relative; overflow: hidden; }
.form-contact .row-select:before { position: absolute; right: 1px; bottom: 1px; height: 45px; content: ""; background: url(/wp-content/themes/sunarea/assets/form-dropdown.svg) center no-repeat, var(--sa-blanc); width: 50px; z-index: 50; pointer-events: none; border-radius: 25px; }
.form-contact select { -webkit-appearance: none; appearance: none; }
.form-contact .wpcf7-not-valid-tip { font-size: 12px; font-weight: 500; }
.form-contact .row-send { display: flex; justify-content: flex-start; width: 100%; position: relative; }
.form-contact .row-send input { border-radius: 60px; font-family: var(--sa-titre); font-size: 17px; color: #FFFFFF; background: var(--sa-orange); border: none; padding: 16px 40px; transition: all .3s; cursor: pointer; font-weight: 500; }
.form-contact .row-send input:hover { background: var(--sa-orange-fonce); }
.form-contact .row-send input:disabled { opacity: .3; }
.form-contact .row-send .wpcf7-spinner { position: absolute; bottom: 15px; }
.form-contact .row-acceptance { margin-bottom: 30px; }
.form-contact .row-acceptance span { margin: 0; }
.form-contact .row-acceptance label { display: flex; align-items: flex-start; }
.form-contact .row-acceptance label input { border-radius: 0; height: 19px; width: 30px; accent-color: var(--sa-orange); }
.form-contact .row-acceptance label span { font-size: 14px; line-height: 1.4em; padding-left: 5px; }
.wpcf7 form .wpcf7-response-output { width: 100%; max-width: 620px; border-radius: 15px; }
.wpcf7 form.invalid .wpcf7-response-output { border-color: var(--sa-orange); }

@media screen and (max-width: 980px) {
  .form-contact { margin: 0 auto; }
  .wpcf7 form.invalid .wpcf7-response-output { margin: 2em auto 1em; }
}
@media screen and (max-width: 768px) {
  .form-contact .row-50 { width: 100%; }
}
