@font-face {
  font-family: 'Switzer';
  src: url('src/typeface/Switzer-Regular.woff') format('woff');
  font-display: swap;
}


@font-face {
  font-family: 'Switzer_Bold';
  src: url('src/typeface/Switzer-Bold.woff') format('woff');
  font-display: swap;
}

/*Structure*/
* {
  box-sizing: border-box;
}

html{
  scroll-behavior: smooth;
  /* Empêche iOS / Android d'agrandir le texte en paysage */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,body{
  min-height: 100vh;   /* repli pour les anciens navigateurs */
  min-height: 100dvh;
  margin: 0;
  width: auto;
  /*cursor: url("assets/img/cursor/Hand_cursor.cur"), pointer;*/
  overflow-x : hidden;
}

body{
  font-family: 'Switzer', sans-serif;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}




/*Header style*/

.header {
  top: 0;
  z-index: 10;
  position: fixed;
  width: 100%;
  padding: 4rem;
  padding-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Fond flouté avec fondu vers le bas, derrière le contenu */
.header::before {
  content: "";
  position: absolute;
  /* repli pour les navigateurs sans "inset" */
  top: 0;
  right: 0;
  left: 0;
  bottom: auto;
  inset: 0 0 auto 0;
  height: 100%;
  z-index: -1;
  pointer-events: none;

  /* Mini dégradé blanc : plus présent en haut, transparent en bas */
  background: -webkit-linear-gradient(
    top,
    rgba(255, 255, 255, 0.55) 10%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.55) 10%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );

  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);

  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
}

.logo img{
width:12.5rem;
display: block;
}

.logo img:hover{
  -webkit-filter: drop-shadow(0 0 0.4em #0066ff);
  filter: drop-shadow(0 0 0.4em #0066ff);
}

/* Menu à gauche */
.header-menu {
    position: absolute;
    left: 4rem;
    top: 1rem;

    display: flex;
    align-items: center;
}

/* Menu à droite */
.header-nav {
  position: absolute;
  right: 4rem;
  top: 1rem;

  display: flex;
  align-items: center;
}

/* Style commun aux pictogrammes */
.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 5rem;
    height: 5rem;
    padding: 0;

    border: none;
    background: transparent;
    cursor: pointer;

    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.header-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.header-icon:hover img {
    -webkit-filter: drop-shadow(0 0 0.4em #0066ff);
    filter: drop-shadow(0 0 0.4em #0066ff);
    -webkit-transform: scale(1.08);
    transform: scale(1.08);
}

.header-nav a:hover {
    color: rgba(255, 181, 179);
    font-weight: bold;
    text-shadow: 0 0 0.8em #0066ff;
}

/* =========================
   USER ICON / ABOUT
   ========================= */

.user-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.user-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-transition: -webkit-transform 0.3s ease, opacity 0.3s ease;
  transition: transform 0.3s ease, opacity 0.3s ease;
}



/* =========================================
   MENU DÉROULANT
   ========================================= */

.header-menu {
    position: absolute;
    left: 4rem;
    top: 1rem;

    display: flex;
    align-items: center;
}

/* Bouton menu */
.menu-toggle {
    position: relative;
    z-index: 10000;
}


/* Panneau déroulant */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 2rem);
    left: 0;

    display: flex;
    flex-direction: column;
    gap: 0.15rem;

    min-width: 11rem;
    padding: 0.6rem;


   border: 0.2rem solid lightgrey;
   border-radius: 0.75rem;

   /* Verre dépoli */
   background: rgba(255, 255, 255, 0.2);
   -webkit-backdrop-filter: blur(30px) saturate(150%);
   backdrop-filter: blur(30px) saturate(150%);
   box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.06),
    0 12px 30px rgba(0, 0, 0, 0.08);


    opacity: 0;
    visibility: hidden;
    -webkit-transform: translateY(-0.4rem);
    transform: translateY(-0.4rem);

    -webkit-transition:
        opacity 0.25s ease,
        -webkit-transform 0.25s ease,
        visibility 0.25s ease;
    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;

    z-index: 10001;
}

/* Liens */
.dropdown-menu a {
    display: block;
    padding: 0.75rem 0.85rem;

    font-family: 'Switzer_Bold', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.015em;
    line-height: 1.4;

    color: lightgrey;
    text-align: left;
    text-decoration: none;
    text-transform: none;

    border-radius: 0.4rem;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

/* Survol */
.dropdown-menu a:hover {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

/* Menu ouvert */
.header-menu.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

@media screen and (max-width: 768px) {

  .header-icon {
    width: 2.75rem;
    height: 2.75rem;
  }

  .header-menu {
    left: 0.75rem;
    top: 0.5rem;
  }

  .header-nav {
    right: 0.75rem;
    top: 0.5rem;
  }

  .logo img {
    width: 7.5rem;
  }

  .header {
    padding: 0.5rem 1rem;
  }
}

/* Très petits écrans */
@media screen and (max-width: 400px) {

  .header-icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .logo img {
    width: 6rem;
  }
}



/*Footer style*/

.footer{
  width: 100%;
  background: white;
  margin-top: auto;
  font-size: 1rem;
  position: fixed;
  bottom: 0;
  z-index: 1000;
}

.footer p{
  font-family: 'Switzer', sans-serif;
  font-size: 0.7rem;
}

.block_footer{
  text-align: center;
}



/* =========================
   STRUCTURE DE LA GALERIE
   ========================= */



.gallery-track {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 20vh;
  padding:15vh 0;
}

.gallery-item {
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 0;
}

.gallery-item img,
.gallery-item video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}


/* =========================
   TAILLES
   ========================= */

.gallery-item.large {
  width: 100%;
}

.gallery-item.medium {
  width: 60%;
}

.gallery-item.small {
  width: 45%;
}


/* =========================
   POSITIONS
   ========================= */

.gallery-item.left {
  align-self: flex-start;
  margin-left: 5%;
  margin-right: auto;
}

.gallery-item.center {
  align-self: center;
  margin-left: 0;
  margin-right: 0;
}

.gallery-item.right {
  align-self: flex-end;
  margin-left: auto;
  margin-right: 5%;
}


/* =========================
   RESPONSIVE MOBILE
   ========================= */

@media (max-width: 600px) {

  .gallery-track {
    gap: 5vh;
    padding: 3vh 0;
  }

  .gallery-item.large {
    width: 85%;
  }

  .gallery-item.medium {
    width: 70%;
  }

  .gallery-item.small {
    width: 55%;
  }

  .gallery-item.left {
    margin-left: 4%;
    margin-right: auto;
  }

  .gallery-item.center {
    align-self: center;
    margin-left: 0;
    margin-right: 0;
  }

  .gallery-item.right {
    margin-left: auto;
    margin-right: 4%;
  }
}



/* =========================
   COMPOSITION : DEUX IMAGES
   ========================= */

.gallery-pair {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 2vw;
  width: 100%;
  box-sizing: border-box;
  padding: 0 5%;
}

/* Chaque image occupe la moitié du groupe */
.gallery-pair .gallery-item {
  width: calc(50% - 1vw);
  min-width: 0;
  margin: 0;
}

/* Images et vidéos */
.gallery-pair img,
.gallery-pair video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Variante : une grande image et une petite */
.gallery-pair.pair-asymmetric .gallery-item:first-child {
  width: 60%;
}

.gallery-pair.pair-asymmetric .gallery-item:last-child {
  width: 40%;
}

/* Variante : groupe décalé vers la gauche */
.gallery-pair.pair-left {
  justify-content: flex-start;
  padding-left: 5%;
  padding-right: 10%;
}

/* Variante : groupe décalé vers la droite */
.gallery-pair.pair-right {
  justify-content: flex-end;
  padding-left: 10%;
  padding-right: 5%;
}

/* Mobile */
@media (max-width: 600px) {
  .gallery-pair {
    gap: 3vw;
    padding-left: 4%;
    padding-right: 4%;
  }

  .gallery-pair .gallery-item {
    width: calc(50% - 1.5vw);
  }

  .gallery-pair.pair-asymmetric .gallery-item:first-child {
    width: 60%;
  }

  .gallery-pair.pair-asymmetric .gallery-item:last-child {
    width: 40%;
  }
}


/* =========================
   COMPOSITION : TROIS IMAGES
   ========================= */

.gallery-trio {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5vw;
  width: 100%;
  box-sizing: border-box;
  padding: 0 5%;
}

/* Chaque image occupe un tiers de la largeur */
.gallery-trio .gallery-item {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

/* Images et vidéos */
.gallery-trio img,
.gallery-trio video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Responsive mobile */
@media (max-width: 600px) {
  .gallery-trio {
    gap: 2vw;
    padding: 0 4%;
  }
}


/* Trois images avec une image centrale dominante */
.gallery-trio.trio-center .gallery-item:nth-child(1),
.gallery-trio.trio-center .gallery-item:nth-child(3) {
  flex: 1 1 0;
}

.gallery-trio.trio-center .gallery-item:nth-child(2) {
  flex: 1.4 1 0;
}



/* =========================
   TITRE Y2K AERO / CYBER
   ========================= */

:root {
  --page-padding: 2rem;                      /* repli */
  --page-padding: clamp(1.5rem, 4vw, 4rem);
}

/* Navigateurs sans clamp() : on garde la valeur de repli */
@supports not (width: clamp(1px, 2px, 3px)) {
  :root {
    --page-padding: 2rem;
  }
}

.project-title {
  position: fixed;
  z-index: 9999;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;

  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;

  padding: 1.2rem 2rem;                      /* repli sans variables CSS */
  padding: 1.2rem var(--page-padding);
  padding-bottom: 1.2rem;                    /* repli sans env() / max() */
  padding-bottom: max(1.2rem, env(safe-area-inset-bottom));

  pointer-events: none;
  isolation: isolate;
}

/* =========================
   FOND GLASSMORPHISM
   ========================= */

   .project-title::before {
     content: "";
     position: absolute;

     /* Prolonge le flou au-dessus des textes
        (repli pour les navigateurs sans "inset") */
     top: -120px;
     right: 0;
     bottom: 0;
     left: 0;
     inset: -120px 0 0 0;

     z-index: 0;

     background: rgba(255, 255, 255, 0);

     -webkit-backdrop-filter: blur(15px) saturate(150%);
     backdrop-filter: blur(15px) saturate(150%);

     /* Dégradé progressif du flou */
     -webkit-mask-image: linear-gradient(
       to top,
       rgba(0, 0, 0, 1) 0%,
       rgba(0, 0, 0, 0.9) 25%,
       rgba(0, 0, 0, 0.6) 50%,
       rgba(0, 0, 0, 0.25) 75%,
       rgba(0, 0, 0, 0) 100%
     );

     mask-image: linear-gradient(
       to top,
       rgba(0, 0, 0, 1) 0%,
       rgba(0, 0, 0, 0.9) 25%,
       rgba(0, 0, 0, 0.6) 50%,
       rgba(0, 0, 0, 0.25) 75%,
       rgba(0, 0, 0, 0) 100%
     );

     pointer-events: none;
   }

/* Navigateurs sans backdrop-filter : fond blanc léger à la place du flou */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .project-title::before {
    background: rgba(255, 255, 255, 0.7);
  }

  .dropdown-menu {
    background: rgba(255, 255, 255, 0.92);
  }

  .header::before {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9) 10%, rgba(255, 255, 255, 0) 100%);
  }
}

/* =========================
   STYLE COMMUN
   ========================= */

.project-title h1,
.project-category,
.project-date {
  position: relative;
  z-index: 1;

  box-sizing: border-box;
  margin: 0;
  padding: 0;

  color: lightgrey;
  font-family: "Switzer", sans-serif;
  line-height: 1;
  white-space: nowrap;
}

/* =========================
   TITRE : CENTRE
   ========================= */

.project-title h1 {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: end;

  font-family: "Switzer_Bold", sans-serif;
  font-size: 1.5rem;                                /* repli sans clamp() */
  font-size: clamp(1.2rem, 2vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  text-align: center;
}

/* =========================
   DESCRIPTION : GAUCHE
   ========================= */

.project-category {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: end;

  font-size: 0.8rem;                                /* repli sans clamp() */
  font-size: clamp(0.65rem, 0.9vw, 1.5rem);
  font-weight: 700;
  text-align: left;
}

/* =========================
   ANNÉE : DROITE
   ========================= */

.project-date {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: end;

  font-size: 0.8rem;                                /* repli sans clamp() */
  font-size: clamp(0.65rem, 0.9vw, 1.5rem);
  font-weight: 700;
  text-align: right;
}

/* =========================
   TABLETTES ET MOBILES
   (media query imbriqué corrigé : un seul niveau)
   ========================= */

@media (max-width: 600px) {

  .project-title {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    -webkit-column-gap: 0.6rem;
    column-gap: 0.6rem;
    align-items: end;
    padding: 0 0.75rem 0.75rem;                                      /* repli sans env() */
    padding: 0 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  /* Le texte sur plusieurs lignes est plus haut : le flou monte davantage */
  .project-title::before {
    top: -100px;
    inset: -100px 0 0 0;
  }

  .project-title h1,
  .project-category,
  .project-date {
    white-space: normal;       /* retours à la ligne autorisés */
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;             /* pas de trait d'union */
    overflow-wrap: normal;     /* on ne coupe jamais un mot */
    word-wrap: normal;
    word-break: normal;
    text-wrap: balance;        /* lignes équilibrées (ignoré par les anciens navigateurs) */
    line-height: 1.15;
    min-width: 0;              /* permet à la colonne de rétrécir */
    padding: 0.5rem 0.25rem;
  }

  /* Titre : coupe plus tôt grâce à max-width */
  .project-title h1 {
    max-width: 14ch;
    font-size: 1.3rem;                              /* repli sans clamp() */
    font-size: clamp(1.1rem, 5vw, 1.6rem);
    letter-spacing: -0.02em;
    text-align: center;
  }

  /* Catégorie et date : colonnes plus étroites */
  .project-category,
  .project-date {
    max-width: 9ch;
    font-size: 0.9rem;                              /* repli sans clamp() */
    font-size: clamp(0.8rem, 3.4vw, 1rem);
    letter-spacing: 0;
  }

  .project-category {
    text-align: left;
  }

  .project-date {
    text-align: right;
  }
}
