/* ═══════════════════════════════════════════════════════════════
   JADE BANGOURA — Portfolio
   Style minimaliste contemporain
   ═══════════════════════════════════════════════════════════════ */


/* ─── VARIABLES ─────────────────────────────────────────────────
   Les "variables" permettent de centraliser les valeurs.
   Pour changer une couleur sur tout le site, tu modifies ici.
   ──────────────────────────────────────────────────────────────── */
:root {
  --color-bg:      #ffffff;
  --color-text:    #1a1a1a;
  --color-muted:   #888888;
  --color-border:  #e8e8e8;

  --font-display:  'Cormorant Garamond', serif;   /* titres */
  --font-body:     'Inter', sans-serif;            /* textes */

  --space-xs:  0.5rem;    /*  8px */
  --space-sm:  1rem;      /* 16px */
  --space-md:  2rem;      /* 32px */
  --space-lg:  4rem;      /* 64px */
  --space-xl:  8rem;      /* 128px */

  --nav-height: 64px;
  --max-width:  1200px;
  --max-narrow: 720px;
}


/* ─── RESET & BASE ──────────────────────────────────────────────
   Neutralise les styles par défaut des navigateurs.
   ──────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;        /* défilement doux au clic sur les liens */
  scroll-padding-top: var(--nav-height);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;              /* l'image remplit son cadre sans se déformer */
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}


/* ─── NAVIGATION ────────────────────────────────────────────────── */
.nav {
  position: fixed;                /* reste visible en haut pendant le défilement */
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;  /* logo | liens centrés | espace */
  align-items: center;
  padding: 0 var(--space-md);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);     /* effet verre dépoli */
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.nav__links {
  display: flex;
  gap: var(--space-lg);             /* plus d'espace entre les liens */
}

.nav__links a {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: var(--space-sm) var(--space-xs); /* zone cliquable plus grande */
  transition: color 0.2s;
}

.nav__links a:hover {
  color: var(--color-text);
}

/* Bouton hamburger (caché sur desktop, à droite sur mobile) */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  justify-self: end;                /* colle à droite dans la grille */
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-text);
  transition: all 0.3s;
}


/* ─── HERO ──────────────────────────────────────────────────────── */
.hero {
  padding-top: var(--nav-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.hero__text {
  text-align: center;
  padding-top: var(--space-lg);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);  /* taille adaptative selon l'écran */
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.hero__subtitle {
  margin-top: var(--space-xs);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.hero__image-wrap {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 4 / 3;             /* ratio fixe : 4 unités de large pour 3 de haut */
  overflow: hidden;
  padding: 0 var(--space-md);
}

.hero__image {
  transition: transform 0.8s ease;
}

.hero__image-wrap:hover .hero__image {
  transform: scale(1.02);
}


/* ─── SECTIONS ──────────────────────────────────────────────────── */
.section {
  padding: var(--space-xl) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.section--narrow {
  max-width: var(--max-narrow);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-lg);
  position: relative;
}

/* Ligne décorative sous le titre */
.section__title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--color-text);
  margin-top: var(--space-sm);
}


/* ─── GALERIE ───────────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* 3 colonnes sur desktop */
  gap: var(--space-sm);
}

.gallery__item {
  aspect-ratio: 3 / 4;              /* format portrait, comme une toile */
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--color-border);
}

.gallery__item img {
  transition: transform 0.5s ease;
}

.gallery__item:hover img {
  transform: scale(1.04);           /* léger zoom au survol */
}

/* Titre de l'œuvre au survol */
.gallery__item::after {
  content: attr(data-title);        /* récupère le data-title de l'HTML */
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm);
  background: linear-gradient(transparent, rgba(0,0,0,0.4));
  color: white;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery__item:hover::after {
  opacity: 1;
}


/* ─── À PROPOS ──────────────────────────────────────────────────── */

/* Deux colonnes principales, équilibrées */
.apropos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* Colonne gauche : photo en haut à gauche, biographie à droite de la photo */
.apropos__bio {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

/* Photo petite — hauteur d'environ deux paragraphes */
.apropos__portrait-wrap {
  flex-shrink: 0;
  width: 110px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.apropos__portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  filter: grayscale(15%);
  transition: filter 0.5s;
}

.apropos__portrait-wrap:hover .apropos__portrait {
  filter: grayscale(0%);
}

.apropos__text {
  font-size: 1rem;
  color: #333;
  line-height: 1.8;
  margin-bottom: var(--space-md);
}

.apropos__text:last-child {
  margin-bottom: 0;
}

.apropos__link {
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  font-style: italic;
  transition: opacity 0.2s;
}

.apropos__link:hover {
  opacity: 0.5;
}


/* ─── CONTACT ───────────────────────────────────────────────────── */
.contact__intro {
  color: var(--color-muted);
  margin-bottom: var(--space-md);
}

.contact__email {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s;
  display: inline-block;
}

.contact__email:hover {
  opacity: 0.5;
}


/* ─── FOOTER ────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-md);
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-muted);
  letter-spacing: 0.1em;
}


/* ─── LIGHTBOX ──────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;                         /* couvre tout l'écran */
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  z-index: 200;
  opacity: 0;
  pointer-events: none;             /* invisible et non-cliquable par défaut */
  transition: opacity 0.3s;
  padding: var(--space-md);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__title {
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.lightbox__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  line-height: 1;
}

.lightbox__close:hover {
  opacity: 1;
}


/* ─── RESPONSIVE — TABLETTE (≤ 768px) ──────────────────────────── */
@media (max-width: 768px) {
  .apropos {
    grid-template-columns: 1fr;     /* une colonne sur tablette/mobile */
  }
  .gallery {
    grid-template-columns: repeat(2, 1fr);   /* 2 colonnes sur tablette */
  }

  .nav__toggle {
    display: flex;
  }

  .nav__links {
    display: none;                  /* caché par défaut sur mobile */
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
  }

  .nav__links.is-open {
    display: flex;                  /* affiché quand le bouton est cliqué */
  }
}


/* ─── RESPONSIVE — MOBILE (≤ 480px) ────────────────────────────── */
@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;    /* 1 colonne sur mobile */
  }

  .section {
    padding: var(--space-lg) var(--space-sm);
  }
}
