/*
 * En-tete des pages de solution (/anticipation-de-crise/, /pilotage-de-crise/,
 * /resilience-durable/), 2026-11-10. Style propre a ces trois pages, distinct
 * de l'accueil (photos defilantes) et de Ressources : texte a gauche, radar
 * anime autour du pictogramme de la solution a droite, frise « Avant /
 * Pendant / Apres » qui situe la page dans le continuum de la crise.
 * Balisage : src/elementor/page-solution.ts. Couleurs : kit Elementor (post-9).
 */

.sol-entete {
  --sol-vert: var(--e-global-color-primary, #19de77);
  --sol-vert-fonce: var(--e-global-color-707eda0, #19a15a);
  --sol-creme: var(--e-global-color-5859616, #f3f3f2);
  --sol-fond: var(--e-global-color-secondary, #052f31);
  --sol-ligne: rgb(25 222 119 / 24%);
  --sol-rouge: var(--e-global-color-8aba4ec, #d7482f);

  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 20px 8px;
  color: var(--sol-creme);
  font-family: 'Product Sans', sans-serif;
}

/* fond : quadrillage discret qui s'estompe vers le bas */
.sol-entete::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--sol-ligne) 1px, transparent 1px),
    linear-gradient(90deg, var(--sol-ligne) 1px, transparent 1px);
  background-size: 56px 56px;
  content: '';
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
}

.sol-entete__grille {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

/* --- texte --- */

.sol-surtitre {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--sol-vert);
  font-size: 17px;
  font-weight: 400;
}

.sol-surtitre::before {
  width: 36px;
  height: 1px;
  background: var(--sol-vert);
  content: '';
}

.sol-titre {
  margin: 0 0 20px;
  color: var(--sol-creme);
  font-size: clamp(38px, 5.2vw, 64px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.sol-titre__accent {
  display: block;
  color: var(--sol-vert);
}

.sol-accroche {
  max-width: 34em;
  margin: 0 0 30px;
  font-size: 19px;
  font-weight: 300;
  line-height: 1.5;
  opacity: 0.85;
}

.sol-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.sol-entete .sol-bouton {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.sol-entete .sol-bouton:hover,
.sol-entete .sol-bouton:focus-visible {
  transform: translateY(-2px);
}

.sol-entete .sol-bouton--plein {
  background: var(--sol-vert);
  color: var(--sol-fond);
}

.sol-entete .sol-bouton--plein:hover,
.sol-entete .sol-bouton--plein:focus-visible {
  background: var(--sol-creme);
  color: var(--sol-fond);
}

.sol-entete .sol-bouton--urgence {
  border-color: rgb(215 72 47 / 60%);
  color: var(--sol-creme);
}

.sol-entete .sol-bouton--urgence::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sol-rouge);
  content: '';
  animation: sol-clignote 1.4s infinite;
}

.sol-entete .sol-bouton--urgence:hover,
.sol-entete .sol-bouton--urgence:focus-visible {
  border-color: var(--sol-rouge);
  background: rgb(215 72 47 / 15%);
  color: var(--sol-creme);
}

.sol-mots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sol-mots li {
  padding: 5px 12px;
  border: 1px solid var(--sol-ligne);
  border-radius: 6px;
  font-size: 13px;
  opacity: 0.8;
}

/* --- radar --- */

.sol-radar {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.sol-radar__anneau {
  position: absolute;
  inset: 0;
  border: 1px solid var(--sol-ligne);
  border-radius: 50%;
}

.sol-radar__anneau:nth-child(2) {
  inset: 16%;
}

.sol-radar__anneau:nth-child(3) {
  inset: 32%;
  border-color: rgb(25 222 119 / 40%);
}

/* onde qui part du centre */
.sol-radar__onde {
  position: absolute;
  inset: 32%;
  border: 2px solid var(--sol-vert);
  border-radius: 50%;
  opacity: 0;
  animation: sol-onde 3.6s ease-out infinite;
}

.sol-radar__onde + .sol-radar__onde {
  animation-delay: 1.8s;
}

/* faisceau qui balaie */
.sol-radar__balayage {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgb(25 222 119 / 28%), transparent 22%);
  animation: sol-tour 6s linear infinite;
  mask-image: radial-gradient(circle, #000 0%, #000 69%, transparent 70%);
}

.sol-radar__picto {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26%;
  aspect-ratio: 1;
  padding: 5%;
  border: 1px solid rgb(25 222 119 / 50%);
  border-radius: 50%;
  background: var(--sol-fond);
  box-shadow: 0 0 40px rgb(25 222 119 / 35%);
  transform: translate(-50%, -50%);
}

.sol-radar__picto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* points reperes sur les anneaux */
.sol-radar__repere {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sol-vert);
  box-shadow: 0 0 12px var(--sol-vert);
  animation: sol-clignote 2.4s infinite;
}

.sol-radar__repere:nth-of-type(1) {
  top: 14%;
  left: 24%;
}

.sol-radar__repere:nth-of-type(2) {
  top: 62%;
  right: 6%;
  animation-delay: 0.8s;
}

.sol-radar__repere:nth-of-type(3) {
  bottom: 9%;
  left: 38%;
  animation-delay: 1.6s;
}

/* --- frise avant / pendant / apres --- */

.sol-frise {
  margin-top: 56px;
}

.sol-frise ol {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ligne de fond et ligne tracee jusqu'a l'etape courante */
.sol-frise ol::before,
.sol-frise ol::after {
  position: absolute;
  top: 7px;
  left: 0;
  height: 2px;
  content: '';
}

.sol-frise ol::before {
  right: 0;
  background: var(--sol-ligne);
}

.sol-frise ol::after {
  width: var(--sol-avance, 0%);
  background: linear-gradient(90deg, var(--sol-vert-fonce), var(--sol-vert));
  transform-origin: left;
  animation: sol-trace 1.2s 0.6s ease-out both;
}

.sol-frise--1 {
  --sol-avance: 16.6%;
}

.sol-frise--2 {
  --sol-avance: 50%;
}

.sol-frise--3 {
  --sol-avance: 83.3%;
}

.sol-frise a {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding-top: 26px;
  color: var(--sol-creme);
  text-align: center;
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.sol-frise a::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid var(--sol-ligne);
  border-radius: 50%;
  background: var(--sol-fond);
  content: '';
  transform: translateX(-50%);
}

.sol-frise a:hover,
.sol-frise a:focus-visible,
.sol-frise__actif a {
  opacity: 1;
}

.sol-frise__actif a::before {
  border-color: var(--sol-vert);
  background: var(--sol-vert);
  box-shadow: 0 0 0 6px rgb(25 222 119 / 18%);
}

.sol-frise__temps {
  color: var(--sol-vert);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sol-frise__nom {
  font-size: 17px;
}

/* --- apparition en cascade --- */

.sol-apparait {
  animation: sol-monte 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.sol-apparait--2 {
  animation-delay: 0.12s;
}

.sol-apparait--3 {
  animation-delay: 0.24s;
}

.sol-apparait--4 {
  animation-delay: 0.36s;
}

.sol-apparait--5 {
  animation-delay: 0.48s;
}

.sol-radar.sol-apparait {
  animation-name: sol-zoom;
  animation-duration: 1.1s;
  animation-delay: 0.2s;
}

@keyframes sol-monte {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sol-zoom {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sol-onde {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(3.1);
  }
}

@keyframes sol-tour {
  to {
    transform: rotate(360deg);
  }
}

@keyframes sol-trace {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes sol-clignote {
  50% {
    opacity: 0.35;
  }
}

/* --- tablette et mobile --- */

@media (width <= 900px) {
  .sol-entete {
    padding-top: 32px;
  }

  .sol-entete__grille {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sol-radar {
    width: min(70%, 300px);
    order: -1;
  }

  .sol-frise__nom {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sol-entete *,
  .sol-entete *::before,
  .sol-entete *::after,
  .sol-frise ol::after {
    animation: none !important;
    transition: none !important;
  }
}
