/* ============================================================
   PAGE ENTREPRISES · Styles complets
   ============================================================ */

/* Banniere */
.entreprises-banner {
  position: relative;
  height: 40vh;
  min-height: 300px;
  background-size: cover;
  background-position: center 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 80px;
}



.banner-content {
  position: relative;
  z-index: 2;
}

.banner-title {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(42px, 8vw, 96px);
  letter-spacing: -0.03em;
  color: white;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.banner-title em {
  font-style: italic;
  color: var(--pink);
  font-weight: 300;
}

/* Main */
.entreprises-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

/* Boutons de sélection */
.company-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.company-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  padding: 12px 32px;
  border-radius: 99px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.3s ease;
}

.company-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.company-btn.active {
  background: var(--pink);
  color: white;
  border-color: var(--pink);
  box-shadow: 0 4px 20px var(--pink-glow);
}

/* Contenu de l'entreprise sélectionnée */
.company-content {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 40px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* En-tête entreprise */
.company-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.company-name {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--ink);
}

.company-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink-dim);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.company-period {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-dim);
}

.company-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin-bottom: 32px;
}

/* Sections titles */
.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--pink);
  margin-bottom: 20px;
  text-transform: uppercase;
}

/* Missions list */
.missions-list {
  list-style: none;
  padding: 0;
  margin-bottom: 32px;
}

.missions-list li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin-bottom: 12px;
  padding-left: 24px;
  position: relative;
}

.missions-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--pink);
}

/* Skills tags */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.skill-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  border: 1px solid var(--line);
  padding: 6px 16px;
  border-radius: 99px;
}

/* ============================================================
   GALERIE · Même système visuel que les cartes Projets
   ============================================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 20px 0 32px 0;
}

.gallery-item {
  aspect-ratio: 1 / 1;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  animation: fadeInUp 0.5s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.05s);
  opacity: 0;
}

/* Calque sombre permanent */
.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
  pointer-events: none;
  transition: background 0.3s;
}

/* Carte encore plus sombre au survol */
.gallery-item:hover::before {
  background: rgba(0, 0, 0, 0.55);
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--pink);
}

.gallery-card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 0.4s;
}

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

/* Overlay central comme sur Projets */
.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}

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

.gallery-card-overlay span {
  color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
}

/* Infos en bas comme les cartes Projets */
.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
  z-index: 3;
}

.gallery-overlay small {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.68);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  transition: color 0.3s;
}

.gallery-item:hover .gallery-overlay small {
  color: rgba(255, 255, 255, 0.9);
}

.gallery-overlay span {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: white;
  margin-bottom: 4px;
}

/* Icône de type média */
.media-type-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: white;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 6px 10px;
  border-radius: 999px;
}

/* Animation fade pour les cartes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   LIGHTBOX MULTIMEDIA
   ============================================================ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  width: min(1100px, 92vw);
  max-height: 90vh;
  position: relative;
}

#lightbox-media {
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-frame {
  width: 100%;
  height: 75vh;
  border: none;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.lightbox-video {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: black;
}

.lightbox-image {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 16px;
  border: 1px solid var(--line);
  object-fit: contain;
}

.lightbox-title {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--ink);
  margin-top: 16px;
}

.lightbox-title small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
}

.lightbox-close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.lightbox-close:hover {
  background: var(--pink);
  color: white;
  transform: rotate(90deg);
}



/* ============================================================
   MODE CLAIR · Corrections de lisibilité
   ============================================================ */

html[data-theme="light"] .company-role,
html[data-theme="light"] .company-period,
html[data-theme="light"] .company-desc,
html[data-theme="light"] .missions-list li,
html[data-theme="light"] .lightbox-title small {
  color: var(--ink-dim);
}

html[data-theme="light"] .skill-tag {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--line);
}

html[data-theme="light"] .company-btn.active,
html[data-theme="light"] .lightbox-close:hover {
  color: white;
}

html[data-theme="light"] .gallery-card-overlay span,
html[data-theme="light"] .gallery-overlay span,
html[data-theme="light"] .media-type-badge {
  color: white;
}

html[data-theme="light"] .gallery-overlay small {
  color: rgba(255, 255, 255, 0.78);
}

/* Responsive */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .company-content {
    padding: 24px;
  }

  .company-name {
    font-size: 24px;
  }

  .company-btn {
    font-size: 16px;
    padding: 8px 24px;
  }

  .lightbox {
    padding: 20px;
  }

  .lightbox-frame {
    height: 68vh;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}