:root {
  --black: #000000;
  --dark: #1a1a1a;
  --mid: #707070;
  --light: #d9d9d9;
  --white: #ffffff;
  --border: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: Montserrat, Arial, sans-serif;
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: #050505;
  color: var(--white);
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 80px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-name {
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-link span,
.site-nav a,
.eyebrow,
.button,
.badge,
.meta-row,
label span,
.project-meta strong {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand-link span,
.muted,
.hint {
  color: #9b9b9b;
}

.site-nav {
  display: flex;
  gap: 34px;
}

.site-nav a:hover,
.text-link:hover,
.footer-links a:hover {
  color: var(--white);
}

.hero,
.project-hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 120px 32px 64px;
}

.project-hero {
  min-height: 86svh;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: grayscale(1);
}

.hero-video {
  display: block;
}

.hero-fallback {
  display: none;
}

.hero::after,
.project-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.82) 48%, rgba(0, 0, 0, 0.28) 100%);
}

.hero-content,
.project-hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 1280px);
  margin: 0 auto;
}

.hero-content {
  display: block;
}

.hero-content > div {
  max-width: 980px;
}

.hero-eyebrow {
  margin-top: 18px;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 900;
  line-height: 0.96;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(52px, 10vw, 138px);
}

h2 {
  font-size: clamp(34px, 5vw, 70px);
}

h3 {
  font-size: 22px;
}

.hero-subtitle,
.lead {
  max-width: 820px;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.55;
  color: #ececec;
}

.hero-description,
.page-intro {
  max-width: 680px;
  line-height: 1.8;
  color: #b9b9b9;
}

.button-row,
.action-row,
.filters,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: transparent;
  color: var(--white);
  padding: 12px 18px;
  cursor: pointer;
}

.button:hover,
.filters a:hover {
  background: var(--white);
  color: var(--black);
}

.button.primary,
.filters a.active {
  border-color: var(--white);
  background: var(--white);
  color: var(--black);
}

.button.danger {
  border-color: rgba(255, 120, 120, 0.5);
  color: #ffb0b0;
}

.button.full {
  width: 100%;
}

.section-shell,
.page-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 92px 32px;
}

.page-shell {
  padding-top: 150px;
}

.narrow {
  width: min(100%, 920px);
}

.section-title-row,
.split-section,
.admin-topbar {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: start;
}

.section-title-row,
.admin-topbar {
  align-items: end;
  justify-content: space-between;
}

.section-title-row {
  grid-template-columns: 1fr auto;
  margin-bottom: 36px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  border: 1px solid var(--border);
  background: #050505;
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.55);
}

.project-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: transform 280ms ease, filter 280ms ease;
}

.project-card:hover img {
  transform: scale(1.04);
  filter: grayscale(0);
}

.badge {
  position: absolute;
  left: 16px;
  top: 16px;
  border: 1px solid var(--white);
  background: var(--black);
  padding: 7px 10px;
}

.project-card-body {
  padding: 22px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #9b9b9b;
}

.project-card h3 {
  margin-top: 18px;
}

.project-card p,
.info-grid p,
.info-box p,
.section-block p {
  color: #c6c6c6;
  line-height: 1.75;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag-list span {
  border: 1px solid var(--border);
  color: #d8d8d8;
  padding: 8px 10px;
  font-size: 13px;
}

.tag-list.compact span {
  font-size: 11px;
  padding: 6px 8px;
}

.two-cols,
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 38px;
}

.info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-grid > div,
.info-box,
.contact-box,
.admin-card {
  border: 1px solid var(--border);
  background: #050505;
  padding: 28px;
}

.contact-box h2 {
  max-width: 900px;
  margin-bottom: 32px;
}

.filters {
  margin: 34px 0 48px;
}

.filters a {
  border: 1px solid var(--border);
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.empty-state {
  border: 1px solid var(--border);
  padding: 24px;
  color: #c6c6c6;
}

.project-meta {
  align-self: start;
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.project-content {
  min-width: 0;
  margin-top: 56px;
}

.project-meta div {
  background: var(--black);
  padding: 22px;
}

.project-meta span {
  display: block;
  margin-top: 10px;
  color: #dadada;
  line-height: 1.55;
}

.info-grid > div,
.info-box {
  min-width: 0;
  overflow: hidden;
}

.info-grid h2,
.info-box h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.info-grid h2 {
  font-size: clamp(24px, 2.1vw, 38px);
  line-height: 1;
}

.info-box h2 {
  font-size: clamp(30px, 4.5vw, 68px);
}

.section-block {
  margin-top: 64px;
}

.section-block h2 {
  margin-bottom: 18px;
  font-size: clamp(26px, 3vw, 44px);
}

.text-section {
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  padding-left: 22px;
}

.image-frame,
.video-frame,
.carousel-stage,
.compare {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #050505;
}

.image-frame img,
.single-image {
  width: 100%;
  max-height: 780px;
  object-fit: cover;
}

figcaption,
.caption {
  margin: 0;
  padding: 14px;
  color: #9b9b9b;
  font-size: 14px;
}

.video-frame {
  aspect-ratio: 16 / 9;
}

.video-frame video,
.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--black);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.carousel-stage {
  position: relative;
  min-height: 320px;
  aspect-ratio: 16 / 10;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img,
.carousel-slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.carousel-slide video {
  background: #000;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

.carousel-controls button,
.dot {
  border: 1px solid var(--border);
  background: var(--black);
  color: var(--white);
  cursor: pointer;
}

.carousel-controls button {
  min-width: 44px;
  min-height: 44px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  margin: 0 4px;
}

.dot.active {
  background: var(--white);
}

/* Galerie projet : lignes justifiées, ratio source, max 3 médias par ligne */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 1.8vw, 22px);
  align-items: flex-start;
  margin-top: 28px;
}

.gallery-item {
  position: relative;
  flex: 0 0 320px;
  height: 300px;
  min-width: 150px;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: none;
  border-radius: 0;
  background: transparent;
}

.gallery-item img {
  cursor: zoom-in;
}

.gallery-item video {
  background: transparent;
}

.gallery-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.compare {
  position: relative;
  aspect-ratio: 16 / 9;
}

.compare img,
.compare-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-top {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
}

.compare input {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 22px;
  width: 90%;
  accent-color: var(--white);
}

.quote-block {
  border-block: 1px solid var(--border);
  padding: 42px 0;
}

.quote-block blockquote {
  margin: 0;
  max-width: 900px;
  font-size: clamp(26px, 4vw, 54px);
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.spec-grid div {
  background: var(--black);
  padding: 20px;
}

.spec-grid dt {
  color: #9b9b9b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.spec-grid dd {
  margin: 10px 0 0;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 48px 32px;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  color: #8f8f8f;
}

.site-footer strong {
  display: block;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.flash {
  position: fixed;
  z-index: 30;
  top: 96px;
  right: 24px;
  max-width: 420px;
  border: 1px solid var(--border);
  background: #050505;
  padding: 14px 18px;
}

.flash-success {
  border-color: rgba(180, 255, 180, 0.42);
}

.flash-error {
  border-color: rgba(255, 140, 140, 0.55);
}

.admin-shell {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 128px 32px 72px;
}

.admin-topbar {
  grid-template-columns: 1fr auto;
  border: 1px solid var(--border);
  background: #050505;
  padding: 28px;
  margin-bottom: 28px;
}

.admin-topbar h1 {
  font-size: clamp(34px, 5vw, 68px);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

.admin-card {
  margin-bottom: 22px;
}

.admin-card h2,
.admin-section h3 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.1;
}

.admin-card h2 {
  margin-bottom: 10px;
}

.admin-card.muted-card {
  background: #030303;
  border-color: rgba(255, 255, 255, 0.1);
}

.section-title-row.compact {
  margin-bottom: 18px;
}

.login-card {
  width: min(100%, 460px);
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.wide {
  grid-column: 1 / -1;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: #8f8f8f;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d0d0d0;
}

.check input {
  width: auto;
}

.upload-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.media-import {
  display: grid;
  gap: 10px;
  align-self: end;
}

.media-import-drop {
  display: grid;
  gap: 7px;
  min-height: 96px;
  align-content: center;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  background: #000;
  padding: 16px;
  cursor: pointer;
}

.media-import-drop:hover {
  border-color: var(--white);
  background: #080808;
}

.media-import-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.media-import-drop span {
  margin: 0;
  color: var(--white);
}

.media-import-drop small,
.media-import-status {
  color: #9b9b9b;
  font-size: 12px;
  line-height: 1.5;
}

.media-import-status {
  min-height: 18px;
  margin: 0;
}

.media-import-status[data-state="success"] {
  color: #baf7c4;
}

.media-import-status[data-state="error"] {
  color: #ffb0b0;
}

.media-import-preview {
  display: grid;
  gap: 8px;
}

.media-import-preview img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border: 1px solid var(--border);
  filter: grayscale(1);
}

.media-import-preview code {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid var(--border);
  padding: 10px;
  color: #d9d9d9;
  font-size: 12px;
}

.admin-project-list {
  display: grid;
  gap: 12px;
}

.admin-project-list article,
.admin-section {
  border: 1px solid var(--border);
  background: var(--black);
  padding: 18px;
}

.admin-project-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.admin-project-list p {
  color: #9b9b9b;
}

.section-admin-list {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.admin-section summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-section summary span:last-child {
  border: 1px solid var(--border);
  color: #d9d9d9;
  padding: 6px 9px;
  font-size: 11px;
}

.admin-textarea-block {
  display: block;
  margin-top: 18px;
}

code {
  color: var(--white);
}

@media (max-width: 980px) {
  .section-title-row,
  .split-section,
  .project-layout,
  .admin-topbar,
  .admin-grid,
  .form-grid,
  .admin-project-list article {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 680px) {
  .site-header {
    height: auto;
    min-height: 74px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px;
  }

  .brand-name {
    font-size: 20px;
  }

  .brand-link span {
    display: none;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .site-nav a {
    font-size: 10px;
  }

  .hero,
  .project-hero {
    padding: 148px 18px 48px;
  }

  .hero-video {
    display: none;
  }

  .hero-fallback {
    display: block;
  }

  .section-shell,
  .page-shell,
  .admin-shell {
    padding-inline: 18px;
  }

  .project-grid,
  .two-cols,
  .info-grid,
  .spec-grid,
  .upload-row {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    display: flex;
    gap: 16px;
  }

  .gallery-item,
  .gallery-item:nth-child(n) {
    width: 100%;
    height: auto !important;
    flex: 0 0 100% !important;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 0;
  }

  .gallery-item img,
  .gallery-item video {
    width: 100%;
    height: auto;
    object-fit: initial;
    border-radius: 0;
    background: transparent;
  }

  .site-footer {
    flex-direction: column;
    padding-inline: 18px;
  }

  .admin-card,
  .contact-box,
  .info-grid > div,
  .info-box {
    padding: 20px;
  }
}


/* Corrections galerie : bouton masqué, lightbox et zoom */
[hidden] {
  display: none !important;
}

.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
  overflow: hidden;
}

.image-lightbox.is-open {
  display: flex;
}

.image-lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.12s ease;
  user-select: none;
}

.image-lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.image-lightbox-tools {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 10001;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.image-lightbox-tools button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 16px;
  cursor: pointer;
}


/* Section PDF */
.pdf-block {
  width: 100%;
}

.pdf-block .section-heading {
  align-items: center;
  gap: 16px;
}

.pdf-card {
  width: 100%;
  margin-top: 24px;
  display: grid;
  justify-items: center;
}

.pdf-viewer {
  aspect-ratio: 210 / 297;
  background: #fff;
  overflow: hidden;
}

.pdf-viewer iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.pdf-viewer-preview {
  width: min(100%, 430px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
}

.pdf-actions {
  width: min(100%, 430px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.pdf-actions .button,
.pdf-actions .text-link {
  white-space: nowrap;
}

.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.86);
}

.pdf-modal[hidden] {
  display: none !important;
}

.pdf-modal-panel {
  width: min(100%, 920px);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.pdf-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(18, 18, 18, 0.94);
  backdrop-filter: blur(14px);
}

.pdf-modal-bar strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-viewer-large {
  width: min(100%, calc((100vh - 150px) * 210 / 297));
  max-width: 100%;
  max-height: calc(100vh - 150px);
  margin-inline: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

.pdf-modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .pdf-block .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .pdf-viewer-preview {
    width: min(100%, 340px);
    border-radius: 14px;
  }

  .pdf-actions {
    width: min(100%, 340px);
    flex-direction: column;
    align-items: stretch;
  }

  .pdf-actions .button,
  .pdf-actions .text-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .pdf-modal {
    padding: 12px;
  }

  .pdf-modal-panel {
    max-height: calc(100vh - 24px);
  }

  .pdf-modal-bar {
    border-radius: 14px;
  }

  .pdf-viewer-large {
    width: 100%;
    max-height: calc(100vh - 130px);
    border-radius: 14px;
  }
}

/* Section aperçu site web */
.website-block .section-heading {
  align-items: center;
  gap: 16px;
}

.website-preview {
  margin-top: 20px;
  height: var(--website-preview-height, 650px);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #050505;
}

.website-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (max-width: 720px) {
  .website-preview {
    height: min(var(--website-preview-height, 650px), 70vh);
  }
}

/* Admin : aperçu glisser-déposer des médias de galleryGrid */
.admin-media-order {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.admin-media-order-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 14px;
}

.admin-media-order-head small {
  color: var(--muted);
}

.admin-media-order-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.admin-media-order-item {
  cursor: grab;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
}

.admin-media-order-item.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.admin-media-order-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  background: #050505;
}

.admin-media-order-thumb img,
.admin-media-order-thumb video {
  width: 100%;
  height: auto;
  display: block;
}

.admin-media-order-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  font-size: 12px;
}

.admin-media-order-meta strong {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-size: 11px;
}

.admin-media-order-meta span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-media-order-empty {
  margin: 0;
  color: var(--muted);
}

/* Admin galleryGrid : aperçu ouvrable/fermable + actions d'ordre */
.admin-media-order-toggle {
  white-space: nowrap;
}

.admin-media-order-list[hidden] {
  display: none !important;
}

.admin-media-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.admin-media-order-actions button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.admin-media-order-actions button:hover {
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 700px) {
  .admin-media-order-head {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Logos projet : ajout ciblé, sans modifier la structure des sections */
.project-intro-side {
  min-width: 0;
  display: grid;
  gap: 24px;
}

.project-logo-panel {
  width: 100%;
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 42%, rgba(0, 0, 0, 0.14));
}

.project-logo-card {
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.project-logo-card img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: none;
}

.project-logo-count-1 .project-logo-card {
  min-height: 260px;
}

.project-logo-count-1 .project-logo-card img {
  max-height: 300px;
}

.project-logo-count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-logo-count-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-logo-count-3 .project-logo-card:first-child {
  grid-column: 1 / -1;
  min-height: 220px;
}

.project-logo-count-3 .project-logo-card:first-child img {
  max-height: 260px;
}

@media (max-width: 700px) {
  .project-logo-panel,
  .project-logo-count-2,
  .project-logo-count-3 {
    grid-template-columns: 1fr;
  }

  .project-logo-card,
  .project-logo-count-1 .project-logo-card,
  .project-logo-count-3 .project-logo-card:first-child {
    min-height: 150px;
  }

  .project-logo-card img,
  .project-logo-count-1 .project-logo-card img,
  .project-logo-count-3 .project-logo-card:first-child img {
    max-height: 190px;
  }
}


/* Section boutons / liens programmables */
.links-section .lead {
  max-width: 760px;
  margin-bottom: 18px;
}

.links-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.links-section-list .links-list {
  display: grid;
  gap: 10px;
  align-items: stretch;
}

.links-section-list .links-list a {
  width: fit-content;
}

.links-section-inline .links-list {
  gap: 8px 18px;
}

.links-section-inline .links-list .button,
.links-section-inline .links-list .link-pill,
.links-section-inline .links-list .text-link {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.link-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 700px) {
  .links-list {
    align-items: stretch;
  }

  .links-section-buttons .links-list .button,
  .links-section-buttons .links-list .link-pill {
    width: 100%;
  }
}


/* ======================================================
   Sections : image annotée + vidéo chapitrée
   ====================================================== */
.annotated-image-layout,
.chaptered-video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
}

.annotated-image-canvas {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.annotated-image-canvas img {
  display: block;
  width: 100%;
  height: auto;
}

.annotation-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.annotation-pin span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 700;
}

.annotation-pin.is-active,
.annotation-pin:hover {
  transform: translate(-50%, -50%) scale(1.08);
}

.annotation-panel-list {
  display: grid;
  gap: 12px;
}

.annotation-panel {
  display: none;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}

.annotation-panel.is-active {
  display: block;
}

.annotation-panel h3 {
  margin-top: 0;
}

.chaptered-video-frame {
  margin: 0;
}

.chapter-list {
  display: grid;
  gap: 10px;
}

.chapter-button {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  color: inherit;
  cursor: pointer;
}

.chapter-button span {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.68;
}

.chapter-button strong,
.chapter-button small {
  display: block;
}

.chapter-button small {
  margin-top: 4px;
  opacity: 0.72;
  line-height: 1.4;
}

.chapter-button.is-active,
.chapter-button:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.11);
}

@media (max-width: 860px) {
  .annotated-image-layout,
  .chaptered-video-layout {
    grid-template-columns: 1fr;
  }
}


/* ======================================================
   ADMIN PROJETS : recherche, filtres et affichage propre
   ====================================================== */
.admin-projects-panel {
  display: grid;
  gap: 18px;
}

.admin-projects-head {
  align-items: flex-start;
  margin-bottom: 0;
}

.admin-project-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-project-stats span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
  color: #a9a9a9;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-project-stats strong {
  color: var(--white);
  font-size: 22px;
  letter-spacing: 0;
}

.admin-project-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(190px, 0.8fr) minmax(150px, 0.6fr);
  gap: 12px;
  align-items: end;
}

.admin-project-toolbar label {
  margin: 0;
}

.admin-project-toolbar span,
.admin-project-search span {
  display: block;
  margin-bottom: 6px;
  color: #b7b7b7;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-project-toolbar input,
.admin-project-toolbar select {
  min-height: 46px;
}

.admin-project-result {
  margin: 0;
  color: #9b9b9b;
  font-size: 13px;
}

.admin-project-list-enhanced {
  display: grid;
  gap: 10px;
}

.admin-project-list-enhanced article {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.018));
}

.admin-project-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.admin-project-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-project-title-row h3 {
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
}

.admin-project-state {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  color: #bfbfbf;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-project-state.is-published {
  color: #c9ffd8;
  border-color: rgba(160, 255, 186, 0.28);
  background: rgba(90, 220, 126, 0.09);
}

.admin-project-state.is-draft {
  color: #ffe0b8;
  border-color: rgba(255, 208, 150, 0.28);
  background: rgba(255, 170, 85, 0.08);
}

.admin-project-state.is-featured {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.09);
}

.admin-project-meta,
.admin-project-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.admin-project-meta span {
  color: #9b9b9b;
  font-size: 13px;
}

.admin-project-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #555;
}

.admin-project-categories span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  color: #cfcfcf;
  font-size: 12px;
}

.admin-project-categories .is-main {
  color: var(--black);
  background: var(--white);
  border-color: var(--white);
}

.admin-project-actions {
  justify-content: flex-end;
  max-width: 620px;
}

.admin-project-actions .button {
  padding-inline: 13px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .admin-project-stats,
  .admin-project-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-project-search {
    grid-column: 1 / -1;
  }

  .admin-project-list-enhanced article {
    grid-template-columns: 1fr;
  }

  .admin-project-actions {
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 620px) {
  .admin-project-stats,
  .admin-project-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-project-list-enhanced article {
    padding: 14px;
  }
}

/* ======================================================
   Correctif affichage admin projets : textes lisibles
   ====================================================== */
.admin-projects-panel {
  overflow: hidden;
}

.admin-projects-head {
  gap: 18px;
}

.admin-project-stats {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-project-stats span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-project-toolbar {
  grid-template-columns: minmax(280px, 1.4fr) minmax(210px, 0.8fr) minmax(170px, 0.6fr);
  gap: 16px;
}

.admin-project-toolbar label,
.admin-project-search {
  min-width: 0;
}

.admin-project-toolbar input,
.admin-project-toolbar select {
  width: 100%;
  min-width: 0;
}

.admin-project-list-enhanced {
  gap: 14px;
}

.admin-project-list-enhanced article {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 22px;
  align-items: start;
  padding: 22px;
  overflow: hidden;
}

.admin-project-main,
.admin-project-title-row,
.admin-project-meta,
.admin-project-categories {
  min-width: 0;
}

.admin-project-title-row {
  row-gap: 10px;
}

.admin-project-title-row h3 {
  min-width: 0;
  max-width: 100%;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.admin-project-state,
.admin-project-categories span {
  flex: 0 0 auto;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.admin-project-meta {
  row-gap: 6px;
  line-height: 1.45;
}

.admin-project-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-project-categories {
  row-gap: 8px;
}

.admin-project-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 360px;
  justify-content: stretch;
}

.admin-project-actions form {
  margin: 0;
  min-width: 0;
}

.admin-project-actions .button {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .admin-project-list-enhanced article {
    grid-template-columns: 1fr;
  }

  .admin-project-actions {
    max-width: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .admin-project-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-project-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .admin-project-list-enhanced article {
    padding: 18px;
  }

  .admin-project-actions {
    grid-template-columns: 1fr;
  }
}

/* ======================================================
   YAN_MASTER_ASSETS_2026_05_24_01
   Fichier CSS maître: admin + projets + PDF + site web + galerie + contact
   ====================================================== */
:root {
  --yan-css-version: "YAN_MASTER_ASSETS_2026_05_24_02_GALLERY_RESTORE";
}


/* Espace entre Objectifs / Public / Résultat et Apprentissages */
.project-content .info-grid + .info-box {
  margin-top: clamp(28px, 4vw, 56px);
}


.contact-box {
  display: grid;
  gap: clamp(18px, 2.5vw, 30px);
}

.contact-box .eyebrow {
  margin-bottom: 0;
}

.contact-box h2 {
  margin: 0;
  line-height: 1.08;
}

.contact-box form {
  display: grid;
  gap: 22px;
  width: 100%;
  max-width: 760px;
}

.contact-box form > div {
  display: grid;
  gap: 9px;
}

.contact-box label {
  color: #dcdcdc;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-box input,
.contact-box textarea {
  width: 100%;
  min-height: 52px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
  font: inherit;
  outline: none;
}

.contact-box textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.6;
}

.contact-box input:focus,
.contact-box textarea:focus {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.contact-box .button[type="submit"] {
  justify-self: start;
  margin-top: 6px;
}

.contact-box > p:not(.eyebrow) {
  max-width: 720px;
  line-height: 1.7;
}

@media (max-width: 700px) {
  .contact-box form {
    gap: 18px;
  }

  .contact-box input,
  .contact-box textarea {
    min-height: 50px;
    padding: 14px;
  }

  .contact-box .button[type="submit"] {
    width: 100%;
    justify-content: center;
  }
}

/* ======================================================
   Liens uniques (suivi CV) — page admin
   ====================================================== */
.link-track-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.link-track-row input {
  width: 100%;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

.link-track-row .button {
  white-space: nowrap;
}
