/* =====================================================================
   Sam'Relaxe : l'Atelier « Faites comme chez vous » (v17.25)
   Repris du prototype validé (site-immersif/prototypes/atelier/atelier.css).
   Différences avec le prototype, propres au thème :
   - l'écran du refuge est une section (.at) de la hauteur de l'écran sous la
     navigation du site : tout ce qui y flottait en « fixed » y est posé en
     « absolute », pour ne jamais passer par-dessus les sections du dessous ;
   - le Rideau, lui, couvre tout l'écran (navigation du site comprise) ;
   - les sections « Comment ça marche », le Cercle, la FAQ et les liens
     (.rf-below) reprennent les règles utiles de l'ancien atelier.css.
   Lit les jetons de socle.css (aucune valeur de couleur en dur).
   ===================================================================== */

.sr-imm--atelier {
  --police-titre: "Cormorant Garamond", Cormorant, Garamond, "Times New Roman", serif;
  --police-texte: "DM Sans", DM, system-ui, -apple-system, "Segoe UI", sans-serif;
  --at-nav: var(--sr-premium-header, 4.75rem);   /* hauteur de la navigation du site (mesurée par atelier.js) */
  --at-dock: 0px;                               /* barre du bas du site sur téléphone, au seuil */
  display: block;
  background: transparent;   /* v17.26 : le fond peint du thème reste visible sous le refuge et sous les sections du bas */
  color: var(--encre);
  font-family: var(--police-texte);
}

.at {
  --at-panneau-largeur: 360px;
  --at-icone: 18px;
  position: relative;
  height: calc(100svh - var(--at-nav));
  min-height: 34rem;
  overflow: hidden;
  overflow: clip;
  color: var(--encre);
  font-family: var(--police-texte);
  font-size: var(--taille-texte);
  line-height: var(--interligne-texte);
}

/* ---------- Le refuge (fond) ---------- */
.at-scene {
  position: absolute;
  inset: 0;
  z-index: var(--plan-fond);
  overflow: hidden;
  background: var(--nuit);
}
.at-scene__cadre {
  position: absolute;
  inset: 0;
  transform-origin: 50% 60%;
  will-change: transform;
}
.at-scene__cadre picture,
.at-scene__affiche,
.at-scene__film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
}
.at-scene__film {
  opacity: 0;
  transition: opacity var(--duree-longue) var(--ease-out);
}
.at-scene__film.at-joue { opacity: 1; }
.at-scene__nuit {
  position: absolute;
  inset: 0;
  background: var(--nuit);
  opacity: 0;
  transition: opacity var(--duree-courte) ease;
}
.at-scene__cadre.at-cadre--fondu { opacity: 0; }
/* Grain de l'image (réglage secondaire) : bruit fixe, jamais animé */
.at-scene__grain {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.4 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  transition: opacity var(--duree-courte) ease;
}
.at-scene__vignette {
  position: absolute;
  inset: -10%;
  background: var(--vignette);
  opacity: 0.75;
  transform: scale(1.16);
}
.at-scene__voile {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--voile) 0%, transparent 18%), var(--voile-bas);
  transition: opacity var(--duree-moyenne) var(--ease-out);
}

/* ---------- Rideau et son : en haut à droite de l'écran du refuge ---------- */
.at-actions {
  position: absolute;
  top: 0;
  right: 0;
  z-index: var(--plan-barre);
  display: flex;
  gap: var(--esp-2);
  padding: var(--esp-4) var(--marge-ecran);
}
.at-bouton-barre {
  display: inline-flex;
  align-items: center;
  gap: var(--esp-2);
  min-height: var(--cible-min);
  padding: 0 var(--esp-4);
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon-pilule);
  background: var(--voile);
  color: var(--encre);
  font-size: var(--taille-etiquette);
  font-weight: var(--graisse-moyenne);
  letter-spacing: var(--approche-etiquette);
  transition: background-color var(--duree-appui) ease, border-color var(--duree-appui) ease, transform var(--duree-appui) var(--ease-out);
}
.at-bouton-barre svg {
  width: var(--at-icone);
  height: var(--at-icone);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.at-bouton-barre:active { transform: scale(var(--appui-echelle)); }
#at-son .at-son__ondes { display: none; }
#at-son[aria-pressed="true"] .at-son__ondes { display: inline; }
#at-son[aria-pressed="true"] .at-son__barre { display: none; }
#at-son[aria-pressed="true"] { border-color: var(--filet-actif); color: var(--or-clair); }

/* ---------- Boutons communs ---------- */
.at-principal {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--esp-3);
  min-height: var(--bouton-hauteur);
  padding: 0 var(--esp-6) 0 var(--esp-5);
  border-radius: var(--rayon-pilule);
  background: var(--or);
  color: var(--encre-sur-or);
  font-size: var(--taille-texte);
  font-weight: var(--graisse-moyenne);
  letter-spacing: var(--approche-etiquette);
  overflow: hidden;
  isolation: isolate;
  transition: background-color var(--duree-appui) ease, transform var(--duree-appui) var(--ease-out);
}
.at-principal svg { width: var(--at-icone); height: var(--at-icone); fill: currentColor; flex: none; }
.at-principal:active { transform: scale(var(--appui-echelle)); }
.at-principal[aria-busy="true"] { cursor: progress; }
.at-principal__progres {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--encre-sur-or);
  opacity: 0.35;
  transform-origin: left center;
  transform: scaleX(var(--at-progres, 0));
  transition: transform var(--duree-courte) var(--ease-out);
  z-index: -1;
}

.at-secondaire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--bouton-hauteur);
  padding: 0 var(--esp-5);
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon-pilule);
  background: var(--voile);
  color: var(--encre);
  font-size: var(--taille-etiquette);
  font-weight: var(--graisse-moyenne);
  letter-spacing: var(--approche-etiquette);
  transition: border-color var(--duree-appui) ease, background-color var(--duree-appui) ease, transform var(--duree-appui) var(--ease-out);
}
.at-secondaire:active { transform: scale(var(--appui-echelle)); }
.at-secondaire--petit { min-height: var(--cible-min); }

.at-lien {
  display: inline-flex;
  align-items: center;
  min-height: var(--cible-min);
  padding: 0 var(--esp-1);
  color: var(--encre-douce);
  font-size: var(--taille-etiquette);
  text-decoration: underline;
  text-decoration-color: var(--filet-fort);
  text-underline-offset: 0.25em;
  text-shadow: var(--ombre-contact);
  transition: color var(--duree-appui) ease, text-decoration-color var(--duree-appui) ease;
}

.at-pilule {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--esp-2);
  min-height: var(--cible-min);
  padding: 0 var(--esp-4);
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon-pilule);
  background: var(--voile-leger);
  color: var(--encre-douce);
  font-size: var(--taille-etiquette);
  font-weight: var(--graisse-moyenne);
  letter-spacing: var(--approche-etiquette);
  white-space: nowrap;
  flex: none;
  transition: border-color var(--duree-appui) ease, color var(--duree-appui) ease, background-color var(--duree-appui) ease, transform var(--duree-appui) var(--ease-out);
}
.at-pilule::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--or-clair);
  box-shadow: var(--halo-luciole);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--duree-courte) var(--ease-out), transform var(--duree-courte) var(--ease-out);
  margin-left: calc(var(--esp-1) * -1);
}
.at-pilule[aria-pressed="true"] {
  border-color: var(--filet-actif);
  color: var(--or-clair);
  background: var(--voile);
}
.at-pilule[aria-pressed="true"]::before { opacity: 1; transform: scale(1); }
.at-pilule:active { transform: scale(var(--appui-echelle)); }

@media (hover: hover) and (pointer: fine) {
  .at-principal:hover { background: var(--or-clair); }
  .at-secondaire:hover, .at-bouton-barre:hover { border-color: var(--filet-actif); background: var(--voile-fort); }
  .at-pilule:hover { border-color: var(--filet-actif); color: var(--encre); }
  .at-lien:hover { color: var(--encre); text-decoration-color: var(--or); }
}

/* ---------- É1 : le seuil ---------- */
.at-contenu { position: absolute; inset: 0; z-index: var(--plan-contenu); pointer-events: none; }
.at-contenu > * { pointer-events: auto; }
.at-seuil {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(100%, 52rem);
  /* au-dessus du bandeau cookies tant qu'il est affiché (--at-bandeau, mesuré par atelier.js) */
  padding: 0 var(--marge-ecran) max(calc(var(--sur-bas) + var(--esp-8)), calc(var(--at-bandeau, 0px) + var(--esp-4)));
  display: grid;
  gap: var(--esp-4);
  justify-items: start;
}
.at .at-nom {
  font-variant: normal;
  font-family: var(--police-titre);
  font-size: var(--taille-titre-1);
  font-weight: var(--graisse-normale);
  line-height: var(--interligne-serre);
  letter-spacing: var(--approche-titre);
  color: var(--encre);
  text-shadow: var(--ombre-contact);
  text-wrap: balance;
}
.at .at-phrase {
  font-family: var(--police-texte);
  font-size: var(--taille-chapo);
  line-height: var(--interligne-chapo);
  color: var(--encre-douce);
  max-width: var(--mesure-phrase);
  margin-bottom: var(--esp-3);
  text-shadow: var(--ombre-contact);
}
.at-prereglages {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-2);
}
.at-entrer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--esp-4);
  margin-top: var(--esp-3);
}

/* Entrée douce des textes du seuil (jamais cachés si l'animation ne joue pas) */
@media (prefers-reduced-motion: no-preference) {
  .at-seuil > * { animation: at-monte var(--duree-phrase) var(--ease-out) both; }
  .at-seuil > :nth-child(2) { animation-delay: 60ms; }
  .at-seuil > :nth-child(3) { animation-delay: 120ms; }
  .at-seuil > :nth-child(4) { animation-delay: 180ms; }
}
@keyframes at-monte { from { opacity: 0.001; transform: translateY(var(--montee)); } }

/* Passage du seuil au refuge */
.at-seuil, .at-panneau, .at-legende, .at-pilule--reglages {
  transition: opacity var(--duree-moyenne) var(--ease-out), transform var(--duree-moyenne) var(--ease-tiroir), visibility 0s linear 0s;
}
.at[data-etat="refuge"] .at-seuil,
.at[data-etat="endormi"] .at-seuil {
  opacity: 0;
  transform: translateY(var(--montee));
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duree-courte) var(--ease-sortie), transform var(--duree-courte) var(--ease-sortie), visibility 0s linear var(--duree-courte);
}

.at-haut { display: contents; }
/* ---------- É2 : légende du refuge (bas droite) ---------- */
.at .at-legende {
  color: var(--encre);
  font-family: var(--police-texte);
  line-height: var(--interligne-titre);
  position: absolute;
  right: var(--marge-ecran);
  bottom: calc(var(--sur-bas) + var(--esp-6));
  display: grid;
  justify-items: end;
  gap: var(--esp-1);
  text-align: right;
  max-width: 28rem;
  pointer-events: none;
}
.at-legende__nom {
  font-family: var(--police-titre);
  font-size: var(--taille-titre-3);
  line-height: var(--interligne-titre);
  letter-spacing: var(--approche-titre);
  text-shadow: var(--ombre-contact);
}
.at-legende__note {
  font-size: var(--taille-etiquette);
  color: var(--encre-douce);
  text-shadow: var(--ombre-contact);
}
.at-legende__reste {
  font-family: var(--police-titre);
  font-style: italic;
  font-size: var(--taille-texte);
  color: var(--or-clair);
  text-shadow: var(--ombre-contact);
}
.at-legende__reste:empty { display: none; }

/* ---------- É2 : le panneau « Faites comme chez vous » ---------- */
.at-panneau {
  position: absolute;
  left: var(--marge-ecran);
  /* au-dessus du bandeau cookies tant qu'il est affiché */
  bottom: max(calc(var(--sur-bas) + var(--esp-5)), calc(var(--at-bandeau, 0px) + var(--esp-3)));
  z-index: var(--plan-fiche);
  width: var(--at-panneau-largeur);
  max-height: calc(100% - 5.5rem - var(--at-bandeau, 0px));
  display: flex;
  flex-direction: column;
  border-radius: var(--rayon);
  background: var(--voile-panneau);
  box-shadow: var(--ombre-panneau);
  border: 1px solid var(--filet);
}
.at-panneau[data-entree] { opacity: 0; transform: translateY(var(--esp-4)); }
.at-panneau__tete {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: var(--esp-3);
  padding: var(--esp-5) var(--esp-5) var(--esp-2);
}
.at .at-panneau__titre {
  font-variant: normal;
  color: var(--encre);
  text-shadow: none;
  font-family: var(--police-titre);
  font-size: var(--taille-titre-4);
  font-weight: var(--graisse-normale);
  line-height: var(--interligne-titre);
  letter-spacing: var(--approche-titre);
}
.at-lien--haut { display: none; }
.at-lien--tete { margin-left: calc(var(--esp-1) * -1); text-shadow: none; color: var(--encre-attenuee); }
.at-poignee { display: none; }
.at-panneau__corps {
  position: relative; /* repère de défilement vers « Plus de réglages » */
  display: grid;
  grid-auto-rows: max-content;
  gap: var(--esp-4);
  padding: 0 var(--esp-5) var(--esp-5);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--filet-fort) transparent;
}
.at-panneau__suite { display: grid; gap: var(--esp-4); }
/* Bouton du tiroir (téléphone seulement) et « Replier le panneau » (ordinateur seulement) */
.at-feuille { display: none; }
.at-pied { position: relative; }
.at-replier {
  position: absolute;
  top: calc(var(--esp-1) + 1px); /* aligné sur la ligne de « Plus de réglages » */
  right: 0;
  padding: 0 var(--esp-4);
}

.at-groupe {
  margin: 0;
  padding: var(--esp-4) 0 0;
  border: 0;
  border-top: 1px solid var(--filet);
  min-width: 0;
  display: grid;
  gap: var(--esp-2);
}
.at-groupe > legend { float: left; width: 100%; padding: 0; margin-bottom: var(--esp-1); }
.at-groupe > legend + * { clear: both; }
.at-groupe--nu { border-top: 0; padding-top: 0; }

.at-reglage { display: grid; gap: 0; }
.at-reglage__ligne {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--esp-3);
  min-height: var(--esp-6);
}
.at-reglage__nom {
  font-size: var(--taille-etiquette);
  font-weight: var(--graisse-moyenne);
  letter-spacing: var(--approche-etiquette);
  color: var(--encre);
}
.at-reglage__sous {
  font-size: var(--taille-etiquette);
  color: var(--encre-douce);
  flex: 1;
  min-width: 0;
}
.at-reglage__valeur {
  font-family: var(--police-titre);
  font-style: italic;
  font-size: var(--taille-texte);
  color: var(--or-clair);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.at-bornes {
  display: flex;
  justify-content: space-between;
  gap: var(--esp-3);
  margin-top: calc(var(--esp-2) * -1);
  font-size: var(--taille-mention);
  color: var(--encre-attenuee);
}
.at .at-aide { font-family: var(--police-texte); font-size: var(--taille-mention); color: var(--encre-attenuee); line-height: var(--interligne-chapo); }
.at .at-aide:empty { display: none; }
.at-cercle-lien {
  color: var(--or-clair);
  text-decoration: underline;
  text-decoration-color: var(--filet-fort);
  text-underline-offset: 0.2em;
  white-space: nowrap;
}
.at .at-cercle-note { color: var(--encre-douce); }
.at-complet { padding-top: var(--esp-2); }

/* « Votre place » : le réglage-geste, un cran plus présent */
.at-place .at-reglage__nom { font-family: var(--police-titre); font-size: var(--taille-titre-4); font-weight: var(--graisse-normale); letter-spacing: var(--approche-titre); line-height: var(--interligne-titre); }
.at-place .at-bornes { font-size: var(--taille-etiquette); color: var(--encre-douce); }

/* ---------- Curseurs (vrais <input type="range">) ---------- */
.at-curseur {
  --at-rempli: 50%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: var(--cible-min);
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.at-curseur:focus-visible { outline: none; box-shadow: none; }
.at-curseur::-webkit-slider-runnable-track {
  height: var(--curseur-piste);
  border-radius: var(--rayon-petit);
  background: linear-gradient(to right, var(--or) 0 var(--at-rempli), var(--filet-fort) var(--at-rempli) 100%);
}
.at-curseur::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--curseur-pastille);
  height: var(--curseur-pastille);
  margin-top: calc((var(--curseur-piste) - var(--curseur-pastille)) / 2);
  border-radius: 50%;
  background: var(--or-clair);
  border: 0;
  box-shadow: var(--ombre-contact), 0 0 0 0 transparent;
  transition: transform var(--duree-appui) var(--ease-out), box-shadow var(--duree-appui) ease;
}
.at-curseur::-moz-range-track { height: var(--curseur-piste); border-radius: var(--rayon-petit); background: var(--filet-fort); }
.at-curseur::-moz-range-progress { height: var(--curseur-piste); border-radius: var(--rayon-petit); background: var(--or); }
.at-curseur::-moz-range-thumb {
  width: var(--curseur-pastille);
  height: var(--curseur-pastille);
  border-radius: 50%;
  background: var(--or-clair);
  border: 0;
  box-shadow: var(--ombre-contact);
  transition: transform var(--duree-appui) var(--ease-out), box-shadow var(--duree-appui) ease;
}
.at-curseur:active::-webkit-slider-thumb { transform: scale(1.15); box-shadow: var(--halo-or); }
.at-curseur:active::-moz-range-thumb { transform: scale(1.15); box-shadow: var(--halo-or); }
.at-curseur:focus-visible::-webkit-slider-thumb { box-shadow: var(--anneau-focus); }
.at-curseur:focus-visible::-moz-range-thumb { box-shadow: var(--anneau-focus); }
.at-curseur:disabled { opacity: 0.45; cursor: default; }

/* ---------- Bouton icône (couper) ---------- */
.at-icone {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--cible-min);
  height: var(--cible-min);
  border-radius: var(--rayon-pilule);
  color: var(--encre-attenuee);
  transition: color var(--duree-appui) ease, background-color var(--duree-appui) ease, transform var(--duree-appui) var(--ease-out);
}
.at-icone svg { width: var(--at-icone); height: var(--at-icone); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.at-icone:active { transform: scale(var(--appui-echelle)); }
@media (hover: hover) and (pointer: fine) { .at-icone:hover { color: var(--encre); background: var(--voile-leger); } }

/* ---------- Couches de sons : nom, curseur, couper ---------- */
.at-couches { display: grid; gap: var(--esp-2); }
.at-couche {
  display: grid;
  grid-template-columns: minmax(0, 7.75rem) minmax(0, 1fr) var(--cible-min);
  align-items: center;
  column-gap: var(--esp-3);
  margin-right: calc(var(--esp-3) * -1);
}
.at-couche__nom {
  font-size: var(--taille-etiquette);
  line-height: var(--interligne-titre);
  color: var(--encre-douce);
  text-wrap: balance;
}
/* Un son qui fait le lieu garde un minimum discret : pas de « Couper », une marque à la place */
.at-couche__fixe {
  width: var(--cible-min);
  text-align: center;
  font-size: var(--taille-mention);
  color: var(--encre-attenuee);
}
.at-couche[data-coupee="true"] .at-curseur { opacity: 0.45; }
.at-couche[data-coupee="true"] .at-couche__nom { color: var(--encre-attenuee); }
.at-couper .at-couper__barre { display: none; }
.at-couper[aria-pressed="true"] { color: var(--or-clair); }
.at-couper[aria-pressed="true"] .at-couper__barre { display: inline; }
.at-couper[aria-pressed="true"] .at-couper__ondes { display: none; }

/* Légende de groupe sur une ligne : « Minuteur ……… Encore 42 min » */
.at-legende-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: var(--esp-3); }
.at-legende-ligne .at-reglage__valeur:empty { display: none; }

/* ---------- Minuteur (boutons radio en segments) ---------- */
.at-segments {
  display: grid;
  grid-template-columns: repeat(var(--at-segments, 4), 1fr);
  padding: 2px;
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon-pilule);
}
.at-segments--5 { grid-template-columns: 1.45fr repeat(4, 1fr); } /* « Sans fin » respire */
.at-segments--2 { --at-segments: 2; }
.at-segments label { position: relative; display: block; min-width: 0; }
.at-segments input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.at-segments span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--cible-min);
  padding: 0 var(--esp-1);
  border-radius: var(--rayon-pilule);
  font-size: var(--taille-etiquette);
  color: var(--encre-douce);
  white-space: nowrap;
  transition: background-color var(--duree-appui) ease, color var(--duree-appui) ease, box-shadow var(--duree-appui) ease;
  pointer-events: none;
}
.at-segments input:checked + span { background: var(--panneau-haut); color: var(--or-clair); box-shadow: inset 0 0 0 1px var(--filet-actif); }
.at-segments input:focus-visible + span { box-shadow: var(--anneau-focus); }
@media (hover: hover) and (pointer: fine) { .at-segments label:hover span { color: var(--encre); } }
/* 2 h et 8 h sans le Cercle : visibles, mais en retrait (la note dessous mène à l'offre) */
.at--sans-cercle .at-segment-cercle span { color: var(--encre-attenuee); }
.at--sans-cercle .at-segment-cercle span::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 5px;
  border-radius: 50%;
  border: 1px solid var(--or);
}

/* ---------- Plus de réglages ---------- */
.at-plus { border-top: 1px solid var(--filet); }
.at-plus summary {
  display: flex;
  align-items: center;
  gap: var(--esp-3);
  width: max-content;
  min-height: var(--cible-min);
  margin-top: var(--esp-1);
  list-style: none;
  cursor: pointer;
  font-size: var(--taille-etiquette);
  font-weight: var(--graisse-moyenne);
  letter-spacing: var(--approche-etiquette);
  color: var(--encre-douce);
  border-radius: var(--rayon-petit);
}
.at-plus summary::-webkit-details-marker { display: none; }
.at-plus summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--duree-courte) var(--ease-out);
}
.at-plus[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.at-plus[open] summary { color: var(--encre); }
.at-plus__corps { display: grid; gap: var(--esp-4); padding: var(--esp-2) 0 var(--esp-2); }
.at-plus__corps > .at-groupe:first-child { border-top: 0; padding-top: 0; }
.at-plus__corps > .at-secondaire { justify-self: start; }
@media (prefers-reduced-motion: no-preference) {
  .at-plus[open] .at-plus__corps { animation: at-apparait var(--duree-courte) var(--ease-out); }
}
@keyframes at-apparait { from { opacity: 0; transform: translateY(calc(var(--montee) * -0.5)); } }

.at-extras { display: flex; flex-wrap: wrap; gap: var(--esp-2); }
.at-bascule {
  display: inline-flex;
  align-items: center;
  gap: var(--esp-2);
  min-height: var(--cible-min);
  padding: 0 var(--esp-4);
  border: 1px dashed var(--filet-fort);
  border-radius: var(--rayon-pilule);
  font-size: var(--taille-etiquette);
  color: var(--encre-douce);
  transition: border-color var(--duree-appui) ease, color var(--duree-appui) ease, background-color var(--duree-appui) ease, transform var(--duree-appui) var(--ease-out);
}
.at-bascule::before { content: "+"; font-size: var(--taille-texte); line-height: 1; color: var(--or); }
.at-bascule[aria-pressed="true"] { border-style: solid; border-color: var(--filet-actif); color: var(--or-clair); background: var(--voile-leger); }
.at-bascule[aria-pressed="true"]::before { content: "−"; }
.at-bascule[aria-busy="true"] { cursor: progress; opacity: 0.7; }
.at-bascule[aria-disabled="true"] { opacity: 0.55; }
.at-bascule:active { transform: scale(var(--appui-echelle)); }
@media (hover: hover) and (pointer: fine) { .at-bascule:hover { border-color: var(--filet-actif); color: var(--encre); } }

/* ---------- Préréglages dans le panneau : une rangée de pilules, largeurs naturelles ---------- */
.at-prereglages--panneau { gap: var(--esp-2); }
.at-prereglages--panneau .at-pilule { padding: 0 var(--esp-3); letter-spacing: var(--approche-normale); }
.at-prereglages--panneau .at-pilule::before { display: none; } /* la bordure --filet-actif suffit à marquer le choix */

/* ---------- Panneau replié (ordi) ---------- */
.at-pilule--reglages {
  position: absolute;
  left: var(--marge-ecran);
  bottom: calc(var(--sur-bas) + var(--esp-5));
  z-index: var(--plan-fiche);
  background: var(--voile-panneau);
  color: var(--encre);
  box-shadow: var(--ombre-panneau);
}

/* ---------- Fin du minuteur ---------- */
.at-sommeil {
  position: absolute;
  left: 50%;
  bottom: calc(var(--sur-bas) + var(--esp-8));
  z-index: var(--plan-fiche);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: var(--esp-3);
  text-align: center;
}
.at .at-sommeil p { color: var(--encre); font-family: var(--police-titre); font-size: var(--taille-titre-3); font-style: italic; text-shadow: var(--ombre-contact); white-space: nowrap; }

.at-lancer-image {
  position: absolute;
  right: var(--marge-ecran);
  top: 5rem;
  min-height: var(--cible-min);
}

/* ---------- Changer de refuge : liste simple (dialog natif) ---------- */
.at-liste {
  width: min(30rem, calc(100vw - 2 * var(--marge-ecran)));
  max-height: min(42rem, calc(100svh - 4rem));
  margin: auto;
  padding: 0;
  display: none;
  flex-direction: column;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  background: var(--panneau);
  color: var(--encre);
  box-shadow: var(--ombre-panneau);
  font-family: var(--police-texte);
}
.at-liste[open] { display: flex; }
.at-liste::backdrop { background: var(--voile-fort); }
.at-liste__tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--esp-3);
  padding: var(--esp-5) var(--esp-5) var(--esp-3);
  border-bottom: 1px solid var(--filet);
}
.at .at-liste__titre { font-variant: normal; color: var(--encre); text-shadow: none; font-family: var(--police-titre); font-size: var(--taille-titre-4); font-weight: var(--graisse-normale); line-height: var(--interligne-titre); }
.at-liste__refuges {
  list-style: none;
  margin: 0;
  padding: var(--esp-2) var(--esp-3);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--filet-fort) transparent;
}
.at-liste__refuge {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "nom cercle" "monde cercle";
  align-items: center;
  column-gap: var(--esp-3);
  width: 100%;
  min-height: 3.25rem;
  padding: var(--esp-2) var(--esp-3);
  border-radius: var(--rayon-petit);
  text-align: left;
  color: var(--encre);
  transition: background-color var(--duree-appui) ease;
}
.at-liste__nom { grid-area: nom; font-family: var(--police-titre); font-size: 1.2rem; line-height: var(--interligne-titre); }
.at-liste__monde { grid-area: monde; font-size: var(--taille-mention); color: var(--encre-attenuee); letter-spacing: var(--approche-etiquette); }
.at-liste__cercle {
  grid-area: cercle;
  padding: 2px var(--esp-2);
  border: 1px solid var(--filet-fort);
  border-radius: var(--rayon-pilule);
  font-size: var(--taille-mention);
  color: var(--or);
}
.at-liste__refuge[aria-current="true"] { background: var(--panneau-haut); box-shadow: inset 0 0 0 1px var(--filet-actif); }
.at-liste__refuge[aria-current="true"] .at-liste__nom { color: var(--or-clair); }
.at--membre .at-liste__cercle { color: var(--encre-attenuee); border-color: var(--filet); }
.at--membre .at-liste__aide { display: none; }
@media (hover: hover) and (pointer: fine) { .at-liste__refuge:hover { background: var(--voile-leger); } }
.at-liste__aide { padding: var(--esp-3) var(--esp-5) var(--esp-5); border-top: 1px solid var(--filet); }

/* ---------- Le Rideau : toute l'interface s'efface, il ne reste que la nuit (plein écran, navigation comprise) ---------- */
.at-contenu, .at-actions { transition: opacity var(--duree-moyenne) var(--ease-out), visibility 0s linear 0s; }
html.at-rideau-actif { overflow: hidden; }
html.at-rideau-actif .sr-header,
html.at-rideau-actif .sr-mobile-dock,
html.at-rideau-actif #srCookieBanner { visibility: hidden; }
.at--rideau .at-scene { position: fixed; inset: 0; z-index: 1000; }
.at--rideau .at-actions,
.at--rideau .at-contenu {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--duree-moyenne) var(--ease-sortie), visibility 0s linear var(--duree-moyenne);
}
.at--rideau .at-scene__voile { opacity: 0; }
.at-rideau-aide, .at-revenir { display: none; }
.at--rideau .at-rideau-aide,
.at--rideau .at-revenir {
  display: block;
  position: fixed;
  left: 50%;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity var(--duree-courte) var(--ease-sortie), visibility 0s linear var(--duree-courte);
}
.at--rideau .at-revenir { bottom: calc(var(--sur-bas) + var(--esp-7)); }
.at--rideau .at-rideau-aide {
  bottom: calc(var(--sur-bas) + var(--esp-7) + var(--bouton-hauteur) + var(--esp-4));
  margin: 0;
  padding: var(--esp-2) var(--esp-4);
  border-radius: var(--rayon-pilule);
  background: var(--voile);
  color: var(--encre-douce);
  font-size: var(--taille-etiquette);
  white-space: nowrap;
}
.at--rideau .at-revenir.at-visible,
.at--rideau .at-rideau-aide.at-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--duree-courte) var(--ease-out), visibility 0s linear 0s;
}
html.at-curseur-cache, html.at-curseur-cache * { cursor: none !important; }

.at-sans-js { position: absolute; left: var(--marge-ecran); top: 1.5rem; z-index: var(--plan-contenu); color: var(--encre-douce); }

/* Dans le refuge, sur téléphone : la barre du bas du site laisse la place au tiroir */
@media (max-width: 760px) {
  html.at-dans-refuge .sr-mobile-dock { display: none !important; }
}

/* =====================================================================
   Mobile dédié (≤ 760 px) : affiche portrait, préréglages sur deux lignes
   (tous visibles d'emblée), panneau en tiroir du bas à deux hauteurs.
   ===================================================================== */
@media (max-width: 760px) {
  .sr-imm--atelier { --at-dock: calc(var(--sr-dock-height, 4.3rem) + var(--sur-bas)); }
  .at { --at-icone: 16px; min-height: 32rem; }
  /* Affiche paysage (refuges sans version portrait) : cadrée sur le feu */
  .at-scene__affiche, .at-scene__film { object-position: var(--at-objet-x, 50%) 50%; }
  .at-actions { padding-top: var(--esp-3); padding-bottom: var(--esp-3); gap: var(--esp-1); }
  .at-bouton-barre { padding: 0 var(--esp-2) 0 var(--esp-3); gap: var(--esp-1); }

  .at-seuil {
    width: 100%;
    padding-bottom: max(calc(var(--at-dock) + var(--esp-5)), calc(var(--at-bandeau, 0px) + var(--esp-3)));
    gap: var(--esp-3);
  }
  .at .at-nom { font-size: var(--taille-titre-2); }
  .at .at-phrase { margin-bottom: var(--esp-1); font-size: var(--taille-texte); }
  .at-prereglages { row-gap: var(--esp-2); }
  .at-entrer { width: 100%; display: grid; justify-items: center; gap: var(--esp-1); margin-top: var(--esp-1); }
  .at-principal { width: 100%; min-height: var(--cible-confort); }

  .at-haut {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--esp-3);
    position: absolute;
    left: var(--marge-ecran);
    right: var(--marge-ecran);
    top: 4.25rem;
    pointer-events: none;
  }
  .at-haut > .at-legende, .at-haut > .at-lancer-image { position: static; }
  .at-haut > .at-lancer-image { pointer-events: auto; }
  .at-haut > .at-lien--haut { display: inline-flex; pointer-events: auto; margin-top: calc(var(--esp-3) * -1); padding: 0; }
  .at-lien--tete { display: none; }
  .at .at-legende { justify-items: start; text-align: left; }
  .at-legende__nom { font-size: var(--taille-titre-4); }

  /* Le tiroir du bas */
  .at-panneau {
    left: 0;
    right: 0;
    bottom: var(--at-bandeau, 0px);
    width: auto;
    max-height: calc(86% - var(--at-bandeau, 0px));
    border-radius: var(--rayon-grand) var(--rayon-grand) 0 0;
    border-width: 1px 0 0;
    transform: translateY(var(--at-decalage, 0px));
    transition: transform var(--duree-moyenne) var(--ease-tiroir), opacity var(--duree-moyenne) var(--ease-out);
  }
  .at-panneau[data-entree] { transform: translateY(100%); opacity: 1; }
  .at-panneau__tete { position: relative; padding: var(--esp-5) var(--marge-ecran) var(--esp-2); touch-action: none; }
  .at-poignee {
    display: block;
    position: absolute;
    left: 50%;
    top: 0;
    width: 7rem;
    height: var(--cible-min);
    transform: translateX(-50%);
    border-radius: var(--rayon-pilule);
  }
  .at-poignee__trait {
    position: absolute;
    left: 50%;
    top: var(--esp-2);
    width: 2.5rem;
    height: var(--curseur-piste);
    border-radius: var(--rayon-pilule);
    background: var(--filet-fort);
    transform: translateX(-50%);
  }
  .at-panneau__corps { padding: 0 var(--marge-ecran) calc(var(--sur-bas) + var(--esp-3)); gap: var(--esp-3); }
  .at-panneau:not(.at-panneau--ouvert) .at-panneau__corps { overflow: hidden; }

  /* « Plus de réglages » : une ligne discrète qui déplie tout le tiroir */
  .at-feuille {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--cible-min);
    border-top: 1px solid var(--filet);
    padding-top: var(--esp-1);
    font-size: var(--taille-etiquette);
    font-weight: var(--graisse-moyenne);
    letter-spacing: var(--approche-etiquette);
    color: var(--encre-douce);
  }
  .at-feuille svg { width: var(--at-icone); height: var(--at-icone); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--duree-courte) var(--ease-out); }
  .at-feuille[aria-expanded="true"] { color: var(--encre); }
  .at-feuille[aria-expanded="true"] svg { transform: rotate(180deg); }
  .at-plus { padding-top: var(--esp-2); }
  .at-plus summary { display: none; }
  .at-plus__corps { padding-top: var(--esp-2); }
  .at-replier { display: none; }
  .at-pilule--reglages { display: none; }

  .at-sommeil { bottom: 45%; }
  .at .at-sommeil p { font-size: var(--taille-titre-4); }
  .at.at--rideau .at-rideau-aide { white-space: normal; width: max-content; max-width: calc(100vw - 2 * var(--marge-ecran)); text-align: center; }

  .at-liste { width: 100vw; max-width: none; max-height: 88svh; margin: auto 0 0; border-radius: var(--rayon-grand) var(--rayon-grand) 0 0; border-width: 1px 0 0; }
  .at-liste__tete { padding-inline: var(--marge-ecran); }
  .at-liste__aide { padding: var(--esp-3) var(--marge-ecran) calc(var(--sur-bas) + var(--esp-4)); }
}

/* Écrans d'ordinateur peu hauts : le seuil remonte un peu moins */
@media (min-width: 761px) and (max-height: 820px) {
  .at-seuil { padding-bottom: max(var(--esp-6), calc(var(--at-bandeau, 0px) + var(--esp-4))); gap: var(--esp-3); }
  .at .at-nom { font-size: var(--taille-titre-2); }
}

/* =====================================================================
   Mouvement réduit : même contenu, aucun déplacement ni fondu animé.
   (socle.css coupe déjà les durées ; ici on retire les transformations.)
   ===================================================================== */
.mouvement-reduit .at-scene__cadre { will-change: auto; }
@media (prefers-reduced-motion: reduce) {
  .at-scene__film { transition: none; }
  .at[data-etat="refuge"] .at-seuil { transform: none; }
  .at-panneau[data-entree] { transform: none; opacity: 0; }
  .at-feuille svg, .at-plus summary::after { transition: none; }
}

/* =====================================================================
   Sous l'écran du refuge : comment ça marche, le Cercle, la FAQ, les liens
   (contenu inchangé ; règles reprises de l'ancien atelier.css).
   ===================================================================== */
.sr-imm--atelier .rf-below { position: relative; z-index: 1; padding: 3.2rem var(--marge-ecran) 4rem; font-family: var(--police-texte); background: transparent; color: var(--encre); font-size: 0.95rem; line-height: 1.6; }
.sr-imm--atelier .rf-below svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; display: inline-block; }
.sr-imm--atelier .rf-below a { text-decoration: none; }
.sr-imm--atelier .rf-below a:not(.sr-btn) { color: inherit; }
.sr-imm--atelier .rf-how__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 0.8rem; }
.sr-imm--atelier .rf-how__grid article { padding: 1.2rem 1.2rem 1.3rem; border-radius: var(--rayon); border: 1px solid var(--filet); background: color-mix(in srgb, var(--panneau) 55%, transparent); }
.sr-imm--atelier .rf-num { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1px solid var(--filet-fort); color: var(--or-clair); font-family: var(--police-titre); font-size: 1rem; margin-bottom: 0.7rem; }
.sr-imm--atelier .rf-how__grid h2 { font-family: var(--police-titre); font-weight: var(--graisse-normale); font-size: 1.35rem; margin: 0 0 0.4rem; }   /* couleur et petites capitales : charte du thème */
.sr-imm--atelier .rf-how__grid p { font-size: 0.86rem; line-height: 1.55; color: var(--encre-douce); margin: 0; }
.sr-imm--atelier .rf-offer { margin: 2.6rem 0; padding: 1.8rem clamp(1.2rem, 4vw, 2.6rem); scroll-margin-top: calc(var(--at-nav) + 1rem); }
.sr-imm--atelier .rf-offer h2 { font-family: var(--police-titre); font-weight: var(--graisse-normale); font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.15; margin: 0 0 0.9rem; max-width: 28ch; }
.sr-imm--atelier .rf-offer__list { margin: 0 0 1rem; padding-left: 1.1rem; font-size: 0.9rem; line-height: 1.7; color: var(--encre-douce); columns: 2; column-gap: 2rem; }
@media (max-width: 1100px) { .sr-imm--atelier .rf-offer__list { columns: 1; } }
.sr-imm--atelier .rf-offer__price { font-size: 0.95rem; color: var(--encre-douce); margin: 0 0 1rem; }
.sr-imm--atelier .rf-offer__price strong { font-family: var(--police-titre); font-size: 1.7rem; color: var(--or-clair); font-weight: var(--graisse-moyenne); }
.sr-imm--atelier .rf-offer .sr-actions a { text-decoration: none; }
.sr-imm--atelier .rf-faq { margin-top: 2.4rem; }
.sr-imm--atelier .rf-faq__item { margin: 0.5rem 0; padding: 0.2rem 1.1rem; }
.sr-imm--atelier .rf-faq__item summary { cursor: pointer; font-family: var(--police-titre); font-size: 1.15rem; padding: 0.7rem 0; color: var(--encre); list-style: none; display: flex; justify-content: space-between; gap: 1rem; min-height: var(--cible-min); align-items: center; }
.sr-imm--atelier .rf-faq__item summary::-webkit-details-marker { display: none; }
.sr-imm--atelier .rf-faq__item summary::after { content: "+"; color: var(--or); }
.sr-imm--atelier .rf-faq__item[open] summary::after { content: "−"; }
.sr-imm--atelier .rf-faq__item p { font-size: 0.88rem; line-height: 1.6; color: var(--encre-douce); margin: 0 0 0.9rem; }
.sr-imm--atelier .rf-links { margin-top: 2rem; font-size: 0.9rem; color: var(--encre-douce); line-height: 1.7; }
.sr-imm--atelier .rf-links a { color: var(--or-clair); border-bottom: 1px solid var(--filet-fort); }
@media (forced-colors: active) {
  .at-pilule[aria-pressed="true"], .at-segments input:checked + span { outline: 2px solid CanvasText; }
}
