/* ============================================================
   GIRARD TP — style.css
   Approche mobile-first, 100 % responsive.
   Palette dérivée du logo : noir + rouge tuile,
   complétée par un blanc cassé et des gris "zinc / ardoise".
   ============================================================ */

/* ---------- 1. Variables de design (couleurs, typo, espacements) ---------- */
:root {
  /* Couleurs */
  --noir-ardoise: #181A1D;   /* fond sombre, évoque l'ardoise */
  --gris-zinc:    #9BA0A6;   /* gris zinc, textes secondaires sur fond sombre */
  --rouge-tuile:  #D7141F;   /* rouge du logo, accent et CTA */
  --rouge-fonce:  #A80F18;   /* rouge assombri pour les états hover/focus */
  --blanc-casse:  #F7F5F2;   /* fond clair principal */
  --encre:        #1C1D1F;   /* texte principal sur fond clair */

  /* Typographie */
  --police-titres: "Barlow Condensed", "Arial Narrow", sans-serif;
  --police-texte:  "Barlow", Arial, sans-serif;

  /* Espacements */
  --espace-s: 0.75rem;
  --espace-m: 1.5rem;
  --espace-l: 3rem;
}

/* ---------- 2. Remise à zéro légère ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--police-texte);
  font-size: 1rem;            /* 16 px minimum : lisibilité */
  line-height: 1.6;
  color: var(--encre);
  background-color: var(--blanc-casse);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Focus clavier bien visible (accessibilité) */
a:focus-visible {
  outline: 3px solid var(--rouge-tuile);
  outline-offset: 3px;
}

/* ---------- 3. En-tête ---------- */
.site-header {
  display: flex;
  justify-content: center;
  padding: var(--espace-m) var(--espace-m) 0;
}

.site-logo {
  width: 140px;
  height: auto;
}

/* ---------- 4. Hero ---------- */
.hero {
  flex: none;
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--espace-m) var(--espace-m) var(--espace-l);
  text-align: center;
}

/* Sur-titre : les trois métiers, façon signalétique */
.hero-eyebrow {
  font-family: var(--police-titres);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rouge-tuile);
  margin-bottom: var(--espace-s);
}

h1 {
  font-family: var(--police-titres);
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: var(--espace-m);
}

.hero-intro {
  font-size: 1.05rem;
  max-width: 38rem;
  margin: 0 auto var(--espace-m);
}

.hero-date {
  font-size: 1.1rem;
  margin-bottom: var(--espace-l);
}

.hero-date strong {
  color: var(--rouge-tuile);
}

/* ---------- 5. Compte à rebours : tuiles d'ardoise ---------- */
.countdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 colonnes sur mobile */
  gap: var(--espace-s);
  max-width: 34rem;
  margin: 0 auto;
}

.tile {
  background: linear-gradient(160deg, #26292d 0%, var(--noir-ardoise) 70%);
  color: var(--blanc-casse);
  border-radius: 6px;
  padding: var(--espace-m) var(--espace-s);
  box-shadow: 0 4px 0 #0c0d0e;          /* épaisseur, effet "tuile posée" */
  border-top: 3px solid var(--rouge-tuile); /* faîtage rouge, rappel du logo */
}

.tile-value {
  display: block;
  font-family: var(--police-titres);
  font-weight: 800;
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;   /* chiffres à chasse fixe : pas de saut */
}

.tile-label {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gris-zinc);
}

/* Petite animation "bounce" quand une valeur change (déclenchée en JS) */
.tile-value.bounce {
  animation: bounce 0.45s ease;
}

@keyframes bounce {
  0%   { transform: translateY(0); }
  35%  { transform: translateY(-8px); }
  70%  { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

/* ---------- 6. Ligne de toit (séparateur SVG) ---------- */
.roofline {
  margin-top: auto; /* pousse la section sombre vers le bas de l'écran */
  line-height: 0;
}

.roofline svg {
  width: 100%;
  height: clamp(48px, 8vw, 90px);
}

/* ---------- 7. Section contact (bande sombre) ---------- */
.contact {
  background-color: var(--noir-ardoise);
  color: var(--blanc-casse);
  text-align: center;
  padding: var(--espace-l) var(--espace-m);
}

.contact h2 {
  font-family: var(--police-titres);
  font-weight: 800;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  text-transform: uppercase;
  margin-bottom: var(--espace-s);
}

.contact p {
  max-width: 40rem;
  margin: 0 auto var(--espace-m);
  color: var(--gris-zinc);
}

/* Groupe de boutons d'action */
.cta-group {
  display: flex;
  flex-direction: column; /* empilés sur mobile */
  gap: var(--espace-s);
  align-items: center;
}

.btn {
  display: inline-block;
  font-family: var(--police-titres);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.8rem;
  border-radius: 6px;
  min-width: 16rem;
  transition: transform 0.2s ease, background-color 0.2s ease,
              color 0.2s ease, border-color 0.2s ease;
}

/* Bouton principal : appel téléphonique */
.btn-primary {
  background-color: var(--rouge-tuile);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--rouge-fonce);
  transform: translateY(-3px);
}

/* Bouton secondaire : e-mail */
.btn-secondary {
  background-color: transparent;
  color: var(--blanc-casse);
  border: 2px solid var(--gris-zinc);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--blanc-casse);
  color: var(--noir-ardoise);
  background-color: var(--blanc-casse);
  transform: translateY(-3px);
}

/* ---------- 8. Pied de page ---------- */
.site-footer {
  background-color: #0F1113; /* légèrement plus sombre que la section contact */
  color: var(--gris-zinc);
  text-align: center;
  font-size: 0.85rem;
  padding: var(--espace-m);
}
.site-footer a {
  color: #ffffff;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--rouge-tuile);
}

/* ---------- 9. Tablette et plus (min-width: 640px) ---------- */
@media (min-width: 640px) {
  .site-logo {
    width: 170px;
  }

  .countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 tuiles alignées */
  }

  .cta-group {
    flex-direction: row;      /* boutons côte à côte */
    justify-content: center;
  }
}

/* ---------- 10. Desktop (min-width: 1024px) ---------- */
@media (min-width: 1024px) {
  .hero {
    padding-top: var(--espace-l);
  }
}

/* ---------- 11. Accessibilité : réduction des animations ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tile-value.bounce {
    animation: none;
  }

  .btn,
  .btn:hover,
  .btn:focus-visible {
    transition: none;
    transform: none;
  }
}
