/* L'étagère des dossiers (js/etagere.js) : une icône de dossier orange par projet, en relief, avec les vraies pages
   de son PDF à l'intérieur. Au survol, la façade (en verre orange) s'ouvre vers l'avant et les pages montent en
   éventail. La zone survolée (le bouton) ne bouge jamais : seuls la façade et les pages s'animent (sinon tremblement). */
.frise-adn .etagere-zone { max-width: 1240px; margin: 0 auto; padding: 30px 24px 10px; }
.frise-adn .ds-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 6px; }
.frise-adn .ds-titre h2 { font-size: 26px; letter-spacing: -.015em; margin: 0; }
.frise-adn .ds-titre h2 span { font: 700 21px var(--mono); color: var(--orange); margin-right: 6px; }
.frise-adn .ds-etapes { display: flex; gap: 18px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--texte-2); }
.frise-adn .ds-etapes li { display: flex; align-items: center; gap: 8px; }
.frise-adn .ds-etapes b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--orange); color: #0a0a0d; font: 700 11.5px var(--mono); }

/* L'étagère elle-même : une rangée posée sur une planche lumineuse. */
.frise-adn .etagere { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: 18px;
  list-style: none; margin: 0; padding: 64px 6px 0; }
.frise-adn .etagere::after { content: ""; position: absolute; z-index: 0; left: -12px; right: -12px; bottom: 33px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--orange) 12%, #ffae6b 50%, var(--orange) 88%, transparent);
  box-shadow: 0 0 18px rgba(232, 98, 10, .6), 0 10px 40px rgba(232, 98, 10, .25); }
.frise-adn .ds { position: relative; z-index: 1; animation: ds-arrivee .7s cubic-bezier(.16, 1, .3, 1) both; }
.frise-adn .ds:nth-child(2) { animation-delay: .06s; } .frise-adn .ds:nth-child(3) { animation-delay: .12s; }
.frise-adn .ds:nth-child(4) { animation-delay: .18s; } .frise-adn .ds:nth-child(5) { animation-delay: .24s; }
.frise-adn .ds:nth-child(6) { animation-delay: .3s; } .frise-adn .ds:nth-child(7) { animation-delay: .36s; }
.frise-adn .ds:nth-child(8) { animation-delay: .42s; } .frise-adn .ds:nth-child(9) { animation-delay: .48s; }
@keyframes ds-arrivee { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* Le dossier : le dos et son onglet, les pages, la façade vitrée. */
.frise-adn .ds-dossier { position: relative; display: block; width: 100%; aspect-ratio: 1 / .9; padding: 0; border: 0; background: none;
  cursor: pointer; perspective: 680px; text-align: left; color: #fff; }
.frise-adn .ds-dos { position: absolute; inset: 11% 0 0; border-radius: 4px 14px 14px 14px;
  background: linear-gradient(180deg, #cf5808, #a94204 70%, #933803);
  box-shadow: inset 0 1px 0 rgba(255, 196, 150, .4), 0 20px 32px rgba(0, 0, 0, .6); }
.frise-adn .ds-onglet { position: absolute; left: 0; top: -15px; width: 52%; height: 17px; padding-left: 12px; border-radius: 12px 4px 0 0;
  background: linear-gradient(180deg, #d65d0b, #cf5808); clip-path: polygon(0 0, 84% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 196, 150, .45); font: 700 9px/18px var(--mono); letter-spacing: .1em; color: rgba(255, 226, 200, .9); }
.frise-adn .ds-feuilles, .frise-adn .ds-face { pointer-events: none; }
/* Les pages : un cadre large qui ne coupe que le bas (elles restent dans le dossier), libre vers le haut et sur les
   côtés pour l'éventail. Il déborde de 60 % de chaque côté : la page (10 % du bord, 80 % de large) y est à 31,82 %. */
.frise-adn .ds-feuilles { position: absolute; z-index: 1; left: -60%; right: -60%; top: -70%; bottom: 5%; overflow: hidden; } /* z-index : les pages restent sous la façade */
.frise-adn .ds-feuilles img { position: absolute; left: 31.82%; top: 52%; width: 36.36%; height: auto; aspect-ratio: 210 / 297; object-fit: cover;
  border-radius: 3px; background: #f4f1ec; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.frise-adn .ds-feuilles img:nth-child(1) { z-index: 4; }
.frise-adn .ds-feuilles img:nth-child(2) { z-index: 3; transform: translate(7%, -2%) rotate(4deg); }
.frise-adn .ds-feuilles img:nth-child(3) { z-index: 2; transform: translate(-7%, -1%) rotate(-5deg); }
.frise-adn .ds-feuilles img:nth-child(4) { z-index: 1; transform: translate(2%, -4%) rotate(1deg); }
.frise-adn .ds-face { position: absolute; z-index: 2; inset: 36% 0 0; display: flex; flex-direction: column; gap: 3px; padding: 12px 12px 11px;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(176deg, rgba(255, 148, 66, .9) 0%, rgba(240, 108, 18, .9) 32%, rgba(212, 84, 6, .95) 100%);
  -webkit-backdrop-filter: blur(5px) saturate(1.3); backdrop-filter: blur(5px) saturate(1.3);
  box-shadow: inset 0 1.5px 0 rgba(255, 216, 176, .8), inset 0 -16px 26px rgba(110, 36, 0, .35), 0 -3px 12px rgba(0, 0, 0, .25), 0 14px 24px rgba(0, 0, 0, .4);
  transform-origin: 50% 100%; transition: transform .6s cubic-bezier(.16, 1, .3, 1), box-shadow .3s; }
.frise-adn .ds-face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, 0) 42%); }
.frise-adn .ds-tampon { font: 700 9px var(--mono); letter-spacing: .14em; text-transform: lowercase; color: rgba(255, 232, 210, .92); }
.frise-adn .ds-tampon::before { content: "#"; }
.frise-adn .ds-nom { font-size: 15.5px; line-height: 1.12; font-weight: 800; letter-spacing: -.01em; color: #fff;
  text-shadow: 0 1px 2px rgba(110, 36, 0, .35); }
.frise-adn .ds-dates { margin-top: auto; font: 700 9.5px var(--mono); color: rgba(255, 232, 210, .9); }

/* Ouvert : au survol (souris) ou au clavier. */
@media (hover: hover) {
  .frise-adn .ds-dossier:hover .ds-face { transform: rotateX(-24deg);
    box-shadow: inset 0 1.5px 0 rgba(255, 216, 176, .8), inset 0 -16px 26px rgba(110, 36, 0, .35), 0 -3px 12px rgba(0, 0, 0, .25), 0 24px 30px rgba(0, 0, 0, .5); }
  .frise-adn .ds-dossier:hover .ds-feuilles img:nth-child(1) { transform: translate(-2%, -42%) rotate(-2deg) scale(1.03); }
  .frise-adn .ds-dossier:hover .ds-feuilles img:nth-child(2) { transform: translate(32%, -30%) rotate(11deg); }
  .frise-adn .ds-dossier:hover .ds-feuilles img:nth-child(3) { transform: translate(-34%, -28%) rotate(-12deg); }
  .frise-adn .ds-dossier:hover .ds-feuilles img:nth-child(4) { transform: translate(6%, -52%) rotate(3deg); }
}
.frise-adn .ds-dossier:focus-visible { outline: 2px solid var(--orange); outline-offset: 6px; border-radius: 10px; }
.frise-adn .ds-dossier:focus-visible .ds-face { transform: rotateX(-24deg); }
.frise-adn .ds-dossier:focus-visible .ds-feuilles img:nth-child(1) { transform: translate(-2%, -42%) rotate(-2deg) scale(1.03); }
.frise-adn .ds-dossier:focus-visible .ds-feuilles img:nth-child(2) { transform: translate(32%, -30%) rotate(11deg); }
.frise-adn .ds-dossier:focus-visible .ds-feuilles img:nth-child(3) { transform: translate(-34%, -28%) rotate(-12deg); }
.frise-adn .ds-dossier:focus-visible .ds-feuilles img:nth-child(4) { transform: translate(6%, -52%) rotate(3deg); }
.frise-adn .ds.suivi .ds-dos { box-shadow: 0 0 0 2px #ffae6b, 0 0 30px rgba(232, 98, 10, .7), 0 20px 32px rgba(0, 0, 0, .6); }

.frise-adn .ds-pied { margin-top: 16px; text-align: center; }
.frise-adn .ds-pied a { font: 600 11px var(--mono); color: var(--orange); text-decoration: none; }
.frise-adn .ds-pied a:hover { text-decoration: underline; }
.frise-adn .ds-accroche { display: none; }

/* Sous l'étagère : le mode d'emploi, puis la présentation du dossier survolé. */
.frise-adn .ds-legende { min-height: 86px; margin: 18px 0 0; padding: 14px 16px; border: 1px solid var(--bord); border-left: 3px solid var(--orange);
  border-radius: 0 8px 8px 0; background: var(--surface); font-size: 14px; color: var(--texte-2); }
.frise-adn .ds-legende small { display: block; font: 600 11px var(--mono); letter-spacing: .06em; color: var(--orange); text-transform: uppercase; }
.frise-adn .ds-legende b { color: var(--texte); }
.frise-adn .ds-legende.pleine b { display: block; font-size: 16px; margin: 2px 0 4px; }
.frise-adn .ds-legende p { margin: 0 0 4px; }
.frise-adn .ds-legende span { font: 600 12px var(--mono); color: var(--orange); }
.frise-adn .ds-legende.pleine { animation: ds-legende .35s ease-out; }
@keyframes ds-legende { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Le bandeau du dossier suivi (js/suivi.js) : une ligne de la barre d'outils collante, donc toujours visible. */
.frise-adn .suivi { flex: 1 0 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 8px 14px;
  border: 1px solid var(--orange-ligne); border-radius: 8px; background: linear-gradient(90deg, rgba(232, 98, 10, .18), rgba(232, 98, 10, .04));
  font-size: 13.5px; color: var(--texte-2); animation: ds-legende .35s ease-out; }
.frise-adn .suivi[hidden] { display: none; }
.frise-adn .suivi-txt { flex: 1 1 320px; }
.frise-adn .suivi-txt b { color: var(--texte); }
.frise-adn .evt.hors-suivi, .frise-adn .carte-evt.hors-suivi { opacity: .12; }

/* Téléphone (provisoire, la version mobile sera reprise) : l'étagère défile de gauche à droite. */
@media (max-width: 760px) {
  .frise-adn .etagere-zone { padding: 22px 16px 6px; }
  .frise-adn .etagere { grid-auto-columns: 138px; overflow-x: auto; scroll-snap-type: x mandatory; padding-top: 30px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .frise-adn .ds { scroll-snap-align: start; }
  .frise-adn .etagere::after { display: none; }
}
