/* ═══ DESIGN PAGE ═══ */

/* HERO */
.design-hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 8rem 2rem 4rem;
  position: relative; overflow: hidden;
  background-image: url('../assets/images/backgrounds/bg-05.jpg');
  background-size: cover; background-position: center; background-attachment: fixed;
}

.design-hero::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.35);
}

.design-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, #0a0f0a);
  z-index: 2;
}

.design-hero > * { position: relative; z-index: 1; }
.design-hero h1 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800; line-height: 1.2; margin: 1rem 0; color: var(--text); }
.design-hero p { color: var(--text-soft); font-size: 1.1rem; }

.scroll-hint { margin-top: 3rem; color: var(--text-soft); font-size: 0.85rem; }
.scroll-arrow { font-size: 1.5rem; margin-top: 0.5rem; animation: bounce 1.5s infinite; color: var(--green); }
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }

.active-link { color: var(--green) !important; }

/* ═══ PHASE 1 — TÉLÉPHONE ═══ */
.phone-scroll-section {
  background-image: url('../assets/images/backgrounds/bg-01.jpg');
  background-size: cover; background-position: center; background-attachment: fixed;
  position: relative;
}
.phone-scroll-section::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 160px; z-index: 3; pointer-events: none;
  background: linear-gradient(to bottom, #f0f4f8, transparent);
}
.phone-scroll-section::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 160px; z-index: 3; pointer-events: none;
  background: linear-gradient(to bottom, transparent, #f0f4f8);
}

.phone-scroll-track {
  height: 550vh;
  position: relative;
}

.phone-sticky-wrapper {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  gap: 5rem; overflow: hidden;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
}

/* Texte gauche */
.phone-left-text {
  width: 280px; position: relative; height: 160px;
}

.label-content {
  position: absolute; top: 0; left: 0;
  opacity: 0; transform: translateY(20px);
  transition: all 0.5s ease;
  pointer-events: none;
}

.label-content.active {
  opacity: 1; transform: translateY(0);
}

.label-num {
  font-size: 0.75rem; color: var(--green);
  letter-spacing: 2px; font-weight: 500;
  display: block; margin-bottom: 0.8rem;
}

.label-content h3 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.6rem; color: #fff; }
.label-content p { color: rgba(255,255,255,0.7); font-size: 0.95rem; line-height: 1.7; }

/* LE TÉLÉPHONE */
.phone-3d {
  perspective: 1200px;
  animation: phoneFloat 4s ease-in-out infinite;
}

@keyframes phoneFloat {
  0%,100% { transform: translateY(0) rotateY(-5deg); }
  50% { transform: translateY(-10px) rotateY(5deg); }
}

@keyframes phoneDone {
  0%   { transform: rotateY(0deg) scale(1); }
  30%  { transform: rotateY(180deg) scale(1.08); }
  60%  { transform: rotateY(340deg) scale(1.12); }
  80%  { transform: rotateY(355deg) scale(1.05); }
  100% { transform: rotateY(360deg) scale(1); }
}

.phone-3d.done {
  animation: phoneDone 1s cubic-bezier(0.34,1.56,0.64,1) forwards !important;
}

.phone-3d.done .phone-frame {
  border-color: var(--green);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 30px 80px rgba(0,0,0,0.8),
    0 0 60px rgba(0,230,118,0.5),
    0 0 120px rgba(0,230,118,0.2),
    inset 0 1px 0 rgba(255,255,255,0.08);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.phone-done-badge {
  position: absolute;
  top: -18px; left: 50%; transform: translateX(-50%);
  background: var(--green); color: #000;
  font-size: 0.75rem; font-weight: 700;
  padding: 0.3rem 1rem; border-radius: 100px;
  opacity: 0; transition: opacity 0.4s 0.8s;
  white-space: nowrap; letter-spacing: 0.5px;
}

.phone-3d.done .phone-done-badge { opacity: 1; }

.phone-frame {
  width: 240px; height: 490px;
  background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
  border-radius: 36px;
  border: 2px solid rgba(0,230,118,0.3);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 30px 80px rgba(0,0,0,0.8),
    0 0 40px rgba(0,230,118,0.1),
    inset 0 1px 0 rgba(255,255,255,0.08);
  position: relative;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 16px 10px 12px;
  transform-style: preserve-3d;
}

.phone-notch {
  width: 80px; height: 22px;
  background: #000;
  border-radius: 0 0 14px 14px;
  margin-bottom: 8px; flex-shrink: 0;
  position: relative;
}
.phone-notch::after {
  content: '';
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px;
  background: #1a1a1a; border-radius: 50%;
  border: 1px solid rgba(0,230,118,0.3);
}

.phone-screen {
  flex: 1; width: 100%;
  background: #000; border-radius: 20px;
  overflow: hidden; position: relative;
}

.phone-slides { width: 100%; height: 100%; position: relative; }

.phone-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.phone-slide.active { opacity: 1; }

.phone-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.phone-progress {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 10;
}

.phone-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: all 0.3s;
}
.phone-dot.active {
  background: var(--green);
  width: 14px; border-radius: 3px;
  box-shadow: 0 0 6px var(--green);
}

.phone-home-bar {
  width: 80px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px; margin-top: 10px; flex-shrink: 0;
}

/* Barre progress latérale */
.scroll-progress-bar {
  position: absolute; right: 10%;
  top: 20%; height: 60%;
  width: 2px; background: rgba(255,255,255,0.05);
  border-radius: 2px;
}

.scroll-progress-fill {
  width: 100%; height: 0%;
  background: linear-gradient(to bottom, var(--green), rgba(0,230,118,0.3));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--green);
  transition: height 0.1s linear;
}

/* ═══ PHASE 2 — GALERIE HORIZONTALE ═══ */
.gallery-section {
  padding: 6rem 0 4rem;
  background-image: url('../assets/images/backgrounds/bg-05.jpg');
  background-size: cover; background-position: center; background-attachment: fixed;
  position: relative; overflow: hidden;
}
.gallery-section::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0.5);
}
.gallery-section > * { position: relative; z-index: 1; }

.gallery-header {
  text-align: center; padding: 0 2rem; margin-bottom: 3rem;
}

.gallery-header h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; }
.gallery-header p { color: var(--gray); margin-top: 0.5rem; }

.gallery-scroll-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  padding: 1rem 4rem 2rem;
}

.gallery-scroll-wrapper::-webkit-scrollbar { display: none; }
.gallery-scroll-wrapper:active { cursor: grabbing; }

.gallery-track {
  display: flex; gap: 1.5rem;
  width: max-content;
}

.gallery-card {
  flex-shrink: 0;
  width: 220px; height: 320px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(0,230,118,0.15);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  background: var(--dark2);
  transform: rotate(var(--tilt, 0deg));
}

.gallery-card:nth-child(odd) { --tilt: -1deg; margin-top: 20px; }
.gallery-card:nth-child(even) { --tilt: 1deg; margin-top: 0; }

.gallery-card:hover {
  transform: rotate(0deg) scale(1.05) translateY(-8px);
  border-color: var(--green);
  box-shadow: 0 20px 50px rgba(0,230,118,0.2);
  z-index: 10;
}

.gallery-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover img { transform: scale(1.05); }

.gallery-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.3s;
  display: flex; align-items: flex-end; padding: 1.2rem;
}

.gallery-card:hover .gallery-card-overlay { opacity: 1; }

.gallery-card-overlay span {
  color: var(--white); font-size: 0.85rem; font-weight: 600;
  background: var(--green); color: #000;
  padding: 0.4rem 1rem; border-radius: 100px;
}

/* TABS */
.category-tabs {
  display: flex; gap: 0.8rem; justify-content: center;
  flex-wrap: wrap; padding: 0 2rem; margin-bottom: 2.5rem;
}

.cat-tab {
  background: var(--dark2);
  border: 1px solid var(--gray2);
  color: var(--gray);
  padding: 0.5rem 1.3rem; border-radius: 100px;
  cursor: pointer; font-size: 0.85rem;
  font-family: inherit; transition: all 0.2s;
}

.cat-tab:hover { border-color: var(--green); color: var(--white); }
.cat-tab.active { background: var(--green); color: #000; border-color: var(--green); font-weight: 600; }

.gallery-scroll-hint {
  text-align: center; color: var(--gray);
  font-size: 0.85rem; margin-top: 1.5rem;
  letter-spacing: 1px;
}

/* ═══ LIGHTBOX ═══ */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(16px);
  display: none; align-items: center; justify-content: center;
  padding: 2rem; gap: 2rem;
}
.lightbox.open { display: flex; }

.lightbox-img-wrap {
  flex: 0 0 auto;
  max-height: 85vh; max-width: 50vw;
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  animation: modalIn 0.35s cubic-bezier(0.34,1.2,0.64,1);
}
.lightbox-img-wrap img {
  width: 100%; height: 100%;
  max-height: 85vh; object-fit: contain;
  display: block;
}

.lightbox-panel {
  width: 320px; flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  padding: 2rem;
  animation: modalIn 0.4s cubic-bezier(0.34,1.2,0.64,1);
  display: flex; flex-direction: column; gap: 1.2rem;
}

.lightbox-panel h3 { font-size: 1.2rem; font-weight: 700; color: #fff; }
.lightbox-panel p { color: rgba(255,255,255,0.6); font-size: 0.9rem; line-height: 1.6; }

.order-form { display: flex; flex-direction: column; gap: 0.8rem; }

.order-form input,
.order-form textarea {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  color: #fff;
  font-family: inherit; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
  resize: none;
}
.order-form input::placeholder,
.order-form textarea::placeholder { color: rgba(255,255,255,0.4); }
.order-form input:focus,
.order-form textarea:focus { border-color: var(--green); }

.form-actions { display: flex; flex-direction: column; gap: 0.7rem; }

.btn-whatsapp {
  padding: 0.85rem; width: 100%;
  background: #25d366; color: #000;
  border-radius: 12px; text-decoration: none;
  font-weight: 700; font-size: 0.9rem;
  text-align: center; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,0.4); }
.form-actions .btn-primary {
  width: 100%; text-align: center; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.9rem; border-radius: 12px;
}

.lightbox-close {
  position: fixed; top: 1.5rem; right: 1.5rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff; width: 44px; height: 44px;
  border-radius: 50%; font-size: 1.1rem;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); transform: rotate(90deg); }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ═══ MODAL COMMANDE (gardé pour fallback) ═══ */
.order-modal { display: none; }

/* ── TABLETTE ── */
@media (max-width: 1024px) {
  .phone-sticky-wrapper { gap: 2rem; }
  .phone-left-text { width: 200px; }
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .design-hero { padding: 6rem 1.2rem 3rem; }
  .design-hero h1 { font-size: 1.8rem; }

  .phone-sticky-wrapper { flex-direction: column; gap: 1rem; padding: 1rem; }
  .phone-left-text { width: 100%; text-align: center; height: auto; }
  .label-content { position: relative; top: auto; left: auto; }
  .label-content h3 { font-size: 1.1rem; color: #fff; }
  .label-content p { font-size: 0.85rem; }
  .phone-3d { transform: scale(0.8); }
  .scroll-progress-bar { display: none; }

  .gallery-section { padding: 3rem 0 2rem; }
  .gallery-header { padding: 0 1.2rem; }
  .gallery-scroll-wrapper { padding: 0.8rem 1.2rem 1.5rem; }
  .gallery-card { width: 150px; height: 220px; border-radius: 20px; }
  .category-tabs { padding: 0 1rem; gap: 0.4rem; flex-wrap: wrap; }
  .cat-tab { padding: 0.35rem 0.7rem; font-size: 0.75rem; }
  .cat-tab svg { display: none; }

  .lightbox { flex-direction: column; padding: 1rem; overflow-y: auto; align-items: center; }
  .lightbox-img-wrap { max-width: 100%; max-height: 40vh; width: 100%; }
  .lightbox-panel { width: 100%; }
  .form-actions { flex-direction: column; }
  .lightbox-close { top: 0.8rem; right: 0.8rem; }
}
