/* La fresque horizontale : chapitres, mois, voies des pistes, périodes, événements accrochés à l'axe. */
.frise-adn .fresque { overflow-x: auto; overflow-y: hidden; border-top: 1px solid var(--bord); border-bottom: 1px solid var(--bord);
  cursor: grab; scrollbar-color: rgba(232, 98, 10, .5) transparent; }
.frise-adn .fresque.saisie { cursor: grabbing; user-select: none; }
.frise-adn .fresque-int { width: calc(var(--col) + var(--largeur) + 48px); position: relative; padding-bottom: 6px; }

/* En-tête : chapitres puis mois */
.frise-adn .rangee-tete { display: flex; position: relative; height: 82px; border-bottom: 1px solid var(--bord); }
.frise-adn .coin { position: sticky; left: 0; z-index: 6; width: var(--col); flex: none; background: var(--fond);
  border-right: 1px solid var(--bord); display: flex; flex-direction: column; justify-content: center; padding: 0 16px;
  font: 600 11px var(--mono); color: var(--texte-3); letter-spacing: .1em; }
.frise-adn .coin span + span::before { content: "→ "; color: var(--orange); }
.frise-adn .tete-piste { position: relative; flex: none; width: var(--largeur); }
.frise-adn .chapitre { position: absolute; top: 8px; height: 26px; display: flex; align-items: center; padding: 0 12px;
  border: 1px solid var(--bord); border-radius: 5px; background: var(--surface); overflow: clip;
  font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--texte-2); white-space: nowrap; }
.frise-adn .chapitre-0 { border-color: var(--orange-ligne); background: var(--orange-doux); color: var(--texte); }
.frise-adn .chapitre span { position: sticky; left: calc(var(--col) + 12px); }
.frise-adn .mois { position: absolute; top: 42px; height: 34px; display: flex; align-items: baseline; gap: 6px; padding: 8px 10px 0;
  background: none; border: 0; border-left: 1px solid var(--bord); text-align: left; color: var(--texte); }
.frise-adn .mois b { font-weight: 700; font-size: 14px; text-transform: capitalize; }
.frise-adn .mois small { font: 500 11px var(--mono); color: var(--texte-3); }
.frise-adn .mois i { font: 600 11px var(--mono); font-style: normal; color: var(--orange); margin-left: auto; padding-right: 6px; }
.frise-adn .mois:hover b { color: var(--orange); }
.frise-adn .mois.etroit small, .frise-adn .mois.etroit i, .frise-adn .mois.tres-etroit small, .frise-adn .mois.tres-etroit i { display: none; }
.frise-adn .mois.tres-etroit { padding: 8px 4px 0; }
.frise-adn .mois.tres-etroit b { font-size: 11.5px; }

/* Calques communs : bandes des chapitres, traits des mois, aujourd'hui */
.frise-adn .pistes { position: relative; }
.frise-adn .calques { position: absolute; top: 0; left: var(--col); width: var(--largeur); pointer-events: none; z-index: 0; }
.frise-adn .bande { position: absolute; top: 0; bottom: 0; }
.frise-adn .bande-0 { background: repeating-linear-gradient(135deg, rgba(232, 98, 10, .045) 0 2px, transparent 2px 14px); }
.frise-adn .bande-1 { background: rgba(232, 98, 10, .035); }
.frise-adn .trait-mois { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--bord); }
.frise-adn .aujourdhui { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed rgba(232, 98, 10, .4); }
.frise-adn .futur-voile { position: absolute; top: 0; bottom: 0; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(10, 10, 13, .55) 0 7px, rgba(10, 10, 13, .38) 7px 14px); }

/* Le curseur du temps (js/curseur.js) : ligne orange et poignée qu'on fait glisser ; à droite, le futur est voilé. */
.frise-adn .curseur { position: absolute; top: 0; bottom: 0; width: 0; z-index: 4; pointer-events: none; }
.frise-adn .curseur.cache { visibility: hidden; }
.frise-adn .curseur-ligne { position: absolute; top: 0; bottom: 0; left: -8px; width: 16px; pointer-events: auto; cursor: ew-resize; touch-action: none; }
.frise-adn .curseur-ligne::before { content: ""; position: absolute; top: 0; bottom: 0; left: 7px; width: 2px;
  background: linear-gradient(180deg, var(--orange), rgba(232, 98, 10, .55)); box-shadow: 0 0 14px rgba(232, 98, 10, .55);
  transition: left .15s, width .15s, box-shadow .15s; }
.frise-adn .curseur-ligne:hover::before, .frise-adn .curseur.saisi .curseur-ligne::before { left: 6px; width: 4px; box-shadow: 0 0 24px rgba(232, 98, 10, .95); }
.frise-adn .curseur-poignee { position: absolute; top: 4px; left: 0; transform: translateX(-50%); pointer-events: auto; cursor: grab; touch-action: none;
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 12px 6px; border: 0; border-radius: 7px;
  background: var(--orange); color: #0a0a0d; white-space: nowrap; box-shadow: 0 8px 24px rgba(232, 98, 10, .45);
  transition: transform .18s, box-shadow .18s; }
.frise-adn .curseur-poignee::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px;
  border: 6px solid transparent; border-bottom: 0; border-top-color: var(--orange); }
.frise-adn .curseur-poignee b { font: 700 11.5px var(--mono); }
.frise-adn .curseur-poignee span { font: 600 10.5px var(--mono); opacity: .8; }
.frise-adn .curseur-poignee:hover { box-shadow: 0 10px 30px rgba(232, 98, 10, .7); }
.frise-adn .curseur-poignee:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.frise-adn .curseur.saisi .curseur-poignee { cursor: grabbing; transform: translateX(-50%) scale(1.06); }
.frise-adn .curseur.deplace .curseur-poignee { background: linear-gradient(135deg, #ff8a3d, var(--orange)); }
.frise-adn .curseur-retour { position: absolute; top: 46px; left: 14px; pointer-events: auto; white-space: nowrap;
  padding: 3px 9px; border-radius: 5px; border: 1px solid var(--orange-ligne); background: rgba(10, 10, 13, .92);
  font: 600 11px var(--mono); color: var(--orange); transition: background .2s, color .2s; }
.frise-adn .curseur-retour:hover { background: var(--orange); color: #0a0a0d; }

/* Une piste = son nom (colonne collante) + sa voie */
.frise-adn .piste { display: flex; position: relative; z-index: 1; border-bottom: 1px solid var(--bord); }
.frise-adn .piste-nom { position: sticky; left: 0; z-index: 5; width: var(--col); flex: none; padding: 14px 16px;
  background: linear-gradient(90deg, var(--fond) 82%, rgba(10, 10, 13, .0)); border-right: 1px solid var(--bord); }
.frise-adn .piste-nom b { display: block; font-size: 13.5px; line-height: 1.3; }
.frise-adn .piste-nom small { display: block; margin-top: 4px; font: 500 11px var(--mono); color: var(--texte-3); }
.frise-adn .voie { position: relative; flex: none; width: var(--largeur); }
.frise-adn .phase { position: absolute; height: 18px; border-radius: 4px; background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .08); overflow: clip; display: flex; align-items: center; }
.frise-adn .phase span { position: sticky; left: calc(var(--col) + 8px); padding: 0 8px; white-space: nowrap;
  font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--texte-3); }
.frise-adn .axe { position: absolute; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, var(--bord-fort), var(--bord)); }

/* Événements : point sur l'axe (::after), tige (::before), étiquette */
.frise-adn .evt { position: absolute; display: flex; align-items: baseline; gap: 7px; max-width: 230px; height: 24px; padding: 3px 9px 3px 10px;
  margin-left: -1px; border: 1px solid var(--bord); border-radius: 0 5px 5px 0; background: rgba(17, 17, 22, .92);
  white-space: nowrap; text-align: left; font-size: 12.5px; color: var(--texte);
  transition: border-color .2s, background .2s, opacity .35s, filter .35s, transform .2s, box-shadow .2s; }
.frise-adn .evt::before { content: ""; position: absolute; left: -1px; bottom: 100%; width: 1px; height: calc(var(--tige) - 0px); background: var(--bord-fort); }
.frise-adn .evt::after { content: ""; position: absolute; left: -5px; top: calc(-1 * var(--tige) - 4px); width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255, 255, 255, .55); }
.frise-adn .evt-date { font: 600 10.5px var(--mono); color: var(--texte-3); flex: none; }
.frise-adn .evt-titre { overflow: hidden; text-overflow: ellipsis; }
.frise-adn .evt::after { transition: transform .2s, background .2s, box-shadow .2s; }
.frise-adn .evt:hover, .frise-adn .evt.actif { border-color: var(--orange); background: #1a1310; z-index: 4; }
.frise-adn .evt:hover { box-shadow: 0 0 0 1px rgba(232, 98, 10, .35), 0 6px 18px rgba(0, 0, 0, .45); }
.frise-adn .evt:hover::before, .frise-adn .evt.actif::before { background: var(--orange); }
.frise-adn .evt:hover::after, .frise-adn .evt.actif::after { transform: scale(1.45); background: var(--orange); box-shadow: 0 0 14px rgba(232, 98, 10, .9); }

.frise-adn .evt.type-naissance { border-left: 2px solid var(--orange); font-weight: 600; }
.frise-adn .evt.type-naissance::after { left: -6px; width: 11px; height: 11px; top: calc(-1 * var(--tige) - 5px); background: var(--orange); box-shadow: 0 0 12px rgba(232, 98, 10, .9); }
.frise-adn .evt.type-naissance .evt-date { color: var(--orange); }
.frise-adn .evt.type-idee { border-style: dashed; border-left: 2px solid var(--orange-ligne); }
.frise-adn .evt.type-idee::after { border-radius: 2px; transform: rotate(45deg); background: var(--fond); border: 2px solid var(--orange); }
.frise-adn .evt.type-materiel::after { background: var(--fond); border: 2px solid rgba(255, 255, 255, .75); }
.frise-adn .evt.type-jalon { font-size: 12px; color: var(--texte-2); }
.frise-adn .evt.type-jalon::after { left: -4px; width: 7px; height: 7px; top: calc(-1 * var(--tige) - 3px); }
.frise-adn .evt.type-idee:hover::after, .frise-adn .evt.type-idee.actif::after { transform: rotate(45deg) scale(1.45); }
.frise-adn .evt.eteint { opacity: .14; }
.frise-adn .evt.futur { opacity: .16; filter: grayscale(1); }
.frise-adn .evt.actif { background: linear-gradient(90deg, rgba(232, 98, 10, .34), rgba(26, 19, 16, .96) 72%);
  box-shadow: 0 0 0 1px var(--orange), 0 8px 24px rgba(0, 0, 0, .5); }
.frise-adn .evt.actif::after { animation: fr-pouls 1.6s ease-out infinite; }
.frise-adn .evt.clic { animation: fr-clic .65s ease-out; }
@keyframes fr-pouls { 0% { box-shadow: 0 0 0 0 rgba(232, 98, 10, .8); } 100% { box-shadow: 0 0 0 16px rgba(232, 98, 10, 0); } }
@keyframes fr-clic { 0% { background: rgba(232, 98, 10, .7); box-shadow: 0 0 0 0 rgba(232, 98, 10, .7); } 100% { box-shadow: 0 0 0 14px rgba(232, 98, 10, 0); } }
.frise-adn .mois { transition: opacity .3s; }
.frise-adn .mois.apres { opacity: .32; }
.frise-adn .mois.compact b { font-size: 12.5px; }

/* Sans JavaScript (et pour les moteurs) : la liste complète. Avec : la fresque sur ordinateur, la liste sur téléphone. */
.frise-adn .fresque { display: none; }
.frise-adn:not(.fr-js) .outils, .frise-adn:not(.fr-js) .aide { display: none; }
.frise-adn.fr-js .fresque { display: block; }
.frise-adn.fr-js .liste { display: none; }
@media (max-width: 760px) {
  .frise-adn.fr-js .fresque { display: none; }
  .frise-adn.fr-js .liste { display: block; }
}
