/* Projets (PSB) — styles propres à la page (le reste est dans /assets/eckes.css) */

/* ---------- Héros : les traits du logo PSB en filigrane ---------- */
.psb-traits { position: absolute; z-index: 1; right: 6%; top: 14%; width: clamp(180px, 24vw, 340px); opacity: .16; mix-blend-mode: screen; filter: grayscale(1) contrast(3); pointer-events: none; }

/* ---------- Badges de type de fichier ---------- */
.badge { display: inline-block; padding: 4px 8px; border-radius: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: #fff; background: #c94a4a; flex: none; }
.t-pptx, .t-ppt { background: #d9773a; }
.t-docx, .t-doc { background: var(--blue); }
.t-xlsx, .t-xls { background: var(--green); }
.t-zip { background: #6b6f7b; }
.t-png, .t-jpg, .t-jpeg, .t-webp { background: #8a5cc4; }

/* ---------- Feuilles (aperçu stylisé des fichiers) ---------- */
.feuille { position: absolute; background: #fff; border-radius: 8px; box-shadow: 0 22px 44px rgba(0,0,0,.32); padding: 7% 7% 0; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.feuille.portrait { aspect-ratio: 3 / 4; }
.feuille.paysage { aspect-ratio: 16 / 10; }
.feuille .badge { position: absolute; left: -10px; top: 12px; }
.feuille i { display: block; height: 6px; border-radius: 3px; background: #e8e5dc; margin-bottom: 9%; }
.feuille i:first-of-type { width: 70%; height: 8px; background: var(--ink); opacity: .8; }
.feuille i:nth-of-type(3) { width: 85%; }

/* ---------- À la une ---------- */
.une { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; padding-block: clamp(70px, 9vw, 110px); }
.une-visuel { position: relative; aspect-ratio: 4 / 3.1; border-radius: 24px; background: var(--navy); overflow: hidden; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 30px 30px; }
.pastille { position: absolute; z-index: 3; left: 20px; top: 20px; background: #fff; color: var(--ink); font-size: .8rem; font-weight: 500; padding: 7px 14px; border-radius: 999px; }
.feuilles { position: absolute; inset: 0; }
.feuilles .f0 { z-index: 2; }
.feuilles .f1 .badge, .feuilles .f2 .badge { left: auto; right: -10px; }   /* badge visible même derrière la 1re feuille */
.feuilles.n1 .f0.portrait { left: 34%; top: 18%; width: 32%; transform: rotate(-3deg); }
.feuilles.n1 .f0.paysage { left: 22%; top: 26%; width: 56%; transform: rotate(-3deg); }
.feuilles.n2 .f0 { left: 17%; top: 17%; width: 34%; transform: rotate(-5deg); }
.feuilles.n2 .f0.paysage { width: 46%; top: 24%; }
.feuilles.n2 .f1 { left: 46%; top: 26%; width: 42%; transform: rotate(4deg); }
.feuilles.n2 .f1.portrait { width: 30%; left: 54%; top: 20%; }
.feuilles.n3 .f0 { left: 12%; top: 22%; width: 30%; transform: rotate(-7deg); }
.feuilles.n3 .f1 { left: 36%; top: 16%; width: 30%; transform: rotate(1deg); z-index: 3; }
.feuilles.n3 .f2 { left: 58%; top: 26%; width: 30%; transform: rotate(7deg); }
.feuilles.n3 .paysage { width: 38%; }
.une-visuel:hover .f0 { transform: rotate(-8deg) translate(-6%, -3%); }
.une-visuel:hover .f1 { transform: rotate(7deg) translate(6%, -2%); }
.une-texte h2 { margin-top: 14px; font-size: clamp(2.6rem, 5vw, 4.2rem); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.une-meta { margin-top: 14px; color: var(--ink-soft); font-size: .92rem; }

/* ---------- Liste des fichiers d'un projet ---------- */
.fichiers { list-style: none; margin-top: 24px; border-top: 1px solid var(--line); }
.fichier { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.f-nom { flex: 1; min-width: 0; }
.f-nom b { display: block; font-weight: 500; overflow-wrap: anywhere; }
.f-nom small { color: var(--ink-soft); font-size: .82rem; }
.f-desc { display: block; margin-top: 4px; color: var(--ink-soft); font-size: .86rem; font-style: normal; line-height: 1.45; }
.p-desc { margin: 4px 0 18px; color: var(--ink-soft); line-height: 1.6; max-width: 62ch; }
.liseuse-corps iframe.office { background: #fff; }
.fichier .btn { padding: .55em 1.05em; font-size: .85rem; }
.btn-icone { width: 38px; padding: 0 !important; height: 36px; }
.zip { display: inline-block; margin-top: 18px; color: var(--blue); font-size: .92rem; font-weight: 500; text-decoration: none; }
.zip:hover { text-decoration: underline; }

/* ---------- Tous les projets ---------- */
.tous { padding-bottom: clamp(60px, 9vw, 110px); }
.tous-tete { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.tous-tete h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 500; letter-spacing: -.03em; }
.tous-nb { color: var(--ink-soft); font-size: .9rem; margin: 10px 0 34px; font-variant-numeric: tabular-nums; }
.recherche { position: relative; flex: 1; max-width: 400px; }
.recherche svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-soft); pointer-events: none; }
.recherche input { width: 100%; padding: 13px 44px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 1rem; -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s; }
.recherche input::-webkit-search-cancel-button { display: none; }
.recherche input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,76,156,.12); }
.recherche button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--paper-2); font-size: 1.1rem; cursor: pointer; }
.recherche button[hidden] { display: none; }

.annee { display: grid; grid-template-columns: 140px 1fr; gap: 40px; }
.annee[hidden] { display: none; }
.annee-titre { position: sticky; top: 100px; align-self: start; }
.annee-titre b { display: block; font-size: 3rem; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.annee-titre span { color: var(--ink-soft); font-size: .85rem; }
.projet { display: grid; grid-template-columns: 1fr 1.05fr; margin-bottom: 26px; border-radius: 26px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.projet, #une { scroll-margin-top: 110px; }   /* liens du plan du site : le projet arrive sous le menu */
.projet[hidden] { display: none; }
.couverture { position: relative; min-height: 340px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; background: var(--navy); color: #fff; overflow: hidden; }
.couverture .traits { position: absolute; right: -60px; bottom: -60px; width: 340px; opacity: .12; mix-blend-mode: screen; filter: grayscale(1) contrast(3); transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.projet:hover .traits { transform: translate(-14px, -14px); }
.couverture .num { position: relative; font-size: .85rem; opacity: .6; }
.couverture h3 { position: relative; font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.couverture .tags { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.couverture .tags span { font-size: .78rem; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); }
.contenu { padding: 28px 30px; }
.contenu .fichiers { margin-top: 14px; }

.a-venir { margin-left: 180px; padding: 30px; border: 1.5px dashed var(--line); border-radius: 22px; text-align: center; color: var(--ink-soft); display: grid; gap: 6px; }
.a-venir[hidden] { display: none; }
.a-venir b { color: var(--ink); font-weight: 500; }
.vide { padding: 40px 0; text-align: center; color: var(--ink-soft); }
.vide[hidden] { display: none; }

/* ---------- Liseuse ---------- */
.liseuse { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: clamp(10px, 3vw, 40px); background: rgba(12,18,36,.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s; }
.liseuse[hidden] { display: none; }
.liseuse.ouverte { opacity: 1; }
.liseuse-boite { width: min(1100px, 100%); height: min(88vh, 100%); display: flex; flex-direction: column; background: #fff; border-radius: calc(var(--radius) + 4px); overflow: hidden; box-shadow: 0 40px 80px rgba(0,0,0,.35); transform: translateY(16px) scale(.98); transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.liseuse.ouverte .liseuse-boite { transform: none; }
.liseuse-boite:fullscreen { width: 100%; height: 100%; border-radius: 0; }
.liseuse-haut { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px 12px 22px; border-bottom: 1px solid var(--line); }
.liseuse-haut h3 { font-size: 1rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.liseuse-actions { display: flex; gap: 6px; flex: none; }
.l-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: background .2s; }
.l-btn[hidden] { display: none; }
.l-btn:hover { background: var(--paper-2); }
.l-btn svg { width: 18px; height: 18px; }
.liseuse-corps { flex: 1; background: #525659; }
.liseuse-corps iframe { width: 100%; height: 100%; border: 0; display: block; }
.liseuse-corps img { width: 100%; height: 100%; object-fit: contain; background: var(--navy); }
.liseuse-aide { padding: 8px; text-align: center; font-size: .78rem; color: var(--ink-soft); border-top: 1px solid var(--line); }

@media (max-width: 1000px) {
  .une { grid-template-columns: 1fr; }
  .projet { grid-template-columns: 1fr; }
  .couverture { min-height: 240px; }
}
@media (max-width: 760px) {
  .annee { grid-template-columns: 1fr; gap: 12px; }
  .annee-titre { position: static; display: flex; align-items: baseline; gap: 12px; }
  .annee-titre b { font-size: 2.2rem; }
  .a-venir { margin-left: 0; }
  .recherche { max-width: none; flex-basis: 100%; }
  .psb-traits { top: 18%; right: -8%; width: 52vw; }
  .contenu { padding: 22px 20px; }
  .fichier { flex-wrap: wrap; }
  .fichier .f-nom { flex-basis: calc(100% - 60px); }
  .liseuse { padding: 0; }
  .liseuse-boite { height: 100%; border-radius: 0; }
  .liseuse-aide { display: none; }
}
