/* -------------------- BASE -------------------- */
body {
  font-family: "Helvetica Neue", "Poppins", "Segoe UI", sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: #111;
  margin: 0;
  padding: 0;
  background: #fff;
  line-height: 1.5;
}

/* -------------------- HEADER -------------------- */
header {
  position: absolute;
  top: 60px;
  left: 60px;
  line-height: 1.2;
}

header h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 40px 0;
  letter-spacing: 3px;
  text-transform: uppercase;
}

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

header h1 a.home-link:hover {
  opacity: 0.6;
}

header h2 {
  font-size: 13px;
  font-weight: 300;
  color: #333;
  margin: 0 0 3px 0;
}

header h3 {
  font-size: 13px;
  font-weight: 300;
  color: #999;
  margin: 0;
  letter-spacing: 0.3px;
}

/* -------------------- NAV -------------------- */
nav {
  position: absolute;
  top: 200px;
  left: 60px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

nav a {
  text-decoration: none;
  color: #111;
  font-size: 13px;
  transition: opacity .2s ease;
}

nav a:hover {
  opacity: 0.6;
}

/* -------------------- HERO -------------------- */
.hero {
  width: 100%;
  height: 100vh;
}

/* -------------------- PANELS -------------------- */
.panel {
  display: none;
  opacity: 0;
  transform: translateX(50px);
  transition: all .3s ease;
  position: absolute;
  top: 60px;
  left: 300px;
  right: 60px;
  bottom: 60px;
  background: rgba(255,255,255,0.97);
  padding: 30px;
  border-left: 1px solid #ddd;
  overflow-y: auto;
}

.panel.visible {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* -------------------- TEXTE -------------------- */
.panel-text,
.project-text {
  max-width: 500px;
  font-size: 13px;
  line-height: 1.6;
}

.panel-text.wide {
  max-width: 100%;
}

/* ------- GRID 2 COLONNES POUR "À PROPOS" ------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 900px;
}

.about-col {
  max-width: 420px;
}

.about-header .subtitle {
  margin-left: 10px;
  color: #999;
  font-weight: 300;
}

.panel p,
.project-text p {
  margin: 0 0 4px 0;
  color: #333;
  font-weight: 300;
}

.panel a {
  color: #111;
  text-decoration: none;
}

.panel a:hover {
  opacity: .6;
}

/* -------------------- PROJETS (panneau) -------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.project-card {
  text-decoration: none;
  color: #111;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card p {
  margin-top: 8px;
  font-size: 12px;
}

/* -------------------- PAGE PROJET -------------------- */
.project-layout {
  position: relative;
  margin: 80px 60px 40px 300px;
  display: flex;
  gap: 60px;
  align-items: flex-start;
}

/* Titre projet */
.project-title {
  font-size: 11px;      /* même taille que le texte */
  font-weight: 400;     /* gras mais pas trop lourd (700 si tu veux plus fort) */
  margin: 0 0 12px 0;   /* garde juste un petit espace dessous */
}

/* --------- CHEVRON + TITRE (au-dessus du texte) --------- */
.project-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.back-arrow {
  font-size: 15px;
  color: #dadada;
  text-decoration: none;
  margin-right: 10px;
  font-weight: 300;
  line-height: 1;
}

.back-arrow:hover {
  color: #c7c7c7;
}

/* -------------------- COLONNE IMAGE (FIXE) -------------------- */
.project-image-viewer {
  flex: 0 0 520px;   /* ← largeur fixe pour que le texte ne bouge jamais */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.project-image-wrapper {
  position: relative;
  width: 520px;      /* ← largeur figée */
  max-width: 520px;  /* ← idem */
}

.project-main-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='4' cy='4' r='3' fill='white' /%3E%3C/svg%3E") 4 4, auto;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.project-main-img.loaded {
  opacity: 1;
}

/* Flèches latérales */
.viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 15px;
  color: #cbcbcb;
  cursor: pointer;
  padding: 0;
  font-weight: 300;
}

.viewer-arrow:hover {
  color: #888;
}

.viewer-arrow.prev {
  left: -37px;
}

.viewer-arrow.next {
  right: -37px;
}

.project-caption {
  margin-top: 10px;
  font-size: 14px;
  color: #444;

  text-align: left;      /* ALIGNEMENT À GAUCHE */
  width: 100%;           /* OCCUPE TOUTE LA LARGEUR DE LA COLONNE */
  padding-left: 0;       /* pas d’indentation */
}

/* -------------------- LIGHTBOX -------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.97);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: 80vw;
  max-height: 80vh;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.lightbox-image.loaded {
  opacity: 1;
}

.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 15px;
  color: #cbcbcb;
  cursor: pointer;
  padding: 0;
  font-weight: 300;
}

.lightbox .nav:hover {
  color: #888;
}

.lightbox .nav.prev {
  left: 40px;
}

.lightbox .nav.next {
  right: 40px;
}

/* Scrollbar minimal */
.panel::-webkit-scrollbar {
  width: 2px;
}

.panel::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.panel::-webkit-scrollbar-track {
  background: transparent;
}

.panel:hover::-webkit-scrollbar-thumb {
  background-color: rgba(185, 185, 185, 0.15);
}

/* Message construction */
.construction-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 300;
  color: #111;
  letter-spacing: 1px;
  opacity: 0.6;
}
/* Page projet 6 : afficher toute la couverture sans recadrage */
.article-cover {
  object-fit: contain !important;   /* montre 100% de l'image */
  background: #ffffff;              /* blanc autour */
  padding: 10px;                    /* petit bord blanc */
}

/* COLONNE TEXTE : référence d'alignement */
.project-text {
    width: 500px;
    max-width: 500px;
    padding-left: 0;          /* IMPORTANT */
    margin-left: 0;           /* IMPORTANT */
    text-align: left;
}

/* CONTENEUR DU TITRE ET CHEVRON */
.project-header {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 0 20px 0;
    padding: 0;
}

/* CHEVRON : EXACTEMENT 1cm À GAUCHE DU TITRE */
.back-arrow {
    position: absolute;
    left: -1cm;                /* ← pile 1 cm */
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #cfcfcf;
    text-decoration: none;
    font-weight: 300;
}

/* TITRE : ALIGNÉ AU TEXTE, PAS DE MARGE */
.project-title {
    margin: 0;                 /* pas d’espace bizarre autour */
    padding: 0;
    text-align: left;
    font-size: 13px;           /* même taille que le texte */
    line-height: 1.6;          /* même feeling que les paragraphes */
    font-weight: 600;          /* en gras */
}

.project-image-viewer {
    text-align: left;     /* force tout à s'aligner à gauche */
}

.project-caption {
    margin-top: 10px;
    font-size: 12px;
    color: #444;
    text-align: left;      /* légende alignée à gauche */
    padding-left: 0;
    display: block;
    width: fit-content;    /* largeur = largeur réelle de la légende */
    max-width: 100%;
}
.project-main-img {
    display: block;
    margin-left: 0;

    
}

/* BOUTON X EN HAUT À DROITE DE LA LIGHTBOX */
.lightbox-close {
    position: fixed;             /* reste en haut même quand l’image défile */
    top: 20px;                   /* espace du bord supérieur */
    right: 20px;                 /* espace du bord droit */
    font-size: 24px;             /* taille du X */
    color: #cfcfcf;              /* même gris que tes chevrons */
    background: none;            /* aucun fond */
    border: none;                /* pas de bordure */
    padding: 0;
    cursor: pointer;
    z-index: 2000;               /* passe au-dessus de tout */
    font-weight: 300;            /* comme tes chevrons */
    line-height: 1;
}

.lightbox-close:hover {
    color: #b5b5b5;              /* léger hover, comme tes flèches */
}
/* Légende alignée sous l’image */
.project-caption {
  margin-top: 6px;
  margin-left: 20px;
  font-size: 12px;
  color: #444;
  text-align: left;
  width: 520px;     /* exactement la largeur de .project-image-wrapper */
  max-width: 520px;
  padding-left: 0;
}
/* ================== VERSION MOBILE ================== */
@media (max-width: 900px) {

  /* On NE TOUCHE PAS au header ni au nav (ils restent comme desktop) */

  /* Panneaux : doivent s'afficher SOUS le menu, jamais à droite */
  .panel {
    position: static !important;         /* enlève absolute */
    top: auto !important;
    left: auto !important;               /* enlève left:300px du desktop */
    right: auto !important;
    bottom: auto !important;
    transform: none !important;          /* enlève slide horizontal */
    opacity: 1 !important;
    display: none !important;            /* caché par défaut */
    width: calc(100% - 40px) !important;
    margin: 40px 20px !important;        /* pile sous le menu */
    padding: 20px 0 !important;
    border-left: none !important;
    border-top: 1px solid #ddd !important;
    background: #fff !important;
  }

  .panel.visible {
    display: block !important;           /* s'affiche enfin dessous */
  }

  /* Contenu À propos : 1 seule colonne */
  .about-grid {
    display: block !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .about-col {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Grille des projets : 1 par ligne */
  .projects-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Page projet : empiler texte puis image */
  .project-layout {
    flex-direction: column !important;
    margin: 40px 20px !important;
    gap: 40px !important;
  }

  .project-text,
  .project-image-viewer {
    width: 100% !important;
    max-width: 100% !important;
  }
}