/* Base styles */
:root {
  --primary: #61adff;
  --primary-dark: #c1d8f0;
  --text: #2d2d2d;
  --bg: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
}

#intro {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.background-video video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -1;
}

.intro-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 1;
}

.intro-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

/* Style du bouton stroke */
.button.stroke {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: inline-block;
  margin-top: 2rem;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.button.stroke:hover {
  background: #fff;
  color: var(--primary);
}

/* Style pour la modal vidéo */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.video-modal.active {
  display: flex;
}

.video-modal video {
  max-width: 90%;
  max-height: 90vh;
}

.video-modal .close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
}

/* Navigation */
.menu-btn {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1001;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
}

.menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--primary);
  position: absolute;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-btn span:nth-child(1) {
  top: 0;
}
.menu-btn span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}
.menu-btn span:nth-child(3) {
  bottom: 0;
}

.menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  width: 300px;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}

nav.active {
  transform: translateX(0);
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.5rem;
  padding: 1rem;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--primary);
}

/* Intro Content */
.intro-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 17, 17, 0.85);
  z-index: 1;
}

.intro-content {
  position: relative;
  z-index: 2;
  padding: 0 2rem;
}

.intro-content h5 {
  color: var(--primary);
  font-size: 2.3rem;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  margin-bottom: 1rem;
}

.intro-content h1 {
  font-size: 8.4rem;
  margin-bottom: 2rem;
}

.intro-position {
  font-size: 1.7rem;
  margin-bottom: 2rem;
}

.intro-position span {
  display: inline-block;
  padding: 0 1rem;
}

.intro-position span:not(:last-child)::after {
  content: "|";
  padding-left: 1rem;
  color: rgba(255, 255, 255, 0.3);
}

/* Sections */
section {
  /* padding: 8rem 2rem; */
  margin: 0 auto;
  padding-top: 8rem;
  padding-bottom: 2rem;
}

section#about {
  max-width: 1340px;
}
section#works {
  max-width: 1340px;
}
section#creation {
  max-width: 1440px;
}
section#contact {
  max-width: 1440px;
}
section h2 {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 4rem;
  position: relative;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--primary);
}

/* Works Section */
section#works {
  max-width: 1340px;
  margin: 0 auto;
  padding: 8rem 2rem;
}

section#works h2 {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 4rem;
  position: relative;
}

section#works h2::after {
  content: "";
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--primary);
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
}

/* Works Grid */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.work-item {
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.work-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 123, 255, 0.2);
}

.image-container {
  position: relative;
  width: 100%;
  padding-top: 75%; /* Ratio d'aspect 4:3 */
  overflow: hidden;
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.work-item:hover .image-container img {
  transform: scale(1.1);
}

.work-info {
  padding: 1.5rem;
  background: white;
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.work-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--primary);
  transition: height 0.3s;
}
/* Tech Badges */
.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background-color: #f5f5f5;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #666;
  transition: all 0.3s ease;
}

.tech-badge i {
  font-size: 1rem;
}

/* Couleurs spécifiques pour chaque technologie */
.tech-badge i.fa-html5 {
  color: #e34f26;
}
.tech-badge i.fa-css3-alt {
  color: #264de4;
}
.tech-badge i.fa-js {
  color: #f7df1e;
}
.tech-badge i.fa-php {
  color: #777bb4;
}
.tech-badge i.fa-wordpress {
  color: #21759b;
}
.tech-badge i.fa-symfony {
  color: #000000;
}
.tech-badge i.fa-sass {
  color: #cc6699;
}
.tech-badge i.fa-database {
  color: #4479a1;
}
.tech-badge i.fa-react {
  color: #61dafb;
}
.tech-badge i.fa-elementor {
  color: #92003b;
}

.tech-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.work-item:hover .work-info::before {
  height: 100%;
}

.work-info h3 {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  transition: color 0.3s;
}

.work-item:hover .work-info h3 {
  color: var(--primary);
}

.work-info p {
  flex-grow: 1;
}

.work-info a {
  color: var(--primary);
  text-decoration: none;
  display: inline-block;
  margin-top: 1rem;
  transition: transform 0.3s;
  align-self: flex-start;
}

.work-info a:hover {
  transform: translateX(5px);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
}

/* Section Création */
.creation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 1rem;
  max-width: 1440px;
  margin: 0 auto;
}

.work-item-flip {
  background: white;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-item-flip:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 123, 255, 0.2);
}

.flip-container {
  perspective: 1000px;
  height: 600px;
}

.flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  cursor: pointer;
}

/* Pour permettre l'ouverture dans un nouvel onglet */
.front img,
.back img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  cursor: pointer;
}

/* Ajouter un conteneur approprié pour le streampack */
#streampack-container {
  max-width: 100%;
  max-height: 600px;
  overflow: hidden;
  margin: 0 auto;
}

/* Corriger le style pour l'image Amir */
.amir_img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  padding: 10px;
  cursor: pointer;
}

.flip-container:hover .flipper {
  transform: rotateY(180deg);
}

.front,
.back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0;
}

.back {
  transform: rotateY(180deg);
}

.work-item-flip:last-child {
  height: auto;
  max-height: 800px;
}

.work-info {
  padding: 1.5rem;
  background: white;
  position: relative;
}

.work-info::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--primary);
  transition: height 0.3s;
}

.work-item-flip:hover .work-info::before {
  height: 100%;
}

.work-info h3 {
  transition: color 0.3s;
  padding-left: 1rem;
}

.work-item-flip:hover .work-info h3 {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .creation-grid {
    grid-template-columns: 1fr;
  }

  .flip-container {
    height: 600px;
  }

  .amir_img {
    max-height: 350px;
  }
}
/* Contact Section */
.contact {
  padding: 80px 20px;
}

.contact h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.8rem;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  background: white;
  border-radius: 15px;
  padding: 4rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.titre_coor {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  position: relative;
}

.titre_coor:after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--primary);
}

.contact-info a {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1.3rem;
  padding: 0.8rem 0;
}

.contact-info a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.contact-info i {
  font-size: 1.5rem;
  color: var(--primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1.2rem;
  border: 2px solid #f0f0f0;
  background: #f8f8f8;
  border-radius: 8px;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
  outline: none;
}

.contact-form button {
  padding: 1.2rem 2.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1rem;
  align-self: center;
  width: auto;
  min-width: 180px;
}

.contact-form button:hover {
  background: linear-gradient(to right, var(--primary), #2980b9);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* Responsive */
@media (max-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 2.5rem;
  }

  .contact-info {
    text-align: center;
  }

  .titre_coor:after {
    left: 50%;
    transform: translateX(-50%);
  }

  .contact-info a {
    justify-content: center;
  }

  .contact-form button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .contact-container {
    padding: 2rem 1.5rem;
  }

  .contact-info a {
    font-size: 1.1rem;
  }
}

/* Utility Classes */
.hidden {
  display: none;
}

.fade {
  opacity: 0;
  transform: scale(0.9);
}
/* Section Vidéos */
.videos {
  padding: 80px 20px;
  background-color: #f9f9f9;
}

.videos h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.5rem;
  position: relative;
}

.videos h2:after {
  content: "";
  position: absolute;
  width: 60px;
  height: 3px;
  background-color: #333;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.videos-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.video-item {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* Pour un ratio 16:9 */
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
  color: white;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.video-thumbnail:hover img {
  transform: scale(1.05);
}

.video-thumbnail:hover .play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
  padding: 25px;
}

.video-info h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.5rem;
  color: #333;
}

.role-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.role-badge {
  background-color: #e9ecef;
  color: #495057;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.video-info p {
  line-height: 1.6;
  color: #555;
  margin: 0;
}

/* Media queries pour responsive */
@media (min-width: 768px) {
  .video-item {
    flex-direction: row;
    align-items: stretch;
  }

  .video-wrapper {
    flex: 0 0 50%;
  }

  .video-thumbnail {
    height: 100%;
    padding-bottom: 0;
    border-radius: 8px 0 0 8px;
  }

  .video-info {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .videos-container {
    gap: 40px;
  }
}
.role-badge i {
  margin-right: 5px;
  font-size: 1.2em;
  color: #3498db;
}
