/* ========================================
   LEAWEBDESIGN — PORTFOLIO & TÉMOIGNAGES
   ======================================== */

/* ========================================
   PORTFOLIO
   ======================================== */
.portfolio {
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

.portfolio-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg) 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.5s var(--ease);
}

.portfolio-card:nth-child(even) {
  grid-template-columns: 1fr 1.3fr;
}
.portfolio-card:nth-child(even) .portfolio-info {
  order: -1;
}

.portfolio-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform 0.8s var(--ease);
}

.portfolio-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 60px rgba(212, 175, 122, 0.05);
}
.portfolio-card:hover::before { transform: scaleX(1); }

/* VISUAL — MOCKUP NAVIGATEUR */
.portfolio-visual {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.mockup-browser {
  width: 100%;
  height: 100%;
  background: #1c1c1c;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 122, 0.15);
  display: flex;
  flex-direction: column;
}

.mockup-bar {
  height: 22px;
  background: #252525;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  flex-shrink: 0;
}
.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}
.mockup-dot:nth-child(1) { background: rgba(255, 95, 86, 0.5); }
.mockup-dot:nth-child(2) { background: rgba(255, 189, 46, 0.5); }
.mockup-dot:nth-child(3) { background: rgba(39, 201, 63, 0.5); }

.mockup-content {
  flex: 1;
  padding: 1.2rem;
  background: #0e0e0e;
  position: relative;
  overflow: hidden;
}

/* PROJET 1 — VITRINE */
.portfolio-vitrine .mockup-content {
  background: linear-gradient(180deg, #0e0e0e 0%, #1a1a1a 100%);
}
.mockup-hero-line {
  height: 14px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-radius: 3px;
  margin: 0 auto 6px;
  opacity: 0.85;
}
.mockup-hero-line.line-1 { width: 60%; }
.mockup-hero-line.line-2 { width: 75%; opacity: 0.6; }
.mockup-hero-line.line-3 { width: 45%; opacity: 0.4; margin-bottom: 14px; }
.mockup-btn {
  width: 80px;
  height: 22px;
  background: var(--gold);
  border-radius: 999px;
  margin: 0 auto 16px;
  opacity: 0.9;
}
.mockup-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.mockup-card {
  height: 32px;
  background: rgba(212, 175, 122, 0.1);
  border: 1px solid rgba(212, 175, 122, 0.2);
  border-radius: 4px;
}

/* PROJET 2 — E-COMMERCE */
.portfolio-ecommerce .mockup-content {
  background: #fafafa;
  padding: 0.8rem;
}
.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #eee;
  margin-bottom: 10px;
}
.shop-logo {
  width: 32px;
  height: 8px;
  background: #000;
  border-radius: 2px;
}
.shop-nav { display: flex; gap: 6px; }
.shop-nav span {
  width: 18px;
  height: 5px;
  background: #ccc;
  border-radius: 2px;
}
.shop-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.shop-product {
  background: white;
  border-radius: 4px;
  padding: 4px;
}
.shop-img {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 100%);
  border-radius: 3px;
  margin-bottom: 4px;
}
.shop-line {
  height: 5px;
  width: 70%;
  background: #333;
  border-radius: 1px;
  margin-bottom: 2px;
}
.shop-price {
  height: 4px;
  width: 30%;
  background: #999;
  border-radius: 1px;
}

/* PROJET 3 — RESTAURANT */
.portfolio-resa .mockup-content {
  background: linear-gradient(135deg, #1a1410 0%, #0e0e0e 100%);
  padding: 1rem;
}
.resto-hero { margin-bottom: 14px; }
.resto-title-line {
  height: 10px;
  width: 80%;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 4px;
  opacity: 0.85;
}
.resto-title-line.short {
  width: 50%;
  opacity: 0.5;
}
.resto-booking {
  background: rgba(212, 175, 122, 0.05);
  border: 1px solid rgba(212, 175, 122, 0.2);
  border-radius: 6px;
  padding: 8px;
}
.booking-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}
.booking-field {
  height: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 122, 0.15);
  border-radius: 3px;
}
.booking-btn {
  height: 18px;
  background: var(--gold);
  border-radius: 999px;
  margin-top: 4px;
}

/* INFO BLOC */
.portfolio-info {
  padding: 0.5rem 0;
}
.portfolio-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  background: rgba(212, 175, 122, 0.08);
  border: 1px solid rgba(212, 175, 122, 0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.portfolio-info h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--ink);
}
.portfolio-info p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.portfolio-features {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.portfolio-features li {
  font-size: 0.92rem;
  color: var(--ink);
  padding-left: 1.4rem;
  position: relative;
}
.portfolio-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 12px;
  height: 1px;
  background: var(--gold);
}

/* BOUTON VOIR LA DÉMO */
.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding: 0.85rem 1.5rem;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all 0.3s var(--ease);
  align-self: flex-start;
  width: fit-content;
}
.portfolio-link:hover {
  background: var(--gold);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 122, 0.3);
}
.portfolio-link svg {
  transition: transform 0.3s var(--ease);
}
.portfolio-link:hover svg {
  transform: translate(2px, -2px);
}

/* CTA PORTFOLIO */
.portfolio-cta {
  text-align: center;
  padding: 3rem 0 0;
  border-top: 1px solid var(--line);
}
.portfolio-cta p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

/* RESPONSIVE PORTFOLIO */
@media (max-width: 900px) {
  .portfolio-card,
  .portfolio-card:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.75rem;
  }
  .portfolio-card:nth-child(even) .portfolio-info {
    order: 0;
  }
}

@media (max-width: 500px) {
  .portfolio-card { padding: 1.5rem; border-radius: 20px; }
  .portfolio-visual { padding: 1rem; }
}

/* ========================================
   TÉMOIGNAGES
   ======================================== */
.testimonials {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.testimonial-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.testimonial-card.empty {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(212, 175, 122, 0.02) 100%);
  border-style: dashed;
  border-color: rgba(212, 175, 122, 0.2);
}

.testimonial-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.testimonial-quote {
  width: 36px;
  height: 36px;
  color: var(--gold);
}
.testimonial-quote svg {
  width: 100%;
  height: 100%;
}

.testimonial-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 300;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 175, 122, 0.2) 0%, rgba(168, 133, 90, 0.1) 100%);
  border: 1px solid rgba(212, 175, 122, 0.25);
  flex-shrink: 0;
  position: relative;
}
.testimonial-avatar::after {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: rgba(212, 175, 122, 0.3);
}

.testimonial-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.15rem;
}
.testimonial-role {
  font-size: 0.78rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.testimonials-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(212, 175, 122, 0.04);
  border: 1px solid rgba(212, 175, 122, 0.15);
  border-radius: 16px;
  text-align: center;
  flex-wrap: wrap;
}
.testimonials-note svg {
  color: var(--gold);
  flex-shrink: 0;
}
.testimonials-note p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 0;
}
.testimonials-note a {
  color: var(--gold);
  border-bottom: 1px solid var(--line-strong);
  font-weight: 500;
  transition: all 0.3s var(--ease);
}
.testimonials-note a:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
}

@media (max-width: 600px) {
  .testimonial-card { padding: 1.75rem 1.5rem; }
  .testimonials-note { padding: 1.25rem; flex-direction: column; gap: 0.5rem; }
}

/* ====================================================
   APERÇU LIVE DES SITES (IMAGES ANIMÉES)
   ==================================================== */
.portfolio-preview {
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.portfolio-preview:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 175, 122, 0.3);
}

.preview-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.preview-dot:nth-child(1) { background: #ff5f57; }
.preview-dot:nth-child(2) { background: #ffbd2e; }
.preview-dot:nth-child(3) { background: #28c840; }
.preview-url {
  margin-left: 1rem;
  font-size: 0.78rem;
  color: var(--ink-mute);
  font-family: 'SF Mono', Monaco, monospace;
  letter-spacing: 0.02em;
  flex: 1;
  text-align: center;
  padding-right: 3rem;
}

.preview-frame-wrap {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  background: var(--bg);
}
.preview-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

/* Animations de défilement vertical (image scrollée vers le haut)
   Les hauteurs réelles des images sont :
   - atelier-solenne (data-preview=1): 800x3727 → ratio = 3727/800 = 4.66
   - vault77 (data-preview=2): 800x2022 → ratio = 2.53
   - maison-ardent (data-preview=3): 800x3779 → ratio = 4.72
   Quand l'image fait 100% de largeur du conteneur (ex 380px), sa hauteur sera ~1770/960/1795px
   Et le conteneur fait 420px, donc on doit translater jusqu'à -(hauteur_image - 420).
   Pour rester souple, on utilise des pourcentages.
*/
@keyframes scrollPreview {
  0%, 8% { transform: translateY(0); }
  48%, 58% { transform: translateY(-50%); }
  90%, 100% { transform: translateY(calc(-100% + 420px)); }
}

.preview-frame[data-preview] {
  animation: scrollPreview 18s ease-in-out infinite;
}
.preview-frame[data-preview="1"] { animation-delay: 0s; }
.preview-frame[data-preview="2"] { animation-delay: -6s; }
.preview-frame[data-preview="3"] { animation-delay: -12s; }

/* Pause au survol */
.portfolio-preview:hover .preview-frame {
  animation-play-state: paused;
}

/* Overlay au hover */
.preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,14,14,0.05) 0%, rgba(14,14,14,0.85) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2rem;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: 2;
}
.portfolio-preview:hover .preview-overlay {
  opacity: 1;
}
.preview-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  background: var(--gold);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 32px rgba(212, 175, 122, 0.4);
  transform: translateY(20px);
  transition: transform 0.4s var(--ease);
}
.portfolio-preview:hover .preview-cta {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .preview-frame-wrap { height: 360px; }
}
@media (max-width: 480px) {
  .preview-frame-wrap { height: 300px; }
}

/* Stop animation si l'utilisateur préfère réduire */
@media (prefers-reduced-motion: reduce) {
  .preview-frame[data-preview] { animation: none; }
}
