/* --- Déclaration des Polices Locales --- */
@font-face {
    font-family: 'Kanit';
    src: url('fonts/Kanit-Light.ttf') format('truetype');
    font-weight: 300; /* Light */
    font-style: normal;
  }
  @font-face {
    font-family: 'Kanit';
    src: url('fonts/Kanit-Medium.ttf') format('truetype');
    font-weight: 500; /* Medium */
    font-style: normal;
  }
  @font-face {
    font-family: 'Kanit';
    src: url('fonts/Kanit-Bold.ttf') format('truetype');
    font-weight: 700; /* Bold */
    font-style: normal;
  }
  @font-face {
    font-family: 'Kanit';
    src: url('fonts/Kanit-Black.ttf') format('truetype');
    font-weight: 900; /* Black */
    font-style: normal;
  }
  
  /* --- Reset & Base --- */
  * { box-sizing: border-box; margin: 0; padding: 0; }
  
  body {
      /* CHANGÉ: Applique Kanit Light par défaut */
      font-family: 'Kanit', sans-serif; 
      font-weight: 300; 
      background-color: #fdfdfd;
      color: #222;
      line-height: 1.0;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      text-rendering: optimizeLegibility;
      overflow-x: hidden;
      cursor: none;
  }
  body a, body button { cursor: none; }
  .container { max-width: 1600px; margin: 0 auto; padding: 0 40px; }
  
  /* --- Header (MODIFIÉ pour Centrage) --- */
  .site-header {
      padding: 20px 0;
      display: flex; /* Garde flex pour aligner verticalement si besoin */
      align-items: center; /* Centre verticalement Nav et Branding */
      border-bottom: 1px solid #eee;
      margin-bottom: 0px;
      position: relative; /* Pour positionner la nav */
      min-height: 80px; /* Hauteur minimale pour que la nav absolue tienne */
  }
  
  .site-branding {
      flex-grow: 1; /* Prend l'espace disponible */
      text-align: center; /* Centre le texte (titre et description) */
  }
  
  .site-title {
      font-size: 2.8em;
      font-weight: 900; /* Kanit Black */
      color: #F5652A;
      line-height: 0.9;
      margin-bottom: 0;
  }
  
  .site-description {
      font-size: 1.1em;
      font-weight: 500; /* Kanit Medium */
      color: #F5652A; /* CHANGÉ: Couleur Orange */
      margin-top: 5px;
  }
  
  .site-navigation {
       /* Positionné en haut à droite */
      position: absolute;
      top: 50%;
      right: 0; /* Attaché à droite du .container via padding */
      transform: translateY(-50%);
  }
  
  .site-navigation a {
      font-weight: 700; /* Kanit Bold par défaut sur les liens ? Ou 500? Gardons 700 */
      color: #F5652A;
      text-decoration: none;
      font-size: 1.3em;
      transition: opacity 0.3s ease, transform 0.3s ease;
      display: inline-block;
  }
.site-navigation a:hover {
    opacity: 0.7;
    transform: scale(1.05);
}

/* --- Carrousel Principal --- */
.project-carousel-wrapper {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 80px;
    padding: 0;
     -webkit-overflow-scrolling: touch;
     scrollbar-width: none;
}
.project-carousel-wrapper::-webkit-scrollbar { display: none; }

.project-carousel {
    display: flex;
    gap: 40px;
    padding: 30px 40px; /* Ajusté padding haut enlevé, car plus de déco */
   /* align-items: flex-start;*/ /* CHANGÉ: Aligne les items (hauteur variable) en haut */
}
.project-item {
    flex: 0 0 400px; 
    height: 450px;  /* Garde la hauteur fixe */
    border-radius: 0px;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    /* AJOUTÉ/VÉRIFIÉ : Centrage vertical et horizontal du contenu (le lien <a>) */
    display: flex;
    align-items: center;        /* Centre verticalement */
    justify-content: center;    /* Centre horizontalement (utile si image plus étroite) */
    /* position: relative; */ /* Enlevé, plus besoin */
}

.project-item:hover {
     box-shadow: 0 20px 50px rgba(0,0,0,0.2);
     transform: translateY(-10px) scale(1.02);
}

.project-link { 
    display: block; 
    width: 100%; 
    height: 100%; /* Prend toute la hauteur de .project-item */
    text-decoration: none; 
    color: inherit;
    position: relative; /* Pour l'overlay */
    border-radius: 0px; 
    overflow: hidden; 
}


.project-item img {
    display: block;
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    /* AJOUTÉ : Assure le centrage du contenu de l'image coupée */
    object-position: center center; 
    background-color: #E8E8E8;
    transition: transform 0.7s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative; 
    z-index: 1; 
}
.project-link:hover img { transform: scale(1.15); }

/* --- Effet Survol (Overlay Uniquement) --- */

/* 1. Styles Décos SVG (positionnées par rapport à .project-item) */
/* TOUTES LES RÈGLES .deco, .deco-*, .deco.visible ONT ÉTÉ SUPPRIMÉES */

/* 2. Overlay Sombre */
.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 70px 30px 30px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 60%, rgba(0, 0, 0, 0) 100%);
    color: white;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
    text-align: center;
    /* z-index: 6; */ /* Plus besoin d'être au dessus des décos */
    z-index: 3;  /* Juste au dessus de l'image (z-index: 1) */
}

.project-link:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Texte Overlay */
.project-overlay .project-title,
.project-overlay .view-project-indicator {
    transform: translateY(15px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-overlay .project-title {
    font-size: 2em;
    font-weight: 700; /* MODIFIÉ: Kanit Bold */
    margin-bottom: 10px;
    transition-delay: 0.15s;
}

.project-overlay .view-project-indicator {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-weight: 300; /* MODIFIÉ: Kanit Light */
    color: #F5652A;
    display: inline-block;
    transition-delay: 0.25s;
}

.project-link:hover .project-overlay .project-title,
.project-link:hover .project-overlay .view-project-indicator {
    transform: translateY(0);
    opacity: 1;
}

/* --- Styles Modale --- */
.modal-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    /* MODIFIÉ: Align en bas */
    align-items: flex-end; 
    justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
    z-index: 1000; pointer-events: none;
    padding-top: 80px; /* MODIFIÉ: Espace pour le header principal */
}

.modal-overlay.active {
    opacity: 1; visibility: visible; transition-delay: 0s; pointer-events: auto;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 1200px;
    /* height: auto; */ /* Gardons auto */
    max-height: calc(95vh - 80px); /* Contrainte globale */
    border-radius: 0px 0px 0 0;
    padding: 50px 60px; /* Padding interne */
    overflow: hidden;
    position: relative;
    transform: translateY(100%);
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* ENLEVÉ: display: flex; flex-direction: column; */
    display: block; /* Assure un contexte de formatage de bloc normal */
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-close-button {
    position: absolute; top: 25px; right: 35px; /* Position ajustée */
    font-size: 3em; font-weight: bold; color: #aaa;
    background: none; border: none; cursor: none; line-height: 1;
    padding: 5px; transition: color 0.3s ease, transform 0.3s ease; z-index: 10;
}
.modal-close-button:hover { color: #F5652A; transform: scale(1.2); }


.modal-header {
    padding-bottom: 5px;
    margin-bottom: 5px; /* Garder cette marge */
    border-bottom: 1px solid #eee;
    /* flex-shrink: 0; */ /* ENLEVÉ */
    /* !!! INSPECTE CET ÉLÉMENT POUR SA HAUTEUR RÉELLE !!! */
    /* border: 1px dashed black; */ /* Optionnel: pour mesurer */
}
#modal-project-title { 
    font-size: 2.8em; /* Taille modifiée */
    font-weight: 700; /* MODIFIÉ: Kanit Bold */
    color: #F5652A; margin-bottom: 15px; line-height: 1.2;
    /* MODIFIÉ: Alignement gauche (par défaut), enlevé text-align:center et width:100% */
    text-align: left; 
}


#modal-project-description { 
    font-size: 1.1em; 
    font-weight: 300; /* AJOUTÉ: Kanit Light */
    color: #555; max-width: 90%; /* Largeur modifiée */
    margin-top: 10px; margin-bottom: 30px; /* Ajout margin-bottom */
}
/* AJOUT : Style pour la vidéo dans le carrousel interne */
/* Règle pour l'image/vidéo DANS la slide (celle que tu as fournie) */
.inner-slide img,
.inner-slide video {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;   /* <= Devrait ENFIN marcher ! */
    object-fit: contain;
    object-position: center center;
    margin: auto;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
   
}
/* NOUVEAU Carrousel Interne Modale */
.modal-inner-carousel-container {
    /* --- Propriétés flex enlevées --- */
    /* flex-grow: 1; */
    /* display: flex; */
    /* flex-direction: column; */
    /* min-height: 0; */

    position: relative; /* Garder pour pos. absolue enfants */
    overflow: hidden;   /* Garder */
    padding: 0;         /* Simplifié */
    margin-top: 10px;   /* Garder cette marge */

    /* === NOUVEAU: Hauteur Calculée === */
    /* Formule: HauteurMaxModale - PaddingHautModale - PaddingBasModale - HauteurHeader - MargeBasHeader - MargeHautContainer */
    /* ESTIMATION INITIALE (À AJUSTER !) : */
    /* 95vh (fenêtre) - 80px (espace haut) - 50px (padding haut) - 50px (padding bas) - [HAUTEUR_HEADER] - 5px (marge bas header) - 10px (marge haut container) */
    /* Ex: Si HAUTEUR_HEADER = 90px: 95vh - 80 - 100 - 90 - 5 - 10 = 95vh - 285px */
    height: calc(95vh - 285px); /* <<< AJUSTE CE CALCUL ! Remplace 285 par la somme correcte */

    /* Sécurité : hauteur minimale */
    min-height: 300px; /* Ajuster si besoin (ex: 250px) */

   
}

.inner-carousel-viewport {
    width: 100%;
    height: 100%;        /* <= RETOUR à height: 100% (du container violet) */
    /* flex-grow: 1; */  /* ENLEVÉ */
    overflow: hidden;
    position: relative;
    /* min-height: 0; */ /* ENLEVÉ */
 
}

.inner-carousel-track {
    display: flex;
    height: 100%;        /* <= Garder (du viewport bleu) */
    position: relative;
    left: 0;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* align-items: stretch; */ /* ENLEVÉ */

}


.inner-slide {
    width: 70%;
    height: 100%;        /* <= Garder (du track vert) */
    flex-shrink: 0;
    margin: 0 5%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s ease;
    transform: scale(0.8);
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
    /* min-height: ... */ /* ENLEVÉ */

}


.inner-slide.active {
    transform: scale(1); /* Slide active est taille normale */
    opacity: 1;
    z-index: 2; /* AJOUTÉ: Passe devant */
}



.modal-caption {
    position: absolute;
    bottom: 5px;
    left: 5%;
    width: 90%;
    z-index: 5;
    pointer-events: none;
    text-align: center;
    font-size: 0.9em;
    font-weight: 300;
    color: #333;
    line-height: 0.9;
    padding: 5px 0;
}
.inner-carousel-button {
    position: absolute; /* <= CHANGEMENT */
    top: 50%;          /* <= NOUVEAU */
    transform: translateY(-50%); /* <= NOUVEAU */
    font-size: 3.5em; color: #ccc;
    background: none; border: none; cursor: none;
    padding: 0 15px;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 10; /* Au dessus des slides et viewport */
    /* align-self: center; */ /* ENLEVÉ */
}
.inner-carousel-button.prev {
    left: 15px; /* Ajuster la position gauche si besoin */
}
.inner-carousel-button.next {
    right: 15px; /* Ajuster la position droite si besoin */
}
.inner-carousel-button:hover { color: #F5652A; transform: scale(1.15); }
.inner-carousel-button:disabled { color: #eee; cursor: none; transform: scale(1); pointer-events: none; }

/* --- Curseur Personnalisé (Mise à jour pour Texte Dynamique) --- */
.custom-cursor {
    position: fixed; left: 0; top: 0; pointer-events: none;
    width: 40px; height: 40px; border: 2px solid #F5652A; border-radius: 50%;
    background-color: rgba(245, 101, 42, 0.1);
    transform: translate(-50%, -50%) scale(1);
    z-index: 9999;
    transition: transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1), width 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), height 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), background-color 0.3s ease, border-color 0.3s ease; 
    display: flex; align-items: center; justify-content: center;
}
.custom-cursor.cursor--clicked { transform: translate(-50%, -50%) scale(0.7); }
.custom-cursor.cursor--link-hover { width: 70px; height: 70px; background-color: rgba(245, 101, 42, 0.2); border-color: #E05A25; }

/* Texte Dynamique dans le curseur */
.custom-cursor::before { 
    content: attr(data-text); position: absolute; color: #F5652A; 
    /* VÉRIFIÉ: Applique la police de base (Kanit Light 300) */
    font-weight: 700; /* MODIFIÉ: Kanit Bold pour meilleure lisibilité */
    font-size: 11px; 
    text-transform: uppercase; letter-spacing: 0.8px; 
    opacity: 0; transform: scale(0.5);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
    white-space: nowrap; 
}
.custom-cursor.cursor--text-visible::before { opacity: 1; transform: scale(1); }