/* SYSTEME DE GRILLE & BASES */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


body {
  font-family: 'SuisseIntl', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: #000;
  background-color: #fff  ;
}


a {
  color: #000;
  text-decoration: underline;
  cursor: pointer;
}

.SuisseIntlScreen {
  font-family: 'SuisseIntlScreen';
  font-size: 25px;
}

a:hover {
  opacity: 1;
}

iframe {
  width: 100%;
  aspect-ratio: 16/9;
}

/* VUES */
.view {
  display: none;
  margin: 0 auto;
}

.view.active {
  display: block;
}

/* Fondu uniquement sur ce qui change entre les pages (header et copyright restent fixes) */
.view.active .sidebar-content,
.view.active .home-content {
  animation: Show .5s;
}

@keyframes Show {
  from {opacity: 0;}
  to {opacity: 1;}
}

/* ACCUEIL : colonne gauche fixe, colonne droite en scroll */
.home-layout.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.75rem;
  padding: 1rem;
}

.home-sidebar {
  grid-column: 1;
  position: sticky;
  top: 1.25rem;
  height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.home-header h1 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em; /* les grandes tailles en gras gagnent à être resserrées */
  text-transform: lowercase;
  white-space: nowrap;
}

.home-header .home-link {
  color: inherit;
  text-decoration: none;
}

.home-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.home-header .contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 15px;
}

.home-brand .subtitle {
  margin-top: 0.2em; /* collé au nom pour former un seul bloc */
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
}

.home-content {
  grid-column: 2;
}

/* Container des descriptions (parcours, jeu indépendant, photo) */
.sidebar-content {
  margin-top: 0rem;   /* espace sous le header */
  --sidebar-content-gap: 2.75rem;   /* espace entre les blocs */
  --sidebar-content-width: 80%;  /* largeur des textes */

  display: flex;
  flex-direction: column;
  gap: var(--sidebar-content-gap);
  margin-top: var(--sidebar-content-top);
  /* 62ch max : environ 60-70 caractères par ligne pour une lecture confortable */
  max-width: min(var(--sidebar-content-width), 62ch);
  /* header et copyright restent visibles, seul ce container défile si besoin */
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

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

.home-footer {
  margin-top: auto;
  flex-shrink: 0;
}

.portrait {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin-bottom:0rem;
}

.sidebar-block .section-title {
  margin-top: 0;
  margin-bottom: 0.4em;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
}

.sidebar-block .bio-section,
.sidebar-block .section-desc {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  text-wrap: pretty;
  hyphens: auto;
}

.sidebar-block .section-desc + .section-desc {
  margin-top: 0.7em;
}

.section-header {
  margin-bottom: 2.5rem;
}

.site-header {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 3.5rem;
}

.brand {
  grid-column: span 5;
}

.brand h1, .brand .home-link {
  font-size: 32px;
  font-weight: normal;
  letter-spacing: 0.05em;
  text-decoration: none;
  display: inline-block;
  font-weight: 400;
}

.subtitle {
  margin-top: 0.25rem;
  font-weight: 400;
  font-size: 20px;
  color: #111;
}

.contact-links {
  grid-column: span 2;
  grid-column-start: 12;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

/* BIO & SECTIONS */
.bio-section {
  margin-top: 15px;
  margin-bottom: 3rem;
}

.section-block {
  margin-bottom: 3.5rem;
}

.section-block.margin-top {
  margin-top: 5rem;
}

.section-block h2 {
  font-size: 19px;
  font-weight: normal;
  margin-bottom: 0.5rem;
}
.section-title {
  grid-column: span 12;
}

.section-desc {
  grid-column: span 5;
  margin-bottom: 1.5rem;
}
.external-link-head {
  text-decoration: underline;
}


/* Cartes projets */
.table-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "preview preview"
    "project contrib"
    "client  contrib"
    "year    action";
  column-gap: 1.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1.3px solid #111;
  text-decoration: none;
  color: #000;
}

.table-row > span:not(.row-preview) {
  transition: opacity 0s ease;
}

.table-row:hover > span:not(.row-preview) {
  opacity: 0.5;
}

/* Aperçu : 1 à 3 images côte à côte */
.row-preview {
  grid-area: preview;
  margin-bottom: 1rem;
}

.row-preview-inner {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 0.5rem;
}

.row-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.col-project { grid-area: project; font-weight: 600; }
.col-client { grid-area: client; }
.col-contrib { grid-area: contrib; text-align: right; }
.col-year {
  grid-area: year;
  font-size: 16px;
  font-style: italic;
  margin-top: 0rem;
  align-self: end;
}

#indie-games-list {
  margin-top: 20vh;
}

#indie-games-list .col-action {
  grid-area: action;
  justify-self: end;
  align-self: end;
  font-family: 'SuisseIntlScreen';
  font-size: 25px;
  line-height: .5;
}

.col-action {
  font-family: 'SuisseIntlScreen';
  grid-area: action;
  justify-self: end;
  align-self: center;
  font-size: 30px;
  line-height: .1;
}

.table-row.row-disabled {
  cursor: default;
}
.table-row.row-disabled:hover > span {
  opacity: 1;
}


/* VUE DETAIL PROJET (même layout que l'accueil) */
#project-detail-content {
  --sidebar-content-gap: 0;
  --sidebar-content-width: 85%;
}

.project-meta {
  margin-bottom: 3.5rem;
}

.project-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 10px;
}

.project-meta-details {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 0px;
}

.project-years {
  font-style: italic;
}

.project-contrib {
  font-size: 16px;
}

.project-description p {
  margin-bottom: 3rem;
  font-size: 18px;
}

.official-site-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 18px; /* même taille que les h2 (.section-title, .subtitle) */
}

.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-gallery img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border: 0px solid;
}

/* RESPONSIVE DESIGN (Tablettes et Mobiles - Système 4 colonnes) */

@media (max-width: 1023px) {

  /* Mobile : une seule colonne, le copyright passe tout en bas de la page */
  .home-layout.active {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    min-height: 100dvh;
    padding: 1.5rem 10px;
  }

  /* La sidebar "s'efface" pour que header, contenu et footer deviennent
     des enfants directs du layout et puissent être réordonnés */
  .home-sidebar {
    display: contents;
  }

  .home-content {
    margin-top: 0.5rem; /* 3rem au total entre la sidebar et les projets */
  }

  .home-footer {
    order: 1;          /* après .home-content */
    margin-top: auto;  /* collé en bas si la page est courte */
  }

  .home-header h1 {
    font-size: 28px;
  }

  .home-brand .subtitle {
    font-size: 15px;
    margin-top: 2px;
  }

  #project-detail-content {
    --sidebar-content-width: 100%;
  }

  .copyright {
    font-size: 12px;
  }

  .portrait {
    max-width: 175px;
    margin-left: auto;
    margin-right: auto;
  }


  .sidebar-content {
    overflow: visible;
    --sidebar-content-top: 1rem;
    --sidebar-content-gap: 2.5rem;
    --sidebar-content-width: 100%;
  }

  /* Aperçu mobile : une image visible, les autres en scroll horizontal */
  .row-preview-inner {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .row-preview-inner::-webkit-scrollbar {
    display: none;
  }

  .row-preview img {
    flex: 0 0 100%;
    scroll-snap-align: start;
  }

  #main-projects-list .table-row:first-child {
    border-top: 1.3px solid #111;
    padding-top: 0.75rem;
  }

  /* Jeux indépendants : année collée sous le titre, l'espace en trop va sous l'année */
  #indie-games-list .table-row {
    grid-template-areas:
      "preview preview"
      "project contrib"
      "year    contrib"
      ".       contrib"
      ".       action";
    grid-template-rows: auto auto auto 1fr auto;
  }

  #indie-games-list .col-year {
    align-self: start;
  }

  #indie-games-list .col-client {
    display: none;
  }

  .site-header {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
  }

  .brand {
    grid-column: span 4;
  }

  .bio-section {
    margin-bottom: 1rem;
  }

  .contact-links {
    grid-column: span 4;
    grid-column-start: 1;
    align-items: flex-start;
  }

  .section-title {
    grid-column: span 4;
  }

  .section-desc {
    grid-column: span 4;
  }
  .slide {
    width: 100vw;
  }

}


/*=====================================PHOTO=====================================*/


.body-photo {
    background-color: white;
    margin: 0;
    padding: 0;
}


.gallery {
  list-style: none;
}

.gallery li {
  display: none;
}

.gallery li.active {
  display: block;
}

.gallery li img {
    width: 100dvw;
    height: 100dvh;
    object-fit: contain;
    padding: 50px 0;
    box-sizing: border-box;
}


.slider-controls {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  bottom: 0;
  z-index: 100;

}

#prev,#next {
  cursor: none;
  width: 100%;
  height: 100%;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0);
}

#counter {
  font-size: 18px;
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.body-photo h1 {
  font-size: 18px;
  position: absolute;
  bottom: 10px;
  left: 10px;
  margin: 0;
  z-index: 1000;
  font-weight: 600;
}

.hover-label {
  position: fixed;
  pointer-events: none;
  color: white;
  mix-blend-mode: difference;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 15px;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 9999;
}

.mobile-hint {
    width: 100dvw;
    position: absolute;
    display: flex;
    justify-content: space-between;
    padding: 10px 10px;
    box-sizing: border-box;
    top: 0;
    text-transform: uppercase;
    visibility: hidden;
}

@media (max-width:800px) {
    .hover-label {
        opacity: 0;
    }

    .mobile-hint  {
        visibility: visible;
    }
}
