/* CARTOGRAPHIER L'ESPACE, LE TERRITOIRE, L'IMAGINAIRE… > TYPOGRAPHIES : ROMAN GROTESQUE WEBL, FONTAWESOME */
/* CLAMP() + BREAKPOINTS : MINIMUM : 20EM - 320PX, MAXIMUM : 48EM - 768PX */

@font-face {
  font-family: 'Roman Grotesque WEBL';
  src: url('../webfont/RomanGrotesqueWEBL-Black.eot');
  src: url('../webfont/RomanGrotesqueWEBL-Black.eot?#iefix') format('embedded-opentype'),
    url('../webfont/RomanGrotesqueWEBL-Black.woff2') format('woff2'),
    url('../webfont/RomanGrotesqueWEBL-Black.woff') format('woff'),
    url('../webfont/RomanGrotesqueWEBL-Black.ttf') format('truetype'),
    url('../webfont/RomanGrotesqueWEBL-Black.svg#RomanGrotesqueWEBL-Black') format('svg');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roman Grotesque WEBL';
  src: url('../webfont/RomanGrotesqueWEBL-Bold.eot');
  src: url('../webfont/RomanGrotesqueWEBL-Bold.eot?#iefix') format('embedded-opentype'),
    url('../webfont/RomanGrotesqueWEBL-Bold.woff2') format('woff2'),
    url('../webfont/RomanGrotesqueWEBL-Bold.woff') format('woff'),
    url('../webfont/RomanGrotesqueWEBL-Bold.ttf') format('truetype'),
    url('../webfont/RomanGrotesqueWEBL-Bold.svg#RomanGrotesqueWEBL-Bold') format('svg');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
    font-family: 'FontAwesome';
    src: url('../webfont/FontAwesome.eot');
    src: url('../webfont/FontAwesome.eot?#iefix') format('embedded-opentype'),
        url('../webfont/FontAwesome.woff2') format('woff2'),
        url('../webfont/FontAwesome.woff') format('woff'),
        url('../webfont/FontAwesome.ttf') format('truetype'),
        url('../webfont/FontAwesome.svg#FontAwesome') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
  --bg: rgb(223, 220, 204);
  --fg: rgb(70,70,70);
  --bg-light: rgb(223, 220, 204, 0.4);
  --bg-light768: rgb(223, 220, 204, 0.5);
  --fg-light: /*rgba(70, 70, 70, 0.4)*/ rgb(168, 166, 156); 
  --citation: rgb(129, 127, 119);
  --bg-legende: rgb(203, 200, 181);
  --orange: /*rgb(255, 90, 0)*/ rgb(255, 94, 73);
  --footer: /* rgb(147, 55, 55);*/ rgb(109, 122, 158);
  --hover: rgb(0, 255, 255);
  --gap: 0.8rem;
}

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

body {
  margin: 0;
  font-family: "Barlow", sans-serif;
  background: var(--bg);
  color: var(--fg);
}

main {
  flex-grow: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 0.6rem;
  margin-bottom: 10rem !important;
}

header {
  padding: 2rem 1.5rem 1rem;
  text-align: left;
}

header h2 {
  font-family: 'Roman Grotesque WEBL';
  font-weight: 900;
  font-style: normal;
  font-size: clamp(2.75rem, 3.571vw + 2.036rem, 3.75rem);
  /* font-size : 44px - 60px */
  line-height: clamp(2.007rem, 2.607vw + 1.486rem, 2.738rem);
  /* line-height : 0.73 - 0.73 */
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

header h2 span {
  color: var(--fg-light);
}

header blockquote {
  font-family: "Barlow", sans-serif;
  font-style: italic;
  font-size: clamp(1.063rem, 0.926vw + 0.618rem, 1.313rem); /* font-size : 17px - 21px */
  line-height: clamp(1.063rem, 1.412vw + 0.385rem, 1.444rem); /* line-height : 1 - 1.1 */
  font-weight: 300;
  color: var(--citation);
  margin-top: 2rem;
  margin-bottom: 0.1rem;
  margin-left: 0rem;
  letter-spacing: -0.02rem;
}

header blockquote span {
  font-family: "Barlow", sans-serif;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 200;
  color: var(--citation);
}

header p {
  font-size: clamp(0.938rem, 0.463vw + 0.715rem, 1.063rem); /* font-size : 15px - 17px */
  line-height: clamp(1.125rem, 0.915vw + 0.942rem, 1.381rem); /* line-height : 1.2 - 1.3 */
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 2rem;
}

small { font-family: "Barlow", sans-serif!important; font-size: 0.9rem; font-weight: 300; line-height: 0.75; font-style: italic; }

/* ---------- Barre de filtre ---------- */

.filtres {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.5rem 1.5rem;
}

.filtre-btn {
  border: 1px solid var(--fg-light);
  background: transparent;
  color: var(--fg);
  padding: 0.1rem 0.8rem;
  font-family: "Barlow", sans-serif;
  font-style: normal;
  font-size: 0.9rem;
  min-height: 36px;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.filtre-btn:hover {
  border: 1px solid var(--orange);
  background: var(--orange);
  border-radius: 50px;
}

.filtre-btn.active {
  background: var(--bg-legende);
  color: var(--fg);
  border-color: var(--fg);
}

.filtre-btn:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

/* ---------- Grille d'images ---------- */

.grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  padding: 0 0.5rem 3rem;
}

.item {
  position: relative;
  /*border: 1px dotted rgba(0,0,0,0.8);*/
  cursor: pointer;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.35s ease, transform 0.35s ease;
  display: flex;
  flex-direction: column;
  margin: 0.4rem 0.4rem;
}

.item.masque {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.item img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.item .legende {
  display: flex;
  align-items: center;
  /* ou start pour le fixer vers le haut */
  padding: 0.55rem 0.7rem 0.55rem 1.1rem;
  background: var(--bg-legende);
  color: var(--fg);
  height: calc(0.95rem * 1.35 * 3 + 1.2rem);
  /* 3 lignes de texte (0.95rem × 1.35) + padding haut/bas (0.6rem × 2) */
  overflow: hidden;
  border-radius: 0px 0px 4px 4px;
  border-bottom: 1px solid rgba(171, 165, 153, 0.6);
  box-shadow: 0 6px 6px -6px var(--fg-light);
}

.item .legende-texte {
  font-size: 0.95rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  width: 100%;
}

.item .legende a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 0, 0.3);
  text-underline-offset: 2px;
}

.item .legende a:hover {
  text-decoration-color: var(--fg);
}

.item .legende strong,
.lightbox-legende strong,
p strong {
  font-weight: 500;
}

.item .vignette {
  position: relative;
  overflow: hidden;
  border-top-left-radius: 60px;
  corner-top-left-shape: bevel; /* bevel, scoop ou notch */
  /*border-top: 1px dotted rgba(0,0,0,0.8);
    border-right: 1px dotted rgba(0,0,0,0.8);
    border-bottom: 1px dotted rgba(0,0,0,0.8);
    border-left: 1px dotted rgba(0,0,0,0.8);*/
}

.item .icone-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 122, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.item .icone-video svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  margin-left: 3px;
  /* recentre visuellement le triangle */
}

.item .icone-son {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(45, 45, 45, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.item .icone-son svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

.item .badge-multi {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.lightbox-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  touch-action: pan-y;
}

.lightbox-points {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.point {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--fg-light);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, width 0.2s;
}

.point:hover {
  background: var(--orange);
}

.point.active {
  background: var(--orange);
  width: 20px;
  border-radius: 8px;
}

.point.point-video::after {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--orange);
}

.point.point-son::after {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--orange);
}

.lightbox video {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 4px;
}

#lightboxAudioBloc {
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

#lightboxAudioPoster {
  max-width: min(400px, 80vw);
  max-height: 60vh;
  border-radius: 4px;
}

#lightboxAudio {
  display: none;
}

.audio-player {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: min(500px, 90vw);
}

.audio-bouton {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.audio-bouton svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.audio-icone-play {
  margin-left: 2px; /* recentre visuellement le triangle */
}

.audio-temps {
  font-family: "Barlow", sans-serif;
  font-size: 0.85rem;
  color: var(--fg);
  min-width: 2.4em;
  text-align: center;
}

.audio-progression {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--fg-light);
  cursor: pointer;
}

.audio-progression::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
}

.audio-progression::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
}

.audio-progression::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--fg-light);
}

.lightbox-legende {
  color: var(--fg);
  text-align: center;
  font-size: clamp(1.344rem, 0.223vw + 1.299rem, 1.406rem);
  /* font-size : 21,5px - 22,5px */
  line-height: clamp(1.478rem, 0.748vw + 1.329rem, 1.688rem);
  /* line-height : 1.1 - 1.2 */
  font-weight: 400;
  max-width: 700px;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.lightbox-legende a {
  color: var(--orange);
  text-decoration: none;
}

.lightbox-legende a:hover {
  text-decoration: none;
  background-color: var(--orange) !important;
  color: var(--bg) !important;
  border-radius: 0px;
}

.lightbox-description {
  color: var(--fg);
  text-align: left;
  font-size: clamp(1.094rem, 0.223vw + 1.049rem, 1.156rem);
  /* font-size : 17,5px - 18,5px */
  line-height: clamp(1.203rem, 1.071vw + 0.989rem, 1.503rem);
  /* line-height : 1.1 - 1.3 */
  font-weight: 300;
  max-width: 700px;
  margin-top: 0.5rem;
  white-space: pre-line;
}

.lightbox-description strong {
  font-weight: 500;
  color: var(--fg);
}

.lightbox-description a {
  font-weight: 400;
  color: var(--orange);
  text-decoration: none;
}

.lightbox-description a:hover {
  text-decoration: none;
  background-color: var(--orange) !important;
  color: var(--bg) !important;
  border-radius: 0px;
}

.lightbox-credits {
  color: var(--fg-light);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 400;
  max-width: 600px;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.compteur {
  padding: 0 1.5rem;
  font-size: 1rem;
  color: var(--orange);
}

/* ---------- Lightbox simple ---------- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-legende);
  z-index: 100;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  padding: 2rem;
  overflow-y: auto;
}

.lightbox.ouvert {
  display: flex;
}

.lightbox img {
  max-width: 75%;
  max-height: 90vh;
  border-radius: 4px;
}

.lightbox .fermer {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  color: var(--orange);
  font-family: "Barlow", sans-serif;
  font-weight: 900;
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  z-index: 110;
}

/* ---------- Citation ---------- */

#auteur {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--citation);
  margin-left: 0.9rem;
}

#source {
  display: inline-block;
  color: var(--citation);
  margin-left: 0.2rem;
}
    
button {
  display: inline-block;
  font: inherit;
  padding: 0.1rem 0.5rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

button:hover, button:focus-visible {
  background: var(--orange);
  border-radius: 16px;
  color: #f4efe6;
}

footer { width: 100%; position: fixed; bottom: 0; z-index: 110; margin-left: 1em; background-color: var(--orange); border-radius: 0.8em 0 0 0; }
footer p { padding-right: 4em; padding-top: 1.2em; padding-bottom: 1.2em; font-weight: 200; font-size: 0.9rem; color: var(--footer); text-align: right; }
footer p span { font-weight: 400; }


/* -- DÉBUT BOUTON BACK TO TOP -- */
#top { display: inline-block; background-color: var(--fg); width: 2.4em; height: 3.2em; text-align: center; border-radius: 1.6em; position: fixed; bottom: 3.6em; opacity: 0; visibility: hidden; z-index: 90; text-decoration: none; margin-left: -1.2em; }
#top:after { content: "\f077"; /* content: "\f062"; */ font-family: 'FontAwesome'; font-weight: normal; font-style: normal; line-height: 2.1em; color: var(--hover); }
#top:hover { cursor: pointer; background-color: var(--orange); }
#top:active { background-color: var(--citation); }
#top.show { opacity: 1; visibility: visible; }
#top { left: 50%; }
/* -- FIN BOUTON BACK TO TOP -- */


/* -- DÉBUT MEDIA QUERIES - FORMAT MOBILE -- */
@media screen and (max-width: 767px) {
  body { font-family: "Barlow", sans-serif!important; background-color: var(--fg); color: var(--bg); }
  .grille { grid-template-columns: 1fr; }
  .item img { height: 260px; width: 90%; margin: 0 auto; }
  .item .vignette { border-top-left-radius: 60px!important; }
  .item .legende  { width: 94%; margin: 0 auto; height: calc(0.95rem * 1.35 * 2 + 2rem); /* 3 lignes de texte (0.95rem × 1.35) + padding haut/bas (1rem × 2) */ }
  .item .badge-multi { right: 1.5rem; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 0.75rem; }
  .item .legende-texte { font-size: 1.05rem; line-height: 1.25; }
  .filtres { padding: 0 1.5rem 1.2rem; justify-content: flex-start; }
  .filtre-btn { flex: 1 1 auto; text-align: center; border: 1px solid var(--bg-light); color: var(--bg); }
  .lightbox { background-color: var(--fg); }
  .lightbox-description strong { color: var(--bg); }
  .point { background: var(--bg-light); }
  header h2 { margin-top: 1rem; }
  header h2 span { color: var(--bg-light768); }
  h2, h3 { font-family: 'Roman Grotesque WEBL'; font-weight: 900; font-style: normal; color: var(--bg); line-height: 0.8em; margin-bottom: 1.2em; }
  p { font-weight: 300; color: var(--bg)!important; }
  small { font-family: "Barlow", sans-serif!important; font-size: 0.8rem; font-weight: 400; line-height: 1; color: var(--bg); }
  strong, b { font-weight: 500; }
  header blockquote, #auteur, #source, .lightbox-credits { color: var(--bg-light768)!important; }
  #top { background-color: var(--citation); }
  /*footer { display: none; }*/
  footer { width: 96%; }
  footer p { padding: 0.8em 2.2em 0.8em 1.2em; font-weight: 200; line-height: 1.15; font-size: 0.9rem; color: var(--footer)!important; }
  footer p span { font-weight: 400; }
}
/* -- FIN MEDIA QUERIES - FORMAT MOBILE --  -- */