/* portfolio.css — isolated styles to avoid conflicts */
:root{
  --p-bg:#fffdf9;
  --p-soft:#f6f1ea;
  --p-text:#1d1d1f;
  --p-muted:#6f6a63;
  --p-line:#dad3c9;
  --p-accent:#0a6bdc;
  --p-radius:18px;
  --p-max:1180px;
  --p-pad:clamp(16px,2.2vw,28px);
  --p-h1:clamp(28px,4.0vw,44px);
  --p-h2:clamp(18px,2.2vw,22px);
  --p-p:clamp(15px,1.2vw,17px);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "SF Pro Display","SF Pro Text", Segoe UI, Roboto, Arial;
  color:var(--p-text);
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(213,145,85,.10), transparent 60%),
    radial-gradient(1000px 620px at 95% 5%, rgba(160,120,255,.08), transparent 55%),
    var(--p-bg);
  line-height:1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;height:auto;display:block}

.p-container{
  max-width: var(--p-max);
  margin: 0 auto;
  padding: 96px var(--p-pad) 0;
}

@media (max-width: 900px){
  .p-container{ padding-top: 86px; }
}

.p-topbar{
  position:sticky;
  top:0;
  z-index:50;
  background: rgba(255,253,249,.84);
  backdrop-filter: blur(16px);
  border-bottom:1px solid rgba(218,211,201,.8);
}

.p-topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  height:56px;
}

.p-brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:650;
  letter-spacing:-0.01em;
}

.p-brand-mark{
  width:22px;
  height:22px;
  border-radius:6px;
  background:linear-gradient(135deg,#1d1d1f,#2b2a28);
}

.p-nav{display:flex;gap:10px;align-items:center}

.p-pill{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(218,211,201,.9);
  background: rgba(255,253,249,.70);
  font-size:13px;
  color:rgba(29,29,31,.9);
}

.p-pill:hover{background: rgba(0,0,0,.04)}

h1{
  font-size:var(--p-h1);
  line-height:1.08;
  margin:18px 0 6px;
  letter-spacing:-0.02em;
}

.p-lead{
  font-size: clamp(16px,1.25vw,18px);
  color: rgba(29,29,31,.84);
  margin:0 0 16px;
}

.p-muted{color:var(--p-muted)}
.p-hr{height:1px;background:var(--p-line);margin:16px 0 22px}

/* Albums list */
.p-albums{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:14px;
  padding-bottom:34px;
}

.p-album{
  grid-column: span 4;
  background: linear-gradient(180deg, rgba(255,250,242,1), rgba(255,253,249,1));
  border:1px solid rgba(218,211,201,.9);
  border-radius: calc(var(--p-radius) + 6px);
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(32,24,16,.06);
  transition: transform .16s ease;
}

.p-album:hover{transform: translateY(-2px)}

.p-album-mainlink{
  display:block;
  color:inherit;
  text-decoration:none;
  height:100%;
}

.p-album-cover{
  background:var(--p-soft);
  border-bottom:1px solid rgba(218,211,201,.7);
}

.p-album-cover img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
}

.p-album-body{
  padding:14px 16px 16px;
  min-width:0;
}

.p-album-title{
  font-size:16px;
  font-weight:650;
  margin:0 0 4px;
  overflow-wrap:anywhere;
}

.p-album-subtitle{
  font-size:13px;
  line-height:1.45;
  color:rgba(29,29,31,.78);
  margin:0 0 6px;
  overflow-wrap:anywhere;
}

.p-album-meta{
  font-size:13px;
  color:rgba(29,29,31,.72);
  margin:0;
}

@media (max-width:980px){
  .p-album{grid-column:span 6}
}

@media (max-width:680px){
  .p-album{grid-column:1/-1}
}

/* Album view */
.p-breadcrumb{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:14px;
  padding:16px 0 14px;
}

.p-back{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  font-weight:650;
  color:rgba(29,29,31,.9);
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(218,211,201,.9);
  background: rgba(255,253,249,.75);
  flex:0 0 auto;
}

.p-back:hover{background: rgba(0,0,0,.04)}
.p-back svg{width:16px;height:16px}

.p-album-header-copy{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
  width:100%;
}

.p-album-header-copy [data-album-title]{
  font-size:clamp(24px, 3vw, 34px);
  line-height:1.15;
  letter-spacing:-0.02em;
  font-weight:700 !important;
  margin:0;
}

.p-album-details{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:14px;
  line-height:1.5;
  color:rgba(29,29,31,.82);
}

.p-album-detail-row{
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:8px;
  align-items:start;
}

.p-album-detail-label{
  font-weight:650;
  color:rgba(29,29,31,.95);
}

.p-album-detail-value{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.p-album-link{
  color:var(--p-accent);
  text-decoration:underline;
  text-underline-offset:3px;
}

.p-album-link:hover{opacity:.9}

@media (max-width:680px){
  .p-album-detail-row{
    grid-template-columns:1fr;
    gap:2px;
  }
}

.p-grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:10px;
  padding-bottom:34px;
}

.p-tile{
  grid-column: span 4;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(218,211,201,.85);
  background:#fff;
  box-shadow:0 10px 22px rgba(32,24,16,.05);
  cursor: zoom-in;
}

.p-tile img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  transform:scale(1.001);
}

.p-tile:hover img{
  transform: scale(1.02);
  transition: transform .25s ease;
}

@media (max-width:980px){
  .p-tile{grid-column:span 6}
}

@media (max-width:680px){
  .p-tile{grid-column:1/-1}
}

/* Lightbox */
.p-lightbox{
  position:fixed;
  inset:0;
  display:none;
  z-index:10000;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(10px);
}

.p-lightbox.open{display:block}

.p-lb-inner{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
}

.p-lb-top{
  position:absolute;
  top:0;
  left:0;
  right:0;
  z-index:6;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:
    calc(14px + env(safe-area-inset-top, 0px))
    14px
    10px;
  color:rgba(255,255,255,.94);
  pointer-events:none;
}

.p-lb-title{
  font-size:14px;
  font-weight:650;
  letter-spacing:.01em;
  opacity:.95;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:calc(100vw - 170px);
  text-shadow:0 1px 10px rgba(0,0,0,.5);
}

.p-lb-actions{
  display:flex;
  gap:10px;
  align-items:center;
  pointer-events:auto;
}

.p-iconbtn,
.p-lb-nav{
  -webkit-appearance:none;
  appearance:none;
}

.p-iconbtn{
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.45);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,.28);
}

.p-iconbtn:hover{background: rgba(0,0,0,.6)}

.p-iconbtn svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
}

[data-lb-close]{
  position:fixed;
  top:calc(env(safe-area-inset-top, 0px) + 14px);
  right:calc(env(safe-area-inset-right, 0px) + 14px);
  z-index:10020;
  width:48px;
  height:48px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.62);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 28px rgba(0,0,0,.35);
}

[data-lb-fs]{
  position:fixed;
  top:calc(env(safe-area-inset-top, 0px) + 14px);
  right:calc(env(safe-area-inset-right, 0px) + 72px);
  z-index:10019;
}

.p-lb-stage{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:
    calc(64px + env(safe-area-inset-top, 0px))
    14px
    calc(14px + env(safe-area-inset-bottom, 0px));
  position:relative;
}

.p-lb-media{
  width:min(1200px, calc(100vw - 28px));
  height:min(78vh, 820px);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  z-index:2;
}

.p-lb-media img,
.p-lb-media video{
  max-width:100%;
  max-height:100%;
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
}

.p-lb-caption{
  max-width:min(1000px, calc(100vw - 28px));
  margin:0 auto 16px;
  padding:0 14px max(env(safe-area-inset-bottom, 0px), 0px);
  color:rgba(255,255,255,.86);
  font-size:14px;
  text-align:center;
  min-height:22px;
}

.p-lb-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:8;
  width:48px;
  height:48px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.24);
  background: rgba(0,0,0,.4);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:32px;
  line-height:1;
  box-shadow:0 8px 24px rgba(0,0,0,.25);
}

.p-lb-nav:hover{background: rgba(0,0,0,.55)}

.p-lb-prev{left:max(18px, env(safe-area-inset-left, 0px))}
.p-lb-next{right:max(18px, env(safe-area-inset-right, 0px))}

@media (max-width:820px){
  .p-lb-media{
    height:min(72vh,700px);
  }

  .p-lb-nav{
    display:flex;
    width:44px;
    height:44px;
    font-size:28px;
  }

  .p-lb-title{
    max-width:calc(100vw - 150px);
  }
}

@media (max-width:640px){
  [data-lb-close]{
    width:50px;
    height:50px;
    top:calc(env(safe-area-inset-top, 0px) + 12px);
    right:calc(env(safe-area-inset-right, 0px) + 12px);
  }

  [data-lb-fs]{
    display:none;
  }

  .p-lb-nav{
    width:46px;
    height:46px;
    font-size:28px;
  }

  .p-lb-prev{
    left:max(10px, env(safe-area-inset-left, 0px));
  }

  .p-lb-next{
    right:max(10px, env(safe-area-inset-right, 0px));
  }

  .p-lb-stage{
    padding-top:calc(72px + env(safe-area-inset-top, 0px));
  }
}

/* Dissuasion copie */
.p-no-copy,
.p-no-copy *{
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.p-no-drag img,
.p-no-drag video{
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* réactive les zones cliquables */
.p-tile{ pointer-events: auto; }
.p-lb-media{ pointer-events: auto; }
/* En-tête album : affichage simple sans labels techniques */
.p-album-header-subtitle{
  font-size:15px;
  line-height:1.5;
  color:rgba(29,29,31,.78);
}

.p-album-header-linkwrap{
  font-size:15px;
  line-height:1.5;
}

.p-album-header-linkwrap .p-album-link{
  color:var(--p-accent);
  text-decoration:underline;
  text-underline-offset:3px;
}
/* Lien externe dans l'en-tête album */
.p-album-header-linkwrap .p-album-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:700;
  color:var(--p-text);
  text-decoration:underline;
  text-underline-offset:3px;
}

.p-album-header-linkwrap .p-album-link::after{
  content:"↗";
  display:inline-block;
  font-size:.95em;
  line-height:1;
  opacity:.8;
}

.p-album-header-linkwrap .p-album-link:hover{
  opacity:.82;
}
