/* 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: #e5dbdb;
    --fg: #222222;*/
  --bg: #dfdccc;
  --fg: rgb(70,70,70);
  --bg-light: rgb(223, 220, 204, 0.4);
  --fg-light: rgba(70, 70, 70, 0.4);
  --accent: #111;
  --muted: #999;
  /*--leg: #f4eded;*/
  --bg-leg: #cbc8b5;
  --orange: rgb(255, 90, 0);
  --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: 6rem !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.125rem, 0.694vw + 0.792rem, 1.313rem);
  /* font-size : 18px - 21px */
  line-height: clamp(1.125rem, 1.181vw + 0.558rem, 1.444rem);
  /* line-height : 1 - 1.1 */
  font-weight: 400;
  margin-top: 2rem;
  margin-bottom: 2rem;
  margin-left: 1rem;
}

header blockquote span {
  font-family: "Barlow", sans-serif;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 300;
}

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;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.5rem 2rem;
}

.filtres label {
  font-size: 0.85rem;
  color: var(--muted);
}

.filtre-select {
  border: 1px dotted var(--fg);
  background: var(--bg-leg);
  color: var(--fg);
  padding: 0.6rem 0.8rem;
  font-family: "Barlow", sans-serif;
  font-style: normal;
  font-size: 1rem;
  line-height: 1.2;
  border-radius: 10px;
  cursor: pointer;
  min-width: 180px;
  min-height: 36px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23111' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 1.1rem;
  padding-right: 2.2rem;
}

.filtre-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ---------- 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;
  margin: 0 auto;
  width: 96%;
  height: 240px;
  object-fit: cover;
}

.item .legende {
  width: 98%;
  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-leg);
  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: 4px 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: 1.05rem;
  line-height: 1.1;
  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 dotted;
  text-decoration-color: rgba(0, 0, 0, 0.3);
  text-underline-offset: 3px;
}

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

.item .legende strong,
.lightbox-legende 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.8rem;
  background: rgba(0, 0, 0, 0.65);
  color: #ebeae3;;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
}

.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, .lightbox-description1 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: 7rem;
}

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

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


.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-leg);
  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: 101;
}

footer { width: 100%; position: fixed; bottom: 0; /*flex-grow: 0; flex-shrink: 0;*/ margin-left: 1em; background-color: var(--orange); border-radius: 0.8em 0 0 0; }
footer p { padding-left: 1.8em; padding-top: 1.6em; padding-bottom: 1.2em; font-weight: 300; font-size: 0.9rem; color: var(--bg); }

/* -- DÉBUT BOUTON BACK TO TOP -- */
:root { --top: rgb(96,96,96); /* bouton up */ --topactive: rgb(133,123,123); --red: rgb(255, 0, 0); --hover: rgb(0, 255, 255); }
#top { display: inline-block; background-color: var(--top); width: 2.4em; height: 3.2em; text-align: center; border-radius: 1.6em; position: fixed; bottom: 3em; opacity: 0; visibility: hidden; z-index: 1000; 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(--topactive); }
#top.show { opacity: 1; visibility: visible; }
#top { left: 50%; }
/* -- FIN BOUTON BACK TO TOP -- */


/* ---------- Tablette (portrait/paysage) : iPad et similaires ---------- */
@media (min-width: 481px) and (max-width: 1024px) {
  .grille { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  header { padding: 1.6rem 1.5rem 0.8rem; }
  header h2 { margin-top: 1.5rem; }
  .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; }
  .lightbox { background-color: var(--fg); }
  .lightbox-description strong { color: var(--bg); }
  .point { background: var(--bg); }
}

@media (max-width: 480px) {
  .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 { flex-wrap:wrap;  padding-right: 10rem; padding-bottom: 2.5rem}
  .filtre-select { flex: 1; min-width: 0; }
  header h2 { margin-top: 1rem; }
  .lightbox { background-color: var(--fg); }
  .lightbox-description strong { color: var(--bg); }
  .point { background: var(--bg); }
}

/* -- 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); }
    h1 { color: var(--h1-768); line-height: 0.75em!important; }
    h2, h3 { font-family: 'Roman Grotesque WEBL'; font-weight: 900; font-style: normal; color: var(--bg); line-height: 0.8em; margin-bottom: 1.2em; }
    header h2 span { color: var(--bg-light); }
    h3, h4 { color: var(--h3-h4-678); }
    h3 span { color: var(--h3-span-768); }
    h4 { font-weight: 400!important; }
    h4 .chapo { margin-bottom: 20em!important; }
    h5, h6 { font-weight:400; color: var(--small-768); }
    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; }
    ul { color: var(--texte-768); }
    li { list-style: none; }
    mark { background-color: var(--mark-768); color: var(--texte-768); border-radius: 4px; }
    .legende { margin-top: -4.5em; color: var(--legende-768); }
    article ul { padding-left: 0.6em!important; }
}
/* -- FIN MEDIA QUERIES - FORMAT MOBILE --  -- */