/* =============================================
   MynDev — Site Vitrine
   Charte graphique : CLAUDE.md
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;500;600;700;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --red:       #2563EB;
  --dark:      #18181B;
  --dark-deep: #09090B;
  --light:     #FAFAFA;
  --white:     #FFFFFF;
  --gray:      #64748B;
  --border:    #E4E4E7;
  --shadow:    0 4px 24px rgba(24,24,27,0.10);
  --radius:    12px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  /* Palette complète ui-ux-pro-max */
  --color-primary:    #18181B;
  --color-secondary:  #3F3F46;
  --color-accent:     #2563EB;
  --color-background: #FAFAFA;
  --color-foreground: #09090B;
  --color-muted:      #E8ECF0;
  --color-muted-fg:   #64748B;
  --color-card:       #FFFFFF;
  --color-border:     #E4E4E7;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Accessibilité — labels visibles uniquement aux lecteurs d'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--red);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* Focus visible sur tous les éléments interactifs */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.hero-title, .section-title, .project-name, .about-name, .stat-value {
  font-family: 'Archivo', sans-serif;
}

/* ── UTILITAIRES ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}
.section-title span { color: var(--red); }
.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray);
  margin-bottom: 48px;
  max-width: 600px;
}
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: #d42e4d; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(242,56,90,0.35); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--dark); }

/* ── HEADER ── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(30,34,53,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: var(--transition);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.header-logo-text {
  display: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}
.header-logo-text span { color: var(--red); }

.header-logo img {
  height: 38px;
  width: auto;
  display: block;
}
nav { display: flex; align-items: center; gap: 8px; }
nav a {
  color: rgba(255,255,255,0.80);
  text-decoration: none;
  font-size: 0.90rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: var(--transition);
}
nav a:hover, nav a.active { color: var(--white); background: rgba(242,56,90,0.18); }
.nav-cta {
  background: var(--red) !important;
  color: var(--white) !important;
  padding: 9px 20px !important;
}
.nav-cta:hover { background: #d42e4d !important; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #09090B 0%, #18181B 55%, #1e1e24 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.18) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse-glow 6s ease-in-out infinite alternate;
}
#hero::after {
  content: '';
  position: absolute;
  bottom: -10%; left: -5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
  pointer-events: none;
}
@keyframes pulse-glow {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.08); }
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding-top: 60px;
}
.hero-logo {
  display: block;
  height: 160px;
  width: auto;
  margin-bottom: 52px;
}
@media (max-width: 768px) {
  .hero-logo { height: 64px; margin-bottom: 24px; }
}

.hero-badge {
  display: block;
  width: fit-content;
  background: rgba(242,56,90,0.15);
  color: var(--red);
  border: 1px solid rgba(242,56,90,0.3);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-title span { color: var(--red); }
.hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(255,255,255,0.72);
  margin-bottom: 40px;
  max-width: 540px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── RÉALISATIONS ── */
#realisations { padding: 100px 0; background: var(--light); }
.project-block {
  margin-bottom: 80px;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.project-block:last-child { margin-bottom: 0; }

.project-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}
.project-info {
  padding: 48px 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.project-logo-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.project-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--white);
  flex-shrink: 0;
}
.project-icon.gestresid { background: #1a4a8a; }
.project-icon.proteines { background: #2a9d8f; }
.project-icon.geneamin  {
  background: url('../img/geneamin-icon.png') center/cover no-repeat;
  font-size: 0; /* masque le contenu textuel éventuel sans casser la balise */
}

.project-name {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--dark);
}
.project-client {
  font-size: 0.82rem;
  color: var(--gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.project-desc {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 24px;
  line-height: 1.7;
}
.project-features {
  list-style: none;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.project-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--dark);
}
.project-features li::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 7px;
}
.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tech-badge {
  background: var(--light);
  color: var(--dark);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Caroussel */
.project-carousel-wrap {
  background: #0f1322;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  padding-bottom: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track.grabbing { cursor: grabbing; }
.carousel-slide {
  flex: 0 0 calc(100% - 0px);
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1d2e;
}
.carousel-slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  transition: transform 0.3s ease;
}
.carousel-slide img:hover { transform: scale(1.02); }
.carousel-slide picture { display: block; width: 100%; }

/* GestResid : hauteur fixe pour contenir les portraits sans recadrage */
#carousel-gestresid .carousel-slide { background: var(--dark-deep); }
#carousel-gestresid .carousel-slide img { height: 340px; object-fit: contain; }

/* GeneaMin : hauteur fixe, fond clair (rappel identité beige/teal) */
#carousel-geneamin .carousel-slide { background: #f5efe1; }
#carousel-geneamin .carousel-slide img { height: 340px; object-fit: contain; }

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.carousel-dots {
  display: flex;
  gap: 8px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}
.dot.active { background: var(--red); width: 24px; border-radius: 4px; }
.carousel-btn {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}
.carousel-btn:hover { background: var(--red); border-color: var(--red); }
.carousel-arrows { display: flex; gap: 8px; }

/* Caption */
.slide-caption {
  text-align: center;
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
  margin-top: 8px;
  font-style: italic;
}

/* Projet "coming soon" */
.project-coming {
  opacity: 0.6;
  filter: grayscale(30%);
}
.coming-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1322;
  border-radius: var(--radius);
  min-height: 260px;
}
.coming-text {
  text-align: center;
  color: rgba(255,255,255,0.5);
}
.coming-text .soon { font-size: 3rem; margin-bottom: 12px; }
.coming-text p { font-size: 0.9rem; }

/* ── À PROPOS ── */
#apropos {
  padding: 100px 0;
  background: var(--dark);
  color: var(--white);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-text .section-title { color: var(--white); }
.about-text .section-subtitle { color: rgba(255,255,255,0.55); margin-bottom: 24px; }
.about-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.8;
  margin-bottom: 32px;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}
.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.about-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 360px;
  width: 100%;
}
.about-avatar {
  width: 90px; height: 90px;
  background: var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  margin: 0 auto 20px;
  letter-spacing: -1px;
}
.about-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.about-role {
  font-size: 0.88rem;
  color: var(--red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.about-tag {
  background: rgba(242,56,90,0.12);
  color: var(--red);
  border: 1px solid rgba(242,56,90,0.25);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── TECHNOLOGIES ── */
#technologies { padding: 100px 0; background: var(--light); }
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.tech-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
}
.tech-card:hover {
  border-color: var(--red);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(242,56,90,0.12);
}
.tech-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
}
.tech-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.tech-role {
  font-size: 0.75rem;
  color: var(--gray);
}

/* ── CONTACT ── */
#contact {
  padding: 100px 0;
  background: var(--dark);
  color: var(--white);
  text-align: center;
}
#contact .section-title { color: var(--white); }
#contact .section-subtitle { color: rgba(255,255,255,0.55); margin: 0 auto 40px; }
.contact-form {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(255,255,255,0.35); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--red); background: rgba(255,255,255,0.08); }
.contact-form textarea { resize: vertical; min-height: 130px; }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  /* Swipe horizontal géré en JS ; on ne laisse au navigateur que le pan vertical */
  touch-action: pan-y;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 94vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  user-select: none;
}
.lightbox-close {
  position: fixed;
  top: 20px; right: 24px;
  color: rgba(255,255,255,0.7);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s;
  z-index: 1001;
}
.lightbox-close:hover { color: var(--red); }
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  z-index: 1001;
  user-select: none;
}
.lightbox-nav:hover { background: var(--red); border-color: var(--red); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.carousel-slide img { cursor: zoom-in; }

/* ── FOOTER ── */
footer {
  background: #0f1322;
  padding: 28px 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer img { height: 28px; }
footer p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.40);
}
footer a { color: var(--red); text-decoration: none; }

/* Numéro de version — discret. Footer sur desktop, menu sur mobile. */
.app-version {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.28);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.footer-version { width: 100%; text-align: center; }
.nav-version { display: none; }

/* ── RESPONSIVE TABLET ── */
@media (max-width: 1024px) {
  .project-header { grid-template-columns: 1fr; }
  .project-carousel-wrap { padding: 24px; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-visual { order: -1; }
}

/* ── RESPONSIVE MOBILE ── */
@media (max-width: 768px) {
  nav { display: none; position: fixed; top: 68px; left: 0; right: 0; background: rgba(30,34,53,0.98); flex-direction: column; padding: 16px; gap: 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  nav.open { display: flex; }
  nav a { padding: 12px 16px; width: 100%; border-radius: 8px; }
  .burger { display: flex; }
  /* Version : masquée dans le footer, affichée dans le menu déroulant */
  .footer-version { display: none; }
  .nav-version { display: block; width: 100%; text-align: center; padding: 10px 16px 4px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,0.08); }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .project-info { padding: 28px 24px; }
  .project-carousel-wrap { padding: 16px; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { justify-content: center; text-align: center; }
  #realisations, #apropos, #technologies, #contact { padding: 64px 0; }
  .tech-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

  /* Header : remplacer le logo par du texte */
  .header-logo .header-logo-img { display: none !important; }
  .header-logo-text { display: block !important; }

  /* Hero : agrandir légèrement le logo */
  .hero-logo { height: 96px; }

}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-title { font-size: 2rem; }
  .about-stats { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .tech-card { padding: 16px 8px; }
  .tech-icon { font-size: 1.5rem; }
}

/* ── MOTION-DRIVEN : animations d'entrée ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  #hero::before { animation: none; }
  .btn-primary:hover, .tech-card:hover, .project-block:hover { transform: none; }
}

/* ── Amélioration cards projet ── */
.project-block {
  transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-block:hover {
  box-shadow: 0 20px 60px rgba(24,24,27,0.14);
  transform: translateY(-4px);
}

/* ── Hero badge amélioré ── */
.hero-badge {
  background: rgba(37,99,235,0.12);
  color: #60a5fa;
  border: 1px solid rgba(37,99,235,0.3);
}

/* ── Dot active bleu ── */
.dot.active { background: var(--color-accent); }

/* ── Stat value bleu ── */
.stat-value { color: var(--color-accent); }
