/* Import Google Fonts - Inter pour le texte, Montserrat pour les titres */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Montserrat:wght@500;600;700;800&display=swap");

:root {
  --racing-red: #c8102e;
  --snow: #f7f3f1;
  --strawberry-red: #99101a;
  --desert-sand: #e7dfda;
  --surface: #ffffff;
  --text-primary: #1f1f1f;
  --text-secondary: #555555;
  --police-principale: "Inter", "Segoe UI", "Roboto", "Open Sans", "Arial", sans-serif;
  --police-titres: "Montserrat", "Inter", "Segoe UI", "Roboto", "Arial", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--police-principale);
  background: var(--snow);
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 400;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

html {
  height: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  line-height: 1.3;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* HEADER */
.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 120px;
  width: 100%;
}

.logo-link {
  display: block;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.logo-link:hover {
  transform: scale(1.02);
}
.logo {
  height: 100px;
  width: auto;
  display: block;
}

.header {
  background: transparent;
  color: var(--text-primary);
  padding: 0;
  transition: all 0.3s ease;
}

.header .container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  max-width: 100%;
}

.nav-toggle {
  display: none;
  background: var(--racing-red);
  color: white;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  padding: 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.nav-toggle:hover {
  background: var(--strawberry-red);
  transform: scale(1.1);
}
.nav {
  margin: 0;
  position: relative;
}
.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 5px;
}
.nav-list li {
  margin: 0;
}

.nav-list a {
  color: var(--racing-red);
  text-decoration: none;
  padding: 10px 15px;
  transition: all 0.3s ease;
  font-weight: 600;
  display: block;
  border-bottom: 2px solid transparent;
  font-family: var(--police-titres);
}

.nav-list a:hover {
  border-bottom-color: var(--desert-sand);
}

.nav-list a.is-current {
  border-bottom-color: var(--racing-red);
}

.btn-contact {
  background: var(--racing-red) !important;
  color: #ffffff !important;
  padding: 10px 20px !important;
  border-radius: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: none !important;
  transition: all 0.3s ease;
  font-family: var(--police-titres);
}

.btn-contact:hover {
  background: var(--strawberry-red) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(227, 6, 19, 0.3);
}

/* MAIN */
main {
  flex: 1;
}

main h1,
main h2 {
  color: var(--text-primary);
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  margin-bottom: 16px;
  text-align: center;
  font-family: var(--police-titres);
  font-weight: 700;
  letter-spacing: -0.3px;
}

main .intro-text {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  color: #000;
  margin: 40px auto 50px;
  text-align: center;
  width: 100%;
  max-width: 1200px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.5px;
  font-family: var(--police-titres);
}

main h3 {
  color: var(--text-primary);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  margin: 22px 0 12px 0;
  font-weight: 600;
  font-family: var(--police-titres);
}

body:has(main section h1.visually-hidden) main h2 {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  text-align: left;
  font-weight: 600;
  margin: 24px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--desert-sand);
}

body:has(main > h1.visually-hidden) article h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  text-align: left;
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--desert-sand);
}

main p {
  font-size: 1.1em;
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.8;
  text-align: justify;
  font-family: var(--police-principale);
  font-weight: 400;
}

main p small {
  font-size: 0.85em;
  color: #777;
  font-style: italic;
  display: block;
  margin-top: 10px;
}

main section {
  margin-bottom: 40px;
}

.countdown-section {
  margin: 24px 0 28px;
}

.countdown-card {
  width: min(100%, 960px);
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 243, 241, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(27, 22, 20, 0.22);
  padding: clamp(34px, 5vw, 54px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 48%);
  pointer-events: none;
}

.countdown-display {
  display: grid;
  grid-template-columns: minmax(200px, 1.3fr) repeat(3, minmax(120px, 1fr));
  gap: 14px;
  margin: 22px 0 14px;
}

.countdown-unit {
  padding: 20px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(235, 235, 235, 0.18) 100%);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #111111;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.16);
}

.countdown-unit-days {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, rgba(220, 220, 220, 0.2) 100%);
}

.countdown-value {
  display: block;
  font-family: var(--police-titres);
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1;
  font-weight: 800;
}

.countdown-label {
  display: block;
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.countdown-status {
  margin: 0;
  text-align: center;
  font-weight: 700;
  color: #111111;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.countdown-status.is-expired {
  color: #111111;
}

.countdown-image {
  width: min(100%, 960px);
  margin: 22px auto 0;
  display: block;
  border-radius: 22px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}


/* Listes */
main ul {
  margin: 20px 0;
  padding-left: 0;
  list-style: none;
}

main ul li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: justify;
}

main ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--racing-red);
  font-weight: bold;
  font-size: 1.2em;
}
main ul li strong {
  color: var(--racing-red);
}

/* Blockquotes */
blockquote {
  background: linear-gradient(135deg, var(--snow) 0%, #ffe8e8 100%);
  border-left: 5px solid var(--racing-red);
  border-right: 5px solid var(--racing-red);
  margin: 30px auto;
  padding: 25px 30px;
  border-radius: 8px;
  font-style: italic;
  box-shadow: 0 4px 15px rgba(227, 6, 19, 0.1);
  max-width: 600px;
}

blockquote p {
  font-size: 1.2em;
  color: var(--text-primary);
  margin: 0;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

.citation-attribution {
  font-size: 0.9em;
  color: #777;
  text-align: center;
  font-style: italic;
  margin: 10px 0 20px;
}

/* Liens */
main section a:not(.btn) {
  color: var(--racing-red);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}
main section a:not(.btn):hover {
  border-bottom-color: var(--racing-red);
}
main section a[target="_blank"]:not(.btn)::after {
  content: " ↗";
  font-size: 0.8em;
}

/* ARTICLES */
article {
  padding: 30px 0;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 30px;
}
article:last-child {
  border-bottom: none;
}

article h3 {
  color: var(--text-primary);
  font-size: clamp(1.3rem, 2.3vw, 1.8rem);
  margin-top: 0;
  margin-bottom: 18px;
  font-family: var(--police-titres);
  font-weight: 700;
}

article p strong {
  color: var(--racing-red);
  font-size: 0.95em;
}

main p.article-date {
  color: var(--racing-red);
  font-weight: 600;
  margin-bottom: 14px;
}

.article-body {
  line-height: 1.55;
  margin-bottom: 10px;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 20px 0 10px;
  flex-wrap: wrap;
}

.pagination-link,
.pagination-current {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-family: var(--police-titres);
}

.pagination-link {
  background: var(--racing-red);
  color: #fff;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.3s ease;
}

.pagination-link:hover {
  background: var(--strawberry-red);
  transform: translateY(-2px);
}

.pagination-current {
  background: #fff;
  color: var(--racing-red);
  border: 2px solid var(--racing-red);
}

.article-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0;
}

.article-images img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}

.article-images img:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* GRILLES */
.row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 30px auto;
  max-width: 1200px;
}

.col {
  background: var(--surface);
  padding: 40px 30px;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid var(--desert-sand);
  text-align: center;
}

.col:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 45px rgba(255, 215, 0, 0.4);
  border-color: #ffd700;
}
.col h3 {
  color: var(--text-primary);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  margin-bottom: 15px;
  font-weight: 600;
  font-family: var(--police-titres);
}
.col p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1em;
  text-align: justify;
}

/* Contact */
.contact-row {
  grid-template-columns: repeat(2, 1fr);
  max-width: 1000px;
  margin: 30px auto;
  gap: 40px;
}
.contact-row .col {
  text-align: left;
  padding: 40px;
}
.contact-row .col:hover {
  transform: none;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  border-color: #f0f0f0;
}
main section:has(.contact-row) {
  text-align: center;
}
main section:has(.contact-row) > p {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.main-title {
  text-align: center;
  font-size: 1.6em;
  font-weight: 700;
  margin-top: 20px;
}

.subtitle {
  text-align: center;
  font-size: 1.2em;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* CAROUSEL */
.carousel {
  position: relative;
  max-width: 1200px;
  width: 100%;
  aspect-ratio: 2 / 1;
  margin: 50px auto;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%; /* ← ajoute ça */
}

.carousel-slide {
  min-width: 100%;
  padding: 0; /* ← était 80px 60px, inutile sans contenu */
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* même rendu que background-size: cover */
  object-position: center; /* même rendu que background-position: center */
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(227, 6, 19, 0.8);
  color: white;
  border: none;
  font-size: 3em;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.carousel-btn:hover {
  background: var(--racing-red);
  transform: translateY(-50%) scale(1.1);
}
.carousel-prev {
  left: 20px;
}
.carousel-next {
  right: 20px;
}

/* BOUTONS */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, #e30613 0%, #b40510 100%);
  color: white !important;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 700;
  font-family: var(--police-titres);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(227, 6, 19, 0.3);
  position: relative;
  overflow: hidden;
  border: none;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #b40510 0%, #8a0410 100%);
  transition: left 0.3s ease;
  z-index: -1;
}
.btn:hover::before {
  left: 0;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(227, 6, 19, 0.4);
}
.btn::after {
  content: "" !important;
}

/* FOOTER */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
  color: white;
  text-align: center;
  padding: 30px 0;
  margin-top: 60px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer p {
  margin: 8px 0;
  font-size: 0.95em;
  opacity: 0.9;
}
.footer p:first-child {
  font-weight: 600;
  font-size: 1em;
}
.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* FORMULAIRE */
.form-group {
  margin-bottom: 25px;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 1em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 1em;
  transition: border-color 0.3s ease;
  background: white;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  outline-offset: 0;
  border-color: var(--racing-red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* LIGHTBOX */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  cursor: default;
}
#lightbox-fermer {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 3em;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease;
}
#lightbox-fermer:hover {
  color: var(--racing-red);
}

/* =============================================
   RESPONSIVE — BLOC UNIQUE
   ============================================= */
@media (max-width: 768px) {
  .header {
    position: static;
    flex: 1;
  }

  .header-wrapper {
    position: relative;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    gap: 10px;
  }

  .logo {
    height: 70px;
  }

  .nav-toggle {
    display: block;
    margin-left: auto; /* ← pousse le burger à droite */
    align-self: center;
  }

  .header .container {
    position: relative;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    background: var(--snow);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 1000;
  }

  .nav.active {
    display: block;
  }
  .nav-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--snow);
    /*Animation*/
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav.active .nav-list {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-list a {
    padding: 15px;
    border-bottom: 1px solid #eee;
  }
  main {
    padding: 40px 20px;
  }

  main .intro-text {
    max-width: 100%;
    margin: 20px auto 24px;
    font-size: clamp(1.1rem, 5vw, 1.35rem);
    line-height: 1.35;
  }

  .home-hero {
    margin: 24px 0 30px;
  }

  .countdown-card {
    padding: 20px 16px;
  }

  .countdown-section {
    margin: 0 0 22px;
  }

  .countdown-display {
    grid-template-columns: repeat(2, 1fr);
  }

  .countdown-unit {
    min-width: 0;
    padding: 18px 14px;
  }

  .countdown-status {
    font-size: 1rem;
    line-height: 1.5;
  }

  .carousel {
    margin: 30px auto;
    padding: 0;
  }

  .carousel-slide {
    height: 100%;
  }

  .carousel-slide img {
    height: 100%;
  }

  .carousel-content {
    left: 5%;
    right: 5%;
    max-width: 100%;
  }

  .carousel-content h2 {
    font-size: 1.5rem;
  }

  .carousel-content p {
    font-size: 1rem;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .article-images {
    grid-template-columns: 1fr;
  }

  blockquote {
    padding: 20px;
    margin: 20px 0;
  }
}

@media (max-width: 480px) {
  main .intro-text {
    margin: 12px auto 20px;
    font-size: 1.1rem;
    letter-spacing: 0.2px;
  }

  .countdown-display {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .countdown-value {
    font-size: 2rem;
  }

  .countdown-label {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
  }

  main h3 {
    font-size: 1.2em;
  }
}
