/*
Theme Name:   Queris
Theme URI:    https://www.queris.fr
Description:  Thème enfant Divi aux couleurs de Queris — Lavande Nuit, Ocre, Tournesol — Inter + Instrument Serif.
Author:       Queris
Template:     Divi
Version:      1.0.1
Text Domain:  queris
*/

/* ==========================================================
   1. Polices et variables de la charte
   ========================================================== */

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --lavande: #2a1e4c;
  --lavande-2: #3d3462;
  --lavande-soft: #b9aed3;
  --ocre: #efebe3;
  --ocre-2: #f2eee8;
  --tournesol: #ffb000;
  --white: #ffffff;
  --ink: #2a1e4c;
  --muted: #5e5676;
  --line: rgba(42, 30, 76, 0.14);
  --line-light: rgba(255, 255, 255, 0.16);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(72px, 10vw, 140px);
  --radius: 4px;
}

/* ==========================================================
   2. Base Divi : typo, couleurs, fond
   ========================================================== */

body,
body #page-container,
body .et_pb_module,
body input, body textarea, body select, body button {
  font-family: var(--sans);
}
body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ocre-2);
  -webkit-font-smoothing: antialiased;
}
#page-container, #et-main-area, #main-content { background: var(--ocre-2); }
a { color: inherit; }

/* Remise à zéro des styles Divi dans les sections Queris */
.q-section h1, .q-section h2, .q-section h3, .q-section h4 {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: inherit;
  padding: 0;
  margin: 0;
}
.q-section p { padding: 0; margin: 0 0 1em; }
.q-section p:last-child { margin-bottom: 0; }
.q-section .et_pb_text_inner > *:last-child { margin-bottom: 0; }
.q-section ul { padding: 0; list-style: none; line-height: inherit; }
.q-section a { color: inherit; }

/* ==========================================================
   3. Sections et rangées
   ========================================================== */

.et_pb_section.q-section {
  padding: var(--section) 0 !important;
  position: relative;
  background-color: var(--ocre-2);
  color: var(--ink);
}
.et_pb_section.q-section.q-tight { padding: calc(var(--section) * .6) 0 !important; }
.et_pb_section.q-white { background-color: var(--white); }
.et_pb_section.q-ocre { background-color: var(--ocre-2); }
.et_pb_section.q-dark { background-color: var(--lavande); color: var(--white); }
.et_pb_section.q-dark h1, .et_pb_section.q-dark h2, .et_pb_section.q-dark h3 { color: var(--white) !important; }
.et_pb_section.q-dark .accent { color: var(--tournesol) !important; }

.et_pb_section.q-section .et_pb_row {
  width: 100% !important;
  max-width: var(--wrap) !important;
  padding: 0 var(--gutter) !important;
  margin: 0 auto;
}
.et_pb_section.q-section .et_pb_row + .et_pb_row { margin-top: clamp(40px, 5vw, 72px); }
.et_pb_section.q-section .et_pb_row.q-row-tight { margin-top: clamp(20px, 2.4vw, 32px); }
.et_pb_section.q-section .et_pb_column { margin-bottom: 0; }
.et_pb_section.q-section .et_pb_module { margin-bottom: 0; }
.et_pb_section.q-section .et_pb_column > .et_pb_module + .et_pb_module { margin-top: 24px; }

@media (max-width: 980px) {
  .et_pb_section.q-section .et_pb_column { margin-bottom: clamp(24px, 4vw, 32px) !important; }
  .et_pb_section.q-section .et_pb_column:last-child { margin-bottom: 0 !important; }
}

/* Héros */
.et_pb_section.q-hero {
  overflow: hidden;
  padding: clamp(96px, 14vw, 180px) 0 clamp(80px, 11vw, 140px) !important;
}
.et_pb_section.q-page-hero {
  overflow: hidden;
  padding: clamp(80px, 11vw, 150px) 0 clamp(64px, 8vw, 110px) !important;
}
/* Le grand « Q » décoratif : dessiné en CSS, rien à gérer dans le builder */
.et_pb_section.q-cta { overflow: hidden; }
.et_pb_section.q-hero::after,
.et_pb_section.q-page-hero::after,
.et_pb_section.q-cta::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  right: -8vw; top: 50%; transform: translateY(-50%);
  width: min(62vw, 720px); aspect-ratio: 1262 / 1440;
  background: url("assets/img/q-mark.svg") no-repeat center / contain;
}
.et_pb_section.q-page-hero::after { width: min(46vw, 520px); right: -10vw; }
.et_pb_section.q-cta::after { width: min(40vw, 440px); right: -6vw; }
.et_pb_section.q-nomark::after { display: none; }
.q-hero .et_pb_row, .q-page-hero .et_pb_row, .q-cta .et_pb_row { position: relative; z-index: 1; }
@media (max-width: 760px) {
  .et_pb_section.q-hero::after, .et_pb_section.q-page-hero::after { right: -38vw; width: 100vw; opacity: .35; }
  .et_pb_section.q-cta::after { display: none; }
}

/* ==========================================================
   4. Typographie
   ========================================================== */

.q-section .serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: 0; }
.q-section .display { font-size: clamp(40px, 6.4vw, 84px); max-width: 15ch; }
.q-section .h1 { font-size: clamp(36px, 5vw, 64px); max-width: 18ch; }
.q-section .h2 { font-size: clamp(30px, 3.8vw, 50px); }
.q-section .h3 { font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -0.01em; line-height: 1.25; }
.q-section .h3-lg { font-size: clamp(24px, 2.4vw, 32px); }
.q-section .lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55; color: var(--muted); max-width: 720px; }
.q-section .lead.ink { color: var(--ink); }
.q-dark .lead { color: rgba(255, 255, 255, .78); }
.q-section .muted { color: var(--muted); }
.q-section .accent { color: var(--tournesol); }
.q-section .mt-s { margin-top: 16px; }
.q-section .mt-m { margin-top: 32px; }
.q-section .mt-l { margin-top: 56px; }

.q-section .eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 24px;
}
.q-section .eyebrow::before {
  content: "";
  width: 17px;
  height: 20px;
  flex: 0 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='151 109 479 562'%3E%3Cg fill='%23FFB000'%3E%3Cpath d='M398.56,542.94s65.92,130.49,230.71,127.8v-84.08s-55.83-5.38-90.8-30.94c-34.98-25.56-66.59-31.61-66.59-31.61l-73.32,18.83Z'/%3E%3Cpath d='M397.6,109.09c-136.15,0-246.52,110.37-246.52,246.52s110.37,246.52,246.52,246.52,246.52-110.37,246.52-246.52-110.37-246.52-246.52-246.52ZM397.6,512.67c-86.74,0-157.06-70.32-157.06-157.06s70.32-157.06,157.06-157.06,157.06,70.32,157.06,157.06-70.32,157.06-157.06,157.06Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.q-dark .eyebrow { color: rgba(255, 255, 255, .7); }

.q-section .statement { font-size: clamp(28px, 3.6vw, 48px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; max-width: 22ch; }
.q-section .statement .serif { font-size: 1.1em; }

/* ==========================================================
   5. Boutons et liens
   ========================================================== */

.q-section .q-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }
.q-section a.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; border-radius: 999px;
  font-size: 15px; font-weight: 600; text-decoration: none; line-height: 1.2;
  border: 1.5px solid transparent; transition: background .2s, color .2s, border-color .2s;
}
.q-section a.btn-primary { background: var(--tournesol); color: var(--lavande) !important; }
.q-section a.btn-primary:hover { background: #ffc233; }
.q-section a.btn-ghost { border-color: currentColor; }
.q-section a.btn-ghost:hover { background: var(--lavande); color: var(--white); border-color: var(--lavande); }
.q-dark a.btn-ghost:hover { background: var(--white); color: var(--lavande); border-color: var(--white); }
.q-section a.link-arrow {
  display: inline-flex; gap: 8px; align-items: center;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border-bottom: 1.5px solid var(--tournesol); padding-bottom: 4px;
}

/* ==========================================================
   6. Composants
   ========================================================== */

/* Cartes (une carte = un module Texte avec la classe q-card) */
.et_pb_row.q-cards .et_pb_column { display: flex; flex-direction: column; }
@media (min-width: 981px) {
  .et_pb_row.q-cards { display: flex; }
}
.et_pb_section.q-section .et_pb_row.q-cards + .et_pb_row.q-cards { margin-top: clamp(20px, 2.4vw, 32px); }
.et_pb_text.q-card {
  flex: 1;
  background: var(--white); padding: clamp(28px, 3vw, 40px); border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s;
}
.et_pb_text.q-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(42, 30, 76, .35); }
.q-card .et_pb_text_inner { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.q-card p { color: var(--muted); margin: 0; }
.q-card .num { font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--muted); margin: 0; }
.q-white .et_pb_text.q-card { background: var(--ocre-2); border-color: transparent; }
.et_pb_text.q-card.q-featured { background: var(--lavande); color: var(--white); border-color: var(--lavande); }
.q-card.q-featured h3 { color: var(--white) !important; }
.q-card.q-featured p { color: rgba(255, 255, 255, .78); }
.q-card.q-featured .num { color: var(--tournesol); }
.et_pb_text.q-card.q-sun { background: var(--tournesol); border-color: var(--tournesol); }
.q-card.q-sun p, .q-card.q-sun .num { color: var(--lavande); }
.q-card.q-sun .link-arrow { border-color: var(--lavande) !important; margin-top: auto; align-self: flex-start; }

/* Piliers numérotés */
.q-section .pillars { border-top: 1px solid var(--line); }
.q-section .pillar { display: grid; grid-template-columns: 80px 1fr 1.4fr; gap: 32px; padding: 40px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.q-section .pillar .n { margin: 0; font-family: var(--serif); font-style: italic; font-size: 34px; color: var(--tournesol); line-height: 1; }
.q-section .pillar p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .q-section .pillar { grid-template-columns: 1fr; gap: 12px; padding: 32px 0; } }

/* Chiffres clés */
.q-section .stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-light); }
.q-section .stat { padding: 40px 24px 8px 0; }
.q-section .stat + .stat { padding-left: 24px; border-left: 1px solid var(--line-light); }
.q-section .stat .v { font-size: clamp(44px, 5vw, 72px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.q-section .stat .v small { font-size: .55em; color: var(--tournesol); font-weight: 600; }
.q-section .stat .l { margin-top: 14px; font-size: 15px; color: rgba(255, 255, 255, .72); max-width: 22ch; }
@media (max-width: 860px) {
  .q-section .stats { grid-template-columns: 1fr 1fr; }
  .q-section .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .q-section .stat:nth-child(n+3) { border-top: 1px solid var(--line-light); }
}

/* Processus en 6 étapes */
.q-section .process { display: grid; grid-template-columns: repeat(6, 1fr); }
.q-section .step { padding: 0 20px 0 0; position: relative; }
.q-section .step .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--tournesol); position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--lavande); }
.q-section .step::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line-light); }
.q-section .step:last-child::before { right: auto; width: 0; }
.q-section .step .verb { font-family: var(--serif); font-style: italic; font-size: 36px; margin: 28px 0 10px; color: var(--tournesol); line-height: 1; }
.q-section .step h3 { font-size: 18px; line-height: 1.3; margin-bottom: 10px; }
.q-section .step p { font-size: 15px; color: rgba(255, 255, 255, .72); margin: 0; }
@media (max-width: 1100px) {
  .q-section .process { grid-template-columns: repeat(3, 1fr); row-gap: 56px; }
  .q-section .step:nth-child(3)::before { right: auto; width: 0; }
}
@media (max-width: 640px) {
  .q-section .process { grid-template-columns: 1fr; row-gap: 0; }
  .q-section .step { padding: 0 0 40px 40px; }
  .q-section .step .dot { position: absolute; left: 0; top: 6px; }
  .q-section .step::before, .q-section .step:nth-child(3)::before { top: 6px; left: 6px; bottom: 0; right: auto; width: 2px; height: auto; }
  .q-section .step:last-child::before { display: none; }
  .q-section .step .verb { margin-top: 0; }
}

/* Liste à tirets */
.q-section .check-list { margin: 0; }
.q-section .check-list li { padding: 22px 0 22px 40px; border-bottom: 1px solid var(--line); position: relative; font-weight: 500; font-size: 18px; }
.q-section .check-list li::before { content: ""; position: absolute; left: 0; top: 33px; width: 18px; height: 2px; background: var(--tournesol); }
.q-dark .check-list li { border-color: var(--line-light); }

/* Étiquettes */
.q-section .tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }
.q-section .tag { font-size: 13px; font-weight: 500; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); }

/* Valeurs */
.et_pb_text.q-value { padding: 36px 0 0; border-top: 1px solid var(--line); }
.q-value h3 { font-family: var(--serif) !important; font-style: italic; font-weight: 400 !important; font-size: 40px; letter-spacing: 0 !important; margin-bottom: 12px !important; }
.q-value p { color: var(--muted); max-width: 34ch; }

/* Secteurs */
.et_pb_text.q-sector { flex: 1; padding: 36px; background: var(--white); border-radius: var(--radius); border-top: 3px solid var(--lavande); }
.q-sector .et_pb_text_inner { display: flex; flex-direction: column; gap: 14px; }
.q-sector p { color: var(--muted); margin: 0; }
.q-sector .et_pb_text_inner::before { content: ""; width: 40px; height: 40px; background: no-repeat center / contain; }
.q-ico-logistics .et_pb_text_inner::before { background-image: url("assets/img/icon-logistics.svg"); }
.q-ico-transport .et_pb_text_inner::before { background-image: url("assets/img/icon-transport.svg"); }
.q-ico-infrastructure .et_pb_text_inner::before { background-image: url("assets/img/icon-infrastructure.svg"); }
.q-ico-industry .et_pb_text_inner::before { background-image: url("assets/img/icon-industry.svg"); }

/* Portrait provisoire (à remplacer par un module Image avec la classe q-portrait-img) */
.et_pb_text.q-portrait {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: var(--lavande) url("assets/img/q-mark.svg") no-repeat;
  background-size: 72% auto; background-position: 135% 18%;
  display: flex; align-items: flex-end; padding: 32px; color: var(--white);
}
.q-portrait .ph-label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin: 0; }
.q-portrait .h3 { color: var(--white); margin-top: 6px; }
.q-portrait-img img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

/* Parcours */
.q-section .track { border-left: 2px solid var(--line); padding-left: 32px; display: grid; gap: 40px; }
.q-section .track-item { position: relative; }
.q-section .track-item::before { content: ""; position: absolute; left: -40px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--tournesol); box-shadow: 0 0 0 5px var(--ocre-2); }
.q-section .track-item .when { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.q-section .track-item p { color: var(--muted); margin: 8px 0 0; }

/* Coordonnées */
.q-section .contact-list li { padding: 26px 0; border-bottom: 1px solid var(--line); }
.q-section .contact-list .k { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.q-section .contact-list a { font-size: clamp(20px, 2vw, 26px); font-weight: 600; text-decoration: none; letter-spacing: -0.01em; word-break: break-word; }
.q-section .contact-list a:hover { text-decoration: underline; text-decoration-color: var(--tournesol); text-underline-offset: 6px; }

/* Bandeau d'appel à l'action */
.q-cta .et_pb_row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 40px; }
.q-cta .et_pb_column { width: auto !important; margin: 0 !important; flex: 0 1 auto; }
.q-cta .h1 { max-width: 16ch; }

/* ==========================================================
   7. Formulaire de contact Divi
   ========================================================== */

.et_pb_contact_form_container.q-form {
  background: var(--white); padding: clamp(28px, 4vw, 48px); border-radius: var(--radius);
}
.q-form .et_pb_contact_main_title { font-size: clamp(20px, 1.8vw, 24px); font-weight: 700; color: var(--ink); padding-bottom: 20px; }
.q-form .et_pb_contact_field_options_title, .q-form label { font-size: 13px; font-weight: 600; }
.q-form p input, .q-form p textarea, .q-form .input {
  font-family: var(--sans) !important; font-size: 16px !important; color: var(--ink) !important;
  background: var(--ocre-2) !important; border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important; padding: 14px 16px !important;
}
.q-form .input:focus { outline: 2px solid var(--tournesol); outline-offset: 1px; }
.q-form .et_pb_button.et_pb_contact_submit {
  font-family: var(--sans) !important; font-size: 15px !important; font-weight: 600 !important;
  background: var(--tournesol) !important; color: var(--lavande) !important; border: 0 !important;
  border-radius: 999px !important; padding: 16px 28px !important;
}
.q-form .et_pb_button.et_pb_contact_submit:after { display: none !important; }
.q-form .et_contact_bottom_container { float: none; text-align: left; margin-top: 8px; }
.q-form .et_pb_contact_captcha_question { color: var(--muted); }

/* ==========================================================
   8. En-tête Divi (logo + menu principal)
   ========================================================== */

#main-header, #main-header.et-fixed-header {
  background-color: var(--lavande) !important;
  box-shadow: none !important;
}
#main-header #logo { filter: brightness(0) invert(1); max-height: 34%; }
#top-menu li a,
.et-fixed-header #top-menu li a {
  color: var(--white) !important; font-size: 15px; font-weight: 500; opacity: 1 !important;
}
#top-menu li > a { position: relative; }
#top-menu > li:not(.q-menu-cta) > a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 26px; height: 2px;
  background: var(--tournesol); transition: right .25s;
}
.et-fixed-header #top-menu > li:not(.q-menu-cta) > a::after { bottom: 14px; }
#top-menu > li:not(.q-menu-cta) > a:hover::after,
#top-menu > li.current-menu-item:not(.q-menu-cta) > a::after { right: 0; }
#top-menu li.current-menu-item > a { color: var(--white) !important; }

/* Ajoutez la classe CSS « q-menu-cta » au lien Contact dans Apparence > Menus */
#top-menu li.q-menu-cta { padding-right: 0; }
#top-menu li.q-menu-cta > a {
  background: var(--tournesol); color: var(--lavande) !important; font-weight: 600;
  padding: 11px 22px !important; border-radius: 999px; margin-top: -11px;
}
#top-menu li.q-menu-cta > a:hover { background: #ffc233; }
.et-fixed-header #top-menu li.q-menu-cta > a { padding: 11px 22px !important; }

/* Icône de recherche et menu mobile */
#et_search_icon:before, #et_top_search #et_search_icon:before { color: var(--white) !important; }
.et_search_form_container input, .et_close_search_field:after { color: var(--white) !important; }
.mobile_menu_bar:before { color: var(--white) !important; }
#main-header .et_mobile_menu {
  background: var(--lavande) !important; border-top: 2px solid var(--tournesol) !important;
}
#main-header .et_mobile_menu li a {
  color: var(--white) !important; font-size: 20px; padding: 16px 5%; border-bottom: 1px solid var(--line-light);
}
#main-header .et_mobile_menu li.q-menu-cta a { color: var(--tournesol) !important; }
#main-header .et_mobile_menu li a:hover { background: rgba(255, 255, 255, .06); opacity: 1; }

/* ==========================================================
   9. Pied de page Queris (affiché par functions.php)
   ========================================================== */

#main-footer { display: none; }

.q-footer { background: var(--lavande); color: rgba(255, 255, 255, .8); padding: 80px 0 40px; font-size: 16px; border-top: 1px solid var(--line-light); }
.q-footer .q-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.q-footer .top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid var(--line-light); }
.q-footer .brand img { height: 26px; width: auto; filter: brightness(0) invert(1); }
.q-footer .tagline { font-family: var(--serif); font-style: italic; font-size: 30px; color: var(--white); margin: 28px 0 0; line-height: 1.2; max-width: 16ch; padding: 0; }
.q-footer h4 { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .55); font-weight: 600; margin: 0 0 18px; padding: 0; }
.q-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.q-footer li { padding: 0; }
.q-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.q-footer a:hover { color: var(--tournesol); }
.q-footer .bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 28px; font-size: 13px; color: rgba(255, 255, 255, .5); }
@media (max-width: 760px) { .q-footer .top { grid-template-columns: 1fr; } }
