/*
 * La demonstration animee du rappel : le meme ecran que dans l'application,
 * porte en HTML et CSS depuis `design/reference-animation-rappel.html`.
 * Les keyframes `pilulo-shake` et `pilulo-ripple` sont celles de la charte,
 * durees comprises (1,7 s et 2,6 s).
 *
 * Les tailles y sont en pixels a dessein : c'est l'image d'un ecran, pas le
 * texte de la page. Le bloc entier porte role="img" et son libelle, donc rien
 * de ce texte n'est lu deux fois ni ne doit suivre la taille de police du
 * lecteur. Le texte de la PAGE, lui, reste en rem partout.
 */

.telephone-boite {
  display: flex;
  justify-content: center;
  height: 650px;
}

.telephone {
  position: relative;
  width: 300px;
  height: 650px;
  flex: none;
  border-radius: 46px;
  padding: 10px;
  background: #1b211f;
  box-shadow:
    0 30px 60px rgba(34, 48, 44, 0.22),
    0 6px 16px rgba(34, 48, 44, 0.12);
  transform-origin: top center;
}

/*
 * Sous 24 rem, `transform: scale` ne suffit pas : il retrecit l'image, pas la
 * boite, et les 300 px du telephone continuaient de pousser la page hors de
 * l'ecran (mesure du 2026-08-30 a 320 px de large). La boite retrecit avec lui.
 */
@media (max-width: 24rem) {
  .telephone-boite {
    height: 553px;
    width: 255px;
    margin-inline: auto;
  }
  .telephone {
    transform: scale(0.85);
    transform-origin: top left;
  }
}

.telephone__ecran {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 37px;
  overflow: hidden;
  background: linear-gradient(180deg, #faf8f4 0%, #f3efe8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 20px 24px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

.telephone__ilot {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 24px;
  border-radius: 999px;
  background: #1b211f;
}

.telephone__entete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 30px;
}

.telephone__kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #16705f;
}

.telephone__heure {
  font-size: 46px;
  font-weight: 200;
  letter-spacing: -1px;
  line-height: 1;
  color: #22302c;
}

.telephone__scene-boite {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.scene {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene__halo {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43, 179, 154, 0.14) 0%, rgba(43, 179, 154, 0) 70%);
}

.scene__onde {
  position: absolute;
  width: 152px;
  height: 152px;
  margin: -76px 0 0 -76px;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1.5px solid #2bb39a;
  opacity: 0;
  animation: pilulo-ripple 2.6s cubic-bezier(0.2, 0.5, 0.4, 1) infinite;
}

.scene__onde--2 {
  animation-delay: 0.85s;
}
.scene__onde--3 {
  animation-delay: 1.7s;
}

/*
 * La grappe ne porte QUE la gelule. Le flacon de la scene de reference a ete
 * retire le 2026-08-30 : les props du designer le donnent a `false` par defaut,
 * l'icone validee de l'application ne montre qu'une gelule, et en capture les
 * deux objets se chevauchaient en decalant le sujet hors du halo.
 */
.scene__grappe {
  position: relative;
  width: 96px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 30%;
  animation: pilulo-shake 1.7s ease-in-out infinite;
}

.scene__gelule {
  position: relative;
  width: 96px;
  height: 43px;
  border-radius: 999px;
  transform: rotate(-28deg);
  display: flex;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(34, 48, 44, 0.18);
}

.scene__gelule-moitie {
  flex: 1;
  background: #2bb39a;
}

.scene__gelule-moitie--claire {
  background: #fdfcfa;
}

.scene__gelule-reflet {
  position: absolute;
  left: 10px;
  top: 7px;
  width: 58px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.telephone__legende {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  padding-bottom: 20px;
}

.telephone__medicament {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 600;
  color: #22302c;
}

.telephone__pastille {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #16a34a;
  flex: none;
}

.telephone__sous-titre {
  font-size: 14px;
  color: #5c6762;
}

.telephone__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/*
 * Les quatre durées de report, côte à côte comme dans l'application depuis la
 * livraison de l'écran d'alerte (2026-08-31). La démonstration montrait
 * jusque-là « Pris » et « Reporter de 10 min », qui venaient de la première
 * référence d'animation et ne correspondaient plus à rien : SOUL.md fixe
 * 5 min, 15 min, 1 heure ou une durée libre.
 */
.telephone__durees {
  display: flex;
  gap: 6px;
}

.telephone__durees .telephone__bouton {
  flex: 1;
  font-size: 13px;
}

.telephone__bouton {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
}

.telephone__bouton--primaire {
  height: 48px;
  background: #1d816e;
  color: #fdfcfa;
  font-size: 16px;
  box-shadow: 0 8px 20px rgba(29, 129, 110, 0.25);
}

.telephone__bouton--secondaire {
  height: 44px;
  background: rgba(34, 48, 44, 0.06);
  color: #22302c;
  font-size: 15px;
  font-weight: 500;
}

@keyframes pilulo-shake {
  0%,
  62%,
  100% {
    transform: rotate(0deg);
  }
  6% {
    transform: rotate(-9deg);
  }
  14% {
    transform: rotate(8deg);
  }
  22% {
    transform: rotate(-6deg);
  }
  30% {
    transform: rotate(5deg);
  }
  38% {
    transform: rotate(-3deg);
  }
  46% {
    transform: rotate(2deg);
  }
  54% {
    transform: rotate(-1deg);
  }
}

@keyframes pilulo-ripple {
  0% {
    transform: scale(0.55);
    opacity: 0.45;
  }
  70% {
    opacity: 0.12;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

/*
 * Mouvement reduit : l'illustration se fige sur une image lisible, jamais
 * une scene vide. Les ondes gardent une opacite basse, la grappe ne tourne
 * plus. SOUL.md invariant 5 : l'accessibilite passe avant l'effet.
 */
@media (prefers-reduced-motion: reduce) {
  .scene__onde {
    animation: none;
    opacity: 0.18;
    transform: scale(1);
  }
  .scene__onde--2 {
    transform: scale(1.22);
    opacity: 0.12;
  }
  .scene__onde--3 {
    transform: scale(1.44);
    opacity: 0.07;
  }
  .scene__grappe {
    animation: none;
  }
}
