/* === Reset & base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg: #f5f5f4;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #c0392b;
  --line: rgba(0,0,0,.08);
  --shadow: 0 8px 28px rgba(0,0,0,.06);
  --radius: 14px;
  --max-w: 960px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* === Header === */
.header {
  padding: 48px 0 36px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #2c2c2c 0%, #5a2a2a 45%, #d4635a 100%);
}
.header h1 {
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 700;
  letter-spacing: -.3px;
  margin-bottom: 6px;
}
.header .tagline {
  font-size: 16px;
  opacity: .8;
  font-weight: 500;
  margin-bottom: 14px;
}
.header .contact {
  font-size: 13px;
  opacity: .65;
}
.header .contact a {
  color: #f5b7b1;
}

/* === Fixed nav === */
.fixed-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 10px 16px;
  background: rgba(245,246,248,.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-link {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s, background .2s;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(10,20,30,.06);
  text-decoration: none;
}
.nav-link.active {
  color: #fff;
  background: var(--accent);
}

@media (max-width: 640px) {
  .fixed-nav { gap: 2px; padding: 8px 10px; }
  .nav-link { padding: 6px 12px; font-size: 12px; }
}

/* === Sections === */
main { padding-bottom: 40px; }

.section {
  margin: 40px 0;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.section h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .1px;
}
.muted { color: var(--muted); }
.tiny  { font-size: 13px; }

/* === Carousel === */
.carousel { position: relative; }

.track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(500px, 85vw);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 16px;
  scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.slide { scroll-snap-align: start; }

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  box-shadow: 0 6px 18px rgba(10,20,30,.10);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
  backdrop-filter: blur(6px);
  z-index: 2;
  transition: background .15s, transform .15s;
}
.nav:hover { background: #fff; box-shadow: 0 8px 22px rgba(10,20,30,.14); }
.nav:active { transform: translateY(-50%) scale(.95); }
.prev { left: -6px; }
.next { right: -6px; }

.dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-top: 10px;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: rgba(10,20,30,.15);
  border: 0;
  cursor: pointer;
  transition: width .2s, background .2s;
}
.dot[aria-current="true"] {
  background: var(--accent);
  width: 20px;
}

/* === Work cards (créations) === */
.work-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.work-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform .5s ease;
}
.work-card:hover img { transform: scale(1.08); }

.work-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(
    to top,
    rgba(10,12,16,.82) 0%,
    rgba(10,12,16,.40) 50%,
    rgba(10,12,16,.05) 100%
  );
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.work-card:hover .work-overlay {
  opacity: 1;
  transform: translateY(0);
}
.work-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.work-overlay h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.pill {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.20);
  backdrop-filter: blur(6px);
  white-space: nowrap;
  font-weight: 500;
}
.work-overlay p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: .92;
}
.work-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  opacity: .8;
}

/* === Embed cards (Facebook) === */
.embed-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.embed-card iframe {
  width: 100%;
  max-width: 100%;
  display: block;
  border: none;
}
.embed-caption {
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.embed-caption strong { font-size: 14px; }

/* === Facebook link cards === */
.fb-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 100%;
  min-height: 300px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.fb-link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(24,119,242,.3);
  text-decoration: none;
}
.fb-link-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  font-family: Georgia, serif;
}
.fb-link-label {
  font-size: 15px;
  font-weight: 600;
}
.fb-link-arrow {
  font-size: 20px;
  opacity: .7;
  transition: transform .2s;
}
.fb-link-card:hover .fb-link-arrow {
  transform: translateX(4px);
  opacity: 1;
}

/* === Sites web === */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.site-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform .2s, box-shadow .2s;
}
.site-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(10,20,30,.12);
  text-decoration: none;
}
.site-preview {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #f0f1f3;
}
.site-preview iframe {
  width: 200%;
  height: 200%;
  transform: scale(.5);
  transform-origin: top left;
  border: none;
  pointer-events: none;
}
.site-browser-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background: rgba(245,246,248,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(10,20,30,.12);
}
.site-dot:first-child { background: #ff5f57; }
.site-dot:nth-child(2) { background: #ffbd2e; }
.site-dot:nth-child(3) { background: #28c940; }
.site-url {
  margin-left: 8px;
  font-size: 11px;
  color: var(--muted);
  font-family: 'Inter', monospace;
}
.site-info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.site-info strong {
  font-size: 15px;
}
.site-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.site-pill {
  background: rgba(192,57,43,.08);
  border: 1px solid rgba(192,57,43,.18);
  color: var(--accent);
}

@media (max-width: 640px) {
  .sites-grid { grid-template-columns: 1fr; }
  .site-preview { height: 150px; }
}

/* === Video showcase === */
.video-showcase {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.video-player {
  position: relative;
  background: #000;
}
.video-player video {
  width: 100%;
  display: block;
}
.video-info {
  padding: 24px 24px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.video-info h3 {
  font-size: 18px;
  font-weight: 700;
}
.video-info p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.video-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.video-pill {
  background: rgba(192,57,43,.08);
  border: 1px solid rgba(192,57,43,.18);
  color: var(--accent);
}
.video-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: gap .2s;
}
.video-link:hover {
  gap: 8px;
  text-decoration: none;
}

@media (max-width: 640px) {
  .video-showcase {
    grid-template-columns: 1fr;
  }
  .video-info {
    padding: 16px;
  }
}

/* === Footer === */
.footer {
  padding: 28px 0 16px;
  text-align: center;
  border-top: 1px solid var(--line);
}

/* === Communication terrain === */
.terrain-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.terrain-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.terrain-info {
  padding: 24px 24px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.terrain-info h3 {
  font-size: 18px;
  font-weight: 700;
}
.terrain-info p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}
.terrain-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.terrain-pill {
  background: rgba(192,57,43,.08);
  border: 1px solid rgba(192,57,43,.18);
  color: var(--accent);
}

@media (max-width: 640px) {
  .terrain-showcase { grid-template-columns: 1fr; }
  .terrain-info { padding: 16px; }
}

/* === See All card === */
.see-all-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 280px;
  gap: 10px;
  background: linear-gradient(135deg, #1a1a1a 0%, #c0392b 100%);
  color: #fff;
  transition: transform .2s, box-shadow .2s;
}
.see-all-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(192,57,43,.25);
}
.see-all-label {
  font-size: 17px;
  font-weight: 600;
}
.see-all-count {
  font-size: 13px;
  opacity: .7;
}

/* === Gallery popup === */
.gallery-popup {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--bg);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.gallery-popup.active {
  opacity: 1;
  visibility: visible;
}
.gallery-popup-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(245,246,248,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.gallery-popup-header h2 {
  font-size: 20px;
  font-weight: 700;
}
.gallery-popup .gallery-popup-close {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  height: auto;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(10,20,30,.06);
  transition: background .2s, box-shadow .2s, transform .15s;
}
.gallery-popup .gallery-popup-close:hover {
  background: #c0392b;
  color: #fff;
  box-shadow: 0 4px 14px rgba(10,20,30,.15);
  transform: translateY(-1px);
}
.gallery-popup .gallery-popup-close:active {
  transform: scale(.96);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(10,20,30,.12);
}
.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  transform: scale(.92);
  transition: transform .25s ease;
}
.lightbox.active .lightbox-img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s;
}
.lightbox-close:hover {
  background: rgba(255,255,255,.3);
}

/* === Responsive === */
@media (max-width: 640px) {
  .header { padding: 36px 0 28px; }
  .section-head { flex-direction: column; gap: 4px; }
  .track { grid-auto-columns: 90vw; }
  .nav { display: none; }
  .work-card img { height: 220px; }
  .see-all-card { height: 220px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
