/* Effets (#633, à venir) — ce que la PAGE montre des ambiances spectaculaires,
   des effets de titre et de la transition d'images, quand le moteur ne peint
   pas (pas de WebGL, contexte perdu, avant le premier dessin, sans JavaScript) :
   un dégradé de la palette de la section, dans l'esprit de chaque ambiance.
   La base (`overflow`, `--atm-a`, `--atm-b`, pseudo-éléments) est celle de
   toutes les ambiances (blocks-base.css, `.content-section[data-atmosphere]`).
   Chargé seulement par les pages qui en ont besoin. */

.content-section[data-atmosphere="smoke"] > .tw-backdrop--section::before{
  inset: -20%;
  background:
    radial-gradient(45% 35% at 30% 80%, color-mix(in oklab, var(--tw-text, #111) 14%, transparent), transparent 70%),
    radial-gradient(40% 30% at 70% 70%, color-mix(in oklab, var(--tw-accent, #6366f1) 16%, transparent), transparent 70%);
  filter: blur(20px);
}
.content-section[data-atmosphere="water"] > .tw-backdrop--section::before{
  inset: 0;
  background:
    radial-gradient(80% 60% at 50% 0%, color-mix(in oklab, var(--tw-accent-2, var(--tw-accent, #6366f1)) 12%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in oklab, var(--tw-accent, #6366f1) 8%, transparent), color-mix(in oklab, var(--tw-accent, #6366f1) 24%, transparent));
}
.content-section[data-atmosphere="embers"] > .tw-backdrop--section::before{
  inset: 0;
  background: radial-gradient(70% 55% at 50% 105%, color-mix(in oklab, var(--tw-accent, #6366f1) 38%, transparent), transparent 72%);
}
.content-section:is([data-atmosphere="snow"], [data-atmosphere="stardust"]) > .tw-backdrop--section::before{
  inset: 0;
  background:
    radial-gradient(2px 2px at 12% 22%, var(--atm-a), transparent 60%),
    radial-gradient(2px 2px at 34% 64%, var(--atm-a), transparent 60%),
    radial-gradient(3px 3px at 58% 30%, var(--atm-a), transparent 60%),
    radial-gradient(2px 2px at 76% 72%, var(--atm-a), transparent 60%),
    radial-gradient(3px 3px at 88% 18%, var(--atm-a), transparent 60%),
    linear-gradient(180deg, color-mix(in oklab, var(--tw-accent, #6366f1) 10%, transparent), transparent);
}
.content-section[data-atmosphere="fluid"] > .tw-backdrop--section::before{
  inset: -10%;
  background:
    radial-gradient(60% 50% at 20% 30%, color-mix(in oklab, var(--tw-accent, #6366f1) 55%, transparent), transparent 70%),
    radial-gradient(55% 50% at 80% 70%, color-mix(in oklab, var(--tw-accent-2, var(--tw-accent, #a855f7)) 50%, transparent), transparent 70%);
  filter: blur(30px);
}

.content-section[data-atmosphere="rain"] > .tw-backdrop--section::before{
  inset: -10%;
  background:
    radial-gradient(18% 22% at 22% 35%, color-mix(in oklab, var(--tw-accent, #6366f1) 30%, transparent), transparent 70%),
    radial-gradient(14% 18% at 68% 60%, color-mix(in oklab, var(--tw-accent-2, var(--tw-accent, #a855f7)) 28%, transparent), transparent 70%),
    radial-gradient(12% 16% at 84% 24%, color-mix(in oklab, var(--tw-accent, #6366f1) 22%, transparent), transparent 70%);
  filter: blur(14px);
}
.content-section[data-atmosphere="fireflies"] > .tw-backdrop--section::before{
  inset: 0;
  background:
    radial-gradient(6px 6px at 18% 62%, color-mix(in oklab, var(--tw-accent, #f59e0b) 70%, #fff3c4), transparent 70%),
    radial-gradient(5px 5px at 41% 38%, color-mix(in oklab, var(--tw-accent, #f59e0b) 70%, #fff3c4), transparent 70%),
    radial-gradient(7px 7px at 67% 70%, color-mix(in oklab, var(--tw-accent, #f59e0b) 70%, #fff3c4), transparent 70%),
    radial-gradient(5px 5px at 86% 44%, color-mix(in oklab, var(--tw-accent, #f59e0b) 70%, #fff3c4), transparent 70%),
    linear-gradient(0deg, color-mix(in oklab, var(--tw-accent, #6366f1) 16%, transparent), transparent 70%);
}
.content-section[data-atmosphere="ink"] > .tw-backdrop--section::before{
  inset: 0;
  background:
    radial-gradient(26% 30% at 26% 40%, color-mix(in oklab, var(--tw-accent, #6366f1) 26%, transparent), transparent 72%),
    radial-gradient(22% 26% at 72% 64%, color-mix(in oklab, var(--tw-accent-2, var(--tw-accent, #a855f7)) 22%, transparent), transparent 72%);
}

/* Dégradé vivant, Onde, Bokeh, Lignes de niveau, Rayons de lumière, Essaim (03/12). */
.content-section[data-atmosphere="silk"] > .tw-backdrop--section::before{
  inset: -15%;
  background:
    radial-gradient(50% 45% at 22% 28%, color-mix(in oklab, var(--tw-accent, #6366f1) 45%, transparent), transparent 70%),
    radial-gradient(45% 45% at 78% 70%, color-mix(in oklab, var(--tw-accent-2, var(--tw-accent, #a855f7)) 42%, transparent), transparent 70%),
    radial-gradient(35% 30% at 55% 15%, color-mix(in oklab, var(--tw-accent, #6366f1) 22%, #fff 18%), transparent 70%);
  filter: blur(28px);
}
.content-section[data-atmosphere="ripple"] > .tw-backdrop--section::before{
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 40%, color-mix(in oklab, var(--tw-accent, #6366f1) 14%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in oklab, var(--tw-accent, #6366f1) 10%, transparent), color-mix(in oklab, var(--tw-accent-2, var(--tw-accent, #a855f7)) 16%, transparent));
}
.content-section[data-atmosphere="lights"] > .tw-backdrop--section::before{
  inset: -10%;
  background:
    radial-gradient(9% 12% at 18% 30%, color-mix(in oklab, var(--tw-accent, #6366f1) 34%, transparent), transparent 70%),
    radial-gradient(12% 16% at 42% 70%, color-mix(in oklab, var(--tw-accent-2, var(--tw-accent, #a855f7)) 28%, transparent), transparent 70%),
    radial-gradient(7% 10% at 66% 24%, color-mix(in oklab, var(--tw-accent, #6366f1) 30%, transparent), transparent 70%),
    radial-gradient(11% 15% at 86% 62%, color-mix(in oklab, var(--tw-accent-2, var(--tw-accent, #a855f7)) 24%, transparent), transparent 70%);
  filter: blur(6px);
}
.content-section[data-atmosphere="contours"] > .tw-backdrop--section::before{
  inset: 0;
  background: repeating-radial-gradient(ellipse 120% 90% at 30% 60%, transparent 0 22px, color-mix(in oklab, var(--tw-text, #111) 12%, transparent) 22px 23px);
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
}
.content-section[data-atmosphere="sunrays"] > .tw-backdrop--section::before{
  inset: -10% 0 0;
  background: conic-gradient(from 160deg at 30% -10%, transparent 0deg, color-mix(in oklab, var(--tw-accent, #f59e0b) 14%, #fff 10%) 8deg, transparent 16deg, color-mix(in oklab, var(--tw-accent, #f59e0b) 10%, #fff 8%) 26deg, transparent 34deg, color-mix(in oklab, var(--tw-accent, #f59e0b) 12%, #fff 10%) 46deg, transparent 56deg);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.content-section[data-atmosphere="swarm"] > .tw-backdrop--section::before{
  inset: 0;
  background:
    radial-gradient(45% 40% at 50% 50%, color-mix(in oklab, var(--tw-accent, #6366f1) 16%, transparent), transparent 70%),
    radial-gradient(1.5px 1.5px at 30% 40%, var(--atm-a), transparent 60%),
    radial-gradient(1.5px 1.5px at 62% 58%, var(--atm-a), transparent 60%),
    radial-gradient(2px 2px at 48% 32%, var(--atm-a), transparent 60%);
}

/* L'Onde et les Rayons de lumière se peignent SUR l'image de fond de la section :
   pour eux, le calque de l'ambiance n'est pas masqué par l'image (blocks-base.css),
   et il passe AU-DESSUS du calque d'un fond fixe (même z-index, posé après lui).
   Leur dégradé de repli s'efface : sans le moteur, c'est l'image qui reste. */
.content-section--has-bg-image:is([data-atmosphere="ripple"], [data-atmosphere="sunrays"]) > .tw-backdrop--section{ display: block; z-index: 1; }
.content-section--has-bg-image:is([data-atmosphere="ripple"], [data-atmosphere="sunrays"]) > .tw-backdrop--section::before{ content: none; }
.content-section--has-bg-image:is([data-atmosphere="ripple"], [data-atmosphere="sunrays"]) > :is(.toweb-container, .content-section__container){ z-index: 2; }

/* Un titre à effet d'ici (sauf le verre) attend son entrée à l'écran, caché par
   le script (jamais sans lui) ; « moins de mouvement » : jamais caché.
   ⚠️ Le nom ne contient pas `tw-` : la typographie des titres libres vise
   `h2:not([class*="tw-"])`. Sous `tw-titre-attend`, le H2 attendait (et était
   ÉCHANTILLONNÉ par les particules) en 24 px graisse 700 au lieu de 44,8 px 400. */
.effet-titre-attend{ opacity: 0; }
@media (prefers-reduced-motion: reduce){ .effet-titre-attend{ opacity: 1; } }
html[data-animations="off"] .effet-titre-attend{ opacity: 1; }

/* Transition d'images : la seconde image n'est qu'une SOURCE de texture, jamais
   montrée telle quelle ; le canevas couvre la première quand il peint. */
.tw-fondu__b{ position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
[data-scroll-effect="morph"] .image-block__media{ position: relative; }
.tw-fondu__canevas{ position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
.tw-fondu--actif .tw-fondu__canevas{ opacity: 1; }
@media (prefers-reduced-motion: reduce){ .tw-fondu__canevas{ display: none; } }

/* Le produit en 3D dans la galerie : sur le fond de la fiche (pas le noir d'une
   vidéo), carré, à la largeur de la diapositive. */
:is(.toweb-product__slide, .toweb-product__main-image, .toweb-product__grid-item):has(> .toweb-product__model3d){ background: var(--tw-surface, var(--tw-bg, transparent)); }
.toweb-product__model3d, .toweb-product__model3d .model3d-block{ width: 100%; height: 100%; margin: 0; background: transparent; }
.toweb-product__model3d .model3d-block__stage{ width: 100%; max-width: none; border-radius: 0; background: transparent; }

/* La vidéo qui suit le défilement : une piste haute, la scène collée en haut de
   l'écran. Sans script actif (moins de mouvement, script bloqué) : une vidéo
   ordinaire, à sa taille, avec ses commandes affichées par le navigateur. */
.tw-video-defile video{ display: block; width: 100%; height: auto; border-radius: var(--tw-radius, 0); }
.tw-video-defile--actif .tw-video-defile__piste{ height: 260vh; }
.tw-video-defile--actif .tw-video-defile__scene{ position: sticky; top: var(--tw-header-height, 72px); height: calc(100vh - var(--tw-header-height, 72px)); display: flex; align-items: center; justify-content: center; }
.tw-video-defile--actif video{ max-height: calc(96vh - var(--tw-header-height, 72px)); object-fit: contain; }
@media (max-width: 640px){ .tw-video-defile--actif .tw-video-defile__piste{ height: 200vh; } }

/* Une ambiance spectaculaire et un héros « photo en fond » (Yann, 01/12) : sur le
   site, au-delà de 760 px, ce héros file bord à bord (blocks-base.css, décision du
   06/08) et sa photo COUVRE toute la section. L'ambiance ne se voyait plus que dans
   une bande sous la photo, que la section suivante recouvrait d'abord avec
   « Sections empilées ». Choisir une ambiance, c'est vouloir la voir : le héros
   reste alors dans la colonne de contenu, comme dans l'éditeur, et l'ambiance
   l'entoure. Le conteneur reprend sa largeur et sa gouttière (les valeurs du
   thème, `--tw-content-max` / `--tw-content-pad`), ce qui suit le héros n'a plus
   à se réaligner, et la section garde son espace sous le menu. Seulement ici :
   cette feuille n'est chargée que par les pages qui portent une ambiance
   spectaculaire (ou un effet de titre d'ici) — sans ambiance, rien ne change. */
@media (min-width: 761px){
  .toweb-section.content-section:is([data-atmosphere="aurora"], [data-atmosphere="smoke"], [data-atmosphere="water"], [data-atmosphere="embers"], [data-atmosphere="snow"], [data-atmosphere="stardust"], [data-atmosphere="fluid"], [data-atmosphere="rain"], [data-atmosphere="fireflies"], [data-atmosphere="ink"], [data-atmosphere="silk"], [data-atmosphere="ripple"], [data-atmosphere="lights"], [data-atmosphere="contours"], [data-atmosphere="sunrays"], [data-atmosphere="swarm"]) .toweb-container:has(> .hero-block--layout-text-image-background > .hero-block__media){
    max-width: var(--tw-content-max, var(--theme-container-max, 1200px));
    padding-inline: var(--tw-content-pad, var(--theme-container-px, 1rem));
  }
  .toweb-section.content-section:is([data-atmosphere="aurora"], [data-atmosphere="smoke"], [data-atmosphere="water"], [data-atmosphere="embers"], [data-atmosphere="snow"], [data-atmosphere="stardust"], [data-atmosphere="fluid"], [data-atmosphere="rain"], [data-atmosphere="fireflies"], [data-atmosphere="ink"], [data-atmosphere="silk"], [data-atmosphere="ripple"], [data-atmosphere="lights"], [data-atmosphere="contours"], [data-atmosphere="sunrays"], [data-atmosphere="swarm"]) .toweb-container:has(> .hero-block--layout-text-image-background > .hero-block__media) > :not(.hero-block){
    padding-inline: 0;
  }
  .toweb-section.content-section:first-child:is([data-atmosphere="aurora"], [data-atmosphere="smoke"], [data-atmosphere="water"], [data-atmosphere="embers"], [data-atmosphere="snow"], [data-atmosphere="stardust"], [data-atmosphere="fluid"], [data-atmosphere="rain"], [data-atmosphere="fireflies"], [data-atmosphere="ink"], [data-atmosphere="silk"], [data-atmosphere="ripple"], [data-atmosphere="lights"], [data-atmosphere="contours"], [data-atmosphere="sunrays"], [data-atmosphere="swarm"]):has(.hero-block--layout-text-image-background > .hero-block__media){
    padding-top: calc(var(--tw-section-py, 4rem) * var(--tw-section-density, 1));
  }
}
