
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --navy: #344b3b;
  --ink: #344239;
  --cream: #e4eddf;
  --gold: #a58a56;
  --muted: #68766b;
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'DM Sans', Arial, sans-serif;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }

.site-header {
  min-height: 82px;
  padding: 14px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  background: #fff;
  position: relative;
  z-index: 5;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  background: var(--navy);
  color: #fff;
  padding: 10px 12px;
  font-family: Georgia, serif;
  font-weight: bold;
  letter-spacing: 2px;
}

.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 17px; }
.brand small { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

.main-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
}

.main-nav a:hover, .text-link:hover { color: var(--gold); }
.menu-toggle { display: none; }

.hero {
  min-height: 570px;
  background:
    linear-gradient(90deg, rgba(12,27,38,.88), rgba(12,27,38,.25)),
    url('images/hero.jpg') center/cover,
    var(--navy);
  position: relative;
  display: flex;
  align-items: center;
  padding: 70px 10%;
  color: white;
}

.hero-content { max-width: 720px; position: relative; }
.portrait-medallion {
  position: absolute;
  top: 20px;
  right: 2%;
  width: 125px;
  height: 125px;
  border: 3px solid var(--gold);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.portrait-medallion img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eyebrow, .number {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero h1, .story-hero h1 {
  font: 600 clamp(42px, 6vw, 72px)/1.12 'Playfair Display', Georgia, serif;
  margin: 15px 0;
}

.hero h1 em, h2 em { color: var(--gold); font-style: normal; }
.hero-lead { font-size: 18px; max-width: 600px; }

.hero-caption {
  position: absolute;
  bottom: 20px;
  right: 6%;
  font-size: 11px;
  letter-spacing: 1px;
}

.button {
  display: inline-block;
  padding: 13px 21px;
  margin-top: 15px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .4px;
}

.button-light { background: #fff; color: var(--navy); }
.button-dark { background: var(--navy); color: #fff; }

.section { padding: 85px 9%; }
.section-heading { max-width: 750px; margin-bottom: 35px; }

.section-heading h2,
.feature-copy h2,
.rolling-copy h2 {
  font: 600 clamp(30px, 4vw, 46px)/1.2 'Playfair Display', Georgia, serif;
  margin: 8px 0;
}

.centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle { color: var(--muted); }

.intro-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 50px;
  align-items: center;
}

.intro-text { font-size: 18px; }

.fact-panel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  padding: 25px;
}

.fact-panel div { text-align: center; }
.fact-panel strong, .fact-panel span { display: block; }
.fact-panel strong { font: 26px Georgia; color: var(--gold); }
.fact-panel span { font-size: 11px; color: var(--muted); }

.feature-band, .rolling-stock {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 360px;
  background: var(--navy);
  color: white;
}

.feature-copy, .rolling-copy {
  padding: 65px 10%;
  align-self: center;
}

.feature-photo, .rolling-image { min-height: 360px; }

.photo-placeholder {
  background: linear-gradient(135deg, #dce8d8, #aebfa9);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #344b3b;
  position: relative;
}

.photo-label {
  background: rgba(255,255,255,.78);
  padding: 8px 13px;
  font-size: 12px;
}

.text-link { color: var(--gold); font-weight: bold; }

.decor-section, .gallery { background: #fff; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.scene-card { background: var(--cream); }
.scene-image { height: 210px; }
.scene-info { padding: 22px; }

.scene-info h3, .construction-grid h3 {
  font: 22px Georgia;
  margin: 8px 0;
}

.scene-info p, .construction-grid p {
  font-size: 14px;
  color: var(--muted);
}

.rolling-stock { grid-template-columns: 1.1fr 1fr; }
.rolling-image { order: 0; }
.simple-list { padding-left: 18px; }

.construction-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.step { font: 32px Georgia; color: var(--gold); }
.construction-photo { height: 260px; margin-top: 35px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-tile { height: 190px; border: 0; }

.contact-strip {
  text-align: center;
  background: #d5e3d0;
  padding: 65px 20px;
}

.contact-strip h2 { font: 32px Georgia; }

.site-footer {
  text-align: center;
  background: #344b3b;
  color: #dce1df;
  padding: 35px 15px;
  font-size: 13px;
}

.footer-brand { font-weight: bold; letter-spacing: 1px; }
.footer-brand span { color: var(--gold); }
.site-footer p { color: #d0ddce; }

/* Page « Au début » */

.story-hero {
  background: var(--navy);
  color: white;
  padding: 90px 10%;
  text-align: center;
}

.story-hero p:last-child { color: #d5dcde; }
.story-content { max-width: 1000px; margin: auto; }

.story-card {
  background: #fff;
  padding: 32px;
  margin: 0 0 22px;
  border-left: 3px solid var(--gold);
}

.story-card h2 { font: 30px Georgia; margin: 7px 0; }
.story-card p { margin-bottom: 0; }

/* Adaptation aux tablettes et téléphones */

@media (max-width: 850px) {
  .site-header { flex-wrap: wrap; }

  .menu-toggle {
    display: block;
    background: none;
    border: 0;
    font-size: 25px;
    cursor: pointer;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 10px 0;
  }

  .main-nav.open { display: flex; }

  .intro-grid,
  .feature-band,
  .rolling-stock {
    grid-template-columns: 1fr;
  }

  .card-grid { grid-template-columns: 1fr 1fr; }
  .construction-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 500px; padding: 55px 7%; }
  .rolling-image { order: 0; }
}

@media (max-width: 560px) {
  .section { padding: 58px 7%; }
  .card-grid { grid-template-columns: 1fr; }
  .fact-panel { flex-wrap: wrap; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-tile { height: 140px; }
  .hero-caption { font-size: 9px; }
  .brand strong { font-size: 14px; }
}




/* Galerie automatique */

#photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.photo-card {
  margin: 0;
  background: #fff;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(30, 50, 35, 0.10);
}

.photo-card img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  cursor: pointer;
}

.photo-card figcaption {
  padding: 10px 3px 3px;
  font-family: Georgia, serif;
  font-size: 16px;
  color: #344b3b;
}

.photo-category {
  display: block;
  padding: 3px;
  font-size: 11px;
  color: #a58a56;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@media (max-width: 850px) {
  #photo-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  #photo-gallery {
    grid-template-columns: 1fr;
  }
}



/* =================================
   GALERIE PHOTO - FILTRES
================================= */

.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
}

.filter-button {
  padding: 10px 20px;
  border: 1px solid #a58a56;
  background: #e4eddf;
  color: #344b3b;
  border-radius: 3px;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 14px;
  transition: all 0.25s ease;
}

.filter-button:hover,
.filter-button.active {
  background: #344b3b;
  color: #fff;
  border-color: #344b3b;
}

/* =================================
   GRILLE DES PHOTOGRAPHIES
================================= */

#photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.photo-card {
  margin: 0;
  padding: 10px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(30, 50, 35, 0.12);
}

.photo-card img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.photo-card img:hover {
  transform: scale(1.02);
}

.photo-card figcaption {
  padding: 12px 3px 4px;
  font-family: Georgia, serif;
  font-size: 16px;
  color: #344b3b;
}

.photo-category {
  display: block;
  padding: 4px 3px;
  font-size: 11px;
  color: #a58a56;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =================================
   AGRANDISSEMENT DES PHOTOS
================================= */

.photo-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(15, 25, 18, 0.94);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 35px;
}

.photo-lightbox.visible {
  display: flex;
}

.photo-lightbox img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border: 5px solid #fff;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.4);
}

.photo-lightbox p {
  color: #fff;
  font-family: Georgia, serif;
  font-size: 18px;
  margin-top: 15px;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 30px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 42px;
  cursor: pointer;
}

/* =================================
   ADAPTATION AUX ECRANS
================================= */

@media (max-width: 850px) {
  #photo-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  #photo-gallery {
    grid-template-columns: 1fr;
  }

  .photo-lightbox {
    padding: 15px;
  }

  .photo-lightbox img {
    max-width: 100%;
  }
}


/* Masquer les textes provisoires des photos */
.photo-placeholder .photo-label {
  display: none;
}



/* Navigation entre les photos agrandies */

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 70px;
  border: 1px solid #a58a56;
  border-radius: 4px;
  background: rgba(52, 75, 59, 0.85);
  color: #fff;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease;
  z-index: 10001;
}

.lightbox-nav:hover {
  background: #a58a56;
}

.lightbox-prev {
  left: 25px;
}

.lightbox-next {
  right: 25px;
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (max-width: 600px) {
  .lightbox-nav {
    width: 40px;
    height: 55px;
    font-size: 36px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}



/* =================================
   RUBRIQUE VIDEOS YOUTUBE
================================= */

.video-section {
  background: #e4eddf;
  padding-top: 60px;
  padding-bottom: 70px;
}

.video-container {
  width: 100%;
  max-width: 950px;
  margin: 35px auto 0;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #17251b;
  border: 5px solid #a58a56;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(30, 50, 35, 0.2);
}

.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  text-align: center;
  margin-top: 20px;
  color: #344b3b;
  font-family: Georgia, serif;
  font-size: 18px;
}

@media (max-width: 600px) {
  .video-section {
    padding: 40px 15px;
  }

  .video-container {
    border-width: 3px;
  }
}



/* =================================
   VIDEOTHEQUE YOUTUBE
================================= */

.video-gallery {
  max-width: 950px;
  margin: 30px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 9px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
}

.video-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-card span {
  color: #344b3b;
  font-family: Georgia, serif;
  font-size: 14px;
  line-height: 1.4;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(30, 50, 35, 0.15);
}

.video-card.active {
  border-color: #a58a56;
  background: #f4f0e7;
}

@media (max-width: 750px) {
  .video-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 450px) {
  .video-gallery {
    grid-template-columns: 1fr;
  }
}
