/**
 * G2RD Countdown — feuille de style du bloc (éditeur + front).
 *
 * Chaque propriété visuelle lit la variable CSS que `save()` pose sur le
 * conteneur : --item-spacing, --item-padding, --item-background,
 * --item-border-radius, --value-size, --label-size, --animation-duration.
 * Repli en cascade : variable du bloc → token du theme.json → valeur
 * historique du bloc. Les variables du bloc étant toujours écrites par
 * `save()` (sauf --value-size / --label-size, optionnelles), un site qui n'a
 * jamais touché aux réglages rend exactement comme avant.
 *
 * Les variables --wp--custom--countdown--* laissent une variation de styles
 * (styles/<projet>.json › settings.custom.countdown) retoucher le décor des
 * pastilles sans une ligne de CSS ni un seul !important.
 *
 * La couleur du texte n'est jamais fixée ici : elle vient du theme.json et
 * des réglages de couleur du bloc.
 */

.g2rd-countdown {
  /* Valeurs locales : les media queries ne retouchent que ces variables. */
  --g2rd-countdown-gap: var(--item-spacing, var(--wp--preset--spacing--xs, 20px));
  --g2rd-countdown-item-padding: var(
    --item-padding,
    var(--wp--preset--spacing--xs, 15px)
  );
  --g2rd-countdown-item-min-width: var(
    --wp--custom--countdown--item-min-width,
    80px
  );
  --g2rd-countdown-value-size: var(--value-size, 2em);
  --g2rd-countdown-label-size: var(--label-size, 0.9em);

  /* Colonne : le titre se place AU-DESSUS de la rangée de pastilles — c'est
     ce que l'éditeur a toujours affiché. En `row`, le <h2 class="countdown-title">
     était écrasé à gauche par .countdown-container (width:100%), d'où un
     deuxième écart éditeur/front. Sans titre, le rendu est inchangé : le
     conteneur est alors l'unique enfant. La rangée elle-même reste gérée par
     .countdown-container / .countdown-layout-*. */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--g2rd-countdown-gap);
  margin: var(--wp--custom--countdown--margin-block, 20px) 0;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(
    --item-background,
    var(--wp--preset--color--surface, #f5f5f5)
  );
  padding: var(--g2rd-countdown-item-padding);
  border-radius: var(
    --item-border-radius,
    var(--wp--custom--radius--s, 8px)
  );
  min-width: var(--g2rd-countdown-item-min-width);
  transition: all 0.3s ease;
  /* Neutralisable depuis une variation : settings.custom.countdown.itemShadow */
  box-shadow: var(
    --wp--custom--countdown--item-shadow,
    0 2px 4px rgba(0, 0, 0, 0.1)
  );
  position: relative;
  overflow: hidden;
}

.countdown-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: var(--g2rd-countdown-gap);
}

.countdown-layout-column {
  flex-direction: column;
  flex-wrap: nowrap;
}

.countdown-layout-row {
  flex-direction: row;
  flex-wrap: wrap;
}

.countdown-item:hover {
  transform: translateY(-2px);
  box-shadow: var(
    --wp--custom--countdown--item-shadow-hover,
    0 4px 8px rgba(0, 0, 0, 0.15)
  );
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.countdown-item.pulse {
  animation: pulse var(--animation-duration, 1s) infinite;
}

@keyframes flip {
  0% {
    transform: rotateX(0);
  }
  100% {
    transform: rotateX(360deg);
  }
}

.countdown-item.flip .countdown-value {
  animation: flip var(--animation-duration, 1s) ease-in-out;
  transform-style: preserve-3d;
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Le fondu a toujours duré la moitié des autres effets : ratio conservé. */
.countdown-item.fade .countdown-value {
  animation: fade calc(var(--animation-duration, 1s) / 2) ease-in-out;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.countdown-item.bounce .countdown-value {
  animation: bounce var(--animation-duration, 1s) ease-in-out;
}

.countdown-value {
  font-size: var(--g2rd-countdown-value-size);
  font-weight: bold;
  line-height: 1;
  margin-bottom: 5px;
  transition: all 0.3s ease;
}

/* Préréglages « style du minuteur » : chaque teinte reste une variable pour
   qu'une variation puisse la remapper (settings.custom.countdown.*). */
.countdown-item.digital .countdown-value {
  font-family: "Digital-7", "Courier New", monospace;
  background: var(--wp--custom--countdown--digital-background, #000);
  color: var(--wp--custom--countdown--digital-text, #0f0);
  padding: 5px 10px;
  border-radius: var(--wp--custom--radius--xs, 4px);
  text-shadow: 0 0 5px var(--wp--custom--countdown--digital-text, #0f0);
}

.countdown-item.neon .countdown-value {
  font-family: "Arial", sans-serif;
  color: var(--wp--custom--countdown--neon-text, #fff);
  text-shadow:
    0 0 5px var(--wp--custom--countdown--neon-text, #fff),
    0 0 10px var(--wp--custom--countdown--neon-text, #fff),
    0 0 20px var(--wp--custom--countdown--neon-glow, #0ff),
    0 0 30px var(--wp--custom--countdown--neon-glow, #0ff),
    0 0 40px var(--wp--custom--countdown--neon-glow, #0ff);
}

.countdown-item.retro .countdown-value {
  font-family: "Press Start 2P", cursive;
  color: var(--wp--custom--countdown--retro-text, #ff6b6b);
  text-shadow: 2px 2px 0 var(--wp--custom--countdown--retro-shadow, #000);
}

.countdown-item.minimal .countdown-value {
  font-family: "Helvetica Neue", sans-serif;
  font-weight: 300;
  letter-spacing: 2px;
}

.countdown-item.bold .countdown-value {
  font-family: "Impact", sans-serif;
  font-weight: 900;
  letter-spacing: -1px;
}

.countdown-label {
  font-size: var(--g2rd-countdown-label-size);
  color: var(--wp--preset--color--muted, currentColor);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.countdown-item:hover .countdown-label {
  transform: scale(1.1);
}

.countdown-ended {
  text-align: center;
  font-size: 1.2em;
  color: var(--wp--preset--color--danger, #ff4444);
  padding: var(--wp--preset--spacing--xs, 20px);
  background: var(--wp--preset--color--white, #fff);
  border-radius: var(--item-border-radius, var(--wp--custom--radius--s, 8px));
  box-shadow: var(
    --wp--custom--countdown--item-shadow,
    0 2px 4px rgba(0, 0, 0, 0.1)
  );
  width: 100%;
  margin: var(--wp--custom--countdown--margin-block, 20px) 0;
  animation: fade calc(var(--animation-duration, 1s) / 2) ease-in-out;
}

/* RGAA 13.1 / WCAG 2.3.3 — respecter prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .g2rd-countdown,
  .g2rd-countdown * {
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .g2rd-countdown {
    --g2rd-countdown-gap: var(--wp--custom--countdown--gap-tablet, 10px);
    --g2rd-countdown-item-padding: var(
      --wp--custom--countdown--item-padding-tablet,
      10px
    );
    --g2rd-countdown-item-min-width: var(
      --wp--custom--countdown--item-min-width-tablet,
      60px
    );
    --g2rd-countdown-value-size: var(--wp--custom--countdown--value-size-tablet, 1.5em);
    --g2rd-countdown-label-size: var(--wp--custom--countdown--label-size-tablet, 0.8em);
  }
}

@media (max-width: 480px) {
  .g2rd-countdown {
    --g2rd-countdown-gap: var(--wp--custom--countdown--gap-mobile, 5px);
    --g2rd-countdown-item-padding: var(
      --wp--custom--countdown--item-padding-mobile,
      8px
    );
    --g2rd-countdown-item-min-width: var(
      --wp--custom--countdown--item-min-width-mobile,
      50px
    );
    --g2rd-countdown-value-size: var(--wp--custom--countdown--value-size-mobile, 1.2em);
    --g2rd-countdown-label-size: var(--wp--custom--countdown--label-size-mobile, 0.7em);
  }
}


/*# sourceMappingURL=index.css.map*/