/* ==========================================================
   Tournoi de soccer interquartiers de Ste-Foy
   Feuille de styles principale
   ========================================================== */

:root {
  --encre: #17211d;
  --texte: #303734;
  --vert: #1f6b4f;
  --vert-fonce: #17513c;
  --gris: #f4f6f5;
  --bordure: #dde2e0;
  --blanc: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--texte);
  background-color: var(--blanc);
}

h1, h2 {
  color: var(--encre);
  line-height: 1.2;
  margin-top: 0;
}

a {
  color: var(--vert-fonce);
}

/* ---------- Section 1 : Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78vh;
  padding: 80px 24px;
  text-align: center;
  color: var(--blanc);

  /* L'image hero.jpg doit se trouver dans le même dossier que ce fichier CSS. */
  background-color: var(--encre);
  background-image: linear-gradient(rgba(15, 25, 21, 0.6), rgba(15, 25, 21, 0.6)), url("hero.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-contenu {
  max-width: 760px;
}

.hero h1 {
  color: var(--blanc);
  font-size: 2.9rem;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.slogan {
  font-size: 1.2rem;
  margin: 0 0 32px;
  color: #eef2f0;
}

.bouton {
  font: inherit;
  font-weight: 600;
  color: var(--blanc);
  background-color: var(--vert);
  border: none;
  border-radius: 4px;
  padding: 14px 32px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.bouton:hover {
  background-color: var(--vert-fonce);
}

.bouton:focus-visible {
  outline: 3px solid var(--blanc);
  outline-offset: 3px;
}

/* ---------- Sections communes ---------- */

.section {
  max-width: 800px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section h2 {
  font-size: 1.9rem;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--vert);
  display: inline-block;
}

.section p {
  margin-top: 20px;
}

.section-grise {
  max-width: none;
  background-color: var(--gris);
  border-top: 1px solid var(--bordure);
  border-bottom: 1px solid var(--bordure);
}

.section-grise > * {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Listes d'informations ---------- */

.liste-infos {
  list-style: none;
  padding: 0;
  margin: 24px auto 0;
}

.liste-infos li {
  padding: 14px 0;
  border-bottom: 1px solid var(--bordure);
}

.liste-infos li:last-child {
  border-bottom: none;
}

.etiquette {
  display: inline-block;
  min-width: 130px;
  font-weight: 600;
  color: var(--encre);
}

/* ---------- Section 4 : FAQ (accordéon) ---------- */

.accordeon {
  margin-top: 28px;
}

.faq-item {
  border: 1px solid var(--bordure);
  border-radius: 4px;
  margin-bottom: 12px;
  background-color: var(--blanc);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  font: inherit;
  font-weight: 600;
  text-align: left;
  color: var(--encre);
  background: none;
  border: none;
  padding: 18px 20px;
  cursor: pointer;
}

.faq-question:hover {
  color: var(--vert-fonce);
}

.faq-question:focus-visible {
  outline: 3px solid var(--vert);
  outline-offset: -3px;
}

.indicateur {
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--vert);
  transition: transform 0.25s ease;
}

.faq-item.ouvert {
  border-color: var(--vert);
}

.faq-item.ouvert .indicateur {
  transform: rotate(45deg); /* le + devient un x */
}

.faq-reponse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.faq-reponse p {
  margin: 0;
  padding: 0 20px 20px;
}

/* ---------- Section 5 : Contact ---------- */

.carte {
  margin-top: 32px;
  border: 1px solid var(--bordure);
  border-radius: 4px;
  overflow: hidden;
}

.carte iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
}

/* ---------- Affichage sur petit écran ---------- */

@media (max-width: 600px) {
  .hero {
    min-height: 65vh;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 48px 20px;
  }

  .etiquette {
    display: block;
    min-width: 0;
  }
}

/* ---------- Respect des préférences d'animation ---------- */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
