/* ==========================================================================
   PORTFOLIO ÉDITORIAL ÉNORA DENIS - V4 - TEST Enora
   ========================================================================== */

/* Typography */
:root {
  --font-editorial: 'Helvetica', 'Arial', sans-serif;
  
  --bg-color: #FFF; /* Elegant off-white / bone */
  --text-color: #000;
  --text-visited: rgba(0,0,0, 0.3);
  --border-color: rgba(0, 0, 0, 1);
  
  --gap: 20px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);

  /* Définissez les variables de sélection globale ici */
  --selection-bg: #b600ff; /* Couleur de fond du surlignage */
  --selection-color: #FFF; /* Couleur du texte surligné */
  /* Valeurs inversées pour neutraliser l'effet de mix-blend-mode: difference sur la sidebar*/
  --selection-bg-inv: #49ff00; /* #ffffff - #b600ff = #49ff00 */
  --selection-color-inv: #000000; /* #ffffff - #ffffff = #000000 */
}

::selection {
  background-color: var(--selection-bg);
  color: var(--selection-color);
}
::-moz-selection {
  background-color: var(--selection-bg);
  color: var(--selection-color);
}

/* Inversion pour neutraliser le blend-mode sur la sidebar de gauche et le menu fixe de droite */
.project-sidebar *::selection,
.project-sidebar::selection,
.right-navigation-container *::selection,
.right-navigation-container::selection {
  background-color: var(--selection-bg-inv);
  color: var(--selection-color-inv);
}
.project-sidebar *::-moz-selection,
.project-sidebar::-moz-selection,
.right-navigation-container *::-moz-selection,
.right-navigation-container::-moz-selection {
  background-color: var(--selection-bg-inv);
  color: var(--selection-color-inv);
}

/* Reset & Basics */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-editorial);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.3;/* ICI gestion globale du line-height */
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

iframe {
  border: none;
  width: 100%;
}

/* ==========================================================================
   LAYOUT PRINCIPAL (12 colonnes)
   ========================================================================== */

.page-layout-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  width: 100%;
  min-height: 100vh;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ==========================================================================
   COLONNES 1-2 : SIDEBAR MÉTADONNÉES PROJET (STICKY)
   ========================================================================== */

.project-sidebar {
  mix-blend-mode: difference;
  color:#FFF; /*diff black*/
  grid-column: 1 / span 2;
  font-weight:400;
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  height: auto;
  align-self: start;
  display: flex;
  flex-direction: column;
  font-size:1rem;/*18px*/
  /*line-height: 1.4; */
  /*-> line-height 1.3 définis dans le body{} s'applique*/
}
.project-sidebar-content{
  width:150%; /*dépasse de la grille de 50% jusqu'à 2.5*/
}

/* ==========================================================================
   COLONNES 3-9 : ZONE D'AFFICHAGE DES BLOCS ÉDITORIAUX
   ========================================================================== */

.editorial-blocks-container {
  grid-column: 3 / span 7; /* Cols 3 à 9 */
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 80px;
}

/* Structure de sous-grille interne (7 colonnes) pour aligner médias et légendes */
.editorial-block {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--gap);
  width: 100%;
  align-items: end; /* Aligner la légende en bas du média */
}
.editorial-block a{
  transition:0.2s;
}
.editorial-block a:hover{
  text-decoration:underline;
}

/* Styles communs pour les légendes éditoriales */
.editorial-caption {
  font-size: 0.8125rem; /*13px*/
  /*line-height: 1.4; */
  /*-> line-height 1.3 définis dans le body{} s'applique*/
  text-align: right;
  align-self: end;
  margin-bottom: 0;
}
.editorial-caption p {
  margin: 0;
}

/* Block Image / Vidéo Droite (Média Cols 7-9 / Légende Cols 4-6) */
.media-right-container {
  grid-column: 5 / span 3; /* Cols 5-7 de la sous-grille = Cols 7-9 de la grille principale */
}
.caption-right-container {
  grid-column: 2 / span 3; /* Cols 2-4 de la sous-grille = Cols 4-6 de la grille principale */
}

/* Block Image / Vidéo Pleine Largeur (Média Cols 5-9 / Légende Cols 3-4) */
.media-full-container {
  grid-column: 3 / span 5; /* Cols 3-7 de la sous-grille = Cols 5-9 de la grille principale */
}
.caption-full-container {
  grid-column: 1 / span 2; /* Cols 1-2 de la sous-grille = Cols 3-4 de la grille principale */
}

/* Block Image / Vidéo Gauche (Média Cols 5-7 / Légende Cols 3-4) */
.media-left-container {
  grid-column: 3 / span 3; /* Cols 3-5 de la sous-grille = Cols 5-7 de la grille principale */
}
.caption-left-container {
  grid-column: 1 / span 2; /* Cols 1-2 de la sous-grille = Cols 3-4 de la grille principale */
}

/* Block Duo d'Images (2 images prenant 2.5 cols chacune / Légende Cols 3-4) */
.media-duo-wrapper {
  grid-column: 3 / span 5; /* Cols 5-9 de la grille principale */
  display: flex;
  gap: 10px;
  width: 100%;
}
.media-duo-item {
  flex: 1;
}
.media-duo-item img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

/* Block Texte Centré (Cols 5-9 de la grille principale) */
.block-text-centered {
  grid-column: 3 / span 5; /* Cols 5-9 de la grille principale */
  font-size: 1rem;
  /*line-height: 1.4; */
  /*-> line-height 1.3 définis dans le body{} s'applique*/
  text-align: left;
  padding:120px 0; /*120px d'espace en haut et en bas*/
  /* Texte justifié forcé en css
  text-align: justify !important; */
}
.block-text-centered p {
  margin: 0 0 1.5em 0;
}
.block-text-centered p:last-child {
  margin-bottom: 0;
}

/* Vidéo aspect ratio standard */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  width: 100%;
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   COLONNES 10-12 : MENU FIXE GLOBAL & SOUS-MENU SCROLLABLE
   ========================================================================== */

.right-navigation-container {
  grid-column: 10 / span 3; /* Cols 10 à 12 */
  position: fixed;
  top: 20px;
  right: 20px;
  width: calc(3 * ((100vw - 20px - 11 * 20px) / 12) + 2 * 20px);
  z-index: 101;
  mix-blend-mode: difference;
  pointer-events: none;
}

/* Menu principal */
.site-menu {
  font-size: 1rem;
  font-weight: 400;
  width: 100%;
  pointer-events: auto;
  text-align: right;
  color:white;
  padding-right:0px;/*Permet d'ajouter de l'espace à droite si besoin*/
}
.site-menu a {
  color: #ffffff; /* Différence avec fond clair donne du noir, et avec texte noir donne du blanc */
  display: inline-block;
}
.site-menu a:hover,
.site-menu a.active {
  color: #ffffff; /* Différence avec fond clair donne du noir, et avec texte noir donne du blanc */
  text-decoration: underline;
}
.site-menu a.disabled {
    opacity: 0.3;
    pointer-events: none; /* Rapproche le lien non cliquable */
    cursor: default;
  }

/* Wrapper pour positionner le sous-menu de façon absolue sous le lien */
.menu-item-with-submenu {
  position: relative;
  display: inline-block;
  pointer-events: auto;
}

/* Sous-menu positionné de façon absolue sous Énora Denis (hérite du Blend Mode) */
.right-projects-container {
  position: absolute;
  top: 100%;
  left: 0;
  width: 240px;
  z-index: 99;
  margin-top: 15px;
  pointer-events: auto;
}



/* Liste verticale des projets (Sous-menu sous Énora Denis) */
.project-vertical-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left; /* Aligné à gauche */
  align-items: flex-start; /* Aligné à gauche */
  font-size: 1rem;
  /* Scroll si le contenu dépasse la hauteur d'écran */
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  
  /* Discret scrollbar */
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 17, 17, 0.2) transparent;
}
@media (min-width: 1024px) {
  .right-projects-container {
    display:block;
    max-width: 237px;
  }
}
@media (min-width: 1200px) {
  .site-menu {
    font-size: 1rem;  
  }
  .right-projects-container {
    max-width: 266px;
  }
  .project-vertical-list {
    font-size: 1rem;/*18px*/
  }
}

/* Scrollbar styling for Webkit browsers */
.project-vertical-list::-webkit-scrollbar {
  width: 4px;
}
.project-vertical-list::-webkit-scrollbar-track {
  background: transparent;
}
.project-vertical-list::-webkit-scrollbar-thumb {
  background-color: rgba(17, 17, 17, 0.2);
  border-radius: 2px;
}

.project-list-link {
  color: #ffffff; /* Différence avec fond clair donne du noir */
}

/* État pour les liens visités */
.project-list-link:visited {
  color: #888888; /* Différence avec fond clair donne du gris (effet muted) */
}
.project-list-link.active {
  text-decoration: underline;
  color: #ffffff !important;
}
/* État actif / survol (override le :visited) */
.project-list-link:hover {
  text-decoration: underline;
  color: #ffffff !important;
}

/* Espace vide pour réserver les colonnes de navigation sur les templates */
.right-navigation-placeholder {
  grid-column: 10 / span 3;
  pointer-events: none;
}

/* ==========================================================================
   PAGE À PROPOS (3 colonnes éditoriales alignées)
   ========================================================================== */

.about-left-col {
  grid-column: 1 / span 2; /* Cols 1-2 */
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.about-contact-section h3 {
  font-size:1rem;
  margin-bottom:20px;
  font-weight:normal;
}
.about-contact-section p,
.about-contact-section ul {
  font-size: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-portrait-img {
  width: 100%;
  filter: grayscale(100%);
}

.about-center-col {
  grid-column: 4 / span 3; /* Cols 4-6 */
  display: flex;
  flex-direction: column;
  gap: 30px;
  
}

.expositions-section h3 {
  /*font-size:1.125rem;*/
  font-size:1rem;
  margin-bottom:20px;
  font-weight:normal;
}

.exposition-item {
  margin-bottom: 20px;
  font-size:1rem;
  /*line-height: 1.4; */
  /*-> line-height 1.3 définis dans le body{} s'applique*/
}
.exposition-date {
  display: block;
}
.exposition-title {
  font-style: italic;
}

.about-right-col {
  grid-column: 8 / span 5; /* Cols 8-12 */
  font-size: 1rem;
  /*line-height: 1.6;*/
  padding-top: 20px; 
}

@media (max-width: 1024px) {
  .about-right-col {
    padding-top: 0;
  }
}

.about-right-col p {
  margin: 0 0 1.5em 0;
}
.about-right-col p:last-child {
  margin-bottom: 0;
}
.about-bio-block{
  margin-bottom: 80px;
  /* Coupe les mots pour justifier le contenu, les lignes et espaces sont plus proches, mais il y a des césures */
    /*overflow-wrap: break-word;*/
    hyphens: auto;
  /* justifie la ligne en ajoutant de l'espace entre les lettres*/
     /*text-justify: inter-word;*/
}
.about-author-header {
  font-size:1rem;
  margin-bottom:20px;
  font-weight:normal;
  max-width:calc(100% - 290px);
}
.about-content{
  font-size:1rem; /*28px*/
  /*line-height: 1.3; */
  /*-> line-height 1.3 définis dans le body{} s'applique*/
  /* Texte justifié forcé en css
  text-align: justify !important; */
}
.about-content p:before{
  content:"\2009\2009\2009\2009\2009";/*5 espaces devant le début des paragraphes*/
  display:inline-block;
}
/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE) - MOBILE
   ========================================================================== */

@media (max-width: 1024px) {
  .page-layout-grid {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
  
  .project-sidebar {
    position: static;
    transform: none;
    width: 100%;
    margin-bottom: 20px;
  }
  
  .editorial-blocks-container {
    width: 100%;
    gap: 40px;
    padding-bottom: 0;
  }
  
  .editorial-block {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  
  .media-right-container,
  .media-full-container,
  .media-left-container,
  .media-duo-wrapper,
  .block-text-centered {
    width: 100%;
  }
  .media-right-container{
    padding-left:90px;
  }
  .media-left-container{
    padding-right:90px;
    
  }
  .block-text-centered{
    padding:60px 0;
  }
  
  .caption-right-container,
  .caption-full-container,
  .caption-left-container {
    width: 100%;
    text-align: right;
    order: 2; /* Légende sous le média */
  }
  
  /* on garde la disposition 2 images cote à cote
  .media-duo-wrapper {
    flex-direction: column;
  } */
  
  /* Menu fixe repositionné sur mobile */
  .right-navigation-container {
    position: fixed;
    width: 100%;
    top:0;
    left:0;
    background: white;
    mix-blend-mode: normal;
    order: -1; /* Placer le menu tout en haut sur mobile */
  }
  
  .site-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    align-items: center;
    justify-content: center;
    font-size:1.125rem;
    justify-content: space-between;
    padding: 60px 20px 20px;
    color:var(--text-color);
  }
  .site-menu a,
  .site-menu a:hover, 
  .site-menu a.active{
    color:var(--text-color);
  }
   .site-menu .menu-separator{
    display:none;
   }
   
   .right-navigation-container{
    flex-direction: row;
    height:auto;
    max-width:none;
    width:100%;
   }
  .project-sidebar-content {
    width: 100%;
  }
  /* Conteneur de projets sur mobile (complètement masqué dans le header) */
  .right-projects-container,
  .right-projects-container.mobile-visible {
    display: none !important;
  }
  
  /* Liste verticale des projets sur mobile */
  .project-vertical-list {
    display: none;
  }
  
  /* About page mobile stack */
  .about-left-col,
  .about-center-col,
  .about-right-col {
    width: 100%;
  }
  .page-layout-grid{
    padding-top:120px;
  }
  /*inversion de l'ordre*/
  .about-left-col{
    order:3;
    padding-right:33%;
  }
  .about-center-col{
    order:2;
  }
  .about-right-col{
    order:1;
  }
  .about-author-header{
    max-width:100%;
  }
  .about-content {
    font-size: 1.375rem;/*22px*/
    /*line-height: 1.3; */
  /*-> line-height 1.3 définis dans le body{} s'applique*/
  }
}

/* ==========================================================================
   BARRE DE NAVIGATION PROJET FIXE SUR MOBILE
   ========================================================================== */

.mobile-project-nav-bar {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-project-nav-bar {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    padding: 10px 0;
    z-index: 1000;
  }
  .mobile-nav-links,
  .mobile-select-wrapper{
    padding: 0 20px;
  }
  
  /* Espacement de sécurité pour éviter le chevauchement avec la barre fixe */
  .page-layout-grid {
    padding-bottom: 160px !important;
  }
  
  .mobile-nav-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 12px;
    font-size: 0.95rem;
  }
  
  .nav-prev-link,
  .nav-next-link {
    color: var(--text-color);
    text-decoration: none;
  }
  
  .nav-prev-link.disabled,
  .nav-next-link.disabled {
    opacity: 0.5;
    pointer-events: none;
  }
  
  .mobile-select-wrapper {
    position: relative;
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    display: flex;
    align-items: center;
  }
  
  .mobile-project-select {
    width: 100%;
    font-family: var(--font-editorial);
    font-size: 1.1rem;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding: 5px 24px 5px 0;
  }
  
  .select-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1.1rem;
    color: var(--text-color);
  }
}
