/* accueil.css : les sections de l'accueil, composition « Arche »
   (_maquettes/arche/). Le héros est dans core.css (critique). Sans
   JavaScript, chaque section est dans son état final ; motion.js y ajoute
   l'ouverture des baies, l'épinglage du seuil et la colonnade horizontale. */

@layer components {
  /* ======================================================================
     02 · Passer sous l'arche. Le titre reste au-dessus de la baie, sur
     l'enduit, sans jamais passer sur la photo ; la baie occupe le reste de
     l'écran. Sur bureau, motion.js l'épingle et l'ouvre depuis une petite
     arche : c'est le geste signature. Le texte posé sur la photo l'est sur
     un voile qui garantit 4,5:1 sur la zone la plus claire de l'image.
     ====================================================================== */
  .seuil { position: relative; display: flex; flex-direction: column; gap: clamp(1.5rem, 4vh, 2.75rem); min-height: 100svh; padding: clamp(4rem, 9vh, 7rem) var(--marge) 0; overflow: hidden; isolation: isolate; background: var(--enduit); }
  .seuil::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 50% at 50% 30%, rgba(255, 246, 228, .7), transparent 70%); }
  .seuil__titre { text-align: center; font-size: clamp(2.1rem, 1.3rem + 2vw, 3.4rem); max-width: none; }
  .seuil__fenetre { position: relative; flex: 1 1 auto; min-height: 66svh; width: 100%; max-width: 1200px; margin-inline: auto; overflow: hidden; border-radius: 50% 50% 0 0 / 24% 24% 0 0; background: var(--sable); }
  .seuil__fenetre :is(picture, img) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .seuil__fenetre img { transform-origin: 50% 70%; }
  .seuil__voile { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(38, 29, 22, 0) 34%, rgba(38, 29, 22, .55) 56%, rgba(38, 29, 22, .82) 76%, rgba(38, 29, 22, .88) 100%); }
  .seuil__texte { position: absolute; left: var(--gout); right: var(--gout); bottom: clamp(2rem, 8svh, 5rem); text-align: center; color: var(--chaux-clair); text-shadow: 0 1px 18px rgba(38, 29, 22, .45); }
  .seuil__phrase { margin-inline: auto; max-width: 22em; font: italic 500 clamp(1.8rem, 1.1rem + 2vw, 3.2rem) / 1.1 var(--serif); }
  .seuil__clienteles { max-width: 46em; margin: 1.3rem auto 0; font: 400 clamp(1.05rem, .95rem + .4vw, 1.35rem) / 1.6 var(--serif); }
  .seuil__clienteles .u-num { font-size: .84em; }
  @media (max-width: 899px) {
    .seuil { min-height: 0; padding-top: 4.5rem; }
    .seuil__fenetre { flex: none; height: 118vw; max-height: 640px; min-height: 0; border-radius: 50% 50% 0 0 / 18% 18% 0 0; }
  }

  /* ======================================================================
     03 · Les trois univers : la baie collante change de vue au défilement.
     Sans JS, elle montre la première vue ; les autres sont des doublons
     décoratifs (aria-hidden), le texte de chaque univers est toujours lisible.
     ====================================================================== */
  .univers { position: relative; padding: var(--section-y) var(--marge) calc(var(--section-y) * .6); background: var(--chaux); }
  .univers__grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 8vw, 140px); }
  .univers__baie { position: sticky; top: 13svh; height: 74svh; align-self: start; }
  .arche--univers { height: calc(100% - 52px); box-shadow: var(--ombre-baie); }
  .arche--univers img { position: absolute; inset: 0; opacity: 0; transform: scale(1.06); transition: opacity 1.6s var(--doux), transform 2.4s var(--doux); }
  .arche--univers img.is-actif { opacity: 1; transform: none; }
  .univers__repere { margin: 18px auto 0; text-align: center; font: italic 1.3rem / 1.3 var(--serif); color: var(--argile); }
  /* 62svh et non 74 : la baie collante change de vue plus tôt, et le vide
     entre deux univers (350 px à 1 440) se resserre. */
  .univers__item { min-height: 62svh; display: flex; flex-direction: column; justify-content: center; padding-block: 5vh; }
  .univers__item h3 { font-size: clamp(2.2rem, 1.4rem + 1.8vw, 3.3rem); margin-bottom: 1.1rem; }
  .univers__item > p:not(.surtitre) { max-width: 30em; color: var(--encre-doux); }
  .univers__item > p:last-child { margin-top: 1.8rem; }
  .arche--mobile { display: none; }
  .univers__credit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 22px; align-items: center; max-width: 34em; margin-top: 2rem; padding: 22px 26px; border-radius: var(--rayon); background: var(--enduit); }
  .univers__taux { font: 300 2.6rem / 1 var(--sans); color: var(--argile); }
  .univers__credit-texte { font-size: .95rem; line-height: 1.55; color: var(--encre-doux); }
  .univers__credit .logo-sap { grid-column: 1 / -1; justify-self: start; }
  .univers__duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: .6rem; }
  .univers__duo > div { padding-top: 20px; border-top: var(--filet); }
  .univers__duo dt { margin-bottom: .5rem; font: 400 1.5rem / 1.2 var(--serif); }
  .univers__duo dd { margin: 0; font-size: .97rem; color: var(--encre-doux); }
  .univers__duo dd + dd { margin-top: 1.1rem; }
  @media (max-width: 899px) {
    .univers { padding-block: 12vh 4vh; }
    .univers__grille { grid-template-columns: minmax(0, 1fr); }
    .univers__baie { display: none; }
    .univers__item { min-height: 0; padding: 0 0 12vh; }
    .arche--mobile { display: block; width: 100%; aspect-ratio: 4 / 5; margin-bottom: 30px; }
    .univers__item:nth-child(2) .arche--mobile { width: 86%; margin-left: auto; }
    .univers__item:nth-child(3) .arche--mobile { width: 86%; }
    .univers__credit { grid-template-columns: minmax(0, 1fr); padding: 20px 22px; }
    .univers__duo { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  }

  /* ======================================================================
     04 · La colonnade des prestations. Sans JS (et sur mobile) : une piste
     qui défile au doigt ou au clavier, avec arrêt sur chaque baie. Sur
     bureau, motion.js l'épingle et la fait glisser au défilement.
     ====================================================================== */
  .galerie { position: relative; overflow: hidden; background: var(--enduit); }
  .galerie::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 50% at 20% 50%, rgba(255, 246, 228, .65), transparent 70%); pointer-events: none; }
  .galerie__defile { position: relative; display: flex; align-items: center; min-height: 100svh; padding-left: var(--marge); }
  .galerie__intro { position: relative; z-index: 2; flex: none; width: clamp(300px, 30vw, 440px); padding-right: 3vw; }
  .galerie__chapo { margin-top: 1.4rem; color: var(--encre-doux); }
  .galerie__mention { margin: 1.2rem 0 1.8rem; font-size: .88rem; line-height: 1.6; color: var(--encre-doux); }
  .galerie__fenetre { position: relative; flex: 1 1 auto; min-width: 0; align-self: stretch; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .35) 5%, #000 13%); mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .35) 5%, #000 13%); }
  .galerie__fenetre::-webkit-scrollbar { display: none; }
  .js-galerie .galerie__fenetre { overflow: hidden; }
  .galerie__piste { display: flex; align-items: center; gap: clamp(36px, 4.4vw, 80px); width: max-content; padding: 4rem 6vw 4rem 5vw; }
  .oeuvre { flex: none; width: clamp(240px, 21vw, 330px); scroll-snap-align: center; }
  .oeuvre a { display: block; }
  .oeuvre .arche { height: 50svh; max-height: 520px; box-shadow: 0 40px 70px -54px rgba(var(--ombre-rvb), .6); transition: box-shadow 1.2s var(--doux), translate 1.2s var(--doux); }
  .oeuvre--haute .arche { height: 58svh; max-height: 600px; }
  .oeuvre--basse { margin-top: 12svh; }
  .oeuvre--basse .arche { height: 44svh; max-height: 460px; }
  .oeuvre--moyenne { margin-bottom: 6svh; }
  .oeuvre .arche img { scale: 1.06; transition: scale 1.8s var(--doux); }
  .oeuvre a:is(:hover, :focus-visible) .arche { box-shadow: 0 50px 80px -50px rgba(var(--ombre-rvb), .7); translate: 0 -8px; }
  .oeuvre a:is(:hover, :focus-visible) .arche img { scale: 1; }
  .oeuvre h3 { margin-top: 1.3rem; font-size: 1.85rem; transition: color var(--dur-survol) var(--doux); }
  .oeuvre a:is(:hover, :focus-visible) h3 { color: var(--argile); }
  .oeuvre__prix { margin-top: .3rem; font-size: 1.1rem; }
  .oeuvre__prix em { font: italic 1.1em / 1 var(--serif); color: var(--argile); }
  .oeuvre__prix--devis { font: italic 1.18rem / 1.4 var(--serif); color: var(--encre-doux); }
  .oeuvre__note { font-size: .9rem; color: var(--encre-doux); }
  @media (max-width: 899px) {
    .galerie__defile { display: block; min-height: 0; padding: 12vh 0 10vh; }
    .galerie__intro { width: auto; padding: 0 var(--marge); }
    .galerie__fenetre { -webkit-mask-image: none; mask-image: none; margin-top: 5vh; }
    .galerie__piste { align-items: flex-start; gap: 22px; padding: 0 var(--marge) 18px; }
    .oeuvre { width: 74vw; }
    .oeuvre :is(.arche, .arche) { height: 92vw; max-height: 480px; }
    .oeuvre--haute .arche, .oeuvre--basse .arche { height: 92vw; max-height: 480px; }
    .oeuvre--basse, .oeuvre--moyenne { margin: 0; }
    .oeuvre .arche img { scale: 1; }
  }

  /* ======================================================================
     05 · L'exigence : engagements en feuilles d'olivier, baie de lin.
     ====================================================================== */
  .exigence { position: relative; padding: var(--section-y) var(--marge) calc(var(--section-y) * .8); overflow: hidden; background: var(--chaux); }
  .rameau--exigence { width: min(40vw, 520px); height: min(40vw, 520px); right: -6%; top: 2%; transform: scaleX(-1) rotate(6deg); }
  .exigence__grille { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(40px, 8vw, 140px); align-items: center; }
  .exigence__chapo { max-width: 32em; margin: 1.6rem 0 2.4rem; color: var(--encre-doux); }
  .engagements { display: grid; gap: 1.15rem; margin-bottom: 2.6rem; }
  .engagements li { position: relative; padding-left: 28px; max-width: 30em; font: 400 1.36rem / 1.35 var(--serif); }
  .engagements li::before { content: ""; position: absolute; left: 0; top: .45em; width: 9px; height: 16px; border-radius: 0 100% 0 100%; background: var(--olive); opacity: .7; transform: rotate(28deg); }
  .exigence__baie { height: min(80svh, 760px); }
  .arche--exigence { height: 100%; box-shadow: var(--ombre-baie); }
  .arche--exigence picture { inset: -6% 0; }
  .exigence .reperes { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 14vh; text-align: center; }
  .exigence .reperes > div { position: relative; padding-top: 34px; }
  .exigence .reperes > div::before { content: ""; position: absolute; top: 0; left: 50%; width: 15px; height: 18px; margin-left: -7.5px; background: var(--arc-icone) center / contain no-repeat; }
  .exigence .reperes dt { font: 300 var(--fs-repere) / 1 var(--sans); color: var(--argile); }
  .exigence .reperes dd { margin: .7rem auto 0; max-width: 16em; font: italic 1.22rem / 1.35 var(--serif); color: var(--encre-doux); }
  .exigence .reperes dd .u-num { font-style: normal; font-size: .84em; }
  @media (max-width: 899px) {
    .exigence { padding-block: 12vh 10vh; }
    .rameau--exigence { width: 80vw; height: 80vw; right: -30%; top: 0; }
    .exigence__grille { grid-template-columns: minmax(0, 1fr); gap: 8vh; }
    .exigence__baie { height: 118vw; max-height: 600px; }
    .engagements li { font-size: 1.24rem; }
    .exigence .reperes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 20px; margin-top: 10vh; }
  }

  /* ======================================================================
     06 · La méthode sous la voûte : quatre temps, des numéros dans une
     petite arche de pierre (plus de grand chiffre posé sur les titres).
     ====================================================================== */
  .methode { position: relative; padding: var(--section-y) var(--marge) calc(var(--section-y) * .9); overflow: hidden; background: var(--enduit); text-align: center; }
  .methode::before { content: ""; position: absolute; inset: 0; background: radial-gradient(50% 40% at 50% 30%, rgba(255, 246, 228, .7), transparent 70%); pointer-events: none; }
  .methode__tete { position: relative; max-width: 760px; margin: 0 auto 9vh; }
  .methode__tete .surtitre { justify-content: center; }
  .methode__tete h2 { margin-inline: auto; }
  .methode__chapo { margin: 1.4rem auto 0; color: var(--encre-doux); }
  .voute { position: relative; max-width: 1180px; margin: 0 auto; }
  .voute__arc { position: relative; aspect-ratio: 1000 / 300; }
  .voute__trait { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .voute__trait path { fill: none; stroke: var(--pierre); stroke-width: 1.2; }
  .voute__point { position: absolute; left: var(--x); top: var(--y); bottom: -18px; width: 1px; margin-left: -.5px; background: linear-gradient(180deg, rgba(164, 105, 74, .55), rgba(205, 184, 149, 0)); transform-origin: top; }
  .voute__point::before { content: ""; position: absolute; top: -5px; left: -4.5px; width: 10px; height: 10px; border-radius: 50%; background: var(--chaux-clair); border: 1.3px solid var(--argile); }
  .etapes { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 34px; }
  .etapes li { padding: 0 6px; max-width: none; }
  .etapes__num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 48px; padding-top: 6px; border: 1px solid var(--pierre); border-radius: 999px 999px 4px 4px; font-size: 1rem; color: var(--argile); background: var(--chaux-clair); }
  .etapes h3 { margin: 1.1rem 0 .7rem; font-size: 1.6rem; }
  .etapes p { margin: 0 auto; max-width: 22em; font-size: .95rem; line-height: 1.6; color: var(--encre-doux); }
  .methode__lien { position: relative; margin-top: 7vh; justify-content: center; }
  @media (max-width: 899px) {
    .methode { padding-block: 12vh 10vh; }
    .methode__tete { margin-bottom: 6vh; }
    .voute__arc { display: none; }
    .etapes { grid-template-columns: minmax(0, 1fr); gap: 46px; margin-top: 0; }
  }

  /* ======================================================================
     07 · De Cassis à Saint-Tropez : la côte se dessine, escales nommées.
     Sur mobile, le tracé s'élargit et défile au doigt (au défilement si
     le mouvement est permis).
     ====================================================================== */
  .cote { position: relative; padding: var(--section-y) 0 calc(var(--section-y) * .75); overflow: hidden; background: var(--chaux); }
  .cote__tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 60px; padding-inline: var(--marge); }
  .cote__texte { max-width: 30em; }
  .cote__chiffres { font: 400 1.5rem / 1.35 var(--serif); }
  .cote__liens { margin-top: 1.3rem; }
  .cote__carte { position: relative; max-width: calc(1240px + 2 * var(--gout)); margin: 8vh auto 0; padding-inline: var(--gout); }
  .coastline--cote .coastline__point text { font-size: 23px; }
  .coastline--cote .coastline__point.is-cle text { font-size: 25px; fill: var(--encre); }
  .coastline--cote .coastline__point--base text { fill: var(--argile); }
  /* Tablette : la côte entière tient dans la largeur, sans panoramique
     (à 250vw, les étiquettes faisaient 36 px et se coupaient au bord).
     Téléphone : un tracé à 200vw qui glisse ; la course est plus courte et
     le panoramique se termine carte entière à l'écran (motion.js). */
  @media (max-width: 899px) {
    .cote__carte { margin-top: 6vh; }
  }
  @media (max-width: 599px) {
    .cote__carte { padding: 0; overflow-x: auto; scrollbar-width: none; }
    .cote__carte::-webkit-scrollbar { display: none; }
    .js-motion .cote__carte { overflow: hidden; }
    .cote__carte .coastline { width: 200vw; padding: 0 var(--gout); }
  }

  /* ======================================================================
     08 · Les avis, dans une niche. Sans JS, les trois citations se
     suivent ; avec JS, une seule est visible et elles se relaient en fondu.
     ====================================================================== */
  .avis { position: relative; padding: var(--section-y) var(--marge); overflow: hidden; background: var(--enduit); }
  .avis__grille { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
  .avis__accroche { margin-top: 1.4rem; font: italic 1.3rem / 1.4 var(--serif); color: var(--encre-doux); }
  .avis__corps { position: relative; justify-self: center; width: 100%; max-width: 620px; padding: clamp(140px, 17vw, 250px) clamp(28px, 5vw, 70px) 48px; border-radius: var(--niche); background: linear-gradient(180deg, rgba(250, 246, 238, .55) 0%, var(--chaux-clair) 60%); box-shadow: inset 0 30px 60px -40px rgba(var(--ombre-rvb), .35), 0 40px 80px -70px rgba(var(--ombre-rvb), .5); text-align: center; }
  .avis__corps::before { content: "«"; position: absolute; left: 50%; top: clamp(64px, 8vw, 120px); transform: translateX(-50%); font: 5.5rem / 1 var(--serif); color: var(--argile-doux); opacity: .55; }
  .avis__liste { display: grid; gap: 40px; }
  .js-citations .avis__liste { gap: 0; }
  .js-citations .citation { grid-area: 1 / 1; }
  .citation blockquote { margin: 0; font: italic 500 clamp(1.5rem, 1.05rem + 1.25vw, 2.2rem) / 1.3 var(--serif); color: var(--encre); }
  .citation figcaption { margin-top: 1.6rem; font-weight: 450; font-size: .98rem; }
  .citation figcaption span { display: block; font: italic 400 1.1rem / 1.3 var(--serif); color: var(--encre-doux); }
  .avis__pieds { display: flex; flex-direction: column; align-items: center; gap: 22px; margin-top: 2.4rem; }
  /* Les points n'ont de sens qu'avec la rotation : sans JS, ils n'apparaissent pas. */
  .avis__points { display: none; }
  .js-citations .avis__points { display: flex; }
  .avis__points button { position: relative; width: var(--cible); height: var(--cible); }
  .avis__points button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--pierre); transition: transform .8s var(--doux), background-color .8s var(--doux); }
  .avis__points button.is-actif::before { background: var(--argile); transform: scale(1.5); }
  @media (max-width: 899px) {
    .avis { padding-block: 12vh; }
    .avis__grille { grid-template-columns: minmax(0, 1fr); gap: 6vh; }
    .avis__corps { padding: 46vw 24px 40px; }
    .avis__corps::before { top: 22vw; font-size: 4.4rem; }
  }

  /* ======================================================================
     09 · Les questions de l'accueil.
     ====================================================================== */
  .questions { padding: var(--section-y) var(--marge); background: var(--chaux); }
  .questions__grille { display: grid; gap: var(--esp-xl) clamp(2.5rem, 7vw, 8rem); }
  @media (min-width: 900px) {
    .questions__grille { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
    .questions__tete { position: sticky; top: calc(var(--h-entete) + 3rem); }
  }
  .questions__tete h2 { margin-bottom: var(--esp-l); }

  /* Blocs de structure de l'accueil : leur mise en page vient de leurs enfants. */
  .avis__tete, .exigence__texte, .univers__liste { min-width: 0; }
}
