/* Galerie et navigation du catalogue Leo Design — mode clair uniquement */
:root {
  --catalog-bg: #172235;
  --catalog-surface: #23334a;
  --catalog-text: #f8fafc;
  --catalog-muted: #b3bece;
  --catalog-line: rgba(255, 255, 255, .13);
  --catalog-shadow: 0 14px 38px rgba(0, 0, 0, .28);
}

html {
  color-scheme: dark;
  scrollbar-color: var(--orange) var(--catalog-bg);
  scrollbar-width: thin;
}
html::-webkit-scrollbar,
.modal::-webkit-scrollbar { width: 11px; }
html::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track { background: var(--catalog-bg); }
html::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb { background: var(--orange); border: 3px solid var(--catalog-bg); border-radius: 999px; }
html.light-mode { scrollbar-color: var(--orange) #f7f8fa; }
html.light-mode::-webkit-scrollbar-track { background: #f7f8fa; }
html.light-mode::-webkit-scrollbar-thumb { border-color: #f7f8fa; }
body {
  --ink: var(--catalog-bg);
  --panel: var(--catalog-surface);
  --muted: var(--catalog-muted);
  --line: var(--catalog-line);
  background: var(--catalog-bg);
  color: var(--catalog-text);
  overflow-x: clip;
}
body.modal-open { overflow: hidden; }

/* Navigation */
.catalog-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 82px;
  padding: 0 clamp(22px, 5vw, 76px);
  background: rgba(23, 34, 53, .94);
  border-bottom: 1px solid var(--catalog-line);
  backdrop-filter: blur(18px);
}
.brand { color: var(--catalog-text); }
.catalog-nav-links { display: flex; align-items: center; gap: 28px; }
.catalog-nav-links a {
  position: relative;
  color: var(--catalog-muted);
  text-decoration: none;
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s ease;
}
.catalog-nav-links a:hover,
.catalog-nav-links a.active { color: var(--catalog-text); }
.catalog-nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.catalog-nav-links a:hover::after,
.catalog-nav-links a.active::after { transform: scaleX(1); }
.catalog-nav-tools { display: flex; align-items: center; }
.catalog-nav-tools { gap: 10px; }
.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--catalog-line);
  border-radius: 50%;
  background: var(--catalog-surface);
  color: var(--catalog-text);
}
.theme-toggle:hover { color: var(--orange); border-color: rgba(255,107,0,.5); }
.catalog-nav-cta {
  padding: 12px 24px;
  border-radius: 100px;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  white-space: nowrap;
}
#menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: 0;
  background: transparent;
}
#menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 3px;
  background: var(--catalog-text);
  transition: transform .3s ease, opacity .3s ease;
}
#menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menu-btn.open span:nth-child(2) { opacity: 0; }
#menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
#mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 109;
  background: rgba(23, 34, 53, .38);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
#mobile-overlay.open { opacity: 1; pointer-events: auto; }
#mobile-menu {
  position: fixed;
  z-index: 110;
  top: 0;
  right: 0;
  width: min(86vw, 360px);
  height: 100dvh;
  padding: 5rem 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  background: rgba(23, 34, 53, .98);
  border-left: 1px solid var(--catalog-line);
  box-shadow: -20px 0 50px rgba(23, 34, 53, .12);
  transform: translateX(100%);
  transition: transform .35s ease;
}
#mobile-menu.open { transform: none; }
#mobile-menu > a {
  width: 100%;
  padding: .52rem 0;
  color: var(--catalog-muted);
  text-decoration: none;
  font: 800 clamp(1.35rem, 5vw, 1.9rem) Montserrat, sans-serif;
}
#mobile-menu > a:hover,
#mobile-menu > a.active-mobile { color: var(--orange); }
.theme-toggle-mobile {
  margin-top: 18px;
  padding: 10px 16px;
  border: 1px solid rgba(255,107,0,.4);
  border-radius: 100px;
  background: rgba(255,107,0,.08);
  color: var(--orange);
  font-weight: 700;
}
.theme-toggle-mobile i { margin-right: 8px; }
#close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 42px;
  height: 42px;
  border: 1px solid var(--catalog-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--catalog-surface);
  color: var(--catalog-text);
}

/* Sections du catalogue */
.hero-copy,
.section-heading > p,
.eyebrow,
.hero-stats span { color: var(--catalog-muted); }
.hero-button { background: var(--catalog-text); color: #fff; }
.hero-stats { border-color: var(--catalog-line); }
.catalog-section { max-width: 1720px; padding: 140px clamp(12px, 3vw, 56px) 110px; }

/* Filtres tactiles */
.filters {
  position: sticky;
  top: 82px;
  z-index: 15;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 28px 0 24px;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(90deg, var(--catalog-bg) 88%, transparent);
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 17px;
  border: 1px solid var(--catalog-line);
  background: var(--catalog-surface);
  color: var(--catalog-muted);
  white-space: nowrap;
}
.filter.active,
.filter:hover { border-color: var(--orange); background: var(--orange); color: #fff; }

/* Masonry sans dépendance : proportions naturelles et ordre de lecture conservé par colonne. */
.works-grid {
  display: block;
  columns: 4;
  column-gap: 14px;
}
.work-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid var(--catalog-line);
  border-radius: 18px;
  background: var(--catalog-surface);
  box-shadow: 0 4px 18px rgba(23, 34, 53, .06);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  vertical-align: top;
  opacity: 1;
  transform: none;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.work-card.hidden { display: none; }
.work-card .visual {
  position: relative;
  height: auto;
  min-height: 0;
  display: block;
  overflow: hidden;
  background: #1c2a40;
  cursor: pointer;
}
.work-card .real-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform: none;
  transition: transform .3s ease;
}
.work-card .visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(23,34,53,.24), transparent 45%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.work-card .visual::before {
  content: "Voir";
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 7px 11px;
  border-radius: 100px;
  background: rgba(255,255,255,.92);
  color: var(--catalog-text);
  font-size: .68rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.work-card .work-info {
  display: block;
  padding: 11px 12px 12px;
}
.work-info > div:first-child { display: block; }
.work-type,
.work-info p,
.card-actions { display: none; }
.work-info h3 {
  margin: 0;
  padding-right: 32px;
  color: var(--catalog-text);
  font: 700 clamp(.74rem, 1vw, .9rem)/1.35 Montserrat, sans-serif;
  overflow-wrap: anywhere;
}
.card-more {
  position: absolute;
  right: 7px;
  bottom: 6px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--catalog-muted);
  font-size: 18px;
  line-height: 1;
}
.card-more:hover,
.card-more:focus-visible { background: rgba(255,255,255,.08); color: var(--catalog-text); }
.visual:focus-visible,
.card-more:focus-visible,
.filter:focus-visible,
.modal button:focus-visible,
.related-card:focus-visible {
  outline: 3px solid rgba(255,107,0,.55);
  outline-offset: 2px;
}
@media (hover: hover) {
  .work-card:hover { transform: translateY(-2px); border-color: rgba(255,107,0,.28); box-shadow: var(--catalog-shadow); }
  .work-card:hover .visual::after { opacity: 1; }
  .work-card:hover .visual::before { opacity: 1; transform: none; }
  .work-card:hover .real-visual img { transform: scale(1.015); }
}
.work-card:active { transform: scale(.99); }

/* Fiche détaillée */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: start center;
  padding: 24px;
  overflow-y: auto;
  scrollbar-color: var(--orange) var(--catalog-bg);
  scrollbar-width: thin;
  visibility: hidden;
  opacity: 0;
  transition: opacity .22s ease, visibility .22s ease;
}
.modal.open { visibility: visible; opacity: 1; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,18,30,.58); backdrop-filter: blur(7px); }
.modal-content {
  position: relative;
  z-index: 1;
  width: min(1220px, 96vw);
  display: block;
  margin: auto 0;
  overflow: visible;
  border: 1px solid var(--catalog-line);
  border-radius: 24px;
  background: var(--catalog-surface);
  color: var(--catalog-text);
  box-shadow: 0 30px 90px rgba(23,34,53,.25);
}
.modal-close {
  position: sticky;
  top: 14px;
  left: 14px;
  z-index: 5;
  width: 44px;
  height: 44px;
  margin: 14px 0 -58px 14px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  background: rgba(23,34,53,.76);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); }
.detail-visual { display: grid; place-items: center; min-width: 0; background: #1c2a40; }
.detail-visual .visual { width: 100%; height: 100%; display: grid; place-items: center; }
.detail-visual img { display: block; width: 100%; height: auto; max-height: min(680px, 76vh); object-fit: contain; }
.modal-caption { padding: clamp(30px, 4vw, 52px) clamp(26px, 3.5vw, 46px); display: flex; flex-direction: column; justify-content: center; }
.modal-caption > span { color: var(--orange); font-size: .69rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.modal-caption h2 { margin: 12px 0 14px; color: var(--catalog-text); font: 800 clamp(2rem, 3vw, 3.15rem)/1.08 Montserrat, sans-serif; }
.modal-caption p { margin: 0; color: var(--catalog-muted); font-size: .9rem; line-height: 1.75; }
.detail-primary-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
}
.modal-caption .detail-icon-action {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--catalog-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--catalog-surface);
  color: var(--catalog-text);
  font-size: .95rem;
}
.modal-caption .detail-icon-action i { margin: 0; line-height: 1; }
body:not(.light-mode) .modal-caption .detail-icon-action {
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.025);
}
body.light-mode .modal-caption .detail-icon-action {
  border-color: rgba(23,34,53,.16);
  background: #fff;
}
.modal-caption .detail-icon-action:hover { background: rgba(255,107,0,.1); }
#detail-more { padding: 0; font-size: 1.05rem; line-height: 1; }
.detail-more-control { position: relative; }
.detail-more-control[hidden],
.detail-more-menu[hidden] { display: none; }
.detail-more-menu {
  position: absolute;
  z-index: 8;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  min-width: 155px;
  padding: 6px;
  border: 1px solid rgba(23,34,53,.12);
  border-radius: 12px;
  background: var(--catalog-surface);
  box-shadow: 0 12px 30px rgba(23,34,53,.16);
}
.detail-more-menu a { padding: 9px 11px; border-radius: 8px; display: flex; align-items: center; gap: 8px; color: var(--catalog-text); text-decoration: none; font-size: .75rem; white-space: nowrap; }
.detail-more-menu a i { margin: 0; color: currentColor; }
.detail-more-menu a:hover { background: rgba(255,107,0,.1); color: var(--catalog-text); }
body:not(.light-mode) .detail-more-menu {
  border-color: rgba(255,255,255,.24);
  background: #101a2a;
  box-shadow: 0 16px 38px rgba(0,0,0,.42);
}
body:not(.light-mode) .detail-more-menu a { color: #f8fafc; }
body:not(.light-mode) .detail-more-menu a:hover { background: rgba(255,107,0,.14); color: #fff; }
body.light-mode .detail-more-menu {
  border-color: rgba(23,34,53,.14);
  background: #fff;
  box-shadow: 0 12px 30px rgba(23,34,53,.16);
}
body.light-mode .detail-more-menu a { color: #172235; }
.detail-primary-actions #modal-order {
  min-height: 44px;
  margin: 0 0 0 auto;
  padding: 11px 20px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: none;
}
.detail-actions { display: flex; align-items: center; gap: 9px; margin: 12px 0 0; }
.detail-actions:has(> .detail-action[hidden]:only-child) { display: none; }
.share-control { position: relative; }
.detail-action {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--catalog-line);
  border-radius: 100px;
  background: rgba(255,255,255,.06);
  color: var(--catalog-text);
  text-decoration: none;
}
#modal-share {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
  font-weight: 700;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
#modal-share i { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#modal-share:hover { border-color: rgba(255,107,0,.5); background: rgba(255,107,0,.1); transform: translateY(-1px); }
.detail-action[hidden] { display: none; }
.share-menu {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}
.share-menu[hidden] { display: none; }
.modal-caption .share-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(5,10,18,.68);
  backdrop-filter: blur(4px);
}
.share-dialog {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  overflow: hidden;
  border: 1px solid rgba(23,34,53,.12);
  border-radius: 22px;
  background: #fff;
  color: #172235;
  box-shadow: 0 24px 70px rgba(8,15,26,.24);
  animation: share-dialog-in .2s ease both;
}
@keyframes share-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.share-header {
  height: 62px;
  padding: 0 18px;
  border-bottom: 1px solid var(--catalog-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.share-header h3 { margin: 0; color: #172235; font: 800 1.05rem Montserrat, sans-serif; }
#share-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f0f2f5;
  color: #172235;
}
.share-preview { margin: 18px; display: flex; align-items: center; gap: 13px; }
.share-preview img { width: 62px; height: 62px; flex: 0 0 auto; border-radius: 12px; object-fit: cover; background: #1c2a40; }
.share-preview div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.share-preview strong { color: #172235; font: 700 .86rem/1.35 Montserrat, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-preview span { color: #64748b; font-size: .72rem; }
.share-heading { margin: 20px 18px 10px; color: #64748b; font-size: .72rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.share-options { margin: 0 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.modal-caption .share-option {
  min-width: 0;
  min-height: 82px;
  margin: 0;
  padding: 11px 5px 9px;
  border: 1px solid var(--catalog-line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: #172235;
  text-decoration: none;
  font-size: .67rem;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.share-option i { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1rem; }
.share-option.whatsapp i { background: #25d366; }
.share-option.facebook i { background: #1877f2; }
.share-option.x-twitter i { background: #0f1419; }
.share-option.native-share i { background: var(--orange); }
.share-option:hover { border-color: rgba(255,107,0,.45); background: rgba(255,107,0,.07); transform: translateY(-1px); }
.share-link-row {
  min-height: 50px;
  margin: 0 18px 20px;
  padding: 5px 5px 5px 13px;
  border: 1px solid var(--catalog-line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f5f6f8;
}
.share-link-row > span { min-width: 0; flex: 1; color: #64748b; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-copy {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
}
.share-copy.copied { background: #25a65a; color: #fff; }
.detail-action i { margin-right: 7px; }
#modal-order {
  min-height: 50px;
  margin: 26px 0 0;
  padding: 13px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
}
#modal-order i { margin-left: 7px; }
.related-section { padding: 30px clamp(16px, 4vw, 50px) 45px; border-top: 1px solid var(--catalog-line); background: var(--catalog-surface); color: var(--catalog-text); }
.related-section h3 { margin: 0 0 20px; font: 800 clamp(1.35rem, 2vw, 1.8rem) Montserrat, sans-serif; }
.related-grid { columns: 4; column-gap: 12px; }
.related-card {
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #1c2a40;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  vertical-align: top;
}
.related-card img { display: block; width: 100%; height: auto; }

/* Sections basses et footer clair */
.process { background: #1c2a40; color: var(--catalog-text); }
.steps { background: var(--catalog-line); }
.steps > div { background: #1c2a40; }
.final-cta { color: #fff; }
.catalog-footer {
  display: block;
  padding: 60px clamp(22px, 6vw, 85px) 28px;
  border-top: 1px solid var(--catalog-line);
  background: #131e30;
  color: var(--catalog-muted);
  font-size: 12px;
}
.footer-grid { max-width: 1200px; margin: auto; display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 60px; }
.footer-about p { max-width: 420px; line-height: 1.8; }
.catalog-footer h4 { margin: 0 0 18px; color: var(--catalog-text); font: 700 12px Montserrat; text-transform: uppercase; letter-spacing: .1em; }
.footer-grid > div:not(.footer-about) > a { display: block; margin: 10px 0; color: var(--catalog-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--orange); }
.footer-socials { display: flex; gap: 9px; margin-bottom: 18px; }
.footer-socials a { width: 38px; height: 38px; border: 1px solid var(--catalog-line); border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.04); color: var(--catalog-muted); text-decoration: none; }
.footer-bottom { max-width: 1200px; margin: 45px auto 0; padding-top: 24px; border-top: 1px solid var(--catalog-line); display: flex; justify-content: space-between; gap: 20px; }
.footer-bottom a { margin-left: 25px; color: var(--catalog-muted); text-decoration: none; }

@media (min-width: 1700px) {
  .works-grid { columns: 5; }
}
@media (min-width: 1024px) {
  .modal { padding: 42px 28px; }
  .modal-content { width: min(1240px, calc(100vw - 64px)); border-color: var(--catalog-line); background: var(--catalog-surface); color: var(--catalog-text); box-shadow: 0 24px 70px rgba(8,15,26,.22); }
  .modal-close { position: absolute; top: 16px; left: 16px; width: 38px; height: 38px; margin: 0; }
  .detail-layout { grid-template-columns: minmax(0, 58fr) minmax(330px, 42fr); padding: 16px; gap: 0; }
  .detail-visual { border-radius: 18px; background: #1c2a40; overflow: hidden; }
  .detail-visual .visual { height: auto; min-height: 0; }
  .modal-caption > span { letter-spacing: .08em; }
  .modal-caption h2 { color: var(--catalog-text); }
  .modal-caption p { color: var(--catalog-muted); }
  .detail-action { border-color: var(--catalog-line); background: var(--catalog-surface); color: var(--catalog-text); }
  #modal-share { background: #f1f3f5; }
  .related-section { color: var(--catalog-text); border-color: var(--catalog-line); background: var(--catalog-surface); }
  .native-share { display: none; }
}
@media (max-width: 1023px) {
  .catalog-nav { height: 70px; padding: 0 16px; }
  .catalog-nav-links,
  .catalog-nav-tools { display: none; }
  #menu-btn { display: flex; }
  .filters { top: 70px; }
  .works-grid { columns: 3; }
  .detail-layout { grid-template-columns: 1.15fr .85fr; }
  .footer-grid { grid-template-columns: 1.5fr 1fr; }
  .footer-grid > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .catalog-section { padding-top: 110px; padding-bottom: 76px; }
  .section-heading { margin-bottom: 18px; }
  .section-heading h2 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .filters { margin-inline: -12px; padding-inline: 12px; }
  .works-grid { columns: 2; column-gap: 10px; }
  .work-card { margin-bottom: 10px; border-radius: 13px; }
  .work-card .work-info { padding: 9px 9px 10px; }
  .work-info h3 { padding-right: 27px; font-size: .7rem; }
  .card-more { right: 3px; bottom: 3px; width: 31px; height: 31px; }
  .modal { padding: 0; place-items: stretch; }
  .modal-content { width: 100%; max-height: none; min-height: 100dvh; border: 0; border-radius: 0; background: var(--catalog-surface); }
  .detail-layout { display: block; min-height: 0; }
  .detail-visual { min-height: 0; margin: 8px 8px 0; border-radius: 24px; overflow: hidden; background: #1c2a40; }
  .detail-visual .visual { height: auto; }
  .detail-visual img { width: 100%; height: auto; max-height: none; object-fit: contain; }
  .modal-close { position: absolute; top: 20px; left: 20px; width: 42px; height: 42px; margin: 0; background: var(--catalog-surface); border-color: var(--catalog-line); color: var(--catalog-text); box-shadow: 0 5px 18px rgba(23,34,53,.14); }
  .modal-caption { padding: 12px 16px 28px; }
  .detail-primary-actions { margin: 0 0 20px; }
  .modal-caption .detail-icon-action { width: 44px; height: 44px; min-height: 44px; }
  .detail-primary-actions #modal-order { position: static; min-height: 44px; bottom: auto; padding: 11px 18px; font-size: .78rem; box-shadow: none; }
  .modal-caption > span { font-size: .62rem; letter-spacing: .08em; }
  .modal-caption h2 { margin: 8px 0 9px; font-size: 1.2rem; line-height: 1.25; }
  .modal-caption p { font-size: .78rem; line-height: 1.6; }
  .detail-actions { margin-top: 20px; }
  .share-menu { place-items: end center; padding: 10px; }
  .share-dialog { width: 100%; border-radius: 20px; animation-name: share-sheet-in; }
  @keyframes share-sheet-in { from { opacity: 0; transform: translateY(24px); } }
  #modal-order { position: static; }
  .related-section { padding: 28px 12px 40px; }
  .related-grid { columns: 2; column-gap: 10px; }
  .related-card { margin-bottom: 10px; border-radius: 12px; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 35px; }
  .footer-grid > div:last-child { grid-column: auto; }
  .footer-about .brand,
  .footer-socials { justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom a { margin: 0 8px; }
}
@media (max-width: 380px) {
  .catalog-section { padding-inline: 8px; }
  .filters { margin-inline: -8px; padding-inline: 8px; }
  .works-grid { column-gap: 8px; }
  .work-card { margin-bottom: 8px; }
  .work-info h3 { font-size: .66rem; }
}

/* Mode clair */
body.light-mode {
  --catalog-bg: #f7f8fa;
  --catalog-surface: #fff;
  --catalog-text: #172235;
  --catalog-muted: #64748b;
  --catalog-line: rgba(23,34,53,.12);
  --catalog-shadow: 0 12px 35px rgba(23,34,53,.09);
  --ink: var(--catalog-bg);
  --panel: var(--catalog-surface);
  --muted: var(--catalog-muted);
  --line: var(--catalog-line);
  background: var(--catalog-bg);
  color: var(--catalog-text);
}
body.light-mode .catalog-nav { background: rgba(255,255,255,.94); }
body.light-mode #mobile-menu { background: rgba(255,255,255,.98); }
body.light-mode #close-btn,
body.light-mode .work-card,
body.light-mode .modal-content { background: #fff; }
body.light-mode .work-card .visual,
body.light-mode .detail-visual,
body.light-mode .related-card { background: #eef1f5; }
body.light-mode .detail-action { background: #fff; }
body.light-mode #modal-share { background: #f0f2f5; }
body.light-mode .share-option { background: #f4f6f8; }
body.light-mode .share-dialog { box-shadow: 0 18px 55px rgba(23,34,53,.16); }
body.light-mode #share-close,
body.light-mode .share-link-row { background: #f4f6f8; }
body.light-mode .process,
body.light-mode .steps > div { background: #f0f2f5; }
body.light-mode .catalog-footer { background: #eef1f5; }
body.light-mode .footer-socials a { background: #fff; }
body.light-mode .card-more:hover,
body.light-mode .card-more:focus-visible { background: #f0f2f5; }

/* Partage desktop : popover compact attaché au bouton */
@media (min-width: 1024px) {
  .share-menu {
    position: absolute;
    inset: auto auto auto 0;
    top: calc(100% + 12px);
    z-index: 40;
    width: 460px;
    padding: 0;
    overflow: visible;
    display: block;
  }
  .share-menu.align-right { right: 0; left: auto; }
  .share-menu.open-up { top: auto; bottom: calc(100% + 12px); }
  .share-backdrop { display: none; }
  .share-dialog {
    width: 100%;
    border: 1px solid #e2e6ea;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15,23,42,.18);
    color: #172235;
    overflow: hidden;
  }
  .share-dialog::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 22px;
    width: 12px;
    height: 12px;
    border-top: 1px solid #e2e6ea;
    border-left: 1px solid #e2e6ea;
    background: #fff;
    transform: rotate(45deg);
  }
  .share-menu.align-right .share-dialog::before { right: 22px; left: auto; }
  .share-menu.open-up .share-dialog::before { top: auto; bottom: -6px; transform: rotate(225deg); }
  .share-header { height: 52px; padding: 0 16px 0 20px; }
  .share-header h3 { font-size: 1rem; }
  #share-close { width: 32px; height: 32px; }
  .share-options { margin: 0; padding: 16px 14px 18px; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 6px; }
  .modal-caption .share-option {
    min-height: 82px;
    margin: 0;
    padding: 8px 3px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #172235;
    font-size: .66rem;
    font-weight: 500;
  }
  .modal-caption .share-option:hover { background: #f5f6f8; transform: translateY(-1px); }
  .share-option i { width: 40px; height: 40px; font-size: 1rem; }
  .share-option.copy-link i { background: #edf0f3; color: #172235; }
  .share-option.email i { background: #64748b; color: #fff; }
  .modal-caption .share-option.copy-link.copied { background: #eef9f2; color: #168447; }
  .modal-caption .share-option.copy-link.copied i { background: #25a65a; color: #fff; }
}

/* Repli tactile uniquement si l'API native n'est pas disponible. */
@media (max-width: 1023px) {
  .share-menu { position: fixed; inset: 0; width: auto; padding: 12px; place-items: end center; }
  .share-dialog { width: min(500px, 100%); border-radius: 22px; }
  .share-options { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; padding: 14px 8px 18px; margin: 0; }
  .modal-caption .share-option { min-height: 80px; padding-inline: 2px; border: 0; font-size: .62rem; }
  .share-option.copy-link i { background: #edf0f3; color: #172235; }
  .share-option.email i { background: #64748b; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
