/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Design tokens — single font for consistency */
:root {
  --dark: #1a1a2e;
  --darker: #16213e;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --medium-gray: #e0e0e0;
  --text-dark: #1a1a1a;
  --text-muted: #555;
  --text-light: #ccc;
  --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* =============================================
   HERO SECTION
   ============================================= */

/* Container principal de la section hero avec image de fond */
.hero {
  position: relative;
  min-height: 100vh;
  background-image: url('moussa.png');
  background-size: cover;
  background-position: center top;
  display: flex;
  flex-direction: column;
  color: var(--white);
  overflow: hidden;
}

/* Overlay sombre en dégradé sur l'image hero */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(0, 0, 0, 0.65) 100%
  );
  z-index: 1;
}

/* NAV */

/* Barre de navigation principale */
nav {
  position: relative;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem 0;
  transition: background 0.3s ease, padding 0.3s ease;
}

/* Logo du site dans la navigation */
.logo {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--white);
}

/* Liste des liens de navigation */
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.nav-links a:hover {
  opacity: 1;
}

/* MENU HAMBURGER */

/* Bouton hamburger pour mobile */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 102;
  position: relative;
}

/* Barres du menu hamburger */
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* État actif : première barre (rotation vers le bas) */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

/* État actif : barre du milieu (masquée) */
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

/* État actif : dernière barre (rotation vers le haut) */
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* HERO CONTENT */

/* Container du contenu texte dans le hero */
.hero-content {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 4rem 5rem;
  max-width: 640px;
}

/* Titre principal du hero */
.hero-content h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 1.2rem;
  white-space: nowrap;
}

/* Paragraphe de description dans le hero */
.hero-content p {
  font-size: 0.9rem;
  line-height: 1.8;
  max-width: 480px;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* Bouton call-to-action dans le hero */
.btn-hero {
  display: inline-block;
  padding: 0.9rem 2rem;
  border: 2px solid var(--white);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  align-self: flex-start;
}

/* État survol du bouton hero */
.btn-hero:hover {
  background: var(--white);
  color: var(--text-dark);
}

/* =============================================
   ABOUT SECTION
   ============================================= */

/* Section À propos */
.about {
  padding: 6rem 4rem;
  background: var(--white);
}

/* Container interne pour le layout 2 colonnes */
.about-inner {
  display: flex;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: flex-start;
}

/* Colonne gauche - Titre de la section */
.about-left {
  flex: 1;
  padding-top: 0rem;
}

/* Titre h2 de la section About */
.about h2 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-dark);
}

/* Colonne droite - Contenu descriptif */
.about-right {
  flex: 1;
  padding-top: 1rem;
}

/* Paragraphes de la colonne droite */
.about-right p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Zone du call-to-action dans About */
.about-cta {
  text-align: center;
  margin-top: 3.5rem;
}

/* Shared button style used across sections */

/* Bouton avec bordure (style réutilisable) */
.btn-outline {
  display: inline-block;
  padding: 0.9rem 2rem;
  border: 2px solid var(--text-dark);
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

/* État survol du bouton outline */
.btn-outline:hover {
  background: var(--text-dark);
  color: var(--white);
}

/* =============================================
   PORTFOLIO SECTION — 2-column card grid
   ============================================= */

/* Section portfolio avec grille de projets */
.portfolio {
  padding: 6rem 4rem;
  background: var(--light-gray);
}

/* Container interne du portfolio */
.portfolio-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* En-tête de la section portfolio */
.portfolio-header {
  text-align: center;
  margin-bottom: 4rem;
}

/* Titre h2 du portfolio */
.portfolio-header h2 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-dark);
}

/* Grille des cartes de projets */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

/* Carte individuelle de projet */
.project-card {
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
  aspect-ratio: 16 / 9;
  position: relative;
  cursor: pointer;
}

/* État survol de la carte projet */
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 70px rgba(0,0,0,0.35);
}

/* Image de la carte projet */
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.4s ease;
}

/* Image au survol : zoom et assombrissement */
.project-card:hover img {
  transform: scale(1.08);
  filter: brightness(0.6);
}

/* Overlay qui apparaît au survol d'une carte projet */
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
  padding: 2rem 2rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Affichage de l'overlay au survol */
.project-card:hover .project-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Bouton icône pour accéder au projet */
.project-link-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  pointer-events: auto;
  z-index: 10;
}

/* État survol du bouton lien projet */
.project-link-btn:hover {
  background: transparent;
  transform: scale(1.5);
}

/* Informations textuelles du projet dans l'overlay */
.project-info {
  text-align: left;
  transform: translateY(10px);
  transition: transform 0.4s ease;
}

/* Animation des infos au survol */
.project-card:hover .project-info {
  transform: translateY(0);
}

/* Titre du projet dans l'overlay */
.project-info h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--white);
}

/* Description du projet dans l'overlay */
.project-info p {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
}

/* =============================================
   SERVICES SECTION — 3-column layout
   ============================================= */

/* Section services */
.services {
  padding: 6rem 4rem;
  background: var(--white);
}

/* Container interne des services */
.services-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Titre de la section services */
.services-title {
  text-align: center;
  margin-bottom: 4rem;
}

/* Titre h2 de la section services */
.services-title h2 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: var(--text-dark);
}

/* Grille 3 colonnes des services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.5rem;
}

/* Carte individuelle de service */
.service-card {
  padding: 0 0.5rem;
  display: flex;
  flex-direction: column;
}

/* Titre d'une carte service */
.service-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

/* Paragraphe de description du service */
.service-card p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Lien "En savoir plus" */
.service-card .learn-more {
  margin-top: auto;
  padding-top: 1rem;
}

/* Liste des caractéristiques d'un service */
.service-features {
  list-style: none;
  margin-top: 1.5rem;
}

/* Item de la liste des caractéristiques */
.service-features li {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  position: relative;
}

/* Icône de validation (✓) avant chaque item */
.service-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--text-dark);
  font-weight: 600;
}

/* =============================================
   CONTACT SECTION
   ============================================= */

/* Section formulaire de contact */
.contact-section {
  padding: 6rem 4rem;
  background: var(--light-gray);
}

/* Container interne du formulaire */
.contact-inner {
  max-width: 700px;
  margin: 0 auto;
}

/* En-tête de la section contact */
.contact-header {
  text-align: center;
  margin-bottom: 3rem;
}

/* Titre h2 de la section contact */
.contact-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

/* Sous-titre de la section contact */
.contact-header p {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Formulaire de contact */
.contact-form {
  background: transparent;
  padding: 0;
}

/* Groupe de champ du formulaire (label + input) */
.form-group {
  margin-bottom: 1.5rem;
}

/* Label d'un champ de formulaire */
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

/* Champs input et textarea du formulaire */
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0.75px solid var(--text-dark);
  border-radius: 0;
  font-family: var(--font-main);
  font-size: 0.95rem;
  background: var(--white);
}

/* État focus des champs */
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--text-dark);
}

/* Propriétés spécifiques au textarea */
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Bouton de soumission du formulaire */
.btn-submit {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 0;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* État survol du bouton submit */
.btn-submit:hover {
  background: var(--darker);
  transform: translateY(-2px);
}

/* État actif (clic) du bouton submit */
.btn-submit:active {
  transform: translateY(0);
}

/* =============================================
   FOOTER
   ============================================= */

/* Pied de page principal */
footer {
  background: var(--dark);
  color: var(--white);
  overflow: hidden;
}

/* Bannière supérieure du footer */
.footer-banner {
  position: relative;
  padding: 4rem 2rem;
  background: var(--darker);
  text-align: center;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Texte de la bannière footer */
.footer-banner-text {
  position: relative;
  z-index: 1;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--white);
  display: inline-block;
}

/* Effet typewriter avec curseur clignotant */
.footer-banner-text::after {
  content: '|';
  animation: blink 0.7s infinite;
  margin-left: 2px;
}

/* Arrêter le curseur quand l'animation est terminée */
.footer-banner-text.typing-complete::after {
  animation: none;
  opacity: 0;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* Contenu principal du footer en 3 colonnes */
.footer-content {
  display: flex;
  gap: 4rem;
  padding: 3rem 4rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Colonnes individuelles du footer */
.footer-contact,
.footer-social,
.footer-links {
  flex: 1;
}

/* Titres h3 dans le footer */
.footer-content h3 {
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

/* Paragraphes dans le footer */
.footer-content p {
  margin-bottom: 0.3rem;
}

/* Liens dans le contenu du footer */
.footer-content a {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  transition: color 0.3s ease;
}

/* État survol des liens footer */
.footer-content a:hover {
  color: var(--white);
}

/* Paragraphes de contact (sauf le premier) */
.footer-contact p:not(:first-of-type) {
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--text-light);
}

/* Section inférieure du footer (copyright + liens légaux) */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Texte copyright dans le footer */
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
}

/* Liens légaux (mentions légales, confidentialité) */
.footer-legal {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Liens légaux du footer */
.footer-legal a {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--text-light);
  transition: color 0.3s ease;
}

/* État survol des liens légaux */
.footer-legal a:hover {
  color: var(--white);
}

/* Séparateur entre les liens légaux */
.footer-legal span {
  color: var(--text-light);
  opacity: 0.5;
}

/* =============================================
   LEGAL PAGES — mentions légales & privacy
   ============================================= */

/* Container des pages légales */
.legal-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
  background: var(--white);
}

/* Titre principal des pages légales */
.legal-page h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.5px;
  margin-bottom: 3rem;
  color: var(--text-dark);
}

/* Titres de section dans les pages légales */
.legal-page h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

/* Paragraphes et items de liste dans les pages légales */
.legal-page p,
.legal-page li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Listes à puces dans les pages légales */
.legal-page ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Liens dans les pages légales */
.legal-page a {
  color: var(--text-dark);
  text-decoration: underline;
}

/* État survol des liens légaux */
.legal-page a:hover {
  opacity: 0.7;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

/* État survol du lien retour */
.back-link:hover {
  color: var(--text-dark);
}

/* Flèche avant le lien retour */
.back-link::before {
  content: "\2190  ";
}

/* =============================================
   ANIMATIONS — hero entrance
   ============================================= */

/* Animation d'apparition par le bas avec fondu */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation d'apparition de la gauche vers la droite avec fondu
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
} */

/* Application de l'animation aux éléments du hero */
.hero-content h1,
.hero-content p,
.hero-content .btn-hero {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.hero-content h1 {
  animation-delay: 0.1s;
}

/* Délai d'animation pour le paragraphe */
.hero-content p {
  animation-delay: 0.3s;
}

/* Délai d'animation pour le bouton */
.hero-content .btn-hero {
  animation-delay: 0.5s;
}

/* Animation du logo
.logo {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0s;
}

/* Animation des liens de navigation
.nav-links li {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

/* Délais progressifs pour chaque lien
.nav-links li:nth-child(1) {
  animation-delay: 0.1s;
}

.nav-links li:nth-child(2) {
  animation-delay: 0.2s;
}

.nav-links li:nth-child(3) {
  animation-delay: 0.3s;
}

.nav-links li:nth-child(4) {
  animation-delay: 0.4s;
}

.nav-links li:nth-child(5) {
  animation-delay: 0.5s;
} */

/* =============================================
   RESPONSIVE — tablet & mobile adjustments
   ============================================= */

/* Très petits écrans (< 400px) */
@media (max-width: 400px) {
  .project-overlay {
    padding: 1.5rem 1.5rem 0.5rem;
  }
}

/* Tablettes et petits écrans (< 900px) */
@media (max-width: 900px) {
  .hero {
    background-position: 80% center;
  }

  /* MENU HAMBURGER */
  .menu-toggle {
    display: flex;
  }

  nav {
    padding: 1.5rem 1rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transition: right 0.4s ease;
    padding: 2rem;
    z-index: 101;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-links.active li {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
  .nav-links.active li:nth-child(2) { transition-delay: 0.15s; }
  .nav-links.active li:nth-child(3) { transition-delay: 0.2s; }
  .nav-links.active li:nth-child(4) { transition-delay: 0.25s; }
  .nav-links.active li:nth-child(5) { transition-delay: 0.3s; }

  .nav-links a {
    font-size: 1rem;
    letter-spacing: 3px;
  }

  .hero-content {
    padding: 0 2rem 3rem;
  }

  .about {
    padding: 4rem 2rem;
  }

  .about-inner {
    flex-direction: column;
    gap: 3.5rem;
  }

  .about-right {
    padding-top: 0;
  }

  .portfolio {
    padding: 3rem 1.5rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  /* En mode mobile, l'overlay est masqué par défaut */
  .project-card .project-overlay {
    opacity: 0;
    pointer-events: none;
  }

  /* Classe active ajoutée via JS au clic */
  .project-card.active .project-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .project-card.active img {
    filter: brightness(0.6);
  }

  .project-info p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .project-info h3 {
    margin-bottom: 0.1rem;
    font-size: 1.1rem;
  }

  .services {
    padding: 4rem 2rem;
  }

  .services-inner {
    flex-direction: column;
    gap: 2rem;
  }

  .services-title {
    flex: none;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
  }
}

/* Smartphones (< 600px) */
@media (max-width: 600px) {
  .hero {
    background-position: 75% center;
  }

  .hero-content {
    padding: 0 1.5rem 2.5rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .about h2 {
    font-size: 2rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-content h3 {
    font-size: 1.4rem;
  }

  .contact-section {
    padding: 4rem 2rem;
  }

  .contact-form {
    padding: 2rem 1.5rem;
  }
}