/* =====================================================================
   Rebecca Bedelia — pages projet (modèle : Motocultor Festival)
   D'après les maquettes XD « Page projet — Motocultor Festival » du 13/11/2026.
   S'ajoute à style.css et illustrations.css (bande, autres pages, visionneuse, signature).
   ===================================================================== */

/* ---------- Haut de page : vagues + bouton « Tous les projets » ---------- */
.p-hero { position: relative; height: 306px;
  background: linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,.25)), url("../img/vagues.webp") center 38% / max(1606px, 112vw) auto no-repeat, var(--violet); }
.p-retour { position: absolute; left: max(20px, calc((100% - 1240px) / 2)); top: 187px; display: inline-flex; align-items: center; gap: 4px; height: 44px; padding: 0 12px;
  border: 2px solid var(--fonce); border-radius: 999px; background: var(--blanc); color: var(--fonce); font-weight: 800; font-size: 17px; text-decoration: none; transition: transform .15s; }
.p-retour:hover { transform: rotate(-2deg); background: var(--lime); }

/* feuille blanche à bord supérieur foncé et coins arrondis, posée sur les vagues */
.p-feuille { position: relative; z-index: 2; margin-top: -40px; background: var(--blanc); border-top: 12px solid var(--fonce); border-radius: 40px 40px 0 0; padding: 44px 0 150px; }

/* ---------- Présentation : fiche | titre + textes | mots clés ---------- */
.p-intro { display: grid; grid-template-columns: 191px minmax(0, 1fr) 231px; column-gap: 18px; }
.p-fiche { display: flex; flex-direction: column; gap: 26px; padding-left: 4px; }
.p-fiche dt { font-weight: 800; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; }
.p-fiche dd { margin: 5px 0 0; }
.p-client { font-weight: 700; font-size: 17px; }
.p-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.p-annee-puce { display: inline-block; background: var(--orange); color: var(--blanc); font-weight: 700; font-size: 17px; line-height: 25px; padding: 0 10px; }
.p-type { display: inline-block; background: var(--violet); color: var(--blanc); font-weight: 700; font-size: 13px; line-height: 24px; padding: 0 11px; border-radius: 999px; }
.p-types { flex-direction: column; align-items: flex-start; gap: 9px; }

.p-centre { padding-top: 0; }
.p-titre { position: relative; display: flex; align-items: flex-end; gap: 0 20px; margin-top: 2px; font-weight: 800; font-size: 82px; line-height: 1; letter-spacing: -1.5px; flex-wrap: nowrap; white-space: nowrap; color: var(--fonce); }
.p-titre-pastille { display: inline-block; margin-bottom: 10px; padding: 4px 30px 10px; background: var(--lime); border: 6px solid var(--fonce); border-radius: 999px; box-shadow: 4px 6px 0 var(--fonce);
  font-size: 72px; letter-spacing: -1px; transform: rotate(-6deg); transform-origin: left bottom; }
.p-textes { display: grid; grid-template-columns: 325px minmax(0, 405px); column-gap: 25px; margin-top: 26px; color: var(--fonce); font-size: 20px; line-height: 26px; }
.p-textes p:first-child { font-weight: 700; }

.p-mots { padding-top: 112px; }
.p-mots h2 { display: inline-block; font-weight: 800; font-size: 19px; text-transform: uppercase; border-bottom: 3px solid var(--violet); padding-bottom: 1px; }
.p-mots ul { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.p-mots li { display: inline-flex; align-items: center; min-height: 33px; padding: 4px 13px; border: 2px solid var(--fonce); border-radius: 999px; background: var(--blanc);
  font-weight: 600; font-size: 13.5px; line-height: 1.1; transition: transform .15s, background-color .15s; }
.p-mots li:hover { background: var(--lime); transform: rotate(-3deg); }
.p-mots li:nth-child(10) { max-width: 166px; }

/* ---------- Éditions : titre + boutons des années ---------- */
.p-editions-tete { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 70px; }
.p-editions-titre { font-weight: 800; font-size: 60px; line-height: 1; letter-spacing: -1px; color: var(--fonce); }
.p-onglets { display: flex; gap: 10px; }
.p-onglet { width: 102px; height: 52px; border: 3px solid var(--fonce); border-radius: 999px; background: var(--blanc); color: var(--fonce); font-weight: 800; font-size: 19px; cursor: pointer;
  transition: transform .15s, background-color .15s; }
.p-onglet:hover { transform: rotate(-3deg); background: var(--lime); }
.p-onglet[aria-selected="true"] { background: var(--orange); color: var(--blanc); box-shadow: 3px 4px 0 var(--fonce); }
.p-onglet[aria-selected="true"]:hover { transform: none; }

/* ---------- Carte de l'année ---------- */
.p-panneau[hidden] { display: none; }
.p-carte { display: grid; grid-template-columns: 490px minmax(0, 1fr); min-height: 320px; margin-top: 75px; border: 3px solid var(--fonce); border-radius: 24px; overflow: hidden; box-shadow: 6px 6px 0 var(--fonce); background: var(--blanc); }
.p-carte-cote { display: flex; flex-direction: column; justify-content: space-between; gap: 30px; padding: 62px 32px 46px; }
.p-carte-annee { font-weight: 800; font-size: 130px; line-height: .9; letter-spacing: -3px; }
.p-carte-sous { font-weight: 700; font-size: 21px; line-height: 1.2; }
.p-carte-liste { align-self: center; display: grid; gap: 12px; padding: 50px 30px 50px 40px; color: var(--fonce); font-size: 17.7px; line-height: 27px; font-variation-settings: 'opsz' 12; }
.p-carte-liste li { position: relative; padding-left: 30px; }
.p-carte-liste li::before { content: "→"; position: absolute; left: 0; top: 0; color: var(--violet); font-weight: 700; font-size: 14px; }
/* « En savoir plus » : sur téléphone, la liste de l'année montre 2 points, le reste s'ouvre d'un clic (bouton sans contour) */
.p-plus-case { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.p-plus { display: none; }
@media (max-width: 600px) {
  .p-plus-case:not(:checked) ~ .p-carte-liste li:nth-child(n+3) { display: none; }
  .p-plus { display: inline-block; order: 1; justify-self: start; margin: -14px 24px 26px; padding: 0; border: 0; background: none; color: var(--fonce);
    font-weight: 800; font-size: 16px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
  .p-plus::after { content: "En savoir plus ↓"; }
  .p-plus-case:checked ~ .p-plus::after { content: "Voir moins ↑"; }
  .p-plus-case:focus-visible ~ .p-plus { outline: 3px solid var(--violet); outline-offset: 3px; }
  .p-carte:not(:has(.p-carte-liste li:nth-child(3))) .p-plus { display: none; }
}
.p-lime .p-carte-cote { background: var(--lime); color: var(--fonce); }
.p-violet .p-carte-cote { background: var(--violet); color: var(--blanc); }
.p-orange .p-carte-cote { background: var(--orange); color: var(--fonce); }
.p-fonce .p-carte-cote { background: var(--fonce); color: var(--lime); }

/* ---------- Galerie de l'année : chaque image à sa place sur la maquette (cadre de 1240 px) ---------- */
.p-galerie { container-type: inline-size; margin-top: 50px; }
.p-plan { --m: calc(100cqw / 1240); position: relative; height: calc(var(--h) * var(--m)); }
.p-img { position: absolute; left: calc(var(--x) * var(--m)); top: calc(var(--y) * var(--m)); width: calc(var(--w) * var(--m)); height: calc(var(--hh) * var(--m)); margin: 0; }
.p-img button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 16px;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), filter .25s; }
.p-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.p-img:nth-child(odd) button:hover, .p-img:nth-child(odd) button:focus-visible { transform: translateY(-6px) rotate(-1deg); filter: drop-shadow(8px 8px 0 var(--violet)); }
.p-img:nth-child(even) button:hover, .p-img:nth-child(even) button:focus-visible { transform: translateY(-6px) rotate(1deg); filter: drop-shadow(8px 8px 0 var(--lime)); }
.p-credit { margin-top: 12px; text-align: right; font-weight: 500; font-size: 13px; color: var(--violet); }

/* la bande qui défile suit directement la feuille blanche */
.p-feuille + .i-bande { position: relative; z-index: 2; }

/* ---------- Tablette ---------- */
@media (max-width: 1100px) {
  .p-intro { grid-template-columns: 170px minmax(0, 1fr); row-gap: 40px; }
  .p-mots { grid-column: 1 / -1; padding-top: 0; }
  .p-titre { font-size: 64px; } .p-titre-pastille { font-size: 54px; }
  .p-carte { grid-template-columns: 320px minmax(0, 1fr); }
  .p-carte-annee { font-size: 84px; }
}
@media (max-width: 900px) {
  .p-intro { grid-template-columns: minmax(0, 1fr); }
  .p-textes { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  .p-editions-tete { flex-direction: column; align-items: flex-start; margin-top: 90px; }
  .p-carte { grid-template-columns: minmax(0, 1fr); }
  .p-carte-liste { padding: 30px 24px; }
}
/* ---------- Téléphone (passe mobile à venir) : images les unes sous les autres ---------- */
@media (max-width: 600px) {
  .p-hero { height: 250px; } .p-retour { top: 140px; }
  .p-feuille { padding: 44px 0 80px; border-radius: 28px 28px 0 0; }
  .p-titre { font-size: 46px; } .p-titre-pastille { font-size: 38px; border-width: 4px; padding: 4px 18px 6px; margin-bottom: 12px; }
  .p-textes { font-size: 17px; line-height: 24px; }
  .p-editions-titre { font-size: 36px; }
  .p-onglets { flex-wrap: wrap; } .p-onglet { width: 76px; height: 44px; font-size: 16px; }
  .p-carte { margin-top: 40px; } .p-carte-cote { padding: 30px 24px; } .p-carte-annee { font-size: min(64px, 16vw); }
  .p-plan { height: auto; display: flex; flex-direction: column; gap: 16px; }
  .p-img { position: static; width: 100%; height: auto; }
  .p-img img { height: auto; }
}
@media (prefers-reduced-motion: reduce) { .p-img button, .p-onglet, .p-mots li { transition: none; } }

/* ---------- Autres pages (bas de page) : titres en 40 px sur les pages projet ---------- */
.p-suite .i-suite-grand { font-size: 40px; }
@media (max-width: 600px) { .p-suite .i-suite-grand { font-size: 32px; } .p-titre { flex-wrap: wrap; white-space: normal; } }

/* ---------- Variantes (page The Velvety Abyss Collective) ---------- */
/* fiche sans « Client » : « Années » reste à la même hauteur que sur les autres pages */
.p-fiche-sans-client { padding-top: 67px; }
.p-type-2l { max-width: 184px; padding: 6px 19px; border-radius: 22px; line-height: 1.2; }
/* titre sur deux lignes : la pastille passe sous le titre */
.p-titre-2l { flex-direction: column; align-items: flex-start; gap: 0; white-space: normal; margin-top: 40px; }
.p-titre-2l .p-titre-pastille { margin: 22px 0 0 4px; padding: 2px 30px 8px; font-size: 76px; transform: rotate(-5deg); transform-origin: left center; }
.p-fonce-blanc .p-carte-cote { background: var(--fonce); color: var(--blanc); }
/* crédit photo centré sous son image */
.p-img-credit { position: absolute; left: 0; right: 6px; top: calc(100% + 12px); text-align: right; font-weight: 500; font-size: 11px; color: var(--violet); }
@media (max-width: 1100px) { .p-titre-2l .p-titre-pastille { font-size: 60px; } }
@media (max-width: 600px) { .p-fiche-sans-client { padding-top: 0; } .p-titre-2l .p-titre-pastille { font-size: 40px; padding: 2px 18px 6px; } .p-img-credit { position: static; margin-top: 6px; } }
.p-titre-2l + .p-textes { margin-top: 14px; }
.p-intro:has(.p-titre-2l) + .p-editions-tete { margin-top: 50px; }
.p-plan:has(.p-img-credit) { margin-bottom: 26px; }
.p-carte.p-liste-etroite .p-carte-liste { padding-right: 75px; }
.p-carte.p-liste-serree .p-carte-liste { gap: 9px; padding-right: 72px; font-size: 16.4px; line-height: 21.5px; }
@media (min-width: 1101px) { .p-carte.p-liste-serree .p-carte-annee { font-size: 120px; } }
.p-carte.p-liste-serree .p-carte-sous { font-size: 25px; }
@media (max-width: 600px) { .p-titre-2l { margin-top: 0; } }

/* ---------- Projet unique (sans boutons) : la galerie suit directement la présentation ---------- */
.p-titre-libre { white-space: normal; flex-wrap: wrap; }
/* sticker posé sur une image (ex. « Présélectionnée par le jury »), accroché à son image */
.p-sticker { position: absolute; z-index: 3; left: calc(var(--sx) * var(--m)); top: calc(var(--sy) * var(--m)); width: calc(300 * var(--m)); height: calc(112 * var(--m));
  display: grid; place-items: center; text-align: center; background: var(--lime); color: var(--fonce);
  border: calc(4 * var(--m)) solid var(--fonce); border-radius: 50%; box-shadow: calc(4 * var(--m)) calc(5 * var(--m)) 0 var(--fonce);
  font-weight: 800; font-size: calc(23 * var(--m)); line-height: 1.05; transform: rotate(-8deg); pointer-events: none; }
.p-sticker small { display: block; margin-top: calc(4 * var(--m)); font-size: calc(14 * var(--m)); font-weight: 700; }
@media (max-width: 600px) { .p-img { position: relative; left: 0; top: 0; } .p-sticker { --m: calc((100vw - 40px) / 654); } .p-unique { margin-top: 50px !important; } }
/* variante de présentation (maquettes du 14/11) : titre un peu plus grand, textes plus bas */
.p-intro.v2 .p-titre { font-size: 85px; margin-top: 8px; }
.p-intro.v2 .p-textes { margin-top: 36px; }
.p-intro.v2 .p-titre-libre { display: block; white-space: nowrap; letter-spacing: -2.6px; line-height: .95; }
.p-intro.v2 .p-titre-libre + .p-textes { margin-top: 30px; }
.p-intro.serre .p-textes p:first-child { letter-spacing: -.05em; }
.p-intro.serre .p-titre { font-size: 81px; }
@media (max-width: 1100px) { .p-intro.v2 .p-titre { font-size: 64px; } .p-intro.v2 .p-titre-libre { white-space: normal; } }
@media (max-width: 600px) { .p-intro.v2 .p-titre { font-size: 46px; } }

/* ---------- Légende centrée sous une image (ex. Vinyl Reworks) ---------- */
.p-img-legende { position: absolute; left: -40px; right: -40px; top: calc(100% + 11 * var(--m)); text-align: center; font-weight: 700; font-size: max(11px, calc(var(--fs, 14) * var(--m))); line-height: 1.33; color: #65666a; }
@media (max-width: 600px) { .p-img-legende { position: static; margin-top: 8px; font-size: 13px; } }

/* ---------- « Et après ? » : encadré pleine largeur sous la galerie (Une parole accentuée) ---------- */
.p-apres { background: #F3EFFF; border-top: 2px solid var(--fonce); padding: 89px 20px 88px; color: var(--fonce); }
.p-apres-carte { position: relative; max-width: 1180px; margin: 0 auto; background: var(--blanc); border: 4px solid var(--fonce); border-radius: 26px; box-shadow: 6px 6px 0 var(--fonce); padding: 70px 65px 58px; }
.p-apres-pastille { position: absolute; left: 51px; top: -28px; background: var(--orange, #F7931E); color: var(--blanc); border: 3px solid var(--fonce); border-radius: 999px; padding: 8px 21px; font-weight: 800; font-size: 21px; transform: rotate(-9deg); }
.p-apres h2 { font-weight: 800; font-size: 52px; line-height: 1.1; letter-spacing: -1px; }
.p-apres-texte { margin-top: 10px; font-size: 21.5px; line-height: 35px; }
.p-apres-liste { margin-top: 40px; border-top: 3px solid var(--fonce); }
.p-apres-liste a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 26px 16px 18px 18px; border-bottom: 3px solid var(--fonce); color: var(--fonce); text-decoration: none; transition: background-color .15s; }
.p-apres-liste a:hover { background: var(--lime); }
.p-apres-liste b { display: block; font-weight: 800; font-size: 28px; line-height: 1.1; }
.p-apres-liste small { display: block; margin-top: 4px; font-size: 16px; color: #5A44B8; }
.p-apres-liste .fleche, .p-apres-cta .fleche { font-weight: 300; font-size: 34px; line-height: 1; }
.p-apres-cta .fleche { font-size: 22px; }
.p-apres-cta { display: inline-block; margin-top: 26px; padding: 14px 27px; border: 3px solid var(--fonce); border-radius: 999px; background: var(--lime); color: var(--fonce); font-weight: 800; font-size: 18px; text-decoration: none; transition: background-color .15s, color .15s; }
.p-apres-cta:hover { background: var(--fonce); color: var(--lime); }
@media (max-width: 600px) { .p-apres { padding: 60px 16px; } .p-apres-carte { padding: 44px 22px 32px; } .p-apres h2 { font-size: 34px; } .p-apres-texte { font-size: 17px; line-height: 1.5; } .p-apres-liste a { gap: 12px; padding: 22px 10px 16px 12px; } .p-apres-liste b { font-size: min(20px, calc((100vw - 144px) / 11.2)); } .p-apres-cta { padding: 14px 16px; font-size: min(18px, calc((100vw - 124px) / 15.2)); white-space: nowrap; } }
/* Vinyl Reworks : texte un peu plus serré, comme sur la maquette */
.p-intro.vr .p-textes p:last-child { letter-spacing: -.014em; }
/* Une parole accentuée : pastille un peu plus petite */
@media (min-width: 1101px) { .p-intro.up .p-titre { font-size: 81px; } .p-intro.up .p-titre-pastille { font-size: 66px; } }
/* bouton d'édition avec un nom (ex. « Vanité fleurie ») */
.p-onglet-large { width: auto; padding: 0 20px; white-space: nowrap; }
/* Motifs floraux */
@media (min-width: 1101px) { .p-intro.mf .p-titre { font-size: 78px; } }
/* titre sans pastille : même hauteur de titre que sur la maquette */
@media (min-width: 1101px) { .p-intro.mf .p-titre, .p-intro.tt .p-titre { margin-top: 39px; } }
@media (min-width: 1101px) { .p-intro.mf + .p-editions-tete { margin-top: 89px; } }
.p-carte.p-carte-motif { min-height: 0; margin-top: 77px; margin-bottom: 6px; }
.p-carte.p-carte-motif .p-carte-cote { gap: 11px; padding: 28px 32px 34px 39px; }
@media (max-width: 600px) { .p-carte.p-carte-motif .p-carte-cote { padding: 30px 24px; } }
@media (min-width: 1101px) {
  .p-intro.mf .p-fiche, .p-intro.tt .p-fiche { gap: 57px; }
  .p-intro.tt .p-titre { font-size: 85px; line-height: 1; letter-spacing: -2.6px; }
  .p-intro.tt .p-textes p:first-child { letter-spacing: -.02em; }
  .p-intro.tt .p-titre-libre + .p-textes { margin-top: 22px; }
}
.p-carte-motif + .p-galerie { padding-top: 6px; }
.p-intro.tt .p-mots li { white-space: nowrap; }
.p-intro.tt .p-mots li:nth-child(10) { max-width: none; }
@media (max-width: 1100px) { .p-img-legende { left: 0; right: 0; } }

/* ---------- Téléphone : placement unique des étiquettes citron des gros titres (projets, pages légales) :
   toujours sur leur propre ligne, sous le titre, même écart, même inclinaison ---------- */
@media (max-width: 600px) {
  .p-titre, .p-titre-libre, .p-intro.v2 .p-titre-libre, .la-titre { display: block; white-space: normal; }
  .p-titre .p-titre-pastille, .p-titre-2l .p-titre-pastille, .la-titre .p-titre-pastille { display: table; margin: 12px 0 4px 6px; transform: rotate(-4deg); transform-origin: left center; }
  .p-intro .p-centre .p-titre { margin-top: 8px; }
  .p-intro .p-centre .p-titre + .p-textes { margin-top: 36px; }
  .p-feuille { padding-bottom: 80px !important; }
}
