/*
 * Couche visuelle commune, chargée en dernier : homogénéise les 26 pages sans toucher à leur contenu.
 * (les feuilles propres à chaque page gardent leur mise en page ; ici on unifie le "toucher" premium)
 */

/* ---------- Typographie ---------- */
h1,
h2 {
  text-wrap: balance;
}

main p {
  text-wrap: pretty;
}

/* ---------- Entrée douce des héros ---------- */
@keyframes zen-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

main > section[class*="-hero"] > :first-child {
  animation: zen-rise .9s cubic-bezier(.22, 1, .36, 1) both;
}

/* ---------- Boutons : même forme partout ---------- */
a[class*="-button"],
button[class*="-button"],
.site-header .header-cta,
.mega-cta {
  border-radius: 999px;
}

a[class*="-button"]:not([class*="link-button"]),
.site-header .header-cta {
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease, background-color .25s ease, color .25s ease;
}

a[class*="-button"]:not([class*="link-button"]):hover,
.site-header .header-cta:hover {
  box-shadow: 0 10px 24px rgba(11, 27, 87, .22);
  transform: translateY(-2px);
}

/* ---------- Cartes photo : coins doux + zoom au survol ---------- */
main article:has(> img:first-child) {
  overflow: hidden;
  border-radius: 16px;
}

main article > img:first-child {
  transition: transform .9s cubic-bezier(.22, 1, .36, 1);
}

main article:hover > img:first-child {
  transform: scale(1.06);
}

/* ---------- Galeries en mosaïque ---------- */
[class*="-gallery-grid"] img {
  border-radius: 14px;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), filter .6s ease, box-shadow .6s ease;
}

[class*="-gallery-grid"] img:hover {
  box-shadow: 0 16px 36px rgba(7, 20, 62, .28);
  filter: saturate(1.1) brightness(1.04);
  transform: scale(1.02);
}

/* ---------- Bouton WhatsApp flottant (un seul pour tout le site) ---------- */
.wa-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  height: 56px;
  min-width: 56px;
  padding: 0 1.1rem 0 1rem;
  border-radius: 999px;
  background: #0e7c4a;
  box-shadow: 0 14px 32px rgba(7, 20, 62, .3);
  color: #ffffff;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease, background-color .25s ease;
}

.wa-float:hover {
  background: #0a6a3e;
  box-shadow: 0 18px 40px rgba(7, 20, 62, .38);
  transform: translateY(-3px);
}

.wa-float svg {
  flex: none;
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.wa-float span {
  white-space: nowrap;
}

@keyframes zen-pulse {
  0% {
    box-shadow: 0 14px 32px rgba(7, 20, 62, .3), 0 0 0 0 rgba(14, 124, 74, .55);
  }

  70%,
  100% {
    box-shadow: 0 14px 32px rgba(7, 20, 62, .3), 0 0 0 16px rgba(14, 124, 74, 0);
  }
}

.wa-float {
  animation: zen-pulse 3.2s ease-out 2s 3;
}

/* Le bouton "retour en haut" de l'accueil passe à gauche pour ne pas chevaucher WhatsApp */
.back-to-top {
  right: auto;
  left: 1.1rem;
}

@media (max-width: 768px) {
  .wa-float {
    right: .8rem;
    bottom: .8rem;
    padding: 0;
    justify-content: center;
  }

  .wa-float span {
    display: none;
  }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  main > section[class*="-hero"] > :first-child,
  .wa-float {
    animation: none;
  }

  main article > img:first-child,
  [class*="-gallery-grid"] img,
  a[class*="-button"],
  .wa-float {
    transition: none;
  }

  main article:hover > img:first-child,
  [class*="-gallery-grid"] img:hover,
  a[class*="-button"]:hover,
  .wa-float:hover {
    transform: none;
  }
}

/* ============================================================
   SYSTÈME ÉDITORIAL — échelle typographique et rythme
   Chargé en dernier : prévaut sur les styles de page.
   ============================================================ */

:root {
  /* Échelle fluide : chaque niveau s'adapte entre mobile et grand écran. */
  --t-micro: clamp(.72rem, .69rem + .12vw, .78rem);
  --t-small: clamp(.9rem, .87rem + .16vw, 1rem);
  --t-body: clamp(1.02rem, .98rem + .22vw, 1.14rem);
  --t-lead: clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  --t-h3: clamp(1.35rem, 1.15rem + .9vw, 1.85rem);
  --t-h2: clamp(2.1rem, 1.55rem + 2.4vw, 3.4rem);
  --t-h1: clamp(2.8rem, 1.9rem + 4vw, 5.2rem);

  /* Rythme vertical : trois respirations au lieu d'une seule. */
  --space-tight: clamp(3rem, 5vw, 4.5rem);
  --space-normal: clamp(4.5rem, 8vw, 7.5rem);
  --space-wide: clamp(6rem, 11vw, 10rem);
}

/* ---------- Titres : tenue et densité ----------
   Ils héritaient de l'interligne 1.6 du corps de texte : un H2 de 48 px
   s'étalait sur 77 px de hauteur de ligne, d'où l'effet mou. */
h1,
h2,
h3,
h4,
[class*="-hero"] h1,
[class*="heading"] h2 {
  text-wrap: balance;
}

h1,
[class*="-hero"] h1 {
  font-size: var(--t-h1);
  line-height: 1.02;
  letter-spacing: -.022em;
}

h2,
[class*="heading"] h2,
[class*="-final"] h2,
[class*="-cta"] h2 {
  font-size: var(--t-h2);
  line-height: 1.06;
  letter-spacing: -.018em;
}

h3 {
  font-size: var(--t-h3);
  line-height: 1.18;
  letter-spacing: -.008em;
}

/* Les titres de cartes restent plus sobres que les titres de section. */
.card h3,
.service-card h3,
[class*="-grid"] article h3,
[class*="-card"] h3 {
  font-size: var(--t-lead);
  line-height: 1.22;
}

/* ---------- Corps de texte ----------
   La taille variait de 13 à 16 px sans logique. Un seul niveau de référence. */
main p,
main li {
  font-size: var(--t-body);
  line-height: 1.62;
}

main .card p,
main [class*="-grid"] article p,
main [class*="-card"] p,
main [class*="process"] p,
main [class*="benefit"] p,
main [class*="reason"] p,
main [class*="advantage"] p {
  font-size: var(--t-small);
  line-height: 1.6;
}

/* Le chapô qui suit un grand titre porte la voix de la page. */
.section-heading > p:not(.eyebrow),
[class*="heading"] > p:not([class*="kicker"]):not(.eyebrow),
[class*="-hero"] [class*="content"] > p:not([class*="kicker"]):not(.eyebrow) {
  font-size: var(--t-lead);
  line-height: 1.45;
  letter-spacing: -.004em;
}

/* Longueur de ligne confortable, quelle que soit la largeur d'écran. */
.section-heading > p:not(.eyebrow),
.split-copy > p:not(.eyebrow) {
  max-width: 62ch;
}

.section-heading > p:not(.eyebrow) {
  margin-inline: auto;
}

/* ---------- Sur-titres : plus fins, plus espacés ---------- */
.eyebrow,
[class*="-kicker"] {
  font-size: var(--t-micro);
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ---------- Surfaces : de la matière plutôt que des aplats ---------- */
.card,
.service-card,
[class*="-grid"] > article,
[class*="-card"]:not([class*="hero"]):not(.mosaic-item) {
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s ease, border-color .45s ease;
}

.card:hover,
.service-card:hover,
[class*="-grid"] > article:hover {
  box-shadow: 0 22px 50px rgba(11, 27, 87, .13);
  transform: translateY(-5px);
}

/* Les cartes de service passent du bleu pâle uni au blanc, avec un filet fin :
   la couleur revient alors uniquement sur les photos et les accents. */
.service-card {
  border-color: rgba(11, 27, 87, .1);
  background: var(--white);
}

.service-card .icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 50%;
  background: var(--sand);
  color: var(--primary);
}

/* ---------- Citations : un vrai moment de lecture ---------- */
.testimonial blockquote,
[class*="testimonial"] blockquote {
  color: var(--dark);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(1.15rem, .95rem + .85vw, 1.6rem);
  font-weight: 400;
  line-height: 1.32;
  letter-spacing: -.01em;
}

/* ---------- Sections : trois respirations au lieu d'une ---------- */
.section {
  padding-block: var(--space-normal);
}

.split-section,
.mosaic-section,
[class*="-gallery"] {
  padding-block: var(--space-wide);
}

.opportunity-section,
.trust-strip {
  padding-block: var(--space-tight);
}

/* Un trait plutôt qu'un dégradé sous les titres de section : plus net. */
.section-heading::after {
  width: 2.5rem;
  height: 2px;
  background: var(--primary);
}

/* ============================================================
   ANIMATIONS PREMIUM — retour tactile, transitions homogènes
   ============================================================ */

/* ---------- Retour tactile au clic (tous les boutons) ---------- */
.button,
a[class*="-button"]:not([class*="link-button"]),
button[class*="-button"],
.site-header .header-cta,
.mega-cta {
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .25s ease, background-color .25s ease, color .25s ease, filter .25s ease;
}

.button:active,
a[class*="-button"]:not([class*="link-button"]):active,
button[class*="-button"]:active,
.site-header .header-cta:active,
.mega-cta:active {
  transform: scale(.97);
  transition-duration: .1s;
}

/* ---------- Liens texte : trait qui se dessine au survol ---------- */
.text-link,
.submenu a,
.destination-regions a,
.mega-column > a strong {
  position: relative;
}

.text-link::after {
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
  content: "";
}

.text-link:hover::after {
  transform: scaleX(1);
}

.site-header .nav > a {
  position: relative;
}

.site-header .nav > a::after {
  position: absolute;
  right: 0;
  bottom: -.3rem;
  left: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1);
  content: "";
}

.site-header .nav > a:hover::after,
.site-header .nav > a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ---------- Menus : une seule courbe d'accélération pour tout le site ---------- */
.submenu,
.mega-menu {
  transition: opacity .28s cubic-bezier(.22, 1, .36, 1), transform .28s cubic-bezier(.22, 1, .36, 1);
}

@media (max-width: 768px) {
  .nav {
    transition: max-height .4s cubic-bezier(.22, 1, .36, 1), padding .4s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
  }
}

/* ---------- Éléments flottants : entrée cohérente ---------- */
.back-to-top {
  transition: opacity .3s cubic-bezier(.22, 1, .36, 1), transform .3s cubic-bezier(.22, 1, .36, 1);
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* ---------- Étoiles des témoignages : légère mise en scène ---------- */
.testimonial .stars {
  display: inline-block;
}

.testimonial.is-visible .stars {
  animation: zen-rise .5s cubic-bezier(.22, 1, .36, 1) .15s both;
}

/* ---------- Champs de formulaire : transition homogène ---------- */
input,
select,
textarea {
  transition: border-color .2s ease, box-shadow .2s ease;
}

/* ---------- Mouvement réduit : toutes les animations de cette section ---------- */
@media (prefers-reduced-motion: reduce) {
  .button,
  a[class*="-button"],
  .site-header .header-cta,
  .mega-cta,
  .text-link::after,
  .site-header .nav > a::after,
  .submenu,
  .mega-menu,
  .nav,
  .back-to-top,
  .testimonial.is-visible .stars {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Messages et confirmation des formulaires (forms.js) ---------- */
/* Messages d'attente et d'erreur : un encadré lisible plutôt qu'une ligne discrète. */
form [role="status"][data-state]:not([data-state=""]):not(:empty) {
  margin-top: .25rem;
  padding: .85rem 1rem;
  border-left: 4px solid currentColor;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.5;
}
form [role="status"][data-state="pending"]:not(:empty) { background: #f1f4f9; color: #42536b; }
form [role="status"][data-state="success"]:not(:empty) { background: #e8f6ee; color: #17663b; }
form [role="status"][data-state="error"]:not(:empty) { background: #fdecea; color: #a4321d; }
/* Pied de page sombre : on garde le style léger existant. */
.site-footer form [role="status"][data-state]:not(:empty) { padding: 0; border: 0; background: none; font-size: inherit; }

/* Écran affiché à la place du formulaire une fois la demande envoyée.
   Le formulaire masqué doit vraiment disparaître (certaines pages lui donnent display: grid). */
form[hidden] { display: none !important; }
.zen-confirm {
  display: grid;
  justify-items: center;
  gap: .9rem;
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
  border: 1px solid #d7eadf;
  border-top: 5px solid #1f7a48;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(11, 27, 87, .1);
  color: #42536b;
  text-align: center;
  animation: zen-confirm-in .35s ease-out;
}
.zen-confirm-fallback { border-top-color: #25d366; }
.zen-confirm-icon {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  place-items: center;
  border-radius: 50%;
  background: #1f7a48;
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}
.zen-confirm-fallback .zen-confirm-icon { background: #25d366; }
.zen-confirm-title {
  margin: .3rem 0 0;
  color: #0b1b57;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
  outline: none;
}
.zen-confirm-text { max-width: 34rem; margin: 0; font-size: 1.05rem; line-height: 1.6; }
.zen-confirm-ref {
  margin: .2rem 0;
  padding: .55rem 1rem;
  border: 1px dashed #b34a00;
  border-radius: 6px;
  background: #fff7ef;
  color: #0b1b57;
  font-size: 1rem;
}
.zen-confirm-ref strong { letter-spacing: .04em; }
.zen-confirm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: .8rem; }
.zen-confirm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .8rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: .85rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.zen-confirm-button:hover { transform: translateY(-2px); }
.zen-confirm-whatsapp { background: #25d366; color: #ffffff; }
.zen-confirm-whatsapp:hover { background: #149c4b; }
.zen-confirm-again { border-color: #0b1b57; background: transparent; color: #0b1b57; }
.zen-confirm-again:hover { background: #0b1b57; color: #ffffff; }
@keyframes zen-confirm-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) {
  .zen-confirm-actions { flex-direction: column; width: 100%; }
  .zen-confirm-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .zen-confirm { animation: none; }
  .zen-confirm-button:hover { transform: none; }
}

/* Horaires d'ouverture dans le pied de page (partials/footer.html). */
.site-footer .footer-hours { margin: .6rem 0 .2rem; color: rgba(255, 255, 255, .72); font-size: .75rem; line-height: 1.6; }

/* Réalisations récentes (remplacent les témoignages) : cas réels, clients anonymes. */
.zen-cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
  text-align: left;
}
.zen-case {
  display: grid;
  align-content: start;
  gap: .55rem;
  padding: 1.6rem;
  border: 1px solid #e2e7ef;
  border-top: 3px solid #b34a00;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(11, 27, 87, .07);
  color: #42536b;
}
.zen-case-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 50%;
  background: #fff1e3;
  color: #b34a00;
  font-size: 1.4rem;
}
.zen-case-tag { margin: .35rem 0 0; color: #b34a00; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.zen-case h3 { margin: 0; color: #0b1b57; font-family: "DM Serif Display", Georgia, serif; font-size: 1.45rem; font-weight: 400; line-height: 1.15; }
.zen-case p:not(.zen-case-tag) { margin: 0; font-size: .92rem; line-height: 1.6; }
.zen-cases-note { margin: 1.1rem 0 0; font-size: .78rem; opacity: .75; text-align: center; }
@media (max-width: 900px) { .zen-cases { grid-template-columns: 1fr; } }
