/* ==========================================================================
   Fiche projet : hero plein écran portant le titre, description + fiche technique collante,
   galerie (paire / pleine largeur) avec visionneuse, projets voisins, appel à l'action.
   Variables et éléments communs (.ds-projets*) : projets.css.
   ========================================================================== */

/* ---- Hero ---- */
.ds-projet__hero { position: relative; height: calc(100vh - var(--ds-header-h)); height: calc(100svh - var(--ds-header-h)); min-height: 460px; overflow: hidden; background: #34302a; color: #fff; }
.ds-projet__slide { width: 100%; height: 100%; margin: 0; }
.ds-projet__slide:not(.is-active) { display: none; }
.ds-projet__slide img { width: 100%; height: 100%; object-fit: cover; }
.ds-projet__slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 10, 9, .78) 0%, rgba(10, 10, 9, .4) 30%, rgba(10, 10, 9, 0) 60%); pointer-events: none; }
.ds-projet__hero::before { content: ""; position: absolute; z-index: 1; inset: 0 0 auto; height: 160px; background: linear-gradient(rgba(0, 0, 0, .5), transparent); pointer-events: none; }
.ds-projet__hero.is-ready .ds-projet__slide { display: block; position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
.ds-projet__hero.is-ready .ds-projet__slide.is-active { opacity: 1; visibility: visible; transition: opacity .3s ease; }
/* Diaporama automatique (comme celui de l'accueil) : fondu enchaîné et lent zoom sur l'image active. */
.ds-projet__hero.is-auto .ds-projet__slide { transition: opacity 1.6s ease, visibility 0s linear 1.6s; }
.ds-projet__hero.is-auto .ds-projet__slide.is-active { transition: opacity 1.6s ease; }
.ds-projet__hero.is-auto .ds-projet__slide img { transform: scale(1); transition: transform 0s linear 1.6s; }
.ds-projet__hero.is-auto .ds-projet__slide.is-active img { transform: scale(1.07); transition: transform 9s ease-out; }

.ds-projet__retour { position: absolute; z-index: 3; top: 24px; left: var(--ds-gouttiere); display: inline-flex; gap: 10px; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 1px 10px rgba(0, 0, 0, .55); transition: gap .2s; }
.ds-projet__retour:hover, .ds-projet__retour:focus-visible { gap: 16px; }
.ds-projet__hero-bas { position: absolute; z-index: 3; left: var(--ds-gouttiere); right: var(--ds-gouttiere); bottom: clamp(30px, 4vw, 58px); display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; text-shadow: 0 2px 22px rgba(0, 0, 0, .4); }
.ds-projet__hero-titre { min-width: 0; max-width: 1100px; }
.ds-projet__type, .ds-projet__lieu { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.ds-projet__hero h1 { margin: 12px 0 14px; font: 400 clamp(44px, 6vw, 96px)/.98 var(--ds-serif); letter-spacing: -.02em; }
.ds-projet__lieu { opacity: .92; }
.ds-projet__controls { display: none; flex: none; align-items: center; gap: 10px; }
.ds-projet__hero.is-ready .ds-projet__controls { display: flex; }
.ds-projet__count { margin-right: 10px; font-size: 13px; letter-spacing: .1em; }
.ds-projet__controls button { width: 50px; height: 50px; border: 1px solid rgba(255, 255, 255, .8); background: rgba(26, 24, 22, .2); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.ds-projet__controls button:hover, .ds-projet__controls button:focus-visible { background: #fff; color: var(--ds-encre); }
.ds-projet__controls button[hidden] { display: none; }
.ds-projet__pause { display: grid; place-items: center; }
.ds-projet__ico-lecture { display: none; }
.ds-projet__pause[aria-pressed="true"] .ds-projet__ico-pause { display: none; }
.ds-projet__pause[aria-pressed="true"] .ds-projet__ico-lecture { display: block; }
.ds-projet__defiler { position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%); display: block; padding: 8px; }
/* Icône de souris : contour arrondi et molette qui descend. */
.ds-projet__souris { position: relative; display: block; width: 24px; height: 38px; border: 2px solid rgba(255, 255, 255, .9); border-radius: 14px; }
.ds-projet__souris::after { content: ""; position: absolute; top: 7px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: #fff; animation: ds-projet-molette 1.8s ease-in-out infinite; }
@keyframes ds-projet-molette { 0% { opacity: 0; transform: translateY(0); } 25% { opacity: 1; } 75% { opacity: 1; transform: translateY(10px); } 100% { opacity: 0; transform: translateY(12px); } }

@media (min-width: 1100px) {
	/* L'en-tête est transparent sur l'image : le hero passe derrière, plein écran. */
	body.ds-projet-avec-hero .ds-projet__hero { height: 100vh; height: 100svh; min-height: 0; }
	body.ds-projet-avec-hero .ds-projet__hero::before { height: 200px; }
	.ds-projet__retour { top: calc(var(--ds-header-h) + 20px); }
}
@media (max-width: 1099px) { .ds-projet__defiler { display: none; } }
@media (max-width: 650px) {
	.ds-projet__hero { min-height: 440px; }
	.ds-projet__hero h1 { font-size: clamp(36px, 10.5vw, 52px); }
	.ds-projet__hero-bas { flex-direction: column; align-items: flex-start; gap: 22px; bottom: 26px; }
	.ds-projet__controls button { width: 44px; height: 44px; font-size: 22px; }
}

/* Sans image : titre simple */
.ds-projet__titre-simple { padding-block: 40px 20px; }
.ds-projet__retour-simple { display: inline-flex; gap: 10px; margin-bottom: 40px; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--p-muted); }
.ds-projet__retour-simple:hover { color: var(--p-red); }
.ds-projet__titre-simple h1 { margin: 14px 0 18px; font: 400 clamp(52px, 7vw, 108px)/.95 var(--ds-serif); letter-spacing: -.02em; }
.ds-projet__titre-simple > p:last-child { color: var(--p-muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

/* ---- Description + fiche technique ---- */
.ds-projet__overview { background: #fff; padding-block: clamp(70px, 8vw, 110px); }
.ds-projet__overview-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .6fr); gap: clamp(45px, 7vw, 120px); align-items: start; }
.ds-projet__texte .ds-projets__eyebrow { margin-bottom: 28px; }
.ds-projet__description { max-width: 880px; color: var(--ds-encre-douce); font-size: clamp(19px, 1.55vw, 23px); line-height: 1.8; }
.ds-projet__description p + p { margin-top: 1.1em; }
/* S'il y a plusieurs paragraphes, le premier sert d'introduction en grand. */
.ds-projet__description > p:first-child:not(:only-child) { color: var(--ds-encre); font: 400 clamp(27px, 2.7vw, 38px)/1.25 var(--ds-serif); margin-bottom: 1.1em; }
.ds-projet__facts { position: sticky; top: calc(var(--ds-header-h-compact) + 28px); border-top: 2px solid var(--p-red); padding-top: 20px; }
.ds-projet__facts h2 { margin-bottom: 18px; font: 600 13px/1.4 var(--ds-sans); letter-spacing: .12em; text-transform: uppercase; }
.ds-projet__facts dl > div { display: flex; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--p-line); font-size: 15px; }
.ds-projet__facts dt { color: var(--p-muted); }
.ds-projet__facts dd { max-width: 60%; text-align: right; font-weight: 600; }
.ds-projet__partage { margin-top: 28px; }
.ds-projet__partage p { margin-bottom: 14px; color: var(--p-muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.ds-projet__partage ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.ds-projet__partage a, .ds-projet__partage button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--p-line); border-radius: 50%; background: #fff; color: var(--ds-encre); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.ds-projet__partage a:hover, .ds-projet__partage button:hover, .ds-projet__partage a:focus-visible, .ds-projet__partage button:focus-visible { border-color: var(--p-red); background: var(--p-red); color: #fff; }
.ds-projet__ico-ok { display: none; }
.ds-projet__partage button.est-copie .ds-projet__ico-lien { display: none; }
.ds-projet__partage button.est-copie .ds-projet__ico-ok { display: block; }
.ds-projet__partage button.est-copie { border-color: var(--p-red); background: var(--p-red); color: #fff; }
.ds-projet__copie-etat { display: block; min-height: 18px; margin-top: 10px; color: var(--p-red); font-size: 12px; }

/* ---- Galerie : paire, paire, pleine largeur… ---- */
.ds-projet__gallery { background: #fff; padding: 0 clamp(8px, 1vw, 14px) clamp(70px, 8vw, 110px); }
/* Pleine largeur, comme sur la page de référence : seules de fines marges bordent la grille. */
.ds-projet__gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1vw, 14px); }
.ds-projet__vue { margin: 0; min-width: 0; }
.ds-projet__vue--large { grid-column: span 2; }
.ds-projet__zoom { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: #e8e2da; cursor: zoom-in; aspect-ratio: 4 / 3; }
.ds-projet__vue--large .ds-projet__zoom { aspect-ratio: 16 / 9; }
.ds-projet__zoom img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ds-sortie); }
.ds-projet__zoom:hover img, .ds-projet__zoom:focus-visible img { transform: scale(1.03); }
.ds-projet__zoom::after { content: "+"; position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--ds-encre); font: 300 24px/1 var(--ds-sans); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.ds-projet__zoom:hover::after, .ds-projet__zoom:focus-visible::after { opacity: 1; transform: none; }
.ds-projet__zoom:focus-visible { outline: 2px solid var(--p-red); outline-offset: 3px; }
.ds-projet__gallery-grid.is-collapsed [data-ds-extra] { display: none; }
.ds-projet__gallery-more { display: block; margin: 48px auto 0; padding: 16px 34px; border: 1px solid var(--ds-encre); background: transparent; color: var(--ds-encre); font: 600 14px var(--ds-sans); letter-spacing: .06em; cursor: pointer; transition: background .2s, color .2s; }
.ds-projet__gallery-more:hover, .ds-projet__gallery-more:focus-visible { background: var(--ds-encre); color: #fff; }
@media (max-width: 650px) {
	.ds-projet__zoom::after { display: none; }
}

/* ---- Projets voisins ---- */
.ds-projet__voisins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ds-projet__voisin { position: relative; display: flex; align-items: flex-end; min-height: clamp(240px, 24vw, 360px); overflow: hidden; background: var(--ds-encre); color: #fff; isolation: isolate; }
.ds-projet__voisin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ds-sortie); }
.ds-projet__voisin::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(10, 10, 9, .75), rgba(10, 10, 9, .25) 70%); transition: background .4s; }
.ds-projet__voisin:hover img, .ds-projet__voisin:focus-visible img { transform: scale(1.05); }
.ds-projet__voisin:hover::after, .ds-projet__voisin:focus-visible::after { background: linear-gradient(0deg, rgba(10, 10, 9, .6), rgba(10, 10, 9, .1) 70%); }
.ds-projet__voisin-texte { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 8px; width: 100%; padding: clamp(22px, 3vw, 44px) var(--ds-gouttiere); text-shadow: 0 1px 14px rgba(0, 0, 0, .4); }
.ds-projet__voisin--suivant .ds-projet__voisin-texte { align-items: flex-end; text-align: right; }
.ds-projet__voisin small { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.ds-projet__voisin strong { font: 400 clamp(26px, 2.8vw, 42px)/1.08 var(--ds-serif); }
.ds-projet__voisin em { font-size: 11px; font-style: normal; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.ds-projet__tous { padding: 44px var(--ds-gouttiere); background: #fff; text-align: center; }
.ds-projet__tous a { display: inline-flex; gap: 10px; padding-bottom: 7px; border-bottom: 1px solid var(--p-red); font-size: 14px; font-weight: 600; transition: gap .2s, color .2s; }
.ds-projet__tous a:hover { gap: 16px; color: var(--p-red); }
@media (max-width: 799px) {
	.ds-projet__voisins { grid-template-columns: 1fr; }
	.ds-projet__voisin { min-height: 200px; }
	.ds-projet__voisin--suivant .ds-projet__voisin-texte { align-items: flex-start; text-align: left; }
}

/* ---- Appel à l'action ---- */
.ds-projet__end { padding-block: clamp(80px, 10vw, 140px); background: var(--ds-encre); color: #fff; text-align: center; }
.ds-projet__end .ds-projets__eyebrow { color: #e8a5a1; }
.ds-projet__end h2 { max-width: 900px; margin: 16px auto 40px; font: 400 clamp(44px, 6vw, 84px)/.98 var(--ds-serif); }
.ds-projet__end h2 em { color: #e8a5a1; font-weight: 400; }
.ds-projet__bouton { display: inline-flex; align-items: center; gap: 12px; padding: 17px 36px; border: 1px solid rgba(255, 255, 255, .75); font-size: 14px; font-weight: 600; letter-spacing: .06em; transition: background .2s, color .2s, gap .2s; }
.ds-projet__bouton:hover, .ds-projet__bouton:focus-visible { gap: 18px; border-color: #fff; background: #fff; color: var(--ds-encre); }
@media (max-width: 650px) { .ds-projet__bouton { width: 100%; justify-content: center; } }

/* ---- Responsive de la description ---- */
@media (max-width: 900px) {
	.ds-projet__overview-grid { grid-template-columns: 1fr; gap: 45px; }
	.ds-projet__facts { position: static; }
}

/* ---- Visionneuse ---- */
.ds-lightbox { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; background: rgba(12, 11, 10, .95); }
.ds-lightbox[hidden] { display: none; }
.ds-lightbox__figure { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; padding: 70px clamp(56px, 7vw, 110px) 64px; }
.ds-lightbox__figure img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; opacity: 0; transition: opacity .3s; }
.ds-lightbox__figure img.est-pret { opacity: 1; }
.ds-lightbox__fermer, .ds-lightbox__nav { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; background: rgba(26, 24, 22, .4); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.ds-lightbox__fermer { top: 18px; right: 18px; }
.ds-lightbox__nav { top: 50%; margin-top: -24px; }
.ds-lightbox__nav--prec { left: 18px; }
.ds-lightbox__nav--suiv { right: 18px; }
.ds-lightbox__fermer:hover, .ds-lightbox__nav:hover, .ds-lightbox__fermer:focus-visible, .ds-lightbox__nav:focus-visible { background: #fff; color: var(--ds-encre); }
.ds-lightbox__compteur { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; color: rgba(255, 255, 255, .85); font-size: 13px; letter-spacing: .14em; }
html.ds-lightbox-ouvert { overflow: hidden; }
@media (max-width: 650px) {
	.ds-lightbox__figure { padding: 64px 12px 60px; }
	.ds-lightbox__nav { top: auto; bottom: 8px; margin-top: 0; width: 44px; height: 44px; }
	.ds-lightbox__nav--prec { left: 14px; }
	.ds-lightbox__nav--suiv { right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.ds-projet__hero.is-ready .ds-projet__slide, .ds-projet__zoom img, .ds-projet__voisin img, .ds-lightbox__figure img { transition: none; }
	.ds-projet__hero.is-auto .ds-projet__slide.is-active img { transform: none; transition: none; }
	.ds-projet__souris::after { animation: none; opacity: 1; }
}
