/* ============================================================
   ATELIER — petit mot qui glisse en bas de l'écran
   Partagé par l'accueil (index.html) et la page d'offre 15 jours
   (twentytwentyfive-child/page-offre-15j.php) ; comportement dans
   assets/atelier-pop.js.

   Autonome : les deux pages n'ont pas les mêmes jetons de couleur, la
   carte porte donc les siens (préfixe --ap-), aux valeurs de la charte.

   Pas de voile, pas de défilement bloqué, pas de focus volé :
   on lit toujours la page derrière. Une croix, Échap ou « Plus tard ».
   ============================================================ */
.atelier-pop {
  --ap-turquoise:  #08c5d1;
  --ap-dark:       #003540;
  --ap-terracotta: #d46f4d;
  --ap-gray:       #4a8a95;
  --ap-gray-light: #b8e6ea;
  --ap-light:      #f0f8f9;
  --ap-white:      #ffffff;
  --ap-beige:      #fff5e0;
  --ap-shadow-sm:  0 2px 8px rgba(0,53,64,.10);
  --ap-font:       'Roboto', sans-serif;
  --ap-r-sm:       8px;
  --ap-r-base:     12px;
  --ap-r-lg:       16px;
  --ap-r-pill:     100px;
  --ap-t-fast:     0.2s cubic-bezier(.4,0,.2,1);
  --ap-t-bounce:   0.4s cubic-bezier(.68,-.55,.265,1.55);

  box-sizing: border-box;
  font-family: var(--ap-font);
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 180;                       /* sous la nav (200) et la bannière témoins */
  width: 340px; max-width: calc(100vw - 32px);
  background: var(--ap-white);
  border: 1px solid var(--ap-gray-light);
  border-radius: var(--ap-r-lg);
  box-shadow: 0 18px 50px rgba(0,53,64,.25);
  padding: 22px 22px 16px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px) rotate(-1.5deg) scale(.96);
  transition: opacity .35s ease, transform .5s var(--ap-t-bounce);
}
.atelier-pop[hidden] { display: none; }
.atelier-pop.is-open { opacity: 1; transform: none; }

/* Trajet d'outil en haut de la carte : une passe laser qui file */
.atelier-pop__passe {
  position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 2;
  background: repeating-linear-gradient(90deg, rgba(8,197,209,.35) 0 8px, transparent 8px 14px);
}
.atelier-pop__passe::after {
  content: ''; position: absolute; top: -3px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ap-terracotta);
  box-shadow: 0 0 10px 3px rgba(212,111,77,.55);
  animation: atelierPopPasse 3.2s ease-in-out infinite;
}
@keyframes atelierPopPasse {
  0%   { left: -10px; }
  50%  { left: calc(100% + 1px); }
  100% { left: -10px; }
}

.atelier-pop__close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.9);
  box-shadow: var(--ap-shadow-sm);
  font: 400 22px/1 var(--ap-font); color: var(--ap-dark);
  cursor: pointer;
  transition: background var(--ap-t-fast), transform var(--ap-t-fast);
}
.atelier-pop__close:hover { background: var(--ap-white); transform: rotate(90deg); }

/* Photo de l'atelier en tête de carte (Gildas devant la CNC) */
.atelier-pop__photo {
  position: relative;
  margin: -22px -22px 14px;
  height: 150px;
  overflow: hidden;
  background: var(--ap-dark);
}
.atelier-pop__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.atelier-pop__photo::after {                       /* fondu vers la carte */
  content: ''; position: absolute; inset: auto 0 0 0; height: 40px;
  background: linear-gradient(transparent, rgba(255,255,255,.35));
}
.atelier-pop.is-open .atelier-pop__photo img { animation: atelierPopZoom 6s ease-out both; }
@keyframes atelierPopZoom {
  from { transform: scale(1.12); }
  to   { transform: scale(1); }
}

.atelier-pop__psst {
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ap-terracotta); margin-bottom: 6px;
}
.atelier-pop__main { display: inline-block; transform-origin: 70% 80%; }
.atelier-pop.is-open .atelier-pop__main { animation: atelierPopCoucou 1.4s .45s ease-in-out 2; }
@keyframes atelierPopCoucou {
  0%,100% { transform: rotate(0); }
  15%     { transform: rotate(16deg); }
  30%     { transform: rotate(-10deg); }
  45%     { transform: rotate(14deg); }
  60%     { transform: rotate(-6deg); }
  75%     { transform: rotate(8deg); }
}

.atelier-pop h3 {
  font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--ap-dark);
  padding-right: 22px; margin-bottom: 6px;
}
.atelier-pop h3 span { color: var(--ap-turquoise); }
.atelier-pop__texte { font-size: 14.5px; color: var(--ap-gray); line-height: 1.55; margin-bottom: 14px; }

/* Rendez-vous : feuillet de calendrier + libellés */
.atelier-pop__rdv {
  display: flex; align-items: center; gap: 14px;
  background: var(--ap-light);
  border: 1px dashed rgba(8,197,209,.45);
  border-radius: var(--ap-r-base);
  padding: 10px 12px; margin-bottom: 14px;
}
.atelier-pop__feuillet {
  flex-shrink: 0; width: 52px;
  border-radius: var(--ap-r-sm); overflow: hidden;
  background: var(--ap-white); box-shadow: var(--ap-shadow-sm);
  text-align: center;
}
.atelier-pop.is-open .atelier-pop__feuillet { animation: atelierPopFeuillet .6s .25s var(--ap-t-bounce) both; }
@keyframes atelierPopFeuillet {
  from { transform: rotateX(80deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.atelier-pop__mois {
  display: block; background: var(--ap-terracotta); color: var(--ap-white);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 0;
}
.atelier-pop__jour { display: block; font-size: 22px; font-weight: 700; color: var(--ap-dark); line-height: 1.35; }
.atelier-pop__quand { min-width: 0; }
.atelier-pop__date { display: block; font-size: 15px; font-weight: 700; color: var(--ap-dark); }
.atelier-pop__heure { display: block; font-size: 12.5px; color: var(--ap-gray); }
.atelier-pop__dans {
  display: inline-block; margin-top: 4px;
  font-size: 11.5px; font-weight: 700; color: var(--ap-turquoise);
  background: rgba(8,197,209,.1); border-radius: var(--ap-r-pill);
  padding: 1px 9px;
}

.atelier-pop__infos {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: -4px 0 14px;
}
.atelier-pop__infos li {
  font-size: 12px; font-weight: 600; color: var(--ap-dark);
  background: var(--ap-beige);
  border: 1px solid rgba(212,111,77,.2);
  border-radius: var(--ap-r-pill);
  padding: 2px 10px;
}
.atelier-pop__plus-tard {
  display: block; width: 100%; margin-top: 8px;
  border: none; background: none; cursor: pointer;
  font: 500 13px var(--ap-font); color: var(--ap-gray);
  padding: 6px;
}
.atelier-pop__plus-tard:hover { color: var(--ap-dark); text-decoration: underline; }

@media(max-width:600px){
  .atelier-pop { right: 16px; left: 16px; bottom: 16px; width: auto; max-width: none; padding: 18px 18px 12px; }
  .atelier-pop h3 { font-size: 17px; }
  .atelier-pop__photo { margin: -18px -18px 12px; height: 110px; }
}
/* Écran peu haut : la photo rétrécit pour que la carte reste sous la nav */
@media(max-height:760px){
  .atelier-pop__photo { height: 100px; }
}

/* Bouton d'inscription : autonome (la page d'offre n'a pas les .btn de l'accueil) */
.atelier-pop__cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  font: 600 16px var(--ap-font);
  color: var(--ap-white); text-decoration: none;
  background: linear-gradient(135deg, #d46f4d, #e0845f);
  border-radius: var(--ap-r-pill);
  padding: 12px 26px;
  box-shadow: 0 4px 16px rgba(212,111,77,.20);
  transition: transform var(--ap-t-bounce), box-shadow var(--ap-t-fast);
}
.atelier-pop__cta:hover {
  color: var(--ap-white);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(212,111,77,.35);
}
.atelier-pop *, .atelier-pop *::before, .atelier-pop *::after { box-sizing: border-box; }
