.chladni-bento {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
}

.chladni-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.chladni-kicker {
  position: absolute;
  top: 1em;
  left: 1em;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  background: color-mix(in lab, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
}

.chladni-toolbar {
  position: absolute;
  top: 1em;
  right: 1em;
  display: flex;
  gap: 0.4em;
}

.chladni-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8em;
  height: 1.8em;
  border: none;
  border-radius: 999px;
  background: color-mix(in lab, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
  color: var(--ink);
  cursor: pointer;
  font-size: var(--x-small);

  &:hover {
    background: color-mix(in lab, var(--bg) 90%, transparent);
  }
}

.chladni-swatch {
  -webkit-appearance: none;
  appearance: none;
  width: 1em;
  height: 1em;
  padding: 0;
  border: 2px solid;
  border-radius: 50%;
  background: none;
  cursor: pointer;

  &::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
  }

  &::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
  }

  &::-moz-color-swatch {
    border: none;
    border-radius: 50%;
  }
}

.chladni-swatch--bg {
  border-color: var(--ink);
}

.chladni-swatch--ink {
  border-color: var(--bg);
}

.chladni-readout {
  position: absolute;
  bottom: 1em;
  left: 1em;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  font-family: monospace;
  font-size: var(--x-small);
  background: color-mix(in lab, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
  color: var(--ink);
}
.contact-bento {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem;
  background:
    linear-gradient(160deg, color-mix(in lab, var(--blue) 12%, transparent), transparent 55%),
    var(--white--true);
  color: var(--ink);
}

.contact-bento .bento-copy i {
  color: var(--ink);
  margin-right: 0.4ch;
}
.datetime-bento {
  display: flex;
  flex-direction: column;
}

.datetime-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.datetime-clock canvas {
  display: block;
}

.datetime-clock-time {
  font-size: var(--x-small);
  font-family: monospace;
  color: var(--grey);
}

.datetime-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-size: var(--x-small);
  font-family: inherit;
  color: var(--ink);
  background: var(--white--true);
  border: 1px solid var(--calendar-border);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
}

.datetime-resume:hover {
  background: var(--white);
}

.datetime-resume[hidden] {
  display: none;
}
.experiences * {
  box-shadow: none;
}

/* Admin : lien « + Ajouter » en pied des bentos expériences/formations */
.experience-add {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: var(--x-small);
  color: var(--gray);
  text-decoration: none;
}

.experience-add:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.formations * {
  box-shadow: none;
}
.gallery-stack-bento {
  cursor: pointer;
  user-select: none;
  gap: 0.75rem;
}

.gallery-stack__pile {
  display: grid;
  grid-template-columns: 1fr;
  padding-bottom: 1rem;
  margin-inline: -2em;
  width: calc(100% + 4em);
}

.gallery-stack__card {
  grid-column: 1;
  grid-row: 1;
  border-radius: calc(var(--radius) - 0.5em);
  padding: 0.5rem;
  will-change: transform;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: fit-content;
  justify-self: center;
  align-self: center;
  filter:
    drop-shadow(1px 2px 4px color-mix(in lab, var(--black) 5%, transparent)) drop-shadow(4px 8px 16px color-mix(in lab, var(--black) 10%, transparent));
}

.gallery-stack__card:nth-child(1) {
  z-index: 30;
  transform: rotate(0deg) translateY(0) scale(1);
}

.gallery-stack__card:nth-child(2) {
  z-index: 20;
  transform: rotate(-2.5deg) translateY(8px) scale(0.97);
}

.gallery-stack__card:nth-child(3) {
  z-index: 10;
  transform: rotate(3deg) translateY(14px) scale(0.94);
}

.gallery-stack__card:nth-child(n+4) {
  z-index: 1;
  transform: rotate(-1deg) translateY(18px) scale(0.91);
  opacity: 0;
}

.gallery-stack__card.is-leaving {
  transform: translateX(115%) rotate(25deg) !important;
  opacity: 0;
  z-index: 40 !important;
  transition:
    transform 0.45s cubic-bezier(0.55, 0, 1, 0.45),
    opacity 0.45s ease;
}

.gallery-stack__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius) - 0.75em);
  pointer-events: none;
}

.gallery-stack__caption {
  display: none;
}

.gallery-stack__empty {
  grid-column: 1;
  grid-row: 1;
  color: var(--gray);
  font-size: var(--small);
  text-align: center;
  padding: 2rem 0;
  margin: 0;
}

.gallery-stack__delete-btn {
  display: none;
  width: 100%;
}

.gallery-stack__card:nth-child(1) .gallery-stack__delete-btn {
  display: block;
  margin-top: 0.4rem;
  padding: 0.3em 0.6em;
  border: none;
  border-radius: 4px;
  background: color-mix(in lab, var(--red) 10%, transparent);
  color: var(--red);
  font-family: inherit;
  font-size: var(--x-small);
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.gallery-stack__delete-btn:hover {
  background: color-mix(in lab, var(--red) 20%, transparent);
}

/* ── Deck tabs ────────────────────────────────────────────────────────────── */

.gallery-stack__decks {
  display: flex;
  gap: 0.35em;
  flex-wrap: wrap;
}

.gallery-stack__deck-tab {
  border: none;
  background: color-mix(in lab, var(--ink) 8%, transparent);
  color: var(--gray);
  padding: 0.25em 0.55em;
  border-radius: 4px;
  font-family: inherit;
  font-size: var(--x-small);
  font-weight: bold;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.gallery-stack__deck-tab:hover:not(.is-active) {
  background: color-mix(in lab, var(--ink) 15%, transparent);
}

.gallery-stack__deck-tab.is-active {
  background: var(--black);
  color: var(--white);
}

/* ── Add deck button ──────────────────────────────────────────────────────── */

.gallery-stack__deck-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
  border-radius: 4px;
  background: color-mix(in lab, var(--ink) 8%, transparent);
  color: var(--gray);
  font-size: var(--x-small);
  font-weight: bold;
  text-decoration: none;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
  margin-left: auto;
}

.gallery-stack__deck-add:hover {
  background: color-mix(in lab, var(--ink) 15%, transparent);
  color: var(--ink);
}

/* ── Drop zone ────────────────────────────────────────────────────────────── */

.gallery-stack__drop-zone {
  position: absolute;
  inset: 0;
  z-index: 50;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in lab, var(--blue) 88%, transparent);
  color: var(--white);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.gallery-stack__drop-label {
  font-size: var(--small);
  font-weight: bold;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gallery-stack-bento.is-drag-over .gallery-stack__drop-zone {
  opacity: 1;
}

/* ── Upload spinner ───────────────────────────────────────────────────────── */

.gallery-stack-bento.is-uploading .gallery-stack__drop-zone {
  opacity: 1;
  pointer-events: none;
}

.gallery-stack-bento.is-uploading .gallery-stack__drop-label::after {
  content: "…";
}

.gallery-stack-bento.is-uploading .gallery-stack__drop-label {
  animation: gallery-stack-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes gallery-stack-pulse {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.4;
  }
}

/* ── New card entrance ────────────────────────────────────────────────────── */

.gallery-stack__card.is-entering {
  transform: scale(0.85) translateY(-12px) !important;
  opacity: 0;
  transition: none;
}

.gallery-stack__card:not(.is-entering):nth-child(1) {
  transition:
    transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.35s ease;
}
.globe-bento {
  display: flex;
  flex-direction: column;
}

.globe-row {
  display: flex;
  flex: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 12rem;
}

.globe-moon-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.globe-bento .globe-host {
  flex: 1 0 auto;
}
.identity-bento {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
}

.identity-top,
.identity-line,
.identity-meta {
  display: flex;
  flex-direction: column;
}

.identity-top {
  gap: 0;
}

.identity-divider {
  margin: 1rem 0rem;
  border: none;
  border-top: 1px solid var(--ink-10);
}

.identity-line {
  gap: 0.15rem;
}

.identity-label {
  color: var(--gray);
  font-size: var(--x-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.identity-name {
  color: var(--ink);
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: bold;
  line-height: 1;
}

.identity-name--last {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.identity-age-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink-faint);
}

.identity-age {
  color: var(--ink);
  font-size: large;
  font-weight: bold;
  line-height: 0.95;
  text-wrap: balance;
}

.identity-meta {
  gap: 0.3rem;
  color: var(--grey);
}

.identity-job {
  color: var(--ink);
  font-size: var(--large);
}
.illustration-bento {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem;
  background:
    linear-gradient(140deg, color-mix(in lab, var(--yellow) 24%, transparent), transparent 60%),
    var(--white--true);
  color: var(--ink);
}
.now-bento {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 0.5rem;
  padding: 0.4rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in lab, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--calendar-border);
}

.now-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.now-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.now-initials {
  font-size: var(--x-small);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.now-age {
  font-size: var(--x-small);
  color: var(--gray);
}

.now-date {
  font-size: var(--x-small);
  color: var(--ink);
  white-space: nowrap;
  margin-left: auto;
}

.now-time {
  font-family: monospace;
  font-size: var(--x-small);
  color: var(--gray);
  white-space: nowrap;
  margin-right: auto;
}
.skills {
  display: grid;
  grid-template: auto auto / 1fr 1fr;
  color: var(--grey);

  span {
    display: inline-flex;
    align-items: center;
    gap: 0.5ch;
  }

  img {
    height: 1.25lh;
    aspect-ratio: 1;
  }

  .header {
    margin-bottom: 0.5lh;
    grid-column: span 2;
  }

  .title {
    color: var(--ink);
    font-weight: bold;
  }

  .design .title,
  .code .title {
    font-size: var(--small);
    margin-bottom: 0.5lh;
  }

  .design,
  .code {
    padding-right: 1lh;
  }
}
.atout {
  margin-bottom: 0.5lh;
}

.atouts,
.langues,
.passions {
  padding-bottom: 0.5lh;

  .header {
    margin-bottom: 0.5lh;
    color: var(--ink);
  }

  div {
    display: flex;
    justify-content: space-between;
    color: var(--grey);

    i {
      color: var(--ink);
    }
  }
}
.timeline-bento {
  display: flex;
  flex-direction: column;
}

.timeline-bento .timeline-section {
  flex: 1;
}

.timeline-empty {
  margin: 0.5rem 0 0;
  color: var(--white);
  font-style: italic;
}

/* ── Admin : événements ponctuels (naissances, ...) ───────────────────── */
.timeline-events-admin {
  position: relative;
  margin-left: auto;
}

.timeline-events-admin summary {
  list-style: none;
  cursor: pointer;
  width: 1.4rem;
  height: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  border: 1px solid var(--calendar-border);
  border-radius: 4px;
  line-height: 1;
}

.timeline-events-admin summary::-webkit-details-marker {
  display: none;
}

.timeline-events-admin__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 10;
  min-width: 16rem;
  padding: 0.6rem;
  background: var(--white--true);
  border: 1px solid var(--calendar-border);
  border-radius: 6px;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 15%, transparent);
}

.timeline-events-admin__form {
  display: flex;
  gap: 0.3rem;
}

.timeline-events-admin__form input {
  min-width: 0;
  font-size: var(--x-small);
}

.timeline-events-admin__form input[type='text'] {
  flex: 1;
}

.timeline-events-admin__list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--x-small);
  color: var(--gray);
}

.timeline-events-admin__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.15rem 0;
}

.timeline-events-admin__delete {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  padding: 0 0.2rem;
}

.timeline-events-admin__delete:hover {
  color: var(--red);
}
.turing-bento {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
}

.turing-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.turing-kicker {
  position: absolute;
  top: 1em;
  left: 1em;
  padding: 0.2em 0.6em;
  border-radius: 999px;
  background: color-mix(in lab, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
}

.turing-toolbar {
  position: absolute;
  top: 1em;
  right: 1em;
  display: flex;
  gap: 0.4em;
}

.turing-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8em;
  height: 1.8em;
  border: none;
  border-radius: 999px;
  background: color-mix(in lab, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
  color: var(--ink);
  cursor: pointer;
  font-size: var(--x-small);

  &:hover {
    background: color-mix(in lab, var(--bg) 90%, transparent);
  }
}

.turing-swatch {
  -webkit-appearance: none;
  appearance: none;
  width: 1em;
  height: 1em;
  padding: 0;
  border: 2px solid;
  border-radius: 50%;
  background: none;
  cursor: pointer;

  &::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
  }

  &::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
  }

  &::-moz-color-swatch {
    border: none;
    border-radius: 50%;
  }
}

.turing-swatch--bg {
  border-color: var(--ink);
}

.turing-swatch--ink {
  border-color: var(--bg);
}

.turing-readout {
  position: absolute;
  bottom: 1em;
  left: 1em;
  right: 1em;
  padding: 0.3em 0.6em;
  border-radius: 0.6em;
  font-family: monospace;
  font-size: var(--small);
  line-height: 1.25;
  text-align: center;
  background: color-mix(in lab, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
  color: var(--ink);
}
.calendar-ring__track {
  stroke: var(--calendar-grid);
  stroke-width: 3;
  fill: none;
}

.calendar-ring--zodiac .calendar-ring__track {
  stroke: var(--orange);
  stroke-width: 4;
}

.calendar-ring--moon .calendar-ring__track {
  stroke: var(--purple);
}

.calendar-ring--seconds .calendar-ring__track {
  stroke: var(--red);
  stroke-dasharray: 4 12;
}

.calendar-ring__labels {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  fill: var(--ink);
}

.calendar-ring__label {
  text-anchor: middle;
  dominant-baseline: middle;
}

.calendar-pointer {
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
}

.calendar-pointer__hub {
  fill: var(--ink);
}
:root {
  /* === Base === */
  --white: #ffffff;
  --black: #000000;

  /* === Ink (texte) === */
  --ink: color-mix(in lab, var(--black) 75%, var(--blue));
  --ink-muted: color-mix(in lab, var(--ink) 65%, var(--bg));
  --ink-10: color-mix(in lab, var(--ink) 10%, transparent);
  --ink-faint: color-mix(in lab, var(--black) 10%, transparent);

  /* === Background === */
  --bg: #f6f6f6;
  --bg-card: var(--white);

  /* === Couleurs === */
  --blue: #1370ed;
  --red: #ec0018;
  --darkblue: #090058;
  --green: #00ee9a;
  --yellow: #ffb700;
  --purple: #530097;
  --orange: lab(73 32 71 / 100%);

  /* === Palette split-flap (inspirée du drapeau LGBT) === */
  --flag-0: #ffbbe5;
  --flag-1: #ffffff;
  --flag-2: #b0e5ff;
  --flag-3: #594138;
  --flag-4: #1b2733;
  --flag-5: #b639ff;
  --flag-6: #0dc2fd;
  --flag-7: #00ff97;
  --flag-8: #ff9200;
  --flag-9: #ff3e19;
  --flag-a: #fff000;

  /* === Typographie split-flap (couverture Unicode via fallback OS) ===
     Latin/symboles d'abord (Helvetica Bold), puis CJK et emoji du système :
     le navigateur substitue chaque glyphe manquant depuis ces polices. */
  --sfp-typeface:
    'Helvetica Neue', Helvetica, Arial, 'Noto Sans', 'Segoe UI', Roboto,
    'PingFang SC', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Microsoft YaHei',
    'Noto Sans CJK SC', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
    sans-serif;

  /* === Typographie === */
  --x-small: 0.75rem;
  --small: 0.8rem;
  --large: 1.25rem;
  --x-large: 1.75rem;

  /* === Layout === */
  --radius: 1rem;
  --width: 48rem;
  --rail-width: 18rem;
  --timeline-width: 72rem;
  /* largeur de la colonne centrale = largeur du panneau split-flap */

  /* === Effets === */
  --shadow: 0.5px 0.5px 1px var(--ink-faint), 2px 2px 6px var(--ink-faint), 7px 7px 23px var(--ink-faint), 30px 30px 60px var(--ink-faint);
  --shadow--inset: inset 0.5px 0.5px 1px var(--ink-faint), inset 2px 2px 6px var(--ink-faint), inset 7px 7px 23px var(--ink-faint), inset 30px 30px 60px var(--ink-faint);

  /* === Composants === */
  --input-border: color-mix(in lab, var(--ink) 25%, transparent);
  --light-grey: color-mix(in lab, var(--ink) 12%, var(--bg));
  --color-contrast: var(--ink);
  --calendar-border: color-mix(in lab, var(--black) 8%, transparent);
  --calendar-grid: color-mix(in lab, var(--blue) 25%, transparent);
  --calendar-highlight: color-mix(in lab, var(--blue) 8%, transparent);

  /* === Aliases === */
  --black--shadow: var(--ink-faint);
  --gray: var(--ink-muted);
  --grey: var(--ink-muted);
}

.clock {
  --color-white: #ffffff;
  --color-bg: #073b4c;
  --color-1: #ef476f;
  --color-2: #ffd166;
  --color-3: #06d6a0;
  --color-4: #118ab2;
  display: flex;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.number {
  position: relative;
  display: grid;
  justify-content: center;
  align-items: center;
  width: 3ch;
  height: 2lh;
  border-radius: 0.5em;
  background: linear-gradient(var(--white) 50%, var(--white) 50%);
  box-shadow: 0 0 1px rgba(var(--color-black), .3);
  font-size: x-small;
  font-weight: bold;
  text-align: center;
  color: var(--ink);

  + .number {
    margin-left: 0.25em;
  }

  &:nth-child(2n) {
    + .number {
      margin-left: 1em;
    }
  }

  .base,
  .flap {
    grid-row: 1 / 1;
    grid-column: 1 / 1;
  }
}

.base {
  display: grid;

  .top,
  .bottom {
    position: relative;
    grid-row: 1 / 1;
    grid-column: 1 / 1;

    &::after {
      content: '';
      position: absolute;
      left: 0;
      width: 100%;
      height: 2px;
    }
  }

  .top {
    clip-path: inset(0 0 50% 0);

    &::after {
      top: calc(50%);
      background-color: var(--white);
    }
  }

  .bottom {
    clip-path: inset(50% 0 0 0);

    &::after {
      bottom: calc(50%);
      background-color: var(--white);
    }
  }
}

.flap {
  display: none;
  backface-visibility: hidden;

  &.show {
    display: block;
    animation: flip .6s ease-in-out 0s 1 normal forwards;
  }

  &.front,
  &.back {
    &::before {
      content: attr(data-content);
    }

    &::after {
      content: '';
      position: absolute;
      left: 0;
      width: 100%;
      height: 2px;
    }
  }
}

.front {
  clip-path: inset(0 0 50% 0);
  transform: rotateX(0deg);
  background-color: var(--white);
  border-radius: 0.5em 0.5em 0 0;

  &::after {
    top: calc(50%);
    background-color: var(--white);
  }

  &.show {
    animation-name: flip-top;
  }
}

.back {
  clip-path: inset(50% 0 0 0);
  transform: rotateX(-180deg);
  background-color: var(--white);
  border-radius: 0 0 0.5em 0.5em;

  &::after {
    bottom: calc(50%);
    background-color: var(--white);
  }

  &.show {
    animation-name: flip-bottom;
  }
}

@keyframes flip-top {
  from {
    transform: rotateX(0deg);
  }
  to {
    transform: rotateX(180deg);
  }
}

@keyframes flip-bottom {
  from {
    transform: rotateX(-180deg);
  }
  to {
    transform: rotateX(0deg);
  }
}
.decks__index {
  height: 100%;
  width: 100%;
  max-width: unset;
}
.decks__index h1 {
  width: 100%;
  font-size: 288pt;
  position: fixed;
  opacity: .1;
  margin: 0;
  top: 0;
}
.decks {
  overflow-x: auto;
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  padding: 10rem;
  gap: 1rem;
  scroll-snap-type: x mandatory;

  a {
    text-decoration: none;
   }

  .deck {
    position: relative;
    scroll-snap-align: center;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-card);

    width: 36rem;
    aspect-ratio: 210/297;
    border-radius: 10px;
    padding: 1rem;
    &:hover {
      h2 { color: var(--color); font-size: 9pt; opacity: 0.1; }
      img {filter: grayscale(0); opacity: 1;}
    }

    h2 {
      color: var(--color-contrast);
      font-size: 48pt;
      padding: .5em;
      padding-right: 0;
      margin: 0;
      position: relative;
      z-index: 1;

      mix-blend-mode: multiply;
      max-width: 50%;
    }
    a.btn {
      --color: inherit;
      background-color: var(--color);
      color: var(--color-contrast);
      font-size: x-small;
    }
  }

  .deck .deck__image {
    object-fit: contain;
    object-position: center center;
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    width: 100%;

    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    z-index: 0;

    filter: grayscale(1);
    opacity: .4;
    transition: filter 250ms, opacity 250ms;
  }
}


@media (max-width: 48rem) {
   .decks{ padding: 2rem;}
  }
form {
  max-width: 48ch;
  margin: 0 auto;

  .field:has(input[type="email"]:placeholder-shown) label,
  .field:has(input[type="password"]:placeholder-shown) label,
  .field:has(input[type="text"]:placeholder-shown) label,
  .field:has(textarea:placeholder-shown) label {
    opacity: 0; top: 1em;
    transition: opacity 150ms, top 150ms;
  }
  .field input::placeholder {
    font-size: smaller;
  }
  .field.big {
    input {
      font-size: large !important;
    }
  }
  .field:has(textarea) {
    height: 100%;
  }

  .field:has(input[type="email"]) label,
  .field:has(input[type="password"]) label,
  .field:has(input[type="text"]) label,
  .field:has(textarea) label
  {
    background: var(--bg-card);
    padding: .25em 0.5em 0em 0.5em;
    border-radius: 4px 4px 0px 0px;

    font-size: x-small;

    border: 1px solid var(--input-border);
    border-bottom: 0px;
    position: relative;
    z-index: 0;
    left: calc(10px - 0.5em);
    opacity: 1; top: 0em;
    transition: opacity 250ms, top 250ms, font-size 250ms;

  }

  input {
    border-radius: 5px;
    border: 1px solid var(--input-border);
    padding: 10px;
    width: 100%;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    transition: border-color 0.3s ease;

    &:focus {
      border-color: var(--blue);
      outline: none;
    }
  }

  input[type="submit"] {
    background-color: var(--blue);
    border: none;
    padding: 10px 20px;
    color: var(--white);
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    &:hover {
      background-color: color-mix(in lab, var(--blue) 65%, var(--black));
    }
  }
  textarea {
    border-radius: 5px;
    border: 1px solid var(--input-border);
    padding: 10px;
    width: 100%;
    height: 100%;
    min-height: 48rem;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    font-family: inherit;
    &:focus {
      border-color: var(--blue);
      outline: none;
    }
  }
}

.product {
  .product__form {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    @media (max-width: 48rem) {
      grid-template-columns: unset;
      grid-template-rows: unset;
    }
    gap: 2rem;
    .text, .illustration {
      width: 100%;
    }
    .illustration {
      display: grid;
      gap: 1rem;
      grid-template: auto min-content min-content / min-content auto;
      img {
        grid-column: 1 / span 2;
        width: 100%;
        @media (max-width: 48rem) {
         max-height: 72rem;
        }
        height: 100%;
      }
      .form-control-file {
        grid-column: 1 / span 2;
      }
    }
  }
}
:root {
  --globe-ocean: transparent;
  --globe-land: var(--black);
  --globe-land-stroke: var(--black);
  --globe-marker: var(--black);
  --globe-border: var(--black);
}

.globe-bento {
  width: 100%;
}

.globe-host {
  display: flex;
  justify-content: center;
}

.globe-panel {
  display: flex;
  justify-content: center;
}

.globe-canvas-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.globe-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
  min-height: 2lh;
  width: 100%;
  padding-top: 0.5rem;
  border-top: 1px solid var(--calendar-border);
  margin-top: 0.5rem;
}

.globe-location {
  font-size: var(--x-small);
  font-weight: bold;
  color: var(--ink);
}

.globe-date {
  font-size: var(--x-small);
  color: var(--grey);
}

.globe-location--clickable {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.globe-location-wrapper {
  position: relative;
}

.globe-location-input {
  font-size: var(--x-small);
  font-weight: bold;
  color: var(--ink);
  font-family: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink);
  outline: none;
  text-align: center;
  width: 8rem;
}

.globe-location-suggestions {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--grey);
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  z-index: 100;
  min-width: 10rem;

  li {
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-size: var(--x-small);
    white-space: nowrap;

    &:hover {
      background: var(--light-grey);
    }
  }
}

.globe-reset {
  font-size: var(--x-small);
  color: var(--grey);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: monospace;
  opacity: 0.5;

  &:hover {
    opacity: 1;
  }
}

.globe-date--clickable {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.globe-date-input {
  font-size: var(--x-small);
  color: var(--grey);
  font-family: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--grey);
  outline: none;
  text-align: center;
  width: 12rem;
}

.globe-astral-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;

  height: 12rem;
}

.globe-detail {
  color: var(--ink);
  font-size: xx-large;
  font-family: monospace;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.globe-pos {
  font-size: xx-small;
  color: var(--grey);
  font-family: monospace;
}
.header {
  display: flex;
  align-items: center;
  gap: 1ex;
  padding-top: 0.25lh;
  padding-bottom: 0.5lh;
}

.header .infos {
  max-width: 18rem;
}

.title {
  align-self: center;
  flex-grow: 1;
  font-size: large;
  font-weight: bold;
  color: var(--ink);
}

.title i {
  margin-right: 1.25ch;
  margin-left: 0.75ch;
}

.profile {
  padding: 3em;
}

@media (max-width: 48rem) {
  .profile {
    padding: 3em 1em;
  }
}

.job {
  position: relative;
  transition: opacity 0.2s, filter 0.2s;
}

/* Curseur de la timeline hors de la période de cette carte : on la grise. */
.job.is-out-of-period {
  opacity: 0.35;
  filter: grayscale(1);
}

.edit-inline {
  position: absolute;
  right: 1em;
}


form.job--edit {
  max-width: unset;
  margin: 0;
}

.job--edit input,
.job--edit textarea,
.job--edit select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gray);
  border-radius: 0;
  padding: 0.1em 0.25em;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

.job--edit input:focus,
.job--edit textarea:focus,
.job--edit select:focus {
  border-bottom-color: var(--ink);
}

.job--edit .title {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}

.job--edit .title input.society {
  font-weight: bold;
  font-size: large;
}

.job--edit .title input.role {
  font-weight: bold;
  font-size: medium;
}

.job--edit .infos {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25em;
}

.job--edit .infos input,
.job--edit .infos select {
  font-size: xx-small;
  font-weight: bold;
  text-align: right;
}

.job--edit .description {
  margin-left: 0;
}

.job--edit .description textarea {
  resize: vertical;
  font-size: small;
  color: var(--gray);
  min-height: unset;
  height: auto;
}

.job__image-field {
  align-self: center;
}

.job__image-field input {
  font-size: xx-small;
  text-align: center;
}

.job__controls {
  grid-column: span 3;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.job__controls input[type="submit"] {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 0.25em 1em;
  border-radius: 3px;
  cursor: pointer;
  font-size: small;
  width: auto;
}

.job__cancel {
  font-size: small;
  opacity: 0.5;
  text-decoration: none;
  cursor: pointer;
}

.job__errors {
  grid-column: span 3;
  color: red;
  font-size: small;
}

.job {
  display: grid;
  grid-template: auto auto / 3rem auto auto;
  gap: 0.5lh;
  padding-bottom: 0.75lh;
  margin-top: 0.25lh;
}

.job .infos {
  flex-direction: column;
  align-items: flex-end;
}

.job .society,
.job .role {
  font-weight: bold;
  font-size: medium;
}

.job .society {
  font-size: large;
}

.job img {
  height: 3em;
  aspect-ratio: 1;
  object-fit: contain;
  margin-right: 1ch;
  justify-self: center;
  align-self: center;
}

.job .description {
  color: var(--gray);
  padding-top: 0.25lh;
  grid-column: span 3;
  margin-left: 3.5rem;
}

.infos {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
}

.infos:has(.info--text) {
  margin-top: 0.25lh;
}

.info--label,
.info--text {
  font-weight: bold;
  font-size: xx-small;
  padding: 0.125lh 0.5lh;
  margin: 0.25px;
}

.info--label {
  border-radius: 2px;
}

.info--text.blue {
  color: var(--blue);
}

.info--text.orange {
  color: var(--purple);
}

.info--text.black {
  color: var(--ink);
}

.info--text.red {
  color: var(--red);
}

.info--label.blue {
  background: var(--green);
  color: var(--blue);
}

.info--label.orange {
  background: var(--yellow);
  color: var(--purple);
}

.info--label.black {
  background: var(--black);
  color: var(--white);
}

.info--label.red {
  background: var(--red);
  color: var(--white);
}


.products {
  flex-direction: column;
}

.products table td, .products table th {
  padding: 1rem;
}
.products table th {
  text-align: left;
}
.products, .product {
  max-width: 72rem;
  width: 100%;
  padding: 3rem;
  box-sizing: border-box;
  color: var(--ink);
}

.product {
  .illustration {
    border-radius: 1mm;
  }
  .illustration img {
    object-fit: contain;
    max-width: 100%;
    z-index: 0;
    position: relative;
    mix-blend-mode: multiply;
    height: 100%;
    @media (max-width: 48rem) {
      height: 48rem;
    }
  }
  .illustration {
    display: flex;
    height: calc(100vh - 12rem);
  }
  .text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  @media (max-width: 48rem) {
    .illustration {
      max-width: 100%;
      height: auto;
    }
    img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
    }
    .text {
      width: 100%;
      order: 2;
    }
  }
}

.product.even {
  display: grid;
  grid-template-columns: 24rem auto;
  gap: 2rem;
  grid-auto-flow: dense; /* Assure un remplissage dense */
  direction: rtl; /* Inverse l'ordre des éléments */
  .text, .pagination {
    direction: ltr; /* Inverse l'ordre des éléments */
  }
}
.product.odd {
  display: grid;
  gap: 2rem;
  grid-template-columns: 24rem auto;
}

@media (max-width: 48rem) {
  .product.odd,
  .product.even {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
}

.prev-link, .next-link {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
  color: var(--ink);
  height: 7mm;
  width: 7mm;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;

}

.prev-link {
  left: -3rem;
}
.next-link {
  right: -3rem;
}
@media (max-width: 60rem) {

  .prev-link {
    left: 1rem;
  }
  .next-link {
    right: 1rem;
  }
}
.pagination {
  position: absolute;
  bottom: 1rem;
  right: 50%;
  width: 0rem;
  white-space: nowrap;
  font-size: xx-small;
}

.product.even:not(:has(.text)) .illustration, .product.odd:not(:has(.text)) .illustration {
      background-color: var(--white--true);
      grid-column: 1 / span 2 !important;
      grid-row: 1 / span 2;
      justify-content: center;
      box-sizing: border-box;
      align-self: center;
      justify-self: center;
      border: 1pt solid var(--white);
      box-shadow: var(--shadow);
      border-radius: var(--radius);
      width: fit-content;
      overflow: hidden;
  }
.product.even:not(:has(.text)), .product.odd:not(:has(.text)) {
  background-color: var(--white);
  img {
    max-height: fit-content;
  }
}
.curriculum-layout {
  /* --rail-width et --timeline-width sont définis dans la charte (:root). */
  display: grid;
  gap: 1ex;
  margin: 0 auto;
  width: fit-content;
  grid-template-columns: var(--rail-width) var(--timeline-width) var(--rail-width);
  align-items: start;

  &>* {
    min-width: 0;
  }

  @media (max-width: 64rem) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    max-width: 48rem;
    padding: 0 1rem 1rem;
  }
}

.left-rail,
.curriculum-main,
.right-rail {
  display: flex;
  flex-direction: column;
  gap: 1ex;
}

.left-rail,
.right-rail {
  width: var(--rail-width);
}

.curriculum-main {
  width: var(--timeline-width);
}

.content-grid {
  display: grid;
  gap: 1ex;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.utility-grid {
  display: flex;
  flex-direction: column;
  gap: 1ex;
  flex: 1 1 auto;
}

.curriculum-layout a.bento {
  text-decoration: none;
}

.identity-bento,
.timeline-bento,
.globe-bento,
.illustration-bento,
.contact-bento {
  width: 100%;
}

.bento-headline {
  color: var(--ink);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  font-weight: bold;
  line-height: 1.05;
}

.bento-copy {
  color: var(--grey);
  line-height: 1.35;
}

.bento-kicker {
  color: var(--gray);
  font-size: var(--x-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.supplemental-grid {
  display: flex;
  flex-direction: column;
  gap: 1ex;
}

.timeline-bento,
.globe-bento,
.content-grid .formations,
.content-grid .experiences {
  .header {
    margin-bottom: 0.75rem;
  }
}

.curriculum-main>.bento {
  width: 100%;
}

@media (max-width: 64rem) {
  .curriculum-layout {
    align-items: start;
  }

  .left-rail,
  .curriculum-main,
  .right-rail,
  .content-grid {
    display: contents;
  }

  .identity-bento {
    order: 1;
    grid-row: 1;
    grid-column: 1 / -1;
    aspect-ratio: auto;
    min-height: 12rem;
  }

  .globe-bento {
    order: 2;
    grid-row: 2;
    grid-column: 1;
    flex: 1 1;
  }

  .timeline-bento {
    order: 4;
    grid-row: 3;
    grid-column: 1 / -1;
  }

  .experiences {
    order: 6;
    grid-row: 4;
    grid-column: 1 / -1;
    flex: 1 1 auto;
  }

  .formations {
    order: 5;
    grid-row: 5;
    grid-column: 1 / -1;
    flex: 1 1 auto;
  }

  .utility-grid {
    order: 7;
    grid-row: 6;
    grid-column: 1 / -1;
  }

  .supplemental-grid {
    order: 8;
    grid-row: 7;
    grid-column: 1 / -1;
    flex: 1 1 auto;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}
.sfp.bento {
  /* --sfp-typeface (pile Unicode) est défini dans la charte (:root). */
  --sfp-housing: var(--bg-card);
  --sfp-tile: color-mix(in lab, var(--ink) 6%, var(--bg-card));
  --sfp-cols: 25;
  --sfp-font: 1rem;

  background: var(--sfp-housing);
  display: grid;
  grid-template-columns: repeat(var(--sfp-cols), 1fr);
  gap: 2px;
  padding: 0.6rem 0.8rem;
  font-family: var(--sfp-typeface);
  font-size: var(--sfp-font);
  font-weight: 700;
  line-height: 1;
  user-select: none;
  width: 100%;
}

/* ── Tuile « volet unique » (flip-clock) ────────────────────────────────────
   Une tuile est coupée par un axe horizontal en son centre. Elle superpose :
   - .sfp-top / .sfp-bottom : les deux moitiés statiques
   - .sfp-flap : le volet articulé sur l'axe central, posé sur la moitié haute,
     qui pivote de 0° à 180° vers le bas (recto = haut de l'actuel, verso = bas
     du prochain).
   Chaque face contient un .sfp-glyph (glyphe pleine hauteur) clippé à sa moitié. */
.sfp-tile {
  --sfp-tile-radius: 6px;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--sfp-tile-radius);
  overflow: hidden;
  /* clippe les faces carrées pour révéler les coins arrondis */
  background: var(--sfp-tile);
  perspective: 6em;
}

/* Moitiés statiques : chacune = 50 % de la tuile. */
.sfp-top,
.sfp-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  overflow: hidden;
  background: var(--sfp-tile);
  color: var(--ink);
}

.sfp-top {
  top: 0;
}

.sfp-bottom {
  top: 50%;
}

/* Faces du volet : elles remplissent le volet (= 50 % de la tuile). */
.sfp-flap-front,
.sfp-flap-back {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--sfp-tile);
  color: var(--ink);
  backface-visibility: hidden;
}

/* Glyphe pleine hauteur, centré ; chaque face n'en montre que sa moitié. */
.sfp-glyph {
  position: absolute;
  left: 0;
  right: 0;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sfp-top .sfp-glyph,
.sfp-flap-front .sfp-glyph {
  top: 0;
}

.sfp-bottom .sfp-glyph,
.sfp-flap-back .sfp-glyph {
  top: -100%;
}

/* Fin ligne médiane : liseré sombre sur la moitié haute (réalisme). */
.sfp-top::after,
.sfp-flap-front::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.18);
}

/* Le volet : moitié haute, pivote sur l'axe central (arête basse). */
.sfp-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  transform-origin: center bottom;
  transform-style: preserve-3d;
  transform: rotateX(0deg);
  z-index: 2;
}

.sfp-flap-front,
.sfp-flap-back {
  backface-visibility: hidden;
}

.sfp-flap-back {
  transform: rotateX(180deg);
}

.sfp-flap.sfp-flip {
  animation: sfp-flip var(--sfp-flip-dur, 200ms) ease-in forwards;
}

@keyframes sfp-flip {
  from {
    transform: rotateX(0deg);
  }

  to {
    transform: rotateX(180deg);
  }
}

.sfp-admin__section form {
  max-width: unset;
}

/* ── Interface d'administration des phrases ─────────────────────────────── */
.sfp-admin {
  max-width: 72ch;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;

  h1 {
    margin: 0;
  }

  h2 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: var(--ink-muted);
  }

  .sfp-admin__hint {
    margin: 0.5rem 0 0;
    color: var(--ink-muted);
    font-size: 0.85rem;
  }

  .sfp-admin__flash {
    background: color-mix(in lab, var(--blue) 12%, var(--bg-card));
    color: var(--blue);
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    margin: 0;
  }

  .sfp-admin__errors {
    color: #c0392b;
    background: color-mix(in lab, #c0392b 8%, var(--bg-card));
    border-radius: 8px;
    padding: 0.6rem 0.9rem 0.6rem 1.6rem;
    margin: 0 0 0.75rem;
  }

  .sfp-admin__empty {
    color: var(--ink-muted);
    font-style: italic;
  }

  /* Ligne de la liste : aperçu + actions */
  .sfp-admin__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem;
    border: 1px solid var(--input-border);
    border-radius: 12px;
    background: var(--bg-card);
    margin-bottom: 1rem;
  }

  .sfp-admin__row-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
  }

  .sfp-admin__delete {
    margin: 0;
  }

  /* Boutons non-<a> (button_to, liens d'action) */
  .sfp-admin__btn {
    --color: var(--blue);
    cursor: pointer;
    text-decoration: none;
    color: var(--color);
    background-color: color-mix(in srgb, var(--color) 15%, transparent);
    font: inherit;
    padding: 0.4em 0.8em;
    border: none;
    border-radius: 6px;
    transition: background-color 150ms;

    &:hover {
      background-color: color-mix(in srgb, var(--color) 25%, transparent);
    }
  }

  .sfp-admin__btn--danger {
    --color: #c0392b;
  }
}

/* ── Éditeur de disposition (grille de saisie 25×6) ─────────────────────── */
.sfp-editor {
  --sfp-cols: 25;
  margin-bottom: 1rem;

  /* Même largeur que le panneau final (colonne centrale) : on déborde du
     conteneur admin étroit en se recentrant sur la page → aperçu 1:1. */
  width: min(var(--timeline-width), 100vw - 2rem);
  position: relative;
  left: 50%;
  transform: translateX(-50%);

  /* Barre d'outils : pinceau texte + palette + gomme */
  .sfp-editor__palette {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
  }

  .sfp-editor__swatch {
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    border-radius: 6px;
    border: 2px solid var(--input-border);
    background: var(--swatch, var(--bg-card));
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    font-weight: bold;
    line-height: 1;
    transition: transform 100ms, border-color 100ms, box-shadow 100ms;

    &:hover {
      transform: translateY(-1px);
    }

    &.is-active {
      border-color: var(--ink);
      box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--ink);
    }
  }

  .sfp-editor__swatch--text,
  .sfp-editor__swatch--erase {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--ink-muted);
    font-size: 0.9rem;
  }

  .sfp-editor__grid {
    display: grid;
    grid-template-columns: repeat(var(--sfp-cols), 1fr);
    gap: 2px;
    padding: 0.6rem 0.8rem;
    /* identique au panneau (.sfp) pour des cases de même largeur */
    border-radius: var(--radius);
    background: color-mix(in lab, var(--ink) 4%, var(--bg-card));
    touch-action: none;
    /* évite le scroll pendant la peinture au doigt */
  }

  .sfp-editor__cell {
    width: 100%;
    aspect-ratio: 3 / 4;
    min-width: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 2px;
    background: var(--cell-bg, color-mix(in lab, var(--ink) 6%, var(--bg-card)));
    color: var(--ink);
    font-family: var(--sfp-typeface);
    font-weight: 700;
    /* Même taille que le panneau final (posée par split_flap_editor_controller). */
    font-size: var(--sfp-font, 1rem);
    text-align: center;
    line-height: 1;
    box-sizing: border-box;
    transition: border-color 120ms;

    &:focus {
      outline: none;
      border-color: var(--blue);
      box-shadow: inset 0 0 0 1px var(--blue);
    }
  }

  .sfp-editor__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.5rem 0 0.25rem;
  }

  .sfp-editor__tools {
    display: flex;
    gap: 1rem;
  }

  .sfp-editor__counter {
    font-size: 0.8rem;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
  }

  .sfp-editor__clear {
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    color: var(--ink-muted);
    background: none;
    border: none;
    text-decoration: underline;

    &:hover {
      color: var(--ink);
    }
  }

  .field--position {
    margin-top: 1rem;
    max-width: 12rem;
  }
}

/* ── Aperçu statique d'une disposition ──────────────────────────────────── */
.sfp-preview {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--sfp-cols), 1fr);
  gap: 1px;
  padding: 0.4rem;
  border-radius: 8px;
  background: color-mix(in lab, var(--ink) 4%, var(--bg-card));
  font-family: var(--sfp-typeface);
  font-weight: 700;
  font-size: clamp(0.4rem, 1.6vw, 0.75rem);
  line-height: 1;

  .sfp-preview__cell {
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1px;
    background: var(--cell-bg, color-mix(in lab, var(--ink) 7%, var(--bg-card)));
    color: var(--ink);
    overflow: hidden;
  }
}
.timeline-section {
  position: relative;
  width: 100%;
  padding: 0.35rem 0 0.4rem;
  box-sizing: border-box;
}

/* ── Scroll horizontal + contenu à largeur pilotée par le zoom ─────────── */
/* Pas de scrollbar : la navigation passe par la minimap et la molette. */
.timeline__scroll {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.timeline__scroll::-webkit-scrollbar {
  display: none;
}

.timeline__content {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.timeline__content:active {
  cursor: grabbing;
}

.timeline__tracker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--black);
  pointer-events: none;
  opacity: 0.5;
  z-index: 3;
}

.timeline__tracker.is-locked {
  opacity: 1;
}

/* ── Minimap : fenêtre = navigation, poignées = zoom ──────────────────── */
.timeline__map {
  position: relative;
  height: 12px;
  margin-top: 0.4rem;
  touch-action: none;
  user-select: none;
  cursor: pointer;
}

.timeline__map-strip {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: var(--calendar-border);
}

.timeline__map-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  opacity: 0.55;
}

.timeline__map-seg.cat--life {
  background: var(--green);
}

.timeline__map-seg.cat--black {
  background: var(--black);
}

.timeline__map-seg.cat--blue {
  background: var(--blue);
}

.timeline__map-seg.cat--red {
  background: var(--red);
}

.timeline__map-seg.cat--orange {
  background: var(--orange);
}

.timeline__map-window {
  position: absolute;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
  min-width: 12px;
  border: 1px solid var(--white);
  border-radius: 5px;
  background: color-mix(in srgb, var(--white) 10%, transparent);
  cursor: grab;
  transition: background 0.15s;
  box-shadow: 0 0 2px 0px color-mix(in srgb, var(--ink) 50%, transparent);
}

.timeline__map-window:hover {
  background: color-mix(in srgb, var(--gray) 18%, transparent);
}

.timeline__map-window:active {
  cursor: grabbing;
}

.timeline__map-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  cursor: ew-resize;
}

.timeline__map-handle--left {
  left: -6px;
}

.timeline__map-handle--right {
  right: -6px;
}

.timeline__map-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--gray);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.15s;
}

.timeline__map:hover .timeline__map-handle::after {
  opacity: 1;
}

.timeline__axis {
  position: relative;
  height: 1em;
  margin-bottom: 0.1rem;
  z-index: 2;
}

.timeline__year {
  position: absolute;
  transform: translateX(-50%);
  font-size: var(--x-small);
  color: var(--gray);
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* ── Grille : trait vertical au début de chaque année ─────────────────── */
.timeline__grid {
  position: absolute;
  top: 1.1em;
  /* sous les labels d'année */
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 0;
}

.timeline__gridline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--calendar-border);
  opacity: 0.45;
}

.timeline__line {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  position: relative;
  z-index: 1;
}


.timeline__track {
  flex: 1;
  position: relative;
  background: transparent;
  border-radius: 3px;
}

/* ── Segments ─────────────────────────────────────────────────────────── */

.timeline__segment {
  position: absolute;
  border-radius: 2px;
  opacity: 0.3;
  cursor: default;
  transition: opacity 0.15s;
}

.timeline__segment.is-current {
  opacity: 1;
}

.timeline-section.is-show-all .timeline__segment {
  opacity: 1;
}

/* Hover sur un segment de la timeline */
.timeline-section:has(.timeline__segment:hover) .timeline__segment {
  opacity: 0.3;
}

.timeline-section:has(.timeline__segment:hover) .timeline__segment:hover {
  opacity: 1;
}

/* Hover sur une carte d'expérience */
.timeline-section.has-focus .timeline__segment {
  opacity: 0.3;
}

.timeline-section.has-focus .timeline__segment.is-active {
  opacity: 1;
}

/* Couleurs par couleur de l'expérience */
.timeline__segment.cat--life {
  background: var(--green);
}

.timeline__segment.cat--black {
  background: var(--black);
}

.timeline__segment.cat--blue {
  background: var(--blue);
}

.timeline__segment.cat--red {
  background: var(--red);
}

.timeline__segment.cat--orange {
  background: var(--orange);
}

/* ── Événements personnels ────────────────────────────────────────────── */

.timeline__track--events {
  background: transparent;
  height: 0.9rem;
}

.timeline__event-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gray);
  opacity: 0.4;
  cursor: default;
  transition: opacity 0.15s;
}

.timeline__event-dot:hover {
  opacity: 1;
}

.timeline__event-label {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--x-small);
  white-space: nowrap;
  color: var(--gray);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.timeline__event-dot:hover .timeline__event-label {
  opacity: 1;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: 9pt;
}

* {
  box-sizing: border-box;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  -moz-user-drag: none;
  user-select: none;
}

body {
  background: var(--bg);
  margin: 0;
  padding: 1em;
}

a.link {
  text-decoration: none;
  color: var(--blue);
  font-weight: bold;
}

a.btn {
  --color: var(--blue);
  position: relative;
  text-decoration: none;
  color: var(--color);
  z-index: 1;
  background-color: color(from var(--color) srgb r g b / 0.15);
  font-size: large;
  padding: 0.25em 0.5em;
  border-radius: 4px;
  transition: background-color 150ms;

  &:hover {
    background-color: color(from var(--color) srgb r g b / 0.25);
  }
}

a.btn.work {
  --color: var(--grey);
  font-size: medium;
}

div:has(.bento) {
  display: flex;
  gap: 1ex;
  flex-wrap: wrap;
}

.bento {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: var(--radius);
  position: relative;
  padding: 1em;
}

.more {
  width: 24rem;
}

@media (max-width: 48rem) {
  main {
    box-shadow: none;
    border-radius: 0rem;
  }

  body {
    margin: 0;
    padding: 0;
  }
}

.nav {
  position: fixed;
  z-index: 10;
  height: 7mm;
  padding: 1rem;
  box-sizing: border-box;
  backdrop-filter: blur(1mm);

  border-radius: 1rem;
  display: flex;
  gap: 1rem;
}

nav.bottom.right {
  bottom: 0rem;
  right: 0rem;
  transform: rotate(-90deg) translate(100%, -7mm);
  transform-origin: top right;
}

nav.top.right {
  top: 0rem;
  right: 0rem;
  transform: rotate(-90deg) translate(7mm, 0%);
  transform-origin: bottom right;
}
