/* Portfolio Joie&Cie. Charte PLEIN VENT (design system du 27/10/2026), transposée du A4 vers l'écran :
   palette Aube, typo T2, langage G1 (losange + une seule ficelle), composition C1 (marge de vol, colonnes 1-4 / 5-12).
   Contrastes : encre partout ; coquelicot en texte sur blanc seulement, jamais sur aube. */

@font-face { font-family: "JC Bricolage"; font-weight: 800; font-display: swap; src: url(polices/JCBricolage-ExtraBold.ttf) format("truetype"); }
@font-face { font-family: "JC Bricolage"; font-weight: 600; font-display: swap; src: url(polices/JCBricolage-SemiBold.ttf) format("truetype"); }
@font-face { font-family: "JC Atkinson"; font-weight: 400; font-display: swap; src: url(polices/JCAtkinson-Regular.ttf) format("truetype"); }
@font-face { font-family: "JC Atkinson"; font-weight: 700; font-display: swap; src: url(polices/JCAtkinson-Bold.ttf) format("truetype"); }

:root {
  --jc-aube: #F5E6D8;
  --jc-coquelicot: #C04A35;
  --jc-encre: #2A1712;
  --jc-gris: #5C4A44;
  --jc-filet: #D9C7B8;
  --jc-blanc: #FFFFFF;
  --jc-titre: "JC Bricolage", "Bricolage Grotesque", Arial, sans-serif;
  --jc-texte: "JC Atkinson", "Atkinson Hyperlegible Next", Arial, sans-serif;
  --gouttiere: clamp(1rem, 4vw, 4rem);
  --espace-section: clamp(4.5rem, 11vw, 10rem);
  --hauteur-bandeau: 4.25rem;
  --sortie: cubic-bezier(.16, 1, .3, 1);
  --losange: polygon(50% 0, 100% 36%, 50% 100%, 0 36%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hauteur-bandeau) + 1.5rem); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.55 var(--jc-texte); color: var(--jc-encre); background: var(--jc-blanc); }
img, video { display: block; width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--jc-titre); color: var(--jc-encre); margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--jc-encre); outline-offset: 3px; }

.evitement { position: absolute; left: var(--gouttiere); top: -4rem; z-index: 30; padding: .6rem 1rem; background: var(--jc-encre); color: var(--jc-blanc); }
.evitement:focus { top: .6rem; }

.meta { color: var(--jc-gris); font-size: .9375rem; }
.insecable { white-space: nowrap; }

/* ---- Bandeau : le filet coquelicot des documents A4, sur l'écran ---- */
.bandeau {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  min-height: var(--hauteur-bandeau); padding: .75rem var(--gouttiere);
  background: var(--jc-blanc); border-bottom: 2px solid var(--jc-coquelicot);
}
.bandeau-logo { display: block; flex: none; }
.bandeau-logo img { width: 132px; height: auto; } /* Le logo complet ne descend jamais sous 94 px. */
.bandeau ul { display: flex; flex-wrap: wrap; gap: .25rem clamp(1rem, 2.4vw, 2.25rem); }
.bandeau nav a { position: relative; display: block; padding: .35rem 0 .35rem 1.05rem; font-weight: 700; font-size: 1rem; text-decoration: none; }
.bandeau nav a::before {
  content: ""; position: absolute; left: 0; top: 50%; width: .62rem; height: .8rem; margin-top: -.42rem;
  background: var(--jc-coquelicot); clip-path: var(--losange); transform: rotate(-14deg) scale(0); transition: transform .45s var(--sortie);
}
.bandeau nav a:hover::before, .bandeau nav a[aria-current="true"]::before { transform: rotate(-14deg) scale(1); }

/* ---- Fond, ficelle, contenu : trois étages ---- */
.page { position: relative; isolation: isolate; overflow-x: clip; }
#fil { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; overflow: visible; }
#fil path { fill: none; stroke: var(--jc-coquelicot); stroke-width: 2; stroke-linecap: round; }

/* ---- Couverture : le seul grand geste. Le cerf-volant sort du cadre, le titre tient la page. ---- */
.couverture {
  position: relative; display: flex; align-items: flex-end;
  min-height: min(calc(100svh - var(--hauteur-bandeau)), 58rem); padding: var(--gouttiere) var(--gouttiere) clamp(2.5rem, 6vw, 5rem);
}
.couverture::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--jc-aube); }
.cerf-volant {
  position: absolute; z-index: 1; right: clamp(-10rem, -7.5vw, -2rem); top: -6svh;
  width: min(54vw, 78svh, 52rem); height: auto; overflow: visible;
  animation: envol .8s var(--sortie) both;
}
/* Entrée du design system : il monte en diagonale, puis se pose avec un léger rebond. */
@keyframes envol {
  0%   { transform: translate(-70px, 80px) rotate(14deg); opacity: 0; }
  55%  { transform: translate(4px, -8px) rotate(-3deg); opacity: 1; }
  80%  { transform: translate(0, 3px) rotate(1deg); }
  100% { transform: none; opacity: 1; }
}
.couverture-texte { position: relative; z-index: 2; max-width: min(100%, 66rem); }
.surtitre { font: 800 .9375rem/1.2 var(--jc-titre); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.25rem; }
h1 { font-weight: 800; font-size: clamp(3.1rem, min(8.6vw, 15.5svh), 9.75rem); line-height: .94; letter-spacing: -.045em; }
.descripteur { margin-top: clamp(1.25rem, 2.5vw, 2.25rem); font-size: clamp(1.125rem, 1.7vw, 1.5rem); line-height: 1.3; }

/* ---- Composition C1 : titres en colonnes 1-4, réalisations en colonnes 5-12 ---- */
.type {
  position: relative;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(.75rem, 1.6vw, 1.5rem);
  padding: var(--espace-section) var(--gouttiere);
}
.type-aube::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--jc-aube); }
.ancre { position: absolute; left: calc(var(--gouttiere) + .55rem); top: calc(var(--espace-section) - .1rem); width: 1px; height: 1px; }
.marge { grid-column: 1 / span 4; position: sticky; top: calc(var(--hauteur-bandeau) + 2rem); align-self: start; z-index: 2; padding-right: 1rem; }
.contenu { grid-column: 5 / span 8; position: relative; z-index: 1; min-width: 0; }

.marge h2 {
  position: relative; padding-left: clamp(2.1rem, 3vw, 2.9rem);
  font-weight: 800; font-size: clamp(2.25rem, 4.2vw, 4.25rem); line-height: 1; letter-spacing: -.035em;
}
.marge h2::before {
  content: ""; position: absolute; left: 0; top: .08em; width: clamp(1.45rem, 2.1vw, 2.05rem); aspect-ratio: 7 / 9;
  background: var(--jc-coquelicot); clip-path: var(--losange); transform: rotate(-14deg);
}
.chiffre { margin-top: clamp(1.75rem, 3.5vw, 3.25rem); padding-left: clamp(2.1rem, 3vw, 2.9rem); }
.chiffre .valeur { font: 800 clamp(1.75rem, 2.5vw, 2.5rem)/1 var(--jc-titre); letter-spacing: -.03em; }
.chiffre .legende { margin-top: .6rem; color: var(--jc-gris); max-width: 19rem; line-height: 1.45; }

/* ---- Films ---- */
.film h3, .capsules h3, .marque h3 { font-weight: 800; letter-spacing: -.02em; line-height: 1.12; }
.film h3 { font-size: clamp(1.375rem, 2vw, 1.875rem); }
.film figcaption { padding-top: 1rem; }
.film figcaption .meta { margin-top: .3rem; }
.film figcaption .meta + p { margin-top: .55rem; max-width: 38rem; }
.ecran { position: relative; overflow: hidden; background: var(--jc-encre); }
.ecran img { transition: transform 1.1s var(--sortie); }
.ecran:hover img { transform: scale(1.025); }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .42fr); gap: clamp(1rem, 2.4vw, 2.25rem); margin-top: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
.film-vertical .ecran { aspect-ratio: 9 / 16; }
.film-vertical .ecran img { height: 100%; object-fit: cover; }

/* Le bouton de lecture est le cerf-volant : la charte interdit le triangle. */
.lire { position: absolute; left: clamp(.85rem, 2vw, 1.5rem); bottom: clamp(.85rem, 2vw, 1.5rem); display: flex; align-items: center; gap: .7rem; color: var(--jc-encre); text-decoration: none; }
.losange-lire { position: relative; flex: none; width: clamp(2.5rem, 4.4vw, 4.25rem); aspect-ratio: 30 / 38; background: var(--jc-coquelicot); clip-path: var(--losange); transform: rotate(-14deg); transition: transform .6s var(--sortie); }
.lire-texte { padding: .6rem 1.05rem; background: var(--jc-coquelicot); color: var(--jc-blanc); font-weight: 700; font-size: clamp(1rem, 1.35vw, 1.25rem); line-height: 1.2; transition: background-color .25s ease; }
.ecran:hover .lire-texte, a.lire:focus-visible .lire-texte { background: var(--jc-encre); }
.ecran:hover a.lire .losange-lire, a.lire:focus-visible .losange-lire { transform: translate(.2rem, -.5rem) rotate(-6deg); }
.ecran iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Motion ---- */
.boucle { position: relative; }
.boucle video { background: #E6E8EC; }
.boucle-bouton {
  position: absolute; right: .75rem; top: .75rem; padding: .4rem .7rem; border: 0;
  background: var(--jc-blanc); color: var(--jc-encre); font: 700 .875rem/1.2 var(--jc-texte); cursor: pointer;
}
.boucle figcaption { padding-top: .6rem; }
.capsules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 1.6vw, 1.5rem); margin-top: clamp(2rem, 4vw, 3.25rem); }
.capsules h3 { margin-top: .6rem; font-size: 1.0625rem; font-weight: 600; }
.capsules .losange-lire { width: clamp(1.5rem, 2.2vw, 2.1rem); }
.capsules .lire { left: .6rem; bottom: .6rem; gap: .45rem; }
.capsules .lire-texte { padding: .3rem .6rem; font-size: .9375rem; }

/* ---- PAO : une planche par marque, jamais la même ---- */
.marque + .marque { margin-top: clamp(3.5rem, 8vw, 7rem); }
.marque header { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 1rem; margin-bottom: 1.25rem; }
.marque h3 { font-size: clamp(1.625rem, 2.6vw, 2.5rem); letter-spacing: -.03em; }
.planche { display: grid; gap: clamp(.6rem, 1.3vw, 1.25rem); }
.planche a { display: block; overflow: hidden; }
.planche img { transition: transform 1.1s var(--sortie); }
.planche a:hover img { transform: scale(1.025); }

.planche-tentimes { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.planche-tentimes .v1 { grid-column: span 6; grid-row: span 2; }
.planche-tentimes .v2 { grid-column: span 3; }
.planche-tentimes .v3 { grid-column: span 3; }
.planche-tentimes .v4 { grid-column: span 6; align-self: end; }

.planche-harper { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.planche-harper a:nth-child(2) { margin-top: clamp(1.5rem, 5vw, 4.5rem); }
.planche-harper a:nth-child(3) { margin-top: clamp(.75rem, 2.5vw, 2.25rem); }

.planche-neoshore { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.planche-neoshore .v1 { grid-column: 1 / -1; }
.planche-neoshore .v2 { grid-column: span 5; }
.planche-neoshore .v3 { grid-column: span 4; }
.planche-neoshore .v4 { grid-column: span 3; }

.lien-charte { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .1rem .8rem; align-items: baseline; }
.lien-charte a { font-weight: 700; text-underline-offset: .18em; }

/* ---- PDF ---- */
.chapeau { font: 600 clamp(1.375rem, 2.3vw, 2.125rem)/1.18 var(--jc-titre); letter-spacing: -.02em; max-width: 22em; }
.intro-liste { margin-top: clamp(2rem, 4vw, 3rem); }
.documents { margin-top: .75rem; border-top: 2px solid var(--jc-encre); }
.documents li { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem 1.5rem; padding: 1rem 0 1rem 1.6rem; border-bottom: 1px solid var(--jc-filet); background: var(--jc-blanc); }
.documents li::before { content: ""; position: absolute; left: 0; top: 1.3rem; width: .68rem; height: .88rem; background: var(--jc-coquelicot); clip-path: var(--losange); transform: rotate(-14deg); }
.documents a { color: var(--jc-coquelicot); font-weight: 700; text-underline-offset: .18em; }

/* ---- Contact : la ficelle arrive ici ---- */
.contact { position: relative; padding: var(--espace-section) var(--gouttiere); }
.contact::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--jc-aube); }
.contact h2, .contact-lien { position: relative; z-index: 1; }
.contact h2 { font-weight: 800; font-size: clamp(2.25rem, 6vw, 6rem); line-height: .98; letter-spacing: -.04em; max-width: 12em; }
.contact-lien { margin-top: clamp(1.5rem, 3vw, 2.75rem); font: 600 clamp(1.125rem, 2.3vw, 2rem)/1.25 var(--jc-titre); overflow-wrap: anywhere; }
.contact-lien a { text-underline-offset: .18em; text-decoration-thickness: 2px; }

.mentions { padding: 1.75rem var(--gouttiere) 2.25rem; background: var(--jc-blanc); border-top: 2px solid var(--jc-coquelicot); color: var(--jc-gris); font-size: .875rem; line-height: 1.5; }
.mentions p + p { margin-top: .25rem; }
.mentions strong { color: var(--jc-encre); }

/* ---- Tablette et téléphone : la marge passe au-dessus, la ficelle reste ---- */
@media (max-width: 860px) {
  :root { --hauteur-bandeau: 6rem; }
  .marge { grid-column: 1 / -1; position: static; margin-bottom: 2.25rem; padding-right: 0; }
  .contenu { grid-column: 1 / -1; }
  .chiffre { margin-top: 1rem; }
  .chiffre .legende { max-width: 30rem; }
  .cerf-volant { width: min(74vw, 60svh); right: -16vw; top: -3vw; }
  h1 { font-size: clamp(2.75rem, 13vw, 6.5rem); }
  .couverture { min-height: min(calc(100svh - var(--hauteur-bandeau)), 46rem); }
}
@media (max-width: 560px) {
  :root { --hauteur-bandeau: 8rem; }
  html { scroll-padding-top: 1rem; }
  body { font-size: 1rem; }
  .descripteur { max-width: 16em; }
  .bandeau { position: static; } /* Sur téléphone, le menu ne reste pas à l'écran : il prendrait trop de place. */
  .duo { grid-template-columns: minmax(0, 1fr); }
  .film-vertical { max-width: 62%; }
  .capsules { grid-template-columns: minmax(0, 1fr); }
  .capsules li { display: grid; grid-template-columns: 48% minmax(0, 1fr); gap: .85rem; align-items: center; }
  .capsules h3 { margin-top: 0; }
  .planche-tentimes .v1 { grid-column: 1 / -1; grid-row: auto; }
  .planche-tentimes .v2, .planche-tentimes .v3 { grid-column: span 6; }
  .planche-tentimes .v4 { grid-column: 1 / -1; }
  .planche-neoshore .v2, .planche-neoshore .v3 { grid-column: span 6; }
  .planche-neoshore .v4 { grid-column: 4 / span 6; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
