/* == Fonts */
@font-face {
  font-family: 'Hepta Slab';
  src: url('./assets/fonts/hepta-slab/hepta-slab-variable.woff2') format('woff2-variations');
  font-weight: 400 600;
  font-style: normal;
}

@font-face {
  font-family: 'More Sugar Extras';
  src: url('./assets/fonts/more-sugar/more-sugar-extras.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'More Sugar';
  src: url('./assets/fonts/more-sugar/more-sugar-regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

/* == Globals */
:root {
  --orange-400: #FFECE5;
  --orange-500: #E26236;
  --orange-600: #E15F30;
  --neutral-300: #FFF2ED;
  --neutral-400: #E0C2B8;
  --neutral-500: #644938;
  --neutral-600: #301C15;
}

* {
  box-sizing: border-box;
}

body {
  color: var(--neutral-600);
  font-family: 'Hepta Slab', sans-serif;
  font-size: clamp(14px, 3vw, 16px);
  line-height: 1.5;
  font-weight: 400;
  margin: 0;
}

h1, h2, .h1, .h2 {
  font-family: 'More Sugar', cursive;
  letter-spacing: 5px;
  line-height: 1;
}

h3, h4, h5, h6, .h3, .h4, .h5, .h6 {
  font-family: inherit;
  letter-spacing: normal;
  line-height: normal;
  font-weight: 600;
}

h1, .h1 { font-size: 2.02728653rem; }
h2, .h2 { font-size: 1.80203247rem; }
h3, .h3 { font-size: 1.40180664rem; }
h4, .h4 { font-size: 1.32382812rem; }
h5, .h5 { font-size: 1.065625rem; }
h6, .h6 { font-size: .925rem; }

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

a:hover {
  opacity: 0.8;
}

/* == General */
section {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-block: 4rem;
  align-items: center;
  padding: 3rem;
  width: 100%;
}

section:nth-child(odd) {
  background-color: var(--neutral-300);
}

section > header {
  color: var(--orange-500);
  text-align: center;
}

section > header h2 {
  margin: 0;
}

section > .content {
  max-width: 60ch;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.content > p {
  text-align: justify;
}

/* == Utils */
.offscreen {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gimmick {
  font-size: 4rem;
  font-family: 'More Sugar Extras', cursive;
}

/* == Button */
.button {
  background-color: var(--orange-500);
  color: #fff;
  text-decoration: none;
  border-radius: 100vw;
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 500;
  padding: 20px 40px;
  transition: all 0.1s ease-out;
}

.button:hover {
  background-color: var(--orange-600);
  color: var(--orange-400);
  transform: scale(0.98);
}

/* == Picture */
.picture {
  position: relative;
  max-width: 100%;
}

.picture img {
  display: block;
  width: 100%;
}

.picture-caption {
  position: absolute;
  right: 8px;
  font-size: 0.625rem;
  color: var(--neutral-500);
  margin-block: 0;
}

/* == Header */
.header-nav {
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 100;
}

.header-nav ul  {
  display: flex;
  flex-direction: row;
  align-items: center;
  list-style: none;
  padding: 1rem 2rem;
  gap: 1rem;
  justify-content: flex-end;
  width: 100%;
}

.header-nav ul li a {
  color: var(--orange-400);
}

@media screen and (max-width: 768px) {
  .header-nav {
    display: none;
  }
}

/* == Associations list */
.associations-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.associations-list img {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  object-position: center;
}

@media screen and (max-width: 768px) {
  .associations-list img {
    max-width: 100px;
    max-height: 100px;
  }
}

/* == Hero */
section.hero {
  background: url('./assets/images/cover.webp');
  background-position: center;
  background-size: cover;
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: center;
  min-height: 85vh;
  position: relative;
}

.hero-logo {
  transform: translateX(-3%);
  width: clamp(280px, 90vw, 600px);
}

.hero-subtitle {
  margin: 0;
  margin-bottom: 2rem;
  font-weight: 500;
  font-size: clamp(1.1rem, 3vw, 1.42382812rem);
  text-align: center;
}

.hero-subtitle em {
  font-style: normal;
}

/* == Compteur ESOD */
.hero-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(32rem, 100%);
  margin-top: 1rem;
  text-align: center;
  color: var(--neutral-600);
}

.hero-counter[hidden] {
  display: none;
}

.hero-counter__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.hero-counter__total {
  font-size: clamp(4.5rem, 20vw, 8.5rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 0.85;
  letter-spacing: -0.04em;
}

.hero-counter__total.is-ticking {
  animation: counter-tick 1.2s ease-out;
}

/* Zéros de tête pendant la montée : masqués, mais gardent leur place */
.hero-counter__ghost {
  visibility: hidden;
}

/* Le chiffre blanchit un instant à chaque renard tué */
@keyframes counter-tick {
  from {
    color: #fff;
  }
}

.hero-counter__caption {
  max-width: 40ch;
  font-size: clamp(1rem, 2.6vw, 1.125rem);
  font-weight: 500;
  line-height: 1.35;
  text-wrap: balance;
}

.hero-counter__note {
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
}

@media (prefers-reduced-motion: reduce) {
  .hero-counter__total.is-ticking {
    animation: none;
  }
}

/* == Objectives */
.objectives > .content {
  position: relative;
}

.objectives-line {
  position: absolute;
  top: 0;
  bottom: -3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 7px;
  background-color: var(--neutral-300);
  z-index: -1;
}

.objectives-line::after {
  content: '';
  background-color: var(--neutral-300);
  display: block;
  position: absolute;
  height: 2rem;
  width: 2rem;
  border-radius: 100vw;
  bottom: -1.2rem;
  transform: translateX(-50%);
  left: 50%;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
  justify-content: center;
  list-style: none;
  padding: 0;
}

.card-item {
  background-color: #fff;
  max-width: 500px;
  text-align: center;
  padding: 24px;
  border-radius: 24px;
  border: 7px solid var(--neutral-300);
}

/* == Contact */
.contact {
  padding-block: 6rem;
}

.contact > .content {
  text-align: center;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  width: 100%;
}

@media screen and (max-width: 768px) {
  .contact > .content {
    flex-direction: column;
  }
}

.contact > .content > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact > .content .button {
  margin-bottom: 0.5rem;
}

.contact > .content small {
  font-size: 0.875rem;
  color: var(--orange-500);
  text-align: center;
}

.copy-mail {
  appearance: none;
  background: none;
  border: none;
  color: var(--orange-500);
  cursor: pointer;
  display: block;
  font-family: inherit;
  margin-inline: auto;
  position: relative;
  text-decoration: underline;
  transition-delay: 0.15s;
  transition-duration: 0.3s;
  transition-property: color;
  transition-timing-function: ease-out;
}

.copy-mail:after {
  color: var(--orange-500);
  content: 'L\'adresse mail a été copiée !';
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  left: 50%;
  margin-inline: auto;
  opacity: 0;
  position: absolute;
  text-align: center;
  top: 0.6rem;
  transform: translate(-50%, -50%);
  transition-duration: 0.3s;
  transition-property: all;
  transition-timing-function: ease-out;
  visibility: hidden;
  white-space: nowrap;
  width: fit-content;
}

.copy-mail[data-copied="true"] {
  color: transparent;
  transition-duration: 0;
  transition-delay: 0s;
}

.copy-mail[data-copied="true"]:after {
  opacity: 1;
  visibility: visible;
}

/* == Footer */
.footer {
  background-color: var(--neutral-600);
  color: var(--neutral-300);
}

.footer-container {
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  max-width: 960px;
}

.footer-logo {
  max-width: 200px;
  border-radius: 8px;
}

.footer-social {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
}

.footer-social__item img {
  display: block;
  width: 32px;
  height: 32px;
  padding: 4px;
}

.footer-links ul {
  list-style: none;
  color: var(--neutral-300);
  padding: 0;
  margin: 0;
}

.footer-links li a {
  color: inherit;
  line-height: 1.75;
}

@media screen and (max-width: 768px) {
  .footer-container {
    flex-direction: column;
  }
}
