/* Identité visuelle historique du Rallye d'Hiver : photo hivernale voilée,
   Abril Fatface pour les titres et les boutons, Roboto léger pour le texte,
   jaune #fff000 en couleur d'accent. Indépendante des éditions. */

:root {
  --color-accent: #fff000;
  --color-text: #ffffff;
  --color-dark: #000000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
}

body {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    var(--color-dark) url('img/background.jpg') center / cover no-repeat fixed;
  font-family: 'Abril Fatface', serif;
  font-size: 1rem;
  color: var(--color-text);
  text-shadow: 1px 1px 7px var(--color-dark);
}

.site {
  width: 70%;
  max-width: 700px;
  margin: 10vh auto 60px auto;
  text-align: left;
}

/* En-tête */

.site-title {
  display: block;
  font-size: 5.2rem;
  line-height: 1.1;
  color: var(--color-text);
  text-decoration: none;
  margin: 10px 0;
}

/* Contenu */

main h1 {
  font-size: 5.2rem;
  font-weight: normal;
  line-height: 1.1;
  color: var(--color-accent);
  margin: 10px 0 0 0;
}

main p {
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 2rem;
  line-height: 1.3;
  margin-top: 2rem;
}

/* Adresse de contact : écrite en séquences d'échappement CSS plutôt qu'en clair
   dans le HTML, pour limiter le glanage automatique. Comme sur le site précédent,
   elle n'est donc pas cliquable. */

.e-mail::before {
  content: '\0068\0065\006c\006c\006f\0040\0072\0061\006c\006c\0079\0065\0068\0069\0076\0065\0072\002e\0066\0072';
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 2.4rem;
  color: var(--color-accent);
}

/* Boutons */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 3rem;
}

.btn {
  display: inline-block;
  border: none;
  padding: 14px 18px;
  min-width: 180px;
  font-family: 'Abril Fatface', serif;
  font-size: 1.8rem;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  background-color: var(--color-accent);
  color: var(--color-dark);
  border-radius: 5px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.btn:hover {
  box-shadow: 0 0 5px var(--color-accent);
}

.btn-disabled,
.btn-disabled:hover {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
  box-shadow: none;
  position: relative;
}

.btn-disabled::after {
  content: attr(data-hover);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 5px;
  background-color: var(--color-accent);
  color: var(--color-dark);
  font-family: 'Roboto', sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.btn-disabled:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Éditions précédentes */

.editions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 2rem;
}

.edition {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  border-radius: 15px;
  background-color: #eeeeee;
  box-shadow: 0 0 10px var(--color-dark);
  font-family: 'Roboto', sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-dark);
  text-shadow: none;
  text-decoration: none;
}

.edition-offline {
  opacity: 0.6;
}

a.edition:hover {
  box-shadow: 0 0 5px #cccccc;
  background-color: #fefff1;
}

.edition img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 100px;
  border: 1px solid var(--color-dark);
  flex-shrink: 0;
}

.edition strong {
  font-weight: 400;
}

/* Portrait */

@media (orientation: portrait) {
  .site {
    width: 85%;
    margin: 3rem auto 60px auto;
  }

  .site-title {
    font-size: 4.6rem;
  }

  main h1 {
    font-size: 4rem;
  }

  /* Pas de survol sur mobile : l'infobulle ne sert à rien et déborderait. */
  .btn-disabled::after {
    display: none;
  }

  .actions {
    gap: 1rem;
  }

  .btn {
    width: 100%;
  }
}
