:root {
  --primary-color: #f5f6fa;
  --accent-color: #3498db;
  --background-color: #1a1a2e;
  --card-color: #232342;
  --text-color: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
  --primary-color: #2d3436;
  --accent-color: #3498db;
  --background-color: #ffffff;
  --card-color: #f5f6fa;
  --text-color: #2d3436;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
  background-color: var(--background-color);
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

body.modal-open {
    overflow: hidden;
    padding-right: 15px;
}

.header {
  background: linear-gradient(135deg, var(--accent-color), #3498db);
  padding: 2rem;
  text-align: center;
  color: white;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.header h1 {
  margin: 0;
  font-size: 3rem;
  letter-spacing: 2px;
}

.header-logo {
    height: 100px;
    width: auto;
    margin: 0 auto;
    display: block;
}

.section-title {
  font-size: 2rem;
  color: var(--primary-color);
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.project-card {
  background: var(--card-color);
  border-radius: 15px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.project-type {
  background: var(--accent-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.project-type.series {
    background: linear-gradient(45deg, #00356B, #0066cc);
    color: white;
    box-shadow: 0 0 15px rgba(0, 102, 204, 0.5);
}

.project-type.film {
    background: linear-gradient(45deg, #6B0022, #cc0044);
    color: white;
    box-shadow: 0 0 15px rgba(204, 0, 68, 0.5);
}

.project-badge {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  display: inline-block;
  margin-top: 1rem;
}

.badge-development {
    background: linear-gradient(45deg, #ff6b00, #ff9500);
    color: white;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.badge-production {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
}

.badge-correction {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.3);
}

.badge-termine {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.badge-planning {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

.section-divider {
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent-color), transparent);
  margin: 4rem 0;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.modal-content {
  background: linear-gradient(145deg, var(--background-color), var(--card-color));
  margin: 5% auto;
  padding: 2rem;
  width: 80%;
  max-width: 900px;
  border-radius: 20px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: modalIn 0.3s ease-out;
  max-height: none;
  overflow-y: visible;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-content::-webkit-scrollbar {
  display: none;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  width: 40px;
  height: 40px;
  background: var(--card-color);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  font-size: 22px;
  line-height: 0;
  margin-top: -1px;
  padding: 0;
  font-family: Arial, sans-serif;
}

.close span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  transform: translate(0.5px, 0.5px);
  position: relative;
  top: 1px;
  line-height: 0;
}

.close:hover {
  background: #e74c3c;
  color: white;
  transform: rotate(90deg);
}


.modal h2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 0;
}

.modal h2::after {
  display: none;
}


.modal h2 .series,
.modal h2 .film {
  order: -1;
  font-size: 0.9rem;
  margin: 0;
}

.project-tags {
  order: 1;
  margin-top: 1rem;
}

.modal h2 .series {
    background: linear-gradient(45deg, #00356B, #0066cc);
    color: white;
    box-shadow: 0 0 15px rgba(0, 102, 204, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin: 0 10px;
}

.modal h2 .film {
    background: linear-gradient(45deg, #6B0022, #cc0044);
    color: white;
    box-shadow: 0 0 15px rgba(204, 0, 68, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin: 0 10px;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1rem 0;
  background: var(--card-color);
  padding: 1rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.tag-badge {
  background: var(--accent-color);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.tag-badge:hover {
    transform: scale(1.05);
}

.deadline-container {
  background: var(--card-color);
  padding: 1rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.deadline-label {
  font-weight: 600;
  color: var(--primary-color);
}

.deadline-date {
  color: var(--accent-color);
  font-weight: 500;
}


.deadline-mini {
    background: linear-gradient(45deg, var(--accent-color), #3498db);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.team-section {
  margin: 2rem 0;
  background: var(--card-color);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.team-section-centered {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.team-card {
  background: var(--card-color);
  padding: 0.8rem;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease;
  margin: 0.3rem;
  min-width: 100px;
  background: linear-gradient(145deg, var(--background-color), var(--card-color));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.team-card:hover {
  transform: translateY(-5px);
}

.chef-card {
  border: 2px solid var(--accent-color);
  background: linear-gradient(145deg, var(--card-color), #fff);
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--card-color), var(--background-color));
}

.chef-card::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    transform: rotate(45deg);
}

.team-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 0.6rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border: 2px solid var(--background-color);
  transition: transform 0.3s ease;
}

.team-card:hover .team-avatar {
    transform: scale(1.1);
}

.team-info {
  margin-top: 0.5rem;
}

.team-pseudo {
  font-weight: 500;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.equipe-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}


.synopsis-container {
  background: var(--card-color);
  padding: 2rem;
  border-radius: 15px;
  margin-top: 2rem;
  background: linear-gradient(145deg, var(--card-color), var(--background-color));
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.synopsis-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--accent-color);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

.synopsis-content {
  line-height: 1.6;
  color: var(--text-color);
  text-align: justify;
  font-size: 1rem;
}


.theme-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: var(--card-color);
  border: 2px solid var(--accent-color);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  overflow: hidden;
}

.theme-switch:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--accent-color);
}

.theme-switch::before {
  content: '🌙';
  position: absolute;
  transition: transform 0.3s ease;
}

[data-theme="light"] .theme-switch::before {
  content: '☀️';
  transform: rotate(360deg);
}


.planning-section {
    position: relative;
    margin: 2rem 0;
    user-select: none;
}

.locked-section {
    filter: blur(8px);
    position: relative;
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.lock-icon {
    font-size: 8rem;
    color: white;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: float 3s ease-in-out infinite;
    filter: none;
    text-align: center;
}

.hidden-content {
    display: none;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}


.submit-project-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #3498db);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding-bottom: 3px;
    color: white;
    font-size: 2.5rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.submit-project-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-project-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.submit-project-btn .tooltip {
    position: absolute;
    background: var(--card-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    right: 80px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.submit-project-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.plus-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    margin-top: -2px;
}

@media (max-width: 1200px) {
  .projects-grid {
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 1.5rem;
      padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  body {
      padding: 0;
      overflow-x: hidden;
  }

  .header {
      padding: 1rem;
  }

  .header-logo {
      height: 70px;
  }

  .dc-logo {
      height: 40px;
  }

  .projects-grid {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 1rem;
      padding: 0 1rem;
  }

  .project-card {
      padding: 1.25rem;
  }

  .section-title {
      font-size: 1.8rem;
      margin: 1.5rem 0;
  }

  .modal-content {
      width: 90%;
      margin: 5vh auto;
      padding: 1.5rem;
  }

  .submit-project-btn {
      bottom: 20px;
      right: 20px;
      width: 50px;
      height: 50px;
  }
}

@media (max-width: 480px) {
  .header-logo {
      height: 50px;
  }

  .dc-logo {
      height: 30px;
  }

  .projects-grid {
      grid-template-columns: 1fr;
      gap: 1rem;
      padding: 0 0.8rem;
  }

  .project-card {
      padding: 1rem;
      margin: 0.5rem 0;
  }

  .section-title {
      font-size: 1.5rem;
      margin: 1.2rem 0;
  }

  .project-type, .project-badge {
      font-size: 0.8rem;
      padding: 0.4rem 0.8rem;
  }

  .modal-content {
      width: 95%;
      padding: 1rem;
      margin: 2vh auto;
  }

  .modal h2 {
      font-size: 1.3rem;
  }

  .submit-project-btn {
      width: 45px;
      height: 45px;
      bottom: 15px;
      right: 15px;
  }

  .theme-switch {
      width: 40px;
      height: 40px;
      top: 15px;
      right: 15px;
  }
}