* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  height: 100%;
  font-family: 'AvenirLTStd_light', Arial, sans-serif;
  font-weight: 300;
  overflow: auto !important;
}

body {
  display: grid;
  grid-template-rows: 100px 1fr auto;
  grid-template-areas:
    "header"
    "map";
  height: 100vh;
  overflow: hidden;
}

header {
  grid-area: header;
  background: #fbfe1e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
}

header h1 {
  font-size: 3rem;
}

header h1 strong {
  background-color: #000;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
}
header nav a {
  margin-left: 15px;
  text-decoration: none;
  color: #000;
}

#map {
  grid-area: map;
  width: 100%;
  height: 100%;
}

#info-panel {
  font-family: 'Printvetica', Arial, sans-serif;
  position: absolute;
  top: 100px;
  right: 0;
  bottom: 120px;
  width: 350px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 1001;
  overflow: scroll;
}
#info-panel::before {
  content: '';
  position: absolute;
  bottom: -20px;
  right: 50px;
  border-width: 20px 20px 0 20px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
}
#info-panel.active {
  transform: translateX(-30px);
}
#close-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
}
#close-panel:hover { color: #35739d; }
#info-panel h2 {
  margin-top: 0;
  margin-bottom: 10px;
}
#info-panel p {
  line-height: 1.5;
}


#timeline {
  position: absolute;     
  bottom: 20px;           
  left: 50%;              
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 800px;
  background: #fff;
  border: 2px solid #000;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  font-family: 'Printvetica', sans-serif;
  z-index: 2000;           
}

.timeline-left { display: flex; align-items: center; gap: 10px; }
#current-year-big { font-size: 1.8rem; font-weight: bold; color: #000; }
#show-all {
  background: transparent; border: 0 solid #000;
  padding: 4px 8px; font-size: 1rem; cursor: pointer;
}
#show-all:hover { background: #000; color: #fff; }
.timeline-slider-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#year-slider {
  -webkit-appearance: none;
  width: 100%; background: transparent;
}
#year-slider:focus { outline: none; }
#year-slider::-webkit-slider-runnable-track {
  height: 4px; background: #ddd; border-radius: 2px;
}
#year-slider::-moz-range-track {
  height: 4px; background: #ddd; border-radius: 2px;
}
#year-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  background: #fff; border: 2px solid #000;
  border-radius: 50%; margin-top: -6px;
  cursor: pointer;
}
#year-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  background: #fff; border: 2px solid #000;
  border-radius: 50%; cursor: pointer;
}
.timeline-labels {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #000;
  margin-top: 6px;
}
#start-year, #end-label { white-space: nowrap; }

.leaflet-control-container { z-index: 2000; }

.leaflet-tile-pane img {
 
  filter:
  invert(1)        
  sepia(1)         
  saturate(10)      
  hue-rotate(25deg) 
  brightness(0.85);  
}


#historique {
  margin: 0;
  padding: 0;
  display: block;
  height: auto !important;
  overflow: visible !important;
}

#historique h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-align: center;
}

.memories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 0; 
}


.memory-item {
  position: relative;
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 350px;
  overflow: hidden;
  cursor: pointer;
}

.memory-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.4s ease;
  z-index: 1;
}


.memory-item .overlay {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  text-align: center;
  padding: 10px;
  color: #fff;


  display: flex;
  flex-direction: column;
  justify-content: center;  
  align-items: center;     
  

  width: 100%;
  height: 100%;
  padding: 20px;         
  
  color: #fff;
  text-align: center;    
}


.memory-item:hover::before {
  background: rgba(0, 0, 0, 0.5);
}

.memory-item:hover .overlay {
  opacity: 1;
  transform: translateY(0);
}


.memory-item h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  margin-bottom: 8px;
}

.memory-item p {
  font-size: 1rem;
  line-height: 1.4;
}






main#admin {
  grid-area: map;
  overflow-y: auto;
  padding: 20px;
  background: #fafafa;
}


main#admin form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}


main#admin form label {
  display: flex;
  flex-direction: column;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: #222;
}
main#admin form input[type="text"],
main#admin form input[type="number"],
main#admin form textarea {
  margin-top: 6px;
  padding: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
}


.input-container {
  position: relative;
}
.input-container .suggestions {
  width: 100%;
  top: 100%;
  left: 0;
}


main#admin form button[type="submit"] {
  align-self: flex-end;
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}
main#admin form button[type="submit"]:hover {
  background: #333;
}


main#admin h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 20px;
  color: #000;
}


header nav a.active {
  text-decoration: underline;
  font-weight: 700;
}

main#admin form input[type="text"],
main#admin form input[type="number"],
main#admin form textarea {
  width: 100%;    
  box-sizing: border-box; 
}


.input-container .suggestions {
  width: 100%;     
}




/* ================================
   Responsive : Tablette (<=768px)
   ================================ */
  @media (max-width: 768px) {
    header h1 { font-size: 2rem; }
    header nav a { font-size: 0.9rem; }
    #info-panel { width: 300px; top: 80px; bottom: 100px; padding: 15px; }
    #info-panel::before { right: 30px; }
    #info-panel h2 { font-size: 1.2rem; }
    #info-panel p { font-size: 0.9rem; }
    #timeline { padding: 8px 15px; gap: 15px; }
    #current-year-big { font-size: 1.4rem; }
  }
  
  /* ================================
     Responsive : Mobile (<=480px)
     ================================ */
  @media (max-width: 480px) {
    /* Header empilé */
body {
  font-size: 14px;
}
header {
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 12px;
  gap: 6px;
}
header h1 {
  font-size: 1.4rem;
  line-height: 1.2;
}
header h1 span {
  display: block;
  margin-top: 4px;
}
header nav {
  width: 100%;
  display: flex;
  justify-content: space-around;
}
header nav a {
  font-size: 0.8rem;
  padding: 4px;
}

#info-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  max-height: 300px;
  background: #fff;
  /*border-radius: 16px 16px 0 0;*/
  transform: translateY(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  z-index: 1001;
}
#info-panel.active {
  transform: translateY(0);
}
#info-panel::before { display: none; }
#close-panel {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.4rem;
}
#info-panel .content {
  margin-top: 32px;
  padding: 0 16px 16px;
  overflow-y: auto;
}
#info-panel h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
#info-panel p {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

#timeline {
  position: fixed;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 16px);
  padding: 6px 10px;
  gap: 8px;
  border-radius: 12px;
}
.timeline-left { display: none; }
.timeline-slider-container { flex: 1; }
.timeline-labels { font-size: 0.8rem; }

.leaflet-popup-content-wrapper {
  max-width: 180px;
  padding: 6px;
  border-radius: 12px;
}
.leaflet-popup-content {
  font-size: 0.85rem;
  line-height: 1.3;
}

.leaflet-control-zoom {
  top: 8px !important;
  left: 8px !important;
}

.leaflet-tile-pane img {
  filter:
    invert(1)
    sepia(1)
    saturate(4)
    hue-rotate(20deg)
    brightness(0.9);
}
  }

@font-face {
  font-family: 'AvenirLTStd_light';
  src: url('../fonts/AvenirLTStd-Light.otf') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-LightOblique.otf') format('opentype');
  font-weight: 300;
  font-style: oblique;
  font-display: swap;
}

@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-Book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-BookOblique.otf') format('opentype');
  font-weight: 400;
  font-style: oblique;
  font-display: swap;
}

@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-Roman.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-Oblique.otf') format('opentype');
  font-weight: 400;
  font-style: oblique;
  font-display: swap;
}

@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-MediumOblique.otf') format('opentype');
  font-weight: 500;
  font-style: oblique;
  font-display: swap;
}

@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-Heavy.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-HeavyOblique.otf') format('opentype');
  font-weight: 700;
  font-style: oblique;
  font-display: swap;
}

@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AvenirLTStd';
  src: url('../fonts/AvenirLTStd-BlackOblique.otf') format('opentype');
  font-weight: 900;
  font-style: oblique;
  font-display: swap;
}

/* Printvetica */
@font-face {
  font-family: 'Printvetica';
  src: url('../fonts/Printvetica.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}