/*
Theme Name: LOVEFLIX
Theme URI: https://loveflix.local
Author: Ton Nom
Description: Thème sur-mesure façon Netflix pour raconter l'histoire d'amour de Kevin et Camille.
Version: 5.0
*/

:root {
  --red: #E50914;
  --dark-bg: #141414;
  --card-bg: #181818;
  --gray: #aaaaaa;
  --light-gray: #e5e5e5;
  --white: #ffffff;
  --green: #46d369;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  user-select: none;
}

body {
  background-color: var(--dark-bg);
  color: var(--white);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Écrans / Vues */
.view {
  display: none;
  min-height: 100vh;
  width: 100%;
}
.view.active {
  display: block;
}

/* Page de Connexion */
.login-container {
  height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.85)), 
              url('https://images.unsplash.com/photo-1518199266791-5375a83190b7?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}
.login-header {
  width: 100%;
  max-width: 1000px;
}
.brand-logo {
  color: var(--red);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 2px;
}
.login-box {
  background: rgba(0, 0, 0, 0.75);
  padding: 60px 68px 40px;
  border-radius: 8px;
  width: 100%;
  max-width: 450px;
}
.login-box h2 {
  font-size: 2rem;
  margin-bottom: 28px;
}
.form-group {
  margin-bottom: 16px;
}
.form-control {
  width: 100%;
  padding: 16px;
  border-radius: 4px;
  border: none;
  background: #333;
  color: #fff;
  font-size: 1rem;
}
.btn-primary {
  width: 100%;
  padding: 16px;
  background-color: var(--red);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 24px;
}
.btn-primary:hover {
  background-color: #f40612;
}

/* Page de Sélection des Profils */
.profiles-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #141414;
  padding: 40px 20px;
  text-align: center;
}

.profiles-header h1 {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 10px;
}

.profiles-header p {
  color: #808080;
  font-size: 1.1rem;
  margin-bottom: 50px;
}

.profiles-gate {
  display: flex;
  gap: 35px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 50px;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  width: 200px;
}

/* Alignement strict des cartes de profil */
.profile-box {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centre verticalement le contenu */
  align-items: center;     /* Centre horizontalement le contenu */
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 15px;
}

.profile-card:hover .profile-box {
  transform: scale(1.05);
}

.box-camille {
  background: linear-gradient(135deg, #ff527b 0%, #e63956 100%);
  box-shadow: 0 10px 25px rgba(230, 57, 86, 0.3);
}

.box-kevin {
  background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
  box-shadow: 0 10px 25px rgba(0, 180, 219, 0.3);
}

.box-nous {
  background: linear-gradient(135deg, #e50914 0%, #b20710 100%);
  box-shadow: 0 10px 25px rgba(229, 9, 20, 0.3);
}

.profile-icon {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 15px;
}

.profile-avatar-img {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 0 -25px 0; /* Alignement propre au-dessus du badge */
  flex-shrink: 0;     /* Empêche l'image de se déformer */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.profile-badge {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap; /* Évite que le texte saute une ligne */
}

.profile-name {
  margin-top: 15px;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.profile-subtitle {
  color: #808080;
  font-size: 0.85rem;
  margin-top: 5px;
}

.btn-explore {
  border: 1px solid #444;
  background: rgba(255, 255, 255, 0.05);
  color: #cccccc;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.btn-explore:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: #888;
}

/* Navbar Principal */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
  z-index: 100;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}
.nav-item {
  color: var(--light-gray);
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
}
.nav-item.active, .nav-item:hover {
  color: #fff;
  font-weight: bold;
}
.profile-dropdown-container {
  position: relative;
}
.current-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 5px;
}
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: rgba(0,0,0,0.9);
  border: 1px solid #333;
  border-radius: 4px;
  width: 180px;
  flex-direction: column;
  padding: 10px 0;
}
.dropdown-menu.show {
  display: flex;
}
.dropdown-item {
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}
.dropdown-item:hover {
  background: #222;
}

/* Hero Section Banner */
.hero {
  position: relative;
  height: 70vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 0 40px 60px;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--dark-bg) 0%, transparent 60%),
              linear-gradient(90deg, rgba(20,20,20,0.8) 0%, transparent 50%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}
.hero-tag {
  color: var(--red);
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.hero-title {
  font-size: 3rem;
  margin: 10px 0;
  font-weight: 800;
}
.hero-desc {
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--light-gray);
  margin-bottom: 20px;
}

/* Rangées & Carrousels */
.content-section {
  padding: 20px 40px 40px;
}
.row-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* Style de carte identique au Screen */
.episode-card {
  background: #181818;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #282828;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
}
.episode-card:hover {
  transform: translateY(-4px);
  border-color: #444;
}
.episode-image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
}
.episode-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.episode-tag-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(229, 9, 20, 0.85);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.episode-details {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.episode-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.episode-highlight {
  color: var(--green);
  font-weight: 700;
}
.episode-match {
  color: #808080;
  font-size: 0.8rem;
}
.episode-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.episode-desc {
  font-size: 0.85rem;
  color: #aaa;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Modale de Détails */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal.show {
  display: flex;
}
.modal-content {
  background: var(--card-bg);
  width: 100%;
  max-width: 700px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-hero {
  height: 300px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
}
.modal-body {
  padding: 30px;
}
.modal-body h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}
.modal-body p {
  color: var(--light-gray);
  line-height: 1.6;
}