<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:      #0f0f0f;
  --surface: #1c1c1c;
  --border:  #2e2e2e;
  --text:    #ddd;
  --accent:  #c8a96e;
  --radius:  6px;
}
html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0 8px 0;
  gap: 24px;
  top: 5px;
  position: relative;
}
#retour { position: fixed; top: 10px; max-width: 100px; z-index:2; color: white; font-size:1em;}

#suite { position: fixed; top: 10px; right: 100px; max-width: 150px; z-index:2; color: white; font-size:1em;}


/* ══════════════════════════════════════════════════════
   CARROUSEL
══════════════════════════════════════════════════════ */
.carousel-outer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

/* Flèches : larges zones cliquables sur les côtés */
.car-btn {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 26px;
  color: var(--text);
  z-index: 10;
  margin: 0 12px;
  transition: background .15s, opacity .15s;
  flex-shrink: 0;
}
.car-btn:hover { background: #282828; }
.car-btn.off   { opacity: .18; pointer-events: none; cursor: default; }

/* Piste : overflow hidden pour que les voisines sortent du cadre */
.carousel-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  overflow: hidden;
  min-height: 640px;
  position: relative;
}

/* Items */
.car-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* Les voisines ne sont PAS cliquables — seules les flèches naviguent */
  pointer-events: none;
}
/* Seule la centrale est cliquable (→ plein écran) */
.car-item.c0 {
  pointer-events: auto;
}

.car-item img {
  display: block;
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid transparent;
}
.car-item.c0 img {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
  cursor: pointer;
  transition: opacity .15s;
}
.car-item.c0 a:hover img { opacity: .88; }

/* Opacités progressives */
.car-item.c0  { opacity: 1;    }
.car-item.cm1,
.car-item.cp1 { opacity: 0.55; }
.car-item.cm2,
.car-item.cp2 { opacity: 0.28; }

.car-label { font-size: 11px; color: #555; }
.car-item.c0 .car-label { color: var(--accent); font-weight: 600; }

/* Fantôme pour les slots vides aux bords */
.car-ghost { flex-shrink: 0; }

/* ══════════════════════════════════════════════════════
   PLEIN ÉCRAN
══════════════════════════════════════════════════════ */
.fullscreen {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 16px;
}
.full-img-wrap img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
}
.full-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.full-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}
.full-btn:hover { background: #282828; }
.full-btn.stop  { border-color: var(--accent); color: var(--accent); }
.full-btn.off   { opacity: .3; pointer-events: none; }
.full-counter   { color: #666; font-size: 13px; }

/* ══════════════════════════════════════════════════════
   PELLICULE
══════════════════════════════════════════════════════ */
.filmstrip-wrap {
  width: 100%;
  max-width: 1100px;
  padding: 0 16px;
}
.filmstrip-scroll {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.filmstrip-scroll::-webkit-scrollbar       { height: 4px; }
.filmstrip-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.film-item { flex-shrink: 0; text-align: center; }

/* Numéro AU-DESSUS */
.film-num {
  font-size: 9px;
  color: #555;
  margin-bottom: 3px;
  line-height: 1;
}
.film-item.current .film-num { color: var(--accent); }

.film-item img {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 3px;
  border: 2px solid transparent;
  transition: border-color .15s;
}
.film-item a:hover img  { border-color: #777; }
.film-item.current img  { border-color: var(--accent); }

/* ══════════════════════════════════════════════════════
   OVERLAY DIAPORAMA
══════════════════════════════════════════════════════ */
#ss-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.94);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
#ss-overlay.active { display: flex; }
#ss-img { max-width: 95vw; max-height: 85vh; object-fit: contain; border-radius: var(--radius); }
#ss-ctrl { display: flex; gap: 16px; align-items: center; }
#ss-ctrl button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 22px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
}
#ss-ctrl button:hover { background: #282828; }
#ss-stop { border-color: var(--accent) !important; color: var(--accent) !important; }
#ss-ctr  { color: #666; font-size: 13px; min-width: 90px; text-align: center; }

</style>
