/* ── PAGE OVERRIDE ── */
body.page-projets {
  padding-top: var(--nav-h);
}

body.page-projets.map-expanded {
  overflow: hidden;
}

.page-projets .container {
  max-width: 1600px;
}

/* ── PAGE HEADER ── */
.page-header {
  background: #fff;
  padding: 28px 0 30px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  color: #1a1d23;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 16px;
}

/* ── FILTERS ── */
.filters-bar {
  position: sticky;
  top: calc(var(--nav-h) - 1px);
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 650;
  padding: 14px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.page-header {
  margin-bottom: -1px;
  /* colle les deux éléments */
}

.filters-inner {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-btn {
  min-height: 42px;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
  font-family: 'Outfit', sans-serif;
  line-height: 1.15;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

/* ── SEARCH ── */
.filters-search-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 200px;
  max-width: 340px;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted, #5a6070);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 36px 10px 40px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: textfield;
  appearance: textfield;
}

.search-input::-webkit-search-cancel-button { display: none; }
.search-input::placeholder { color: var(--text-muted, #5a6070); }

.search-input:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(var(--brand-red-rgb), 0.12);
}

.search-clear {
  position: absolute;
  right: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: var(--text-muted, #5a6070);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
  transition: background var(--transition);
}

.search-clear:hover { background: var(--brand-red); }

@media (max-width: 640px) {
  .filters-search-row {
    justify-content: stretch;
  }

  .search-wrapper {
    max-width: 100%;
    width: 100%;
  }
}

/* ── MAP ── */
.projects-map-section {
  position: relative;
  z-index: 1;
  padding: 44px 0 34px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

body.page-projets.map-expanded .projects-map-section {
  z-index: 8500;
}

.projects-map-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.projects-map-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  justify-content: flex-end;
  min-width: 220px;
}

.projects-map-toggle {
  min-height: 42px;
  min-width: 190px;
  padding: 11px 22px;
  border: 1px solid rgba(var(--brand-red-rgb), 0.22);
  border-radius: 999px;
  background: #fff;
  color: var(--brand-red);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 14px 32px rgba(24, 29, 38, 0.07);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

/* ── Bouton "Afficher la carte" : carte France + marqueur animé ── */
.map-toggle-icon {
  position: relative;
  width: 30px;
  height: 29px;
  flex: none;
}

.map-toggle-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 87'%3E%3Cpolygon points='49.7,0 89.7,24 84.2,73 70.4,77 53.8,85 20.7,76.5 24.8,64 24.8,48 13.1,35 0,28 12.4,23 22.1,24 22.1,13 34.5,15' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 87'%3E%3Cpolygon points='49.7,0 89.7,24 84.2,73 70.4,77 53.8,85 20.7,76.5 24.8,64 24.8,48 13.1,35 0,28 12.4,23 22.1,24 22.1,13 34.5,15' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
}

.map-toggle-pin {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--brand-red, #c1121f);
  box-shadow: 0 0 0 2px #fff;
  z-index: 1;
}

.map-toggle-pin::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid rgba(var(--brand-red-rgb), 0.85);
  animation: map-pin-pulse 1.8s ease-out infinite;
}

.map-toggle-text {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.2;
  text-align: left;
}

.map-toggle-title {
  font-size: 14px;
  font-weight: 800;
}

.map-toggle-sub {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.78;
}

@keyframes map-pin-pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  70% {
    transform: scale(2.1);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* Respecte le réglage système "Réduire les animations" (accessibilité) :
   on coupe les animations en boucle du bouton carte. */
@media (prefers-reduced-motion: reduce) {
  .map-toggle-pin::after,
  .projects-map-section.map-collapsed .projects-map-toggle,
  .projects-map-section.map-collapsed .projects-map-toggle::after {
    animation: none;
  }
}

.projects-map-toggle:hover,
.projects-map-toggle:focus-visible {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
  transform: translateY(-1px);
  outline: none;
}

.projects-map-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 800;
  color: #151922;
  margin: 4px 0 8px;
}

.projects-map-header p {
  max-width: 680px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.projects-map-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
}

.projects-map-section.map-collapsed {
  padding: 34px 0 38px;
  background: #fff;
}

.projects-map-section.map-collapsed .projects-map-header {
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
}

.projects-map-section.map-collapsed .projects-map-header > div:first-child {
  display: none;
}

.projects-map-section.map-collapsed .projects-map-actions {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.projects-map-section.map-collapsed .projects-map-layout {
  display: none;
}

.projects-map-section.map-collapsed .projects-map-toggle {
  position: relative;
  isolation: isolate;
  min-width: 320px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 15px 38px;
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
  box-shadow: 0 18px 42px rgba(var(--brand-red-rgb), 0.24), 0 0 0 8px rgba(var(--brand-red-rgb), 0.06);
  animation: map-toggle-ring 2.4s ease-in-out infinite;
}

.projects-map-section.map-collapsed .projects-map-toggle::after {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: inherit;
  border: 8px solid rgba(var(--brand-red-rgb), 0.08);
  filter: blur(8px);
  opacity: 0.72;
  animation: map-toggle-aura 2.4s ease-in-out infinite;
}

.projects-map-section.map-collapsed .projects-map-toggle:hover,
.projects-map-section.map-collapsed .projects-map-toggle:focus-visible {
  background: var(--brand-red-dk);
  border-color: var(--brand-red-dk);
  box-shadow: 0 22px 48px rgba(var(--brand-red-rgb), 0.3), 0 0 0 9px rgba(var(--brand-red-rgb), 0.08);
}

@keyframes map-toggle-ring {
  0%,
  100% {
    box-shadow: 0 16px 36px rgba(var(--brand-red-rgb), 0.2), 0 0 0 6px rgba(var(--brand-red-rgb), 0.05);
  }

  50% {
    box-shadow: 0 22px 50px rgba(var(--brand-red-rgb), 0.32), 0 0 0 12px rgba(var(--brand-red-rgb), 0.11);
  }
}

@keyframes map-toggle-aura {
  0%,
  100% {
    transform: scale(0.98);
    opacity: 0.36;
  }

  50% {
    transform: scale(1.04);
    opacity: 0.86;
  }
}

.france-map-panel,
.projects-map-side {
  border: 1px solid rgba(32, 40, 53, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(27, 35, 48, 0.1);
}

.france-map-panel {
  min-height: 620px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.france-map-panel.map-expanded {
  position: fixed;
  inset: 18px;
  z-index: 8500;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  border-radius: 8px;
  background: #eef2f6;
  box-shadow:
    0 0 0 9999px rgba(24, 28, 36, 0.88),
    0 28px 90px rgba(0, 0, 0, 0.48);
}

.leaflet-projects-map {
  position: relative;
  z-index: 0;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  min-height: 620px;
  background: #eef2f6;
  overflow: hidden;
}

.france-map-panel.map-expanded .leaflet-projects-map {
  height: 100%;
  min-height: 100%;
}

.france-map-panel .projects-map-expand {
  z-index: 1200;
}

.france-map-panel .projects-map-expand.is-active {
  font-size: 26px;
  font-family: Arial, sans-serif;
  padding-bottom: 3px;
}

.map-load-state {
  height: 100%;
  min-height: inherit;
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}

.leaflet-projects-map .leaflet-control-zoom {
  border: 0;
  box-shadow: 0 12px 30px rgba(27, 35, 48, 0.16);
}

.leaflet-projects-map .leaflet-control-zoom a {
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-color: rgba(32, 40, 53, 0.1);
  color: #151922;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
}

.leaflet-projects-map .leaflet-control-attribution {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
}

.bruyas-map-marker {
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.2), 0 0 0 4px rgba(var(--brand-red-rgb), 0.1);
}

.bruyas-map-marker-logo {
  width: 23px;
  height: 23px;
  display: block;
  object-fit: contain;
}

.bruyas-map-marker-count {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand-red);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.bruyas-map-marker.outside {
  border-color: rgba(79, 91, 107, 0.86);
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.18), 0 0 0 4px rgba(79, 91, 107, 0.11);
}

.bruyas-map-marker.outside .bruyas-map-marker-count {
  background: #4f5b6b;
}

.bruyas-map-cluster {
  border-radius: 999px;
  background: rgba(var(--brand-red-rgb), 0.18);
  border: 1px solid rgba(var(--brand-red-rgb), 0.34);
  display: grid;
  place-items: center;
  box-shadow: 0 16px 34px rgba(var(--brand-red-rgb), 0.28);
}

.bruyas-map-cluster span {
  width: 34px;
  height: 34px;
  border-radius: inherit;
  display: grid;
  place-items: center;
  background: var(--brand-red);
  color: #fff;
  border: 3px solid #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.map-project-popup {
  width: 236px;
  display: grid;
  gap: 9px;
  font-family: 'Outfit', sans-serif;
}

.map-project-popup-media {
  width: 100%;
  height: 118px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f6;
}

.map-project-popup-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.map-project-popup-media.is-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f6 100%);
}

.map-project-popup-media.is-fallback img {
  width: 76%;
  height: auto;
  max-height: 68%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.08));
}

.map-project-popup strong {
  color: #151922;
  font-size: 15px;
  line-height: 1.25;
}

.map-project-popup span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.map-project-popup button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  padding: 9px 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.projects-map-side {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.projects-map-side-head span,
.map-detail-eyebrow {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}

.projects-map-side-head p {
  margin-top: 8px;
  color: var(--text-muted);
  line-height: 1.6;
}

.projects-map-detail {
  padding: 18px;
  border-radius: 8px;
  background: #f7f9fc;
  border: 1px solid rgba(32, 40, 53, 0.1);
}

.projects-map-detail h3 {
  margin: 7px 0 8px;
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  color: #151922;
}

.projects-map-detail p {
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 14px;
}

.projects-map-detail-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.map-project-link {
  width: 100%;
  border: 1px solid rgba(32, 40, 53, 0.1);
  border-radius: 8px;
  background: #fff;
  color: #151922;
  padding: 10px 12px;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}

.map-project-link:hover {
  color: var(--brand-red);
  border-color: rgba(var(--brand-red-rgb), 0.32);
  transform: translateX(3px);
}

.projects-map-list {
  display: grid;
  gap: 9px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.projects-map-item {
  border: 1px solid rgba(32, 40, 53, 0.1);
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #151922;
  font-family: 'Outfit', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.projects-map-item strong {
  font-size: 14px;
  line-height: 1.25;
}

.projects-map-item span {
  flex-shrink: 0;
  min-width: 34px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(var(--brand-red-rgb), 0.1);
  color: var(--brand-red);
  font-size: 13px;
  font-weight: 800;
}

.projects-map-item:hover,
.projects-map-item.active {
  border-color: rgba(var(--brand-red-rgb), 0.34);
  box-shadow: 0 14px 28px rgba(27, 35, 48, 0.09);
  transform: translateY(-2px);
}

/* ── GALLERY ── */
.gallery-section {
  padding: 54px 0 100px;
  background: var(--surface-1);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px 40px;
}

/* ── PROJECT CARD ── */
a.proj-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.proj-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--surface-3);
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.proj-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  border-color: rgba(var(--brand-red-rgb), 0.5);
}

.proj-card.large {
  grid-column: span 2;
  aspect-ratio: 21/9;
}

.proj-card.large .card-title {
  font-size: 32px;
}

.proj-card.large .card-cat {
  font-size: 14px;
}

.proj-card img,
.proj-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
  background: #05070b;
}

.proj-card:hover img,
.proj-card:hover video {
  transform: scale(1.06);
}

.proj-card.has-video::after {
  content: '▶';
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(196, 30, 58, 0.9);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.proj-card.no-photo {
  background:
    linear-gradient(135deg, #f8fafc 0%, #eef2f6 100%);
}

.proj-card.no-photo img {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(58%, 320px);
  height: auto;
  max-height: 38%;
  object-fit: contain;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.08));
}

.proj-card.no-photo:hover img {
  transform: translate(-50%, -50%) scale(1.03);
}

.proj-card.large.no-photo img {
  width: min(34%, 340px);
  max-height: 48%;
}

.proj-card-info {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 12, 16, 0.88) 0%, rgba(8,12,16,0.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 24px;
  opacity: 1;
  transition: background 0.3s ease;
}

.proj-card:hover .proj-card-info {
  background: linear-gradient(to top, rgba(8, 12, 16, 0.97) 0%, rgba(8,12,16,0.5) 60%, transparent 100%);
}

.card-cat {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(var(--brand-red-rgb), 0.35);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 10px;
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.card-hint {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-count {
  background: rgba(var(--brand-red-rgb), 0.25);
  color: var(--brand-red);
  border: 1px solid rgba(var(--brand-red-rgb), 0.35);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
}

/* ── PROJECT OVERLAY ── */
.proj-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(24, 28, 36, 0.97);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px clamp(34px, 4.5vw, 86px);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.proj-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.proj-detail {
  width: 100%;
  max-width: 1840px;
  min-height: calc(100svh - 56px);
  padding: 30px 0 24px;
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: center;
  column-gap: clamp(24px, 3.8vw, 72px);
  row-gap: 14px;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(.4, 0, .2, 1);
}

.proj-overlay.open .proj-detail {
  transform: translateY(0);
}

.detail-close {
  position: fixed;
  top: 22px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all var(--transition);
  z-index: 20;
}

.detail-close:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.detail-share {
  position: fixed;
  top: 22px;
  right: 78px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all var(--transition);
  z-index: 20;
}

.detail-share:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

/* ── TOAST ── */
.gallery-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 16px);
  z-index: 100000;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(15, 18, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gallery-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ── DETAIL HEADER ── */
.detail-header {
  grid-column: 1;
  grid-row: 1 / 4;
  align-self: center;
  margin-bottom: 0;
  padding: 22px 0 48px;
  min-width: 0;
}

.detail-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--brand-red);
  margin-bottom: 12px;
}

.detail-title {
  font-family: 'Outfit', sans-serif;
  font-size: var(--detail-title-size, clamp(28px, 2.35vw, 38px));
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.08;
  letter-spacing: 0;
  max-width: 340px;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: manual;
  text-wrap: balance;
}

.detail-title-line {
  display: block;
}

.detail-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 330px;
  margin-bottom: 12px;
}

.detail-locations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.loc-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── PHOTO VIEWER ── */
.detail-viewer {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 28px);
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin-bottom: 0;
  min-width: 0;
}

.viewer-main {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: #05070b;
  position: relative;
  min-width: 0;
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.42);
}

.viewer-main::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.18), transparent 42%);
  pointer-events: none;
}

.viewer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(34px) brightness(0.5) saturate(1.1);
  transform: scale(1.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.viewer-bg.is-ready {
  opacity: 1;
}

.viewer-main.is-empty {
  min-height: clamp(360px, 58svh, 620px);
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 242, 246, 0.94) 100%);
}

.viewer-main.is-empty::after {
  display: none;
}

.viewer-main.is-portrait-photo {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(32, 39, 52, 0.92) 0%, rgba(5, 7, 11, 0.98) 72%);
}

.viewer-main > img {
  width: 100%;
  height: clamp(540px, 72svh, 820px);
  max-height: calc(100svh - 168px);
  object-fit: cover;
  display: block;
  background: #05070b;
  position: relative;
  z-index: 1;
}

.viewer-main.is-portrait-photo > img {
  width: auto;
  max-width: min(100%, 620px);
  object-fit: contain;
  background: transparent;
}

.viewer-main > video,
.viewer-video-slot {
  width: 100%;
  height: clamp(540px, 72svh, 820px);
  max-height: calc(100svh - 168px);
  object-fit: contain;
  display: block;
  background: #05070b;
  position: relative;
  z-index: 1;
}

.viewer-video-slot {
  position: relative;
}

.viewer-main:not(.is-empty):not(.is-video) img {
  cursor: zoom-in;
}

.viewer-main.is-empty img {
  width: min(46%, 420px);
  max-height: 180px;
  opacity: 0.92;
  background: transparent;
  filter: drop-shadow(0 12px 22px rgba(15, 23, 42, 0.1));
}

.viewer-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  z-index: 3;
}

.viewer-main.is-empty .viewer-caption {
  display: none;
}

.viewer-main.is-video .viewer-caption {
  top: clamp(12px, 1.3vw, 18px);
  bottom: auto;
  left: clamp(12px, 1.3vw, 18px);
  right: auto;
  width: fit-content;
  max-width: min(62%, 430px);
  padding: 8px 12px 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: #151922;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: none;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  z-index: 5;
}

.viewer-main.is-video .viewer-caption::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--brand-red);
}

.viewer-video-slot .moyens-video-player,
.lightbox-video-slot .moyens-video-player {
  position: relative;
  width: 100%;
  height: 100%;
  background: #070a10;
  overflow: hidden;
}

.lightbox-video-slot .moyens-video-player {
  height: min(72vh, 720px);
}

.viewer-video-slot .moyens-custom-video,
.lightbox-video-slot .moyens-custom-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #070a10;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.moyens-video-player:not(.has-frame) .moyens-custom-video {
  opacity: 0;
}

.moyens-video-poster-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #070a10;
  opacity: 1;
  transition: opacity 0.26s ease, visibility 0.26s ease;
  pointer-events: none;
}

.moyens-video-player.has-frame .moyens-video-poster-layer {
  opacity: 0;
  visibility: hidden;
}

.moyens-video-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border: 4px solid rgba(255, 255, 255, 0.34);
  border-top-color: var(--brand-red);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 0 14px rgba(8, 10, 16, 0.48), 0 18px 44px rgba(0, 0, 0, 0.38);
  animation: moyens-video-spin 0.85s linear infinite;
  transition: opacity 0.2s ease;
}

.moyens-video-player.is-loading:not(.has-frame) .moyens-video-loader {
  opacity: 1;
}

.moyens-video-player.is-loading:not(.has-frame) .moyens-video-main-play {
  opacity: 0;
  pointer-events: none;
}

@keyframes moyens-video-spin {
  to {
    transform: rotate(360deg);
  }
}

.moyens-video-main-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  transition: opacity 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.moyens-video-main-play:hover,
.moyens-video-main-play:focus-visible {
  background: var(--brand-red);
  transform: translate(-50%, -50%) scale(1.04);
  outline: none;
}

.moyens-video-main-play span {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid currentColor;
}

.moyens-video-player.is-playing .moyens-video-main-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
}

.moyens-video-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 54px 22px 18px;
  color: #fff;
  background: linear-gradient(to top, rgba(4, 6, 10, 0.86), rgba(4, 6, 10, 0.38) 58%, transparent);
}

.moyens-video-control {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.moyens-video-control svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;
  stroke-width: 2.2;
}

.moyens-video-control:hover,
.moyens-video-control:focus-visible {
  background: var(--brand-red);
  transform: translateY(-1px);
  outline: none;
}

.moyens-video-toggle span {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

.moyens-video-player.is-playing .moyens-video-toggle span {
  width: 12px;
  height: 15px;
  margin-left: 0;
  border: 0;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}

.moyens-video-progress {
  width: 100%;
  accent-color: var(--brand-red);
  cursor: pointer;
}

.moyens-video-time {
  min-width: 78px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.moyens-video-player:fullscreen {
  width: 100vw;
  height: 100vh;
  background: #05070c;
}

.detail-viewer.has-no-photos .viewer-nav,
.detail-viewer.has-no-photos .viewer-zoom-btn {
  opacity: 0.32;
  pointer-events: none;
}

.viewer-nav:disabled,
.viewer-zoom-btn:disabled {
  cursor: not-allowed;
}

/* ── ZOOM BUTTON ── */
.viewer-zoom-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition);
  z-index: 5;
  backdrop-filter: blur(6px);
  line-height: 1;
}

.viewer-zoom-btn:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  transform: scale(1.1);
}

.viewer-main.is-video .viewer-zoom-btn {
  display: none;
}

/* ── LIGHTBOX PLEIN ÉCRAN ── */
.lightbox {
  --lightbox-controls-bottom: 24px;
  --lightbox-controls-height: 56px;
  --lightbox-caption-gap: 14px;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(48px) brightness(0.3) saturate(1.1);
  transform: scale(1.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-bg.is-ready {
  opacity: 1;
}

.lightbox-img-wrap {
  position: relative;
  z-index: 1;
  width: fit-content;
  height: fit-content;
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 54px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
}

.lightbox-img-wrap > img {
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 54px);
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  display: block;
  position: relative;
  z-index: 1;
}

.lightbox-img-wrap.is-portrait-photo > img {
  width: auto;
  max-width: min(calc(100vw - 160px), 720px);
  object-fit: contain;
}

.lightbox-img-wrap > video,
.lightbox-video-slot {
  max-width: 100%;
  max-height: calc(100vh - 54px);
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  display: block;
  position: relative;
  z-index: 1;
}

.lightbox-img-wrap img {
  transform: translate3d(var(--zoom-x, 0px), var(--zoom-y, 0px), 0) scale(var(--zoom-scale, 1));
  transform-origin: center center;
  transition: transform 0.16s ease;
  will-change: transform;
  cursor: inherit;
}

.lightbox-img-wrap > video,
.lightbox-video-slot {
  width: min(1180px, calc(100vw - 160px));
  background: #000;
}

.lightbox-img-wrap.is-video {
  cursor: default;
  touch-action: auto;
}

.lightbox.zoomed .lightbox-img-wrap {
  cursor: grab;
}

.lightbox.zoom-dragging .lightbox-img-wrap {
  cursor: grabbing;
}

.lightbox.zoom-dragging .lightbox-img-wrap img {
  transition: none;
}

.lightbox-caption {
  position: absolute;
  left: clamp(12px, 1.4vw, 18px);
  right: auto;
  bottom: clamp(12px, 1.4vw, 18px);
  z-index: 11;
  width: fit-content;
  max-width: min(72%, 440px);
  box-sizing: border-box;
  padding: 9px 13px 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.95);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: #151922;
  text-shadow: none;
  transform: none;
  overflow-wrap: anywhere;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.lightbox-caption::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: var(--brand-red);
}

.lightbox-caption:empty {
  display: none;
}

.lightbox-zoom-controls {
  position: fixed;
  left: 50%;
  bottom: var(--lightbox-controls-bottom);
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 18, 26, 0.72);
  color: #fff;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  transition:
    opacity var(--transition),
    visibility var(--transition),
    transform var(--transition);
}

@media (hover: hover) and (pointer: fine) {
  .lightbox-zoom-controls {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 10px);
  }

  .lightbox-img-wrap:hover + .lightbox-zoom-controls,
  .lightbox-zoom-controls:hover,
  .lightbox-zoom-controls:focus-within {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }
}

.lightbox-zoom-controls button {
  min-width: 42px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.lightbox-zoom-controls button:hover,
.lightbox-zoom-controls button:focus-visible {
  background: var(--brand-red);
  transform: translateY(-1px);
  outline: none;
}

#lightbox-zoom-reset {
  min-width: 64px;
  padding: 0 14px;
  font-size: 13px;
  letter-spacing: 0.4px;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all var(--transition);
  z-index: 6;
}

.lightbox-close:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.lightbox-share {
  position: fixed;
  top: 14px;
  right: 72px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all var(--transition);
  z-index: 10;
}

.lightbox-share:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

/* Partage réservé au tactile/mobile : masqué sur desktop (souris) */
@media (hover: hover) and (pointer: fine) {
  .detail-share,
  .lightbox-share {
    display: none;
  }
}

.lightbox-nav {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  padding: 0 0 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  font-family: Arial, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.lightbox-nav:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

.viewer-nav {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  padding: 0 0 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-family: Arial, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.viewer-nav:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
}

/* ── THUMBNAILS ── */
.detail-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  grid-column: 2;
  grid-row: 2;
  max-height: 122px;
  overflow-y: auto;
  margin: 0;
  padding: 2px 2px 4px;
}

.thumb {
  width: 60px;
  height: 48px;
  padding: 0;
  background: transparent;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb.is-video {
  position: relative;
}

.thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.thumb.active {
  border-color: var(--brand-red);
}

.thumb:hover {
  border-color: rgba(var(--brand-red-rgb), 0.6);
  transform: translateY(-2px);
}

.detail-counter {
  grid-column: 2;
  grid-row: 3;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
}

.detail-counter span {
  color: #fff;
  font-weight: 700;
}

/* ── CTA SECTION ── */
.cta-section {
  padding: 80px 0;
  text-align: center;
}

.cta-section .section-subtitle {
  margin: 0 auto 40px;
}

.cta-section .btn-primary {
  font-size: 16px;
  padding: 16px 40px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1180px) {
  .projects-map-layout {
    grid-template-columns: 1fr;
  }

  .projects-map-side {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .projects-map-list {
    grid-column: 1 / -1;
    max-height: none;
  }

  .proj-overlay {
    align-items: flex-start;
    padding: 22px;
  }

  .proj-detail {
    max-width: min(980px, calc(100vw - 44px));
    min-height: auto;
    padding: 64px 24px 42px;
    display: block;
  }

  .detail-header {
    padding: 0;
    margin-bottom: 22px;
  }

  .detail-title {
    font-size: var(--detail-title-size, clamp(28px, 4.6vw, 36px));
    line-height: 1.08;
    max-width: 760px;
  }

  .detail-desc {
    max-width: 760px;
  }

  .detail-viewer {
    margin-bottom: 14px;
  }

  .viewer-main > img,
  .viewer-main > video,
  .viewer-video-slot {
    height: auto;
    max-height: 62svh;
  }

  .detail-thumbs {
    max-height: none;
    margin-bottom: 12px;
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 22px 0 24px;
  }

  .page-header h1 {
    font-size: clamp(28px, 8vw, 34px);
  }

  .page-header p {
    font-size: 15px;
    line-height: 1.55;
  }

  .filters-bar {
    padding: 10px 0;
  }

  .filters-inner {
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filters-inner::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 13px;
  }

  .projects-map-section {
    padding: 26px 0 24px;
  }

  .projects-map-header {
    flex-direction: column;
    align-items: stretch;
  }

  .projects-map-actions {
    justify-content: stretch;
    min-width: 0;
  }

  .projects-map-toggle {
    flex: 1;
    min-width: 0;
  }

  .france-map-panel {
    min-height: 320px;
  }

  .france-map-panel.map-expanded {
    inset: 8px;
  }

  .leaflet-projects-map {
    min-height: 320px;
  }

  .projects-map-side {
    display: flex;
    padding: 18px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .gallery-section {
    padding: 34px 0 70px;
  }

  .proj-card.large {
    grid-column: span 1;
    aspect-ratio: 4/3;
  }

  .proj-card-info {
    padding: 18px;
  }

  .card-title,
  .proj-card.large .card-title {
    font-size: clamp(21px, 6vw, 26px);
    line-height: 1.14;
  }

  .card-cat {
    font-size: 10px;
    letter-spacing: 1px;
  }

  .card-hint {
    font-size: 14px;
  }

  .proj-overlay {
    padding: 10px;
  }

  .proj-detail {
    max-width: calc(100vw - 20px);
    padding: 58px 10px 34px;
  }

  .detail-cat {
    font-size: 10px;
    letter-spacing: 2.5px;
    margin-bottom: 10px;
  }

  .detail-title {
    font-size: var(--detail-title-size, clamp(26px, 7.6vw, 34px));
    line-height: 1.1;
    max-width: 100%;
    margin-bottom: 12px;
  }

  .detail-desc {
    font-size: 15px;
    line-height: 1.55;
    margin-bottom: 10px;
  }

  .detail-locations {
    margin-top: 10px;
  }

  .detail-viewer {
    flex-direction: column;
    gap: 10px;
  }

  .viewer-main {
    width: 100%;
  }

  .viewer-bg {
    filter: blur(24px) brightness(0.5) saturate(1.1);
  }

  .viewer-main > img,
  .viewer-main > video,
  .viewer-video-slot {
    max-height: 48svh;
  }

  .viewer-caption {
    padding: 26px 12px 10px;
    font-size: 12px;
  }

  .detail-thumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .viewer-main.is-video .viewer-caption {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    padding: 7px 10px 7px 14px;
    font-size: 11px;
  }

  .viewer-main.is-video .viewer-caption::before {
    left: 6px;
    top: 7px;
    bottom: 7px;
  }

  .lightbox {
    --lightbox-controls-bottom: 16px;
    gap: 8px;
  }

  .lightbox-bg {
    filter: blur(34px) brightness(0.3) saturate(1.1);
  }

  .lightbox-img-wrap {
    max-width: calc(100vw - 18px);
    max-height: calc(100vh - 126px);
  }

  .lightbox-img-wrap > img,
  .lightbox-img-wrap > video,
  .lightbox-video-slot {
    max-height: calc(100vh - 126px);
  }

  .lightbox-img-wrap > img {
    max-width: calc(100vw - 18px);
  }

  .lightbox-img-wrap.is-portrait-photo > img {
    max-width: min(calc(100vw - 18px), 720px);
  }

  .lightbox-img-wrap > video,
  .lightbox-video-slot {
    width: 100%;
  }

  .lightbox-zoom-controls {
    bottom: var(--lightbox-controls-bottom);
  }

  .lightbox-caption {
    left: 10px;
    bottom: 12px;
    max-width: calc(100% - 20px);
    padding: 7px 10px 7px 14px;
    background: rgba(255, 255, 255, 0.94);
  }

  .lightbox-caption::before {
    left: 6px;
    top: 7px;
    bottom: 7px;
  }

  .moyens-video-controls {
    grid-template-columns: auto minmax(80px, 1fr) auto auto;
    gap: 8px;
    padding: 44px 12px 12px;
  }

  .moyens-video-time {
    display: none;
  }

  .moyens-video-main-play {
    width: 66px;
    height: 66px;
  }

  .lightbox-zoom-controls button {
    min-width: 38px;
    height: 36px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .lightbox-share {
    top: 12px;
    right: 60px;
    width: 40px;
    height: 40px;
  }

  .lightbox-nav {
    position: fixed;
    top: 50%;
    z-index: 13;
    width: 42px;
    height: 42px;
    font-size: 26px;
    transform: translateY(-50%);
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .viewer-nav {
    display: none;
  }

  .thumb {
    width: 70px;
    height: 52px;
  }
}

/* ── PAYSAGE / ECRANS BAS (telephones a l'horizontale) ── */
@media (orientation: landscape) and (max-height: 600px) {
  .proj-detail {
    min-height: 0;
    align-content: start;
    padding: 16px 0 18px;
    row-gap: 10px;
  }

  .viewer-main > img,
  .viewer-main > video,
  .viewer-video-slot {
    height: auto;
    min-height: 0;
    max-height: 62svh;
  }

  .viewer-main.is-portrait-photo > img {
    max-height: 62svh;
  }

  .detail-thumbs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .thumb {
    width: 62px;
    height: 46px;
    flex: 0 0 auto;
  }

  /* Lightbox : media plein cadre, controles compacts */
  .lightbox-img-wrap,
  .lightbox-img-wrap > img,
  .lightbox-img-wrap > video,
  .lightbox-video-slot {
    max-height: calc(100svh - 70px);
  }
}

/* ── SKELETON LOADER ── */
@keyframes skeleton-shimmer {
  from { background-position: -600px 0; }
  to   { background-position:  600px 0; }
}

.proj-card-skeleton {
  border-radius: var(--radius, 12px);
  aspect-ratio: 4/3;
  background: linear-gradient(
    90deg,
    #e8eaed 25%,
    #f4f5f7 50%,
    #e8eaed 75%
  );
  background-size: 1200px 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border: 1px solid rgba(0, 0, 0, 0.065);
}
