/* Pages projets — même univers que l’accueil : papier crème, encre, filet doré */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: radial-gradient(ellipse at 50% 0%, var(--fond-1) 0%, var(--fond-2) 60%, var(--fond-3) 100%) fixed; color: var(--encre); font-family: var(--police-ui); }
a { color: var(--encre); }

/* double filet du cadre, comme sur l’accueil */
.cadre { position: fixed; inset: 16px; border: 1px solid var(--filet); pointer-events: none; z-index: 10; }
.cadre::after { content: ''; position: absolute; inset: 4px; border: .5px solid var(--filet-2); }

.entete { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 45px 48px 26px 45px;   /* logo au même endroit que sur l’accueil */ background: linear-gradient(var(--fond-entete) 70%, transparent); }
.entete .logo img { display: block; height: 48.9px; width: auto; }
.entete .logo:hover, .retour:hover { opacity: .7; }
/* « ← Tous les projets » : en bas à gauche, en face du bouton jour / nuit */
.retour { position: fixed; left: 30px; bottom: 30px; z-index: 6; display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: color-mix(in srgb, var(--papier) 78%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 13px; letter-spacing: .08em; text-decoration: none; }

.projet { max-width: 1040px; margin: 0 auto; padding: 40px 44px 120px; animation: fondu 1.1s ease both; }
@keyframes fondu { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

h1 { margin: 0; font-family: var(--police); font-weight: 500; font-size: clamp(56px, 9vw, 112px); line-height: 1; }
.accroche { margin: 18px 0 0; max-width: 620px; font-family: var(--police); font-style: italic; font-size: 26px; line-height: 1.45; color: var(--accent); }

.couverture { margin: 48px 0 0; overflow: hidden; border-radius: 2px; box-shadow: 0 30px 60px -30px var(--ombre); }
.couverture img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.corps { margin-top: 64px; }
.texte p { margin: 0 0 1.1em; font-family: var(--police); font-size: 23px; line-height: 1.65; color: var(--texte); }
.lien { margin: 8px 0 0; font-size: 13px; letter-spacing: .12em; }
.lien a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); padding-bottom: 2px; }
.lien a:hover { border-bottom-color: var(--accent); }
.credits { margin: 36px 0 0; font-size: 11px; line-height: 1.7; letter-spacing: .06em; color: var(--gris); }
.credits a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--filet-2); }
.projet-bientot h1 { margin-bottom: 8px; }
.galerie video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.texte p:first-child::first-letter { float: left; font-size: 3.4em; line-height: .85; padding: 6px 10px 0 0; color: var(--accent); }


.galerie { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 64px; }
.galerie figure { margin: 0; overflow: hidden; }
.galerie img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1.2s ease; }
.galerie figure:hover img { transform: scale(1.04); }

.suite { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px; margin-top: 96px; padding-top: 28px; border-top: 1px solid var(--filet-3); }
.suite a { text-decoration: none; font-family: var(--police); font-size: 30px; }
.suite a span { display: block; margin-bottom: 4px; font-family: var(--police-ui); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gris); }
.suite a:last-child { text-align: right; }
.suite a:hover { color: var(--accent); }
.suite .tous { font-family: var(--police-ui); font-size: 13px; letter-spacing: .08em; text-decoration: underline; text-underline-offset: 6px; }

.introuvable { padding: 120px 44px; text-align: center; font-family: var(--police); font-size: 26px; }

@media (max-width: 760px) {
  .entete { padding: 22px 22px 18px; }
  .retour { left: 18px; bottom: 18px; }
  .entete .logo img { height: 38.7px; }
  .projet { padding: 24px 26px 90px; }
  .galerie { grid-template-columns: 1fr; }
  .suite { grid-template-columns: 1fr 1fr; }
  .suite .tous { grid-column: 1 / -1; order: 3; text-align: center; }
}

/* arrivée depuis la galerie de l’accueil (« on entre dans la bulle », voir js/projets/page.js) */
.bulle-arrivee .projet { animation: none; }
.bulle-arrivee .cadre, .bulle-arrivee .entete, .bulle-arrivee .projet > :not(.couverture) { opacity: 0; transform: translateY(14px); transition: opacity 1s ease, transform 1.3s cubic-bezier(.2,.7,.2,1); }
.bulle-arrivee.bulle-revele .cadre, .bulle-arrivee.bulle-revele .entete, .bulle-arrivee.bulle-revele .projet > :not(.couverture) { opacity: 1; transform: none; }
.bulle-arrivee .couverture { visibility: hidden; }
.bulle-arrivee .cadre, .bulle-arrivee .entete { transform: none; }   /* le logo ne bouge pas : simple fondu */
.bulle-photo { position: fixed; z-index: 30; display: block; object-fit: cover; pointer-events: none; }

/* View Transitions entre pages (Chrome, Safari) : fondu doux par défaut ; pour la transition « bulle »
   (js/projets/transition.js + arrivee.js), l’ancienne page — la photo en plein écran — reste affichée puis s’efface. */
@view-transition { navigation: auto; }
html:active-view-transition-type(bulle)::view-transition-old(root) { animation: bulle-relais .4s ease both; }
html:active-view-transition-type(bulle)::view-transition-new(root) { animation: none; }
@keyframes bulle-relais { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }

/* retour vers la galerie (« ← Tous les projets », voir js/projets/arrivee.js) : le texte s’efface */
html.bulle-depart .cadre, html.bulle-depart .entete, html.bulle-depart .projet > :not(.couverture) { opacity: 0 !important; transition: opacity .5s ease !important; transition-delay: 0s !important; }
.bulle-lumiere { position: fixed; inset: 0; z-index: 40; opacity: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 0%, var(--fond-1) 0%, var(--fond-2) 60%, var(--fond-3) 100%); }

/* Les captures et vidéos gardent leurs proportions, sur tous les formats. */
.couverture img{aspect-ratio:auto;object-fit:contain}
.couverture:has(video){position:relative}
.couverture:has(video)>img{display:none}
.couverture video{display:block;position:relative;width:100%;height:auto;max-height:75svh;object-fit:contain;background:#111}
.galerie img{height:auto;aspect-ratio:auto;object-fit:contain}
.galerie video{height:auto;aspect-ratio:auto;max-height:75svh;object-fit:contain}
.galerie{align-items:start}
.suite>a{min-width:0;overflow-wrap:anywhere}

/* Jalon : identité et maquettes fournies. */
.projet-jalon{max-width:1200px}
.jalon-intro{max-width:760px;padding:20px 0 12px}
.jalon-surtitre{font-family:var(--police-ui);font-size:12px;line-height:1.6;letter-spacing:.12em;text-transform:uppercase;color:var(--gris)}
.jalon-logo{margin:32px 0}
.jalon-logo img{display:block;width:190px;height:auto;padding:18px 22px;background:#FFF3D6;border-radius:2px}
.jalon-promesse{font-family:var(--police);font-size:clamp(38px,5.8vw,72px);line-height:1.08;margin:28px 0 22px;letter-spacing:-.025em}
.jalon-resume{max-width:530px;font-size:18px;line-height:1.7;color:var(--texte)}
.jalon-bureau{padding:30px;background:#FFF3D6;box-shadow:none;border-radius:12px}
.jalon-bureau img{border-radius:5px;box-shadow:0 14px 32px -22px #49250766}
.jalon-bureau video{border-radius:5px;background:#FFF3D6}
.projet-jalon figcaption{font-family:var(--police-ui);font-size:13px;line-height:1.6;text-align:center;margin-top:18px;color:var(--gris)}
.jalon-bureau figcaption{color:#492507}
.jalon-section{margin-top:100px}
.jalon-section h2{font-family:var(--police);font-weight:500;font-size:clamp(30px,4vw,48px);line-height:1.15;margin:0 0 24px;letter-spacing:-.02em}
.jalon-section p{line-height:1.8}
.jalon-contexte{display:grid;grid-template-columns:1fr 1fr;gap:48px}
.jalon-contexte p{font-size:18px;margin:0 0 20px;color:var(--texte)}
.jalon-section-titre{max-width:580px}
.jalon-section-titre>p:last-child{font-size:17px;color:var(--texte)}
.jalon-marques{display:grid;grid-template-columns:1fr 1fr .7fr;gap:16px;margin-top:36px}
.jalon-marque{min-height:220px;display:flex;align-items:center;justify-content:center;padding:38px;border-radius:8px}
.jalon-marque img{display:block;width:100%;max-width:220px;height:auto}
.jalon-marque img.jalon-monogramme{max-width:70px;max-height:100px}
.jalon-jaune{background:#FFB40D}.jalon-marron{background:#492507}.jalon-creme{background:#FFF3D6}
.jalon-palette{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin:28px 0}
.jalon-palette span{font-size:14px;line-height:1.7;display:grid;grid-template-columns:32px 1fr;column-gap:12px;align-items:center}
.jalon-palette i{grid-row:span 2;width:32px;height:32px;border-radius:50%;border:1px solid #49250722}
.jalon-palette small{grid-column:2;color:var(--gris);font-size:12px}
.jalon-document{display:inline-flex;align-items:center;gap:12px;min-height:44px;font-size:14px;text-underline-offset:5px}
.jalon-document span{font-size:11px;text-decoration:none;letter-spacing:.08em;color:var(--gris)}
.jalon-terrain{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:64px;padding:48px;border:1px solid var(--filet-2);border-radius:12px}
.jalon-telephone{margin:0;justify-self:center;width:100%;max-width:300px}
.jalon-telephone img{display:block;width:100%;height:auto;border:6px solid #492507;border-radius:30px;box-shadow:0 24px 44px -30px var(--ombre)}
.jalon-usages{margin:32px 0 0}
.jalon-usages>div{padding:22px 0;border-top:1px solid var(--filet-2)}
.jalon-usages dt{font-size:17px;font-weight:600;line-height:1.5}
.jalon-usages dd{font-size:16px;line-height:1.8;margin:8px 0 0;color:var(--texte)}
@media(max-width:700px){
 .jalon-intro{padding-top:0}.jalon-logo{margin:24px 0}.jalon-resume{font-size:16px}
 .jalon-section{margin-top:64px}.jalon-bureau{padding:12px;margin-top:30px;border-radius:6px}
 .jalon-contexte{grid-template-columns:1fr;gap:0}.jalon-contexte p{font-size:16px}
 .jalon-marques{grid-template-columns:1fr 1fr;gap:10px}.jalon-marque{min-height:150px;padding:24px}.jalon-marque:last-child{grid-column:1 / -1;min-height:140px}
 .jalon-palette{gap:12px}.jalon-palette span{grid-template-columns:1fr;font-size:12px}.jalon-palette i{grid-row:auto;margin-bottom:8px}.jalon-palette small{grid-column:1;font-size:11px}
 .jalon-terrain{grid-template-columns:1fr;padding:24px 18px;gap:40px}.jalon-terrain-texte{grid-row:1}.jalon-telephone{max-width:280px}
}
