/* ═══════════════════════════════════════════════════
   BARLATAY.CSS — Feuille de style commune
   SuperTrail du Barlatay — 15ème édition 2026
   ═══════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --color-primary: #e8820a;
  --color-primary-2: #f5a623;
  --color-dark: #333;
  --color-mid: #666;
  --color-light: #ddd;
  --color-footer-bg: #666;
  --color-footer-bar: #555;
  --color-accent: #99D2E0;
  --color-white: #fff;
  --font-main: 'Segoe UI', Arial, sans-serif;
  --nav-height: 72px;
  --content-max: 900px;
  --radius: 6px;
  --shadow-card: 0 4px 16px rgba(0, 0, 0, .08);
  --transition: .2s ease;
}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background: var(--color-white);
  color: var(--color-dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════
   NAV
══════════════════════════════════ */
.nav {
  background: var(--color-white);
  padding: 10px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
}

.nav__logo img {
  height: 52px;
  width: auto;
  display: block;
}

.nav__links {
  list-style: none;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav__links a {
  padding: 7px 13px;
  border-radius: 4px;
  font-size: .85rem;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ══════════════════════════════════
   HERO — Page d'accueil (plein écran)
══════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  background-image: url('./hero.jpg');
  background-size: cover;
  background-position: center top;
  display: flex;
  flex-direction: column;
}

/* Nav transparent par-dessus le hero sur index */
.hero .nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, .25);
  box-shadow: none;
}

.hero .nav__links a {
  color: rgba(255, 255, 255, .9);
}

.hero .nav__links a:hover,
.hero .nav__links a.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.hero__content {
  padding: 120px 40px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--color-white);
  text-transform: uppercase;
  line-height: 1.1;
  text-shadow: 1px 2px 6px rgba(0, 0, 0, .45);
  margin-bottom: 28px;
}

.hero__date {
  color: var(--color-white);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  text-shadow: 1px 2px 6px rgba(0, 0, 0, .45);
  margin-top: 48px;
}

/* ── Bouton inscription ── */
.btn-inscription {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-2));
  color: var(--color-white);
  text-decoration: none;
  border-radius: 4px;
  padding: 10px 20px 10px 10px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
  transition: filter var(--transition);
  width: fit-content;
}

.btn-inscription:hover {
  filter: brightness(1.1);
  text-decoration: none;
}

.btn-inscription__icon {
  background: rgba(255, 255, 255, .2);
  border-radius: 3px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-inscription__icon svg {
  width: 26px;
  height: 26px;
  fill: var(--color-white);
}

.btn-inscription__label {
  line-height: 1.1;
}

.btn-inscription__label .title {
  display: block;
  font-size: 1.05rem;
  font-style: italic;
}

.btn-inscription__label .sub {
  display: block;
  font-size: .75rem;
  font-weight: 400;
  opacity: .9;
}

/* ══════════════════════════════════
   PAGE HERO — Pages intérieures
══════════════════════════════════ */
.page-hero {
  background-image: url('./hero.jpg');
  background-size: cover;
  background-position: center top;
  padding: 60px 40px 50px;
  display: flex;
  align-items: flex-end;
  min-height: 220px;
}

.page-hero__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--color-white);
  text-transform: uppercase;
  text-shadow: 1px 2px 8px rgba(0, 0, 0, .5);
  letter-spacing: .04em;
}

.page-hero__subtitle {
  color: rgba(255, 255, 255, .9);
  font-size: 1rem;
  margin-top: 6px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, .4);
}

/* ══════════════════════════════════
   CONTENU — Sections intérieures
══════════════════════════════════ */
.content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 30px;
  flex: 1;
  width: 100%;
}

.content p {
  line-height: 1.75;
  color: #444;
  margin-bottom: 12px;
}

.content p:last-child {
  margin-bottom: 0;
}

.content ul,
.content ol {
  margin: 8px 0 12px 22px;
}

.content ul li,
.content ol li {
  line-height: 1.75;
  color: #444;
  margin-bottom: 4px;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: .9rem;
}

.content table td {
  padding: 7px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.content table tr:last-child td {
  border-bottom: none;
}

.content table tr:hover td {
  background: #fdf5ee;
}

.page-meta {
  text-align: right;
  font-size: .78rem;
  color: #aaa;
  padding: 0 30px 24px;
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ══════════════════════════════════
   SECTION BIENVENUE (index)
══════════════════════════════════ */
.bienvenue {
  background: var(--color-white);
  text-align: center;
  padding: 48px 24px 40px;
}

.bienvenue__title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #222;
  margin-bottom: 20px;
}

.bienvenue__text {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
}

/* ══════════════════════════════════
   VIDÉO YOUTUBE (index)
══════════════════════════════════ */
.video-section {
  background: var(--color-white);
  padding: 0 24px 48px;
  display: flex;
  justify-content: center;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16/9;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
}

.video-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter var(--transition);
}

.video-wrapper:hover img {
  filter: brightness(.85);
}

.video-wrapper__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  background: rgba(0, 0, 0, .75);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  pointer-events: none;
}

.video-wrapper:hover .video-wrapper__play {
  background: var(--color-primary);
}

.video-wrapper__play svg {
  width: 30px;
  height: 30px;
  fill: var(--color-white);
  margin-left: 4px;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ══════════════════════════════════
   CAROUSEL SPONSORS (index)
══════════════════════════════════ */
.sponsors {
  background: var(--color-white);
  padding: 40px 24px 48px;
  text-align: center;
}

.sponsors__title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--color-dark);
  margin-bottom: 32px;
}

.carousel {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel__slides {
  width: 100%;
}

.carousel__slide {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 60px;
}

.carousel__slide.active {
  display: flex;
}

.carousel__slide img {
  max-height: 130px;
  max-width: 320px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform var(--transition);
}

.carousel__slide img:hover {
  transform: scale(1.04);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #aaa;
  font-size: 2rem;
  line-height: 1;
  transition: color var(--transition);
  z-index: 2;
}

.carousel__btn:hover {
  color: var(--color-primary);
}

.carousel__btn--prev {
  left: 0;
}

.carousel__btn--next {
  right: 0;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background var(--transition);
}

.carousel__dot.active {
  background: var(--color-primary);
}

/* ══════════════════════════════════
   ACCORDION (règlement)
══════════════════════════════════ */
.accordion {
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  overflow: hidden;
}

.accordion__item {
  border-bottom: 1px solid #d4edf5;
}

.accordion__item:last-child {
  border-bottom: none;
}

.accordion__btn {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .95rem;
  font-weight: 700;
  color: var(--color-dark);
  transition: background var(--transition);
  gap: 12px;
  font-family: var(--font-main);
}

.accordion__btn:hover {
  background: #f9f9f9;
}

.accordion__btn.open {
  color: var(--color-primary);
  background: #fff8f2;
}

.accordion__chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform .25s;
}

.accordion__btn.open .accordion__chevron {
  transform: rotate(180deg);
}

.accordion__body {
  display: none;
  padding: 4px 20px 20px;
  font-size: .92rem;
  line-height: 1.75;
  color: #444;
}

.accordion__body.open {
  display: block;
}

.accordion__body p {
  margin-bottom: 10px;
}

.accordion__body p:last-child {
  margin-bottom: 0;
}

.accordion__body ul,
.accordion__body ol {
  margin: 8px 0 10px 22px;
}

.accordion__body li {
  margin-bottom: 4px;
}

.accordion__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: .88rem;
}

.accordion__body table td {
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.accordion__body table tr:last-child td {
  border-bottom: none;
}

.accordion__body table tr:hover td {
  background: #fdf5ee;
}

/* Badges sanctions */
.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--color-white);
  white-space: nowrap;
}

.badge--dq {
  background: #c0392b;
}

.badge--pen {
  background: var(--color-primary);
}

.badge--app {
  background: #7f8c8d;
}

/* ══════════════════════════════════
   PLAN DE SITUATION
══════════════════════════════════ */
.plan-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  display: block;
}

/* ══════════════════════════════════
   SE LOGER — Cartes hébergements
══════════════════════════════════ */
.lodging-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.lodge-card {
  border: 1px solid #eee;
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow var(--transition);
}

.lodge-card:hover {
  box-shadow: var(--shadow-card);
}

.lodge-card__location {
  font-size: .78rem;
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

.lodge-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.lodge-card__desc {
  font-size: .88rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 14px;
}

.btn-reserve {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 6px 16px;
  border-radius: 4px;
  font-size: .82rem;
  font-weight: 700;
  transition: filter var(--transition);
  text-decoration: none;
}

.btn-reserve:hover {
  filter: brightness(1.1);
  text-decoration: none;
}

/* ══════════════════════════════════
   ÉCO-CHARTE
══════════════════════════════════ */
.eco-section {
  margin-bottom: 32px;
}

.eco-section__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eco-icon {
  font-size: 1.4rem;
}

/* ══════════════════════════════════
   VAGUE DE TRANSITION
══════════════════════════════════ */
.wave {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background: var(--color-white);
}

.wave svg {
  display: block;
  width: 100%;
}

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
footer {
  background: var(--color-footer-bg);
  color: var(--color-light);
  padding: 40px 40px 0;
}

.footer__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 60px;
  max-width: 680px;
  margin-bottom: 32px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-light);
  font-size: .92rem;
}

.footer__item a {
  color: var(--color-light);
  text-decoration: none;
}

.footer__item a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.footer__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
}

.footer__links2 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.footer__social {
  text-align: center;
  margin-bottom: 12px;
}

.footer__social a {
  color: var(--color-light);
  transition: color var(--transition);
}

.footer__social a:hover {
  color: var(--color-white);
}

.footer__bar {
  background: var(--color-footer-bar);
  margin: 0 -40px;
  padding: 16px 40px;
  text-align: center;
  font-size: .78rem;
  color: #bbb;
  letter-spacing: .02em;
}

.footer__bar a {
  color: #bbb;
  text-decoration: underline;
}

.footer__bar a:hover {
  color: var(--color-white);
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 768px) {
  .nav {
    padding: 10px 16px;
  }

  .nav__links a {
    padding: 5px 8px;
    font-size: .78rem;
  }

  .hero__content {
    padding: 80px 20px 30px;
  }

  .page-hero {
    padding: 40px 20px 30px;
  }

  .content {
    padding: 30px 16px;
  }

  footer {
    padding: 28px 20px 0;
  }

  .footer__links {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer__bar {
    margin: 0 -20px;
    padding: 14px 20px;
  }
}

@media (max-width: 480px) {
  .nav__links {
    display: none;
  }

  /* Menu mobile à implémenter si besoin */
}