/* ═══════════════════════════════════════════════
   style.css
   Pour modifier l'apparence, tout est ici.
   Les couleurs principales sont dans :root en haut.
   ═══════════════════════════════════════════════ */


/* ── Variables ────────────────────────────────
   Change ces valeurs pour recolorer tout le site
   ─────────────────────────────────────────────  */
:root {
  --color-bg:           #fdf6f0;   /* fond de page */
  --color-card:         #fff8f4;   /* fond des cartes */
  --color-card-locked:  #f5ede8;   /* fond des cartes verrouillées */
  --color-border:       #e8c9b0;   /* bordure des cartes */
  --color-accent:       #d4856a;   /* couleur principale (icônes, points actifs) */
  --color-text:         #3d2414;   /* texte principal */
  --color-text-mid:     #a07060;   /* texte secondaire */
  --color-text-light:   #c9a48c;   /* texte discret (hints, labels) */
  --color-veil-a:       #fce8db;   /* rayures du voile (couleur A) */
  --color-veil-b:       #f5e4d8;   /* rayures du voile (couleur B) */

  --font-serif: 'Cormorant Garamond', serif;
  --font-sans:  'Jost', sans-serif;

  --transition-reveal: 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ── Reset minimal ────────────────────────────  */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background-color: var(--color-bg);
  font-family: var(--font-sans);
  color: var(--color-text);
}


/* ── Mise en page principale ──────────────────  */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem 3rem;
}


/* ── En-tête ──────────────────────────────────  */
.header {
  text-align: center;
  margin-bottom: 2.8rem;
  animation: fade-down 0.7s ease both;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-text-light);
  font-weight: 300;
  margin-bottom: 0.4rem;
}

.title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.countdown {
  font-size: 13px;
  font-weight: 300;
  color: var(--color-text-mid);
}

/* Le nombre de jours est mis en valeur */
.countdown strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 400;
  color: var(--color-accent);
}


/* ── Grille de cartes ─────────────────────────  */
.cards {
  display: flex;
  gap: 16px;
  width: 100%;
  max-width: 600px;
  animation: fade-up 0.8s ease 0.1s both;
}


/* ── Carte individuelle ───────────────────────  */
.card {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.4rem 1rem 1.2rem;
  min-height: 200px;

  background-color: var(--color-card);
  border: 0.5px solid var(--color-border);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Survol uniquement sur les cartes disponibles et non révélées */
.card:hover:not(.card--locked):not(.card--revealed) {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(180, 100, 60, 0.1);
}

/* Carte verrouillée (heure pas encore atteinte) */
.card--locked {
  background-color: var(--color-card-locked);
  opacity: 0.55;
  cursor: default;
}

/* Carte déjà révélée */
.card--revealed {
  cursor: default;
}


/* ── Label horaire (MATIN / MIDI / NUIT) ──────  */
.card__label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-light);
  font-weight: 400;
  margin-bottom: 0.9rem;
}


/* ── Icône Lucide ─────────────────────────────  */
.card__icon {
  width: 28px;
  height: 28px;
  margin-bottom: 0.8rem;
  color: var(--color-accent);
  opacity: 0.6;
  flex-shrink: 0;
}


/* ── Texte du message (caché par défaut) ──────  */
.card__text {
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  font-weight: 300;
  color: var(--color-text);
  line-height: 1.7;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;

  /* Caché jusqu'à la révélation */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}

/* Indication "glisser pour lire" */
.card__hint {
  font-size: 11px;
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  font-style: italic;
  margin-top: 0.6rem;
  transition: opacity 0.3s ease;
}

/* Icône cadenas (cartes verrouillées) */
.card__lock {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 14px;
  height: 14px;
  color: var(--color-text-light);
}


/* ── Voile rayé (masque le message) ───────────
   Slide vers le haut quand on clique → CSS transform.
   ─────────────────────────────────────────────  */
.card__veil {
  position: absolute;
  inset: 0;

  /* Motif hachuré diagonal */
  background: repeating-linear-gradient(
    135deg,
    var(--color-veil-a) 0px,
    var(--color-veil-a) 8px,
    var(--color-veil-b) 8px,
    var(--color-veil-b) 16px
  );

  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--color-text-light);
  font-style: italic;

  transition: transform var(--transition-reveal), opacity 0.3s ease;
  user-select: none;
}


/* ── État révélé : le voile monte, le texte apparaît ── */
.card--revealed .card__veil {
  transform: translateY(-100%);
  opacity: 0;
}

.card--revealed .card__text {
  opacity: 1;
  transform: translateY(0);
}

.card--revealed .card__hint {
  opacity: 0;
  pointer-events: none;
}


/* ── Points de progression ────────────────────  */
.dots {
  display: flex;
  gap: 7px;
  margin-top: 2rem;
  animation: fade-up 0.9s ease 0.2s both;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--color-border);
  transition: background-color 0.4s ease, transform 0.3s ease;
}

.dot--lit {
  background-color: var(--color-accent);
  transform: scale(1.35);
}


/* ── Date en bas de page ──────────────────────  */
.date-label {
  font-size: 11px;
  color: var(--color-text-light);
  margin-top: 1.4rem;
  letter-spacing: 0.1em;
  font-weight: 300;
  animation: fade-up 1s ease 0.3s both;
}


/* ── Message "pas de notes" ───────────────────  */
.no-notes {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-text-mid);
  text-align: center;
  max-width: 320px;
  line-height: 1.8;
}


/* ── Animations d'entrée ──────────────────────  */
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── Responsive mobile ────────────────────────  */
@media (max-width: 500px) {
  .cards {
    flex-direction: column;
    max-width: 280px;
  }
  .card {
    min-height: 140px;
  }
}
