@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap');

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

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: px 10vh;
  z-index: 1000;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

nav {
  position: static;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header.scrolled a {
  color: #111;
}

li, a, button {
    font-family: "Jost", sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: white;
    text-decoration: none;
}

body {
    font-family: "Jost", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

.banniere {
    width: 100%;
    height: 50vh;
    aspect-ratio: 16/9;
}

.logo {
  cursor: pointer;
  margin-right: auto;
  height: 65px;
  width: auto;
}

.logo:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

.links {
    list-style: none;
}

.links li {
    display: inline-block;
    padding: 0px 20px;
}

.links li a {
    transition: all 0.3s ease 0s;
}

.bretagne {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 100px;
}

.bretagne h1 {
    font-size: 3rem;
    font-weight: 500;
    position: relative;
}

.bretagne h1::after {
    content: "";
    display: block;
    width: 80px;
    height: 6px;
    background-color: #A0AE9E;
    border-radius: 4px;
    margin: 10px auto 0;
}

.saviez {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 40px;
}

.saviez h2 {
    font-weight: 300;
}

.voyage {
    text-align: center;
    margin-top: 25px;
    font-family: "Jost", sans-serif;
}

.voyage p {
    font-size: 1.5rem;
    font-weight: 500;
    color: #000; 
}

.voyage span {
    font-size: 2.5rem; 
    font-weight: 500;
    color: #A0AE9E; 
}

.co2 {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 60px;
}

.co2 img {
    max-width: 450px;
    width: 100%;
    height: auto;
}

.voyagez {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 100px;
    margin-bottom: 75px;
}

.voyagez h3 {
    font-size: 3rem;
    font-weight: 500;
    position: relative;
}

.voyagez h3::after {
    content: "";
    display: block;
    width: 80px;
    height: 6px;
    background-color: #A0AE9E;
    border-radius: 4px;
    margin: 10px auto 0;
}

.hero {
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url("images/train.jpg") center/cover;
  color: white;
  text-align: center;
  padding: 120px 20px;
}

.hero h1 { font-size: 3rem; margin-bottom: 10px; }
.hero p { font-size: 1.3rem; margin-bottom: 20px; }

.stats { display: flex; justify-content: center; gap: 30px; margin: 20px 0; font-size: 1rem; }
.stats div { background: rgba(255,255,255,0.1); padding: 15px 25px; border-radius: 12px; }

.controls {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 72px;
  flex-wrap: wrap;
  margin: 32px auto 24px;
  max-width: 1100px;
}

.control{
  display:flex;
  align-items:center;
  gap:18px;
}

.control label{
  font-size:16px;
  font-weight:500;
  white-space:nowrap;
  color:#111;
}

.input-pill{
  min-width:220px;
  padding:10px 18px;
  border:1.5px solid #8A9386;
  border-radius:9999px;
  background:#fff;
  color:#111;
  outline:none;
  line-height:1.2;
}

.input-pill:focus{
  box-shadow:0 0 0 3px rgba(138,147,134,0.25);
}

.btn {
  padding: 10px 18px;
  border-radius: 9999px;
  border: 1.5px solid #8A9386;
  background: #8A9386;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  align-self: center;
  margin-top: -8px;
}
.btn:hover{ filter:brightness(0.95); }

.map-and-panel{
  display:flex;
  gap:24px;
  align-items:stretch;
  max-width:1200px;
  margin:24px auto 60px;
  padding:0 16px;
}

#map{
  flex: 1 1 66%;
  height: 70vh;
  min-height: 520px;
  border-radius: 16px;
  overflow: hidden;
  background: #e9ecef;
}

.panel{
  flex: 0 0 34%;
  background:#F2F3F2;
  border-radius:16px;
  padding:20px;
  border:1px solid #E0E3DF;
}

.panel-title{
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.panel-desc{
  color:#2a2f2b;
  line-height:1.45;
  margin-bottom: 18px;
}

.eco-block{
  background:#A0AE9E;
  color:#fff;
  padding:16px;
  border-radius:14px;
  margin-bottom: 18px;
}
.eco-block strong{ display:block; margin-bottom:6px; }

.nearby-title{
  font-size:1.2rem;
  font-weight:800;
  margin: 6px 0 10px;
}

.nearby-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}

.place-card{
  background:#B4BDB4;
  color:#111;
  border-radius:14px;
  padding:14px;
  font-weight:600;
  min-height:92px;
  display:flex;
  align-items:flex-end;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.place-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.leaflet-tooltip.city-label{
  background: #fff;
  border:1px solid #A0AE9E;
  color:#111;
  font-weight:600;
  border-radius: 9999px;
  padding:4px 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

#liste-lieux {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  list-style: none;
  padding-left: 0;
}

/* Cartes "lieux à proximité" avec image de fond */
.nearby-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:14px;
}

.place-card{
  position: relative;
  border-radius: 14px;
  min-height: 140px;
  background: #B4BDB4 no-repeat center/cover; /* remplacé par une image via JS */
  cursor: pointer;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.place-card::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 40%, rgba(0,0,0,0.45) 100%);
}
.place-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.place-content{
  position:absolute; left:12px; right:12px; bottom:10px; z-index:1;
  color:#fff; font-family:"Jost",sans-serif;
}
.place-title{ font-weight:700; line-height:1.1; }
.place-dist{ opacity:.9; font-size:.9rem; margin-top:2px; }
.leaflet-tooltip.city-label{
  background:#fff;
  border:1px solid #A0AE9E;
  border-radius:9999px;
  padding:4px 10px;
  color:#111;
  font-weight:600;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
}

#ville {
  margin-bottom: 6px;
}

#description {
  color: #2a2f2b;
  line-height: 1.45;
  margin-bottom: 12px;
}

.villes-bretagne {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  padding: 100px 10%;
}

.villes-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  flex: 1;
}

.villes-images img {
  width: 100%;
  height: 220px;
  border-radius: 20px;
  object-fit: cover;
  display: block;
}

.villes-texte {
  flex: 1;
}

.villes-texte h3 {
  font-size: 2.8rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 30px;
}

.villes-texte h3 span {
  display: inline-block;
  border-bottom: 6px solid #A0AE9E;
  border-radius: 3px;
  padding-bottom: 4px;
}

.villes-texte p {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
  max-width: 550px;
}

.eco-dash{
  max-width: 1200px;
  margin: 80px auto 100px;
  padding: 0 16px;
}

.dash-title{
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.dash-title::after{
  content:"";
  display:block;
  width: 140px;
  height: 6px;
  background:#A0AE9E;
  border-radius: 4px;
  margin: 10px auto 0;
}

.dash-controls{
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:center;
  margin: 10px 0 28px;
}

.dash-controls label{
  font-weight:500;
}

#trajet.input-pill{
  min-width:260px;
  padding:10px 18px;
  border-radius:9999px;
  background:#fff;
  outline:none;
}
#trajet.input-pill:focus{ box-shadow:0 0 0 3px rgba(138,147,134,.25); }

#tourisme-section {
  padding: 80px 10%;
  background: #fff;
  text-align: center;
}

#tourisme-section .controls {
  justify-content: center;
  margin-bottom: 30px;
}

#tourisme-section h3 {
  font-size: 2.2rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 20px;
}

#tourisme-section .chart-item {
  background: transparent; 
  border: none;            
  box-shadow: none;        
  padding: 0;
  height: auto;
}

#tourismeChart {
  width: 600px !important;   
  height: 600px !important;  
  max-width: 90%;
  margin: 0 auto;
  display: block;
}




.charts-container{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:24px;
  margin-top: 10px;
  margin-bottom:40px;
}

.chart-item{
  background:#E9EAEB;
  border: 1px solid #E0E3DF;
  border-radius: 22px;
  padding: 22px;
  height: 360px;
}

.chart-item canvas{
  width:100% !important;
  height:100% !important;
}

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  min-height: 100vh;
}

.site-footer {
  margin-top: auto;
  width: 100%;
  background-color: #EDEDE3;
  color: #111;
  text-align: center;
  padding: 25px 15px;
  font-family: "Jost", sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  border-top: 1px solid #D8D8D8;
  position: relative;
  bottom: 0;
  left: 0;
}

.footer-links {
  margin-bottom: 8px;
}

.footer-links a {
  color: #111;
  text-decoration: none;
  margin: 0 5px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #A0AE9E;
}

.footer-info {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 4px;
}

.footer-copy {
  font-size: 0.85rem;
  color: #555;
}


.graph-block {
  background: #fff;
  padding: 60px 10%;
  text-align: center;
}

.graph-block h3 {
  color: #000;
  margin-bottom: 20px;
}

.graph-block canvas {
  width: 400px !important;
  height: 400px !important;
  margin: 0 auto;
  display: block;
}

/* base utiles */
html { scroll-behavior: smooth; }
section, .premier, #map-section, .eco-dash, .villes-bretagne { scroll-margin-top: 110px; }

/* ——— 1200px ——— */
@media (max-width: 1200px) {
  .bretagne h1 { font-size: 2.6rem; }
  .voyagez h3 { font-size: 2.6rem; }

  .map-and-panel { max-width: 1000px; gap: 18px; }
  .panel { padding: 16px; }
  .charts-container { gap: 18px; }
}

/* ——— 992px (tablette paysage) ——— */
@media (max-width: 992px) {
  /* navbar: logo un peu plus petit */
  .logo { height: 54px; }

  /* bannière moins haute */
  .banniere { height: 42vh; }

  /* bloc "villes" : passe à 2 colonnes d’images */
  .villes-bretagne {
    padding: 70px 6%;
    gap: 40px;
    flex-direction: column;
    align-items: stretch;
  }
  .villes-images {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .villes-images img { height: 200px; border-radius: 18px; }

  .villes-texte { max-width: none; }
  .villes-texte h3 { font-size: 2.4rem; }
  .villes-texte p { font-size: 0.98rem; }

  /* filtres carte */
  .controls { gap: 28px; margin: 24px auto; }
  .input-pill { min-width: 200px; }

  /* carte + panneau : pile l’un sous l’autre */
  .map-and-panel {
    flex-direction: column;
    max-width: 860px;
    gap: 16px;
  }
  #map { height: 56vh; min-height: 420px; }
  .panel { flex: 1 1 auto; }

  /* graphs côte à côte → ok jusqu’à 992px */
  .chart-item { height: 320px; }
}

/* ——— 768px (tablette portrait / mobile large) ——— */
@media (max-width: 768px) {
  /* body sous la navbar fixe */
  body { margin-top: 100px; }

  /* navigation : liens plus serrés */
  .links li { padding: 0 10px; }
  li, a, button { font-size: 15px; }

  .bretagne { margin-top: 60px; }
  .bretagne h1 { font-size: 2.2rem; }
  .saviez h2 { font-size: 1.05rem; padding: 0 12px; }
  .voyage p { font-size: 1.2rem; }
  .voyage span { font-size: 2rem; }

  .co2 img { max-width: 360px; }

  /* filtres carte : en colonne */
  .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    max-width: 520px;
    width: 100%;
    padding: 0 16px;
  }
  .control { justify-content: space-between; }
  .input-pill { width: 100%; min-width: 0; }
  .btn { width: 100%; margin-top: 4px; }

  /* carte + panneau */
  #map { height: 50vh; min-height: 360px; }
  .panel-title { font-size: 1.3rem; }
  .nearby-grid { grid-template-columns: 1fr; }

  /* graphs empilés */
  .charts-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .chart-item { height: 280px; }

  /* images : 2 colonnes */
  .villes-images { grid-template-columns: repeat(2, 1fr); }
  .villes-images img { height: 180px; }
}

/* ——— 480px (mobile) ——— */
@media (max-width: 480px) {
  header { padding: 18px 18px; }
  .logo { height: 48px; }

  .banniere { height: 36vh; }

  .villes-bretagne { padding: 60px 16px; gap: 28px; }
  .villes-images { grid-template-columns: 1fr; gap: 10px; }
  .villes-images img { height: 200px; border-radius: 16px; }

  .panel { padding: 14px; }
  .eco-block { border-radius: 10px; }
  .place-card { min-height: 70px; }

  .dash-title { font-size: 2rem; }
  .chart-item { height: 240px; }

  .site-footer { padding: 18px 12px; font-size: 0.9rem; }
}
