/* =========================================================================
   ALEXANDRE REDON — PORTFOLIO
   One-page : toutes les sections s'enchaînent verticalement, la colonne de
   gauche est une navigation par ancres (scroll + surbrillance de la
   section active). Monochrome, très épuré, sans motif décoratif.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Familjen+Grotesk:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  /* --- couleurs (monochrome) --- */
  --bg:         #ffffff;
  --ink:        #111111;   /* texte principal */
  --gray-1:     #6b6b6b;   /* sous-titres, texte secondaire */
  --gray-2:     #9a9a9a;   /* texte tertiaire / légendes */
  --gray-3:     #dcdcdc;   /* bordures visibles */
  --gray-4:     #f3f3f2;   /* fonds discrets */
  --line:       rgba(17,17,17,.11);
  --line-soft:  rgba(17,17,17,.06);
  --shadow:     0 40px 90px -30px rgba(17,17,17,.22);

  /* --- typo --- */
  --f-display: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* --- rythme --- */
  --sidebar-w: 300px;
  --topbar-h: 64px;
  --gutter: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.65,0,.35,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---------------------------------------------------------------------- */
/* Reset                                                                  */
/* ---------------------------------------------------------------------- */
*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--f-display);
  font-weight:400;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4,p{ margin:0; }
::selection{ background:var(--ink); color:#fff; }

button{
  appearance:none; -webkit-appearance:none;
  background:none; border:0; margin:0; padding:0;
  font:inherit; color:inherit; line-height:1; cursor:pointer;
}
a:focus-visible, button:focus-visible, [tabindex]:focus-visible{
  outline:1.5px solid var(--ink);
  outline-offset:3px;
}

.container{ max-width:1180px; margin:0; padding:0 var(--gutter); }

/* ---------------------------------------------------------------------- */
/* Structure générale : colonne fixe + contenu qui défile                 */
/* ---------------------------------------------------------------------- */
.shell{ display:flex; min-height:100vh; }

.sidebar{
  width:var(--sidebar-w); flex:none;
  position:fixed; top:0; left:0; bottom:0; z-index:500;
  display:flex; flex-direction:column; justify-content:space-between;
  padding:52px 44px; background:var(--bg); border-right:1px solid var(--line);
}
.sidebar__brand{ display:block; }
.sidebar__name{ display:block; font-size:19px; font-weight:600; letter-spacing:-.01em; color:var(--ink); }
.sidebar__tagline{ display:block; margin-top:10px; font-size:13px; color:var(--gray-1); line-height:1.55; max-width:20ch; }

.sidebar__nav{ display:flex; flex-direction:column; gap:3px; }
.nav__link{
  position:relative; display:block; width:fit-content;
  padding:9px 0 9px 20px; font-size:14.5px; letter-spacing:.005em;
  color:var(--gray-1);
  transition:color .3s var(--ease);
}
.nav__link::before{
  content:""; position:absolute; left:0; top:50%; width:10px; height:1px;
  background:var(--ink); transform:translateY(-50%) scaleX(0); transform-origin:left;
  transition:transform .35s var(--ease-out);
}
.nav__link:hover, .nav__link:focus-visible, .nav__link.is-active{ color:var(--ink); }
.nav__link:hover::before, .nav__link:focus-visible::before, .nav__link.is-active::before{
  transform:translateY(-50%) scaleX(1);
}

.sidebar__bottom{
  font-family:var(--f-mono); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--gray-2);
}

.menu-toggle{
  display:none; position:fixed; top:20px; right:var(--gutter); z-index:600;
  width:30px; height:20px; cursor:pointer;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after{
  content:""; position:absolute; left:0; right:0; height:1px; background:var(--ink);
  transition:transform .3s var(--ease), opacity .2s;
}
.menu-toggle span{ top:9px; }
.menu-toggle span::before{ top:-7px; }
.menu-toggle span::after{ top:7px; }
.menu-toggle.is-open span{ background:transparent; }
.menu-toggle.is-open span::before{ transform:translateY(7px) rotate(45deg); background:var(--ink); }
.menu-toggle.is-open span::after{ transform:translateY(-7px) rotate(-45deg); background:var(--ink); }

.content{ margin-left:var(--sidebar-w); flex:1 1 auto; min-width:0; }

/* chaque section est une ancre — compense la barre fixe en mobile */
section[id]{ scroll-margin-top:0; }

.section{ padding:70px var(--gutter) 80px; border-top:1px solid var(--line-soft); }
.section__head{ margin-bottom:64px; max-width:640px; }
.eyebrow{
  display:block; font-family:var(--f-mono); font-size:11px; letter-spacing:.15em;
  text-transform:uppercase; color:var(--gray-2); margin-bottom:16px;
}
.section__title{
  font-size:clamp(28px, 3.4vw, 42px); font-weight:500; letter-spacing:-.01em; line-height:1.12; color:var(--ink);
}
.section__lede{
  margin-top:18px; font-size:16.5px; color:var(--gray-1); max-width:52ch; line-height:1.65;
}

/* ---------------------------------------------------------------------- */
/* Reveal au scroll (delicat)                                             */
/* ---------------------------------------------------------------------- */
.reveal{
  opacity:0; transform:translateY(18px);
  transition:opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal.is-visible{ opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
}

/* ---------------------------------------------------------------------- */
/* Accueil / hero                                                         */
/* ---------------------------------------------------------------------- */
.hero{
  min-height:88vh; display:flex; flex-direction:column; justify-content:center;
  position:relative; padding:120px var(--gutter) 90px;
}
.hero__inner{ max-width:900px; }
.hero__eyebrow{
  font-family:var(--f-mono); font-size:12px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--gray-2); display:flex; align-items:center; gap:14px; margin-bottom:26px;
}
.hero__eyebrow::before{ content:""; width:34px; height:1px; background:var(--gray-3); }
.hero__title{
  font-size:clamp(38px, 6.4vw, 78px); font-weight:500; line-height:1.04; letter-spacing:-.02em; color:var(--ink);
}
.hero__title em{ font-style:italic; font-weight:400; color:var(--gray-1); }
.hero__sub{
  margin-top:30px; max-width:58ch; font-size:clamp(15.5px,1.4vw,18px); color:var(--gray-1); line-height:1.7;
}
.hero__actions{ margin-top:44px; display:flex; align-items:center; gap:30px; flex-wrap:wrap; }

.btn{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--f-mono); font-size:11px; letter-spacing:.1em; text-transform:uppercase;
  padding:15px 26px; border:1px solid var(--gray-3); border-radius:2px; color:var(--ink);
  transition:border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), opacity .3s var(--ease);
}
.btn:hover{ border-color:var(--ink); transform:translateY(-2px); }
.btn--solid{ background:var(--ink); color:#fff; border-color:var(--ink); }
.btn--solid:hover{ opacity:.82; }
.btn--text{ border-color:transparent; padding-left:20px; padding-right:20px; color:var(--gray-1); }
.btn--text:hover{ color:var(--ink); transform:translateX(3px); }

.hero__meta{
  margin-top:70px;
  font-family:var(--f-mono); font-size:11px; letter-spacing:.04em; color:var(--gray-2);
}
.hero__meta strong{ display:block; color:var(--gray-1); font-weight:400; margin-bottom:8px; text-transform:uppercase; letter-spacing:.14em; font-size:10.5px; }

/* ---------------------------------------------------------------------- */
/* À propos                                                                */
/* ---------------------------------------------------------------------- */
.about{ display:grid; grid-template-columns:.8fr 1.2fr; gap:clamp(40px,6vw,110px); align-items:start; }
.about__portrait{ position:relative; aspect-ratio:4/5; overflow:hidden; background:var(--gray-4); }
.about__portrait img{ width:100%; height:100%; object-fit:cover; filter:grayscale(0.3) contrast(1.04); }
.about__portrait::after{ content:""; position:absolute; inset:0; border:1px solid var(--line); pointer-events:none; }
.about__frame-label{
  position:absolute; left:14px; bottom:14px; font-family:var(--f-mono); font-size:10px;
  letter-spacing:.1em; text-transform:uppercase; color:#fff; background:rgba(17,17,17,.55);
  padding:6px 10px; backdrop-filter:blur(4px);
}
.about__text p{ font-size:16.5px; line-height:1.85; color:var(--gray-1); margin-bottom:22px; max-width:60ch; }
.about__text p:first-of-type{ color:var(--ink); font-size:18.5px; }
.about__facts{
  margin-top:44px; display:grid; grid-template-columns:repeat(2,1fr); gap:28px 40px;
  padding-top:36px; border-top:1px solid var(--line);
}
.fact dt{ font-family:var(--f-mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--gray-2); margin-bottom:8px; }
.fact dd{ margin:0; font-size:14.5px; color:var(--gray-1); line-height:1.6; }

/* ---------------------------------------------------------------------- */
/* Savoir-faire                                                            */
/* ---------------------------------------------------------------------- */
.savoir__row{
  display:grid; grid-template-columns:.85fr 1.15fr; gap:clamp(30px,5vw,90px);
  align-items:center; padding:64px 0; border-top:1px solid var(--line-soft);
}
.savoir__row:first-of-type{ border-top:0; padding-top:0; }
.savoir__row:nth-of-type(even) .savoir__media{ order:2; }
.savoir__media{ position:relative; aspect-ratio:5/4; overflow:hidden; background:var(--gray-4); }
.savoir__media img{ width:100%; height:100%; object-fit:cover; transition:transform 1.1s var(--ease-out); }
.savoir__row:hover .savoir__media img{ transform:scale(1.045); }
.savoir__index{ font-family:var(--f-mono); font-size:11.5px; color:var(--gray-2); letter-spacing:.08em; margin-bottom:14px; display:block; text-transform:uppercase; }
.savoir__title{ font-size:clamp(21px,2.2vw,27px); font-weight:500; margin-bottom:18px; color:var(--ink); }
.savoir__text{ color:var(--gray-1); font-size:15px; line-height:1.85; max-width:56ch; }

/* ---------------------------------------------------------------------- */
/* Projets — filtres + mosaïque                                            */
/* ---------------------------------------------------------------------- */
.filters{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:52px; }
.filters__btn{
  font-family:var(--f-mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase;
  color:var(--gray-1); border:1px solid var(--gray-3); padding:10px 18px; border-radius:2px;
  transition:color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease); background:transparent;
}
.filters__btn:hover{ color:var(--ink); border-color:var(--gray-1); }
.filters__btn.is-active{ color:#fff; background:var(--ink); border-color:var(--ink); }

.grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:clamp(16px,2vw,30px); }

.card{
  position:relative; cursor:pointer; overflow:hidden; background:var(--gray-4);
}
.card.is-hidden{ display:none; }

.card__frame{ position:relative; aspect-ratio:1/1; overflow:hidden; }
.card__frame img{
  width:100%; height:100%; object-fit:cover;
  transition:transform 1.2s var(--ease-out), filter .6s var(--ease);
}
.card:hover .card__frame img{ transform:scale(1.06); filter:brightness(.9); }
.card__frame::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(to top, rgba(10,10,10,.82) 0%, rgba(10,10,10,.04) 46%, transparent 70%);
}
.card__body{ position:absolute; left:0; right:0; bottom:0; padding:22px 24px; }
.card__tags{
  font-family:var(--f-mono); font-size:10px; letter-spacing:.08em; text-transform:uppercase;
  color:rgba(255,255,255,.72); margin-bottom:8px;
  opacity:.85; transform:translateY(4px); transition:transform .4s var(--ease), opacity .4s var(--ease);
}
.card__title{ font-size:20px; font-weight:500; color:#fff; transition:transform .4s var(--ease); }
.card__client{
  font-size:12.5px; color:rgba(255,255,255,.68); margin-top:4px; max-height:0; opacity:0; overflow:hidden;
  transition:max-height .4s var(--ease), opacity .3s var(--ease);
}
.card:hover .card__client{ max-height:40px; opacity:1; }
.card:hover .card__tags{ transform:translateY(0); opacity:1; }
.card__plus{
  position:absolute; top:16px; right:16px; width:36px; height:36px; border-radius:50%;
  border:1px solid rgba(255,255,255,.4); display:flex; align-items:center; justify-content:center;
  opacity:0; transform:scale(.8) rotate(-20deg); transition:all .4s var(--ease);
  background:rgba(17,17,17,.35); backdrop-filter:blur(3px); color:#fff;
}
.card:hover .card__plus{ opacity:1; transform:scale(1) rotate(0); }
.card__plus svg{ width:14px; height:14px; }

@media (max-width:900px){ .grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .grid{ grid-template-columns:1fr; } }

/* ---------------------------------------------------------------------- */
/* Modale projet                                                           */
/* ---------------------------------------------------------------------- */
.modal{
  position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center;
  padding:32px; visibility:hidden; opacity:0; transition:opacity .4s var(--ease), visibility 0s linear .4s;
}
.modal.is-open{ visibility:visible; opacity:1; transition:opacity .4s var(--ease); }
.modal__backdrop{ position:absolute; inset:0; background:rgba(15,15,14,.6); backdrop-filter:blur(6px); }
.modal__panel{
  position:relative; z-index:1; width:min(1360px, 94vw); max-height:92vh;
  background:var(--bg); border:1px solid var(--line); box-shadow:var(--shadow);
  display:grid; grid-template-columns:1.3fr 1fr; overflow:hidden;
  transform:translateY(14px) scale(.98); opacity:0;
  transition:transform .5s var(--ease-out), opacity .5s var(--ease-out);
}
.modal.is-open .modal__panel{ transform:translateY(0) scale(1); opacity:1; }

.modal__close{
  position:absolute; top:18px; right:18px; z-index:5; width:40px; height:40px; border-radius:50%;
  background:rgba(17,17,17,.5); border:1px solid rgba(255,255,255,.3); color:#fff;
  display:flex; align-items:center; justify-content:center; transition:all .25s var(--ease);
}
.modal__close:hover{ background:var(--ink); transform:rotate(90deg); }
.modal__close svg{ width:15px; height:15px; }

/* zone image carrée : la photo entière reste visible (object-fit: contain),
   quel que soit son format d'origine (portrait ou paysage) */
.modal__slides{
  position:relative; background:var(--gray-4); overflow:hidden;
  aspect-ratio:1/1; max-height:78vh;
}
.modal__slide{
  position:absolute; inset:0; opacity:0; transition:opacity .6s var(--ease);
  display:flex; align-items:center; justify-content:center;
}
.modal__slide.is-active{ opacity:1; z-index:1; }
.modal__slide img{ width:100%; height:100%; object-fit:contain; }

.modal__nav{
  position:absolute; top:50%; transform:translateY(-50%); z-index:3; width:44px; height:44px;
  border-radius:50%; background:rgba(17,17,17,.45); border:1px solid rgba(255,255,255,.3); color:#fff;
  display:flex; align-items:center; justify-content:center; transition:all .25s var(--ease);
}
.modal__nav:hover{ background:var(--ink); }
.modal__nav--prev{ left:16px; }
.modal__nav--next{ right:16px; }
.modal__nav svg{ width:16px; height:16px; }

.modal__dots{ position:absolute; left:0; right:0; bottom:16px; z-index:3; display:flex; align-items:center; justify-content:center; gap:7px; }
.modal__dot{
  display:block; width:6px; height:6px; min-width:6px; flex:none;
  border-radius:50%; background:rgba(255,255,255,.45);
  transition:width .3s var(--ease), background .3s var(--ease);
}
.modal__dot.is-active{ background:#fff; width:18px; border-radius:3px; }

.modal__info{ padding:46px 44px; overflow-y:auto; }
.modal__tags{ font-family:var(--f-mono); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--gray-2); margin-bottom:16px; }
.modal__title{ font-size:clamp(23px,2.6vw,30px); font-weight:500; line-height:1.15; color:var(--ink); }
.modal__client{ margin-top:10px; font-size:13.5px; color:var(--gray-2); font-family:var(--f-mono); letter-spacing:.02em; }
.modal__desc{ margin-top:26px; padding-top:26px; border-top:1px solid var(--line); }
.modal__desc p{ font-size:15px; line-height:1.85; color:var(--gray-1); white-space:pre-line; }

@media (max-width:820px){
  .modal{ padding:0; align-items:stretch; }
  .modal__panel{ grid-template-columns:1fr; width:100%; max-height:100vh; height:100%; overflow-y:auto; border:0; }
  .modal__slides{ aspect-ratio:1/1; max-height:56vh; }
}

/* ---------------------------------------------------------------------- */
/* Contact                                                                  */
/* ---------------------------------------------------------------------- */
.contact__title{ font-size:clamp(32px,4.4vw,56px); font-weight:500; line-height:1.08; max-width:15ch; color:var(--ink); }
.contact__title em{ font-style:italic; font-weight:400; color:var(--gray-1); }
.contact__rows{ margin-top:56px; max-width:520px; }
.contact__row{ display:flex; align-items:baseline; gap:14px; padding:18px 0; border-top:1px solid var(--line); }
.contact__label{ font-family:var(--f-mono); font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--gray-2); width:110px; flex:none; }
.contact__value{ font-size:16.5px; color:var(--ink); }
.contact__value a:hover{ color:var(--gray-1); }

.site-footer{
  padding:40px var(--gutter) 46px; display:flex; justify-content:space-between; align-items:center;
  font-family:var(--f-mono); font-size:10.5px; letter-spacing:.05em; color:var(--gray-2);
  border-top:1px solid var(--line-soft);
}

/* ---------------------------------------------------------------------- */
/* Sidebar mobile                                                          */
/* ---------------------------------------------------------------------- */
@media (max-width:900px){
  .menu-toggle{ display:block; }

  section[id]{ scroll-margin-top:var(--topbar-h); }

  .sidebar{
    width:100%; height:var(--topbar-h); flex-direction:row; align-items:center; justify-content:space-between;
    padding:0 var(--gutter); border-right:0; border-bottom:1px solid var(--line);
  }
  .sidebar__tagline{ display:none; }
  .sidebar__bottom{ display:none; }

  .sidebar__nav{
    position:fixed; inset:0; top:var(--topbar-h); z-index:550;
    flex-direction:column; gap:22px; padding:40px var(--gutter);
    background:var(--bg); overflow-y:auto;
    transform:translateX(100%); transition:transform .5s var(--ease);
  }
  .sidebar__nav.is-open{ transform:translateX(0); }
  .nav__link{ font-size:16px; padding-left:22px; }

  .content{ margin-left:0; padding-top:var(--topbar-h); }

  .about{ grid-template-columns:1fr; }
  .about__portrait{ max-width:320px; }
  .savoir__row{ grid-template-columns:1fr; }
  .savoir__row:nth-of-type(even) .savoir__media{ order:0; }
}

@media (max-width:560px){
  .section{ padding:76px 0 76px; }
  .hero{ padding-top:56px; min-height:auto; }
  .modal__info{ padding:32px 26px; }
}

/* Sélecteur de langue */
.lang-switch{ display:flex; align-items:center; gap:7px; }
.lang-switch button{
  padding:0; border:0; background:none; color:var(--gray-2); cursor:pointer;
  font:inherit; letter-spacing:.08em; transition:color .2s var(--ease);
}
.lang-switch button:hover,.lang-switch button:focus-visible,.lang-switch button.is-active{ color:var(--ink); }
.lang-switch span{ color:var(--line); }
@media (max-width:900px){
  .sidebar__bottom{ display:block; margin-left:auto; margin-right:48px; }
  .lang-switch{ gap:5px; }
}
