/* ============================================================
   components.css : coquille applicative
   fenêtre, barre latérale, barre d'onglets, vues, listes
   ============================================================ */

/* ---------- 1. La fenêtre ---------- */

/* Pas de z-index ici : cela créerait un contexte d'empilement qui enfermerait
   la barre latérale en dessous du voile sur mobile. */
.app {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  overflow: hidden;
  background: var(--wall-base);
  background-image:
    radial-gradient(62% 48% at -4% -6%, var(--wall-1) 0%, transparent 64%),
    radial-gradient(52% 46% at 6% 52%, var(--wall-2) 0%, transparent 68%),
    radial-gradient(70% 60% at 2% 108%, var(--wall-4) 0%, transparent 66%),
    radial-gradient(58% 52% at 46% -8%, var(--wall-2) 0%, transparent 64%),
    radial-gradient(78% 88% at 107% 42%, var(--wall-3) 0%, transparent 62%),
    radial-gradient(60% 58% at 84% 112%, var(--wall-4) 0%, transparent 62%);
}

/* ---------- 2. Barre latérale ---------- */

.side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: transparent;
  padding: 10px 10px 10px 11px;
}

.side-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 6px 12px;
}

.orb {
  width: 26px; height: 26px;
  border-radius: 50%;
  flex: none;
  background: var(--orb);
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}
.orb img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* Les deux lignes forment un bloc serré, centré sur la hauteur de l'avatar.
   Interlignes courts pour que l'ensemble ne dépasse pas ses 26 px. */
.sh-text { display: flex; flex-direction: column; justify-content: center; min-width: 0; }

.side-head .sh-name {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.15;
}
.side-head .sh-role { font-size: 0.7rem; color: color-mix(in srgb, var(--ink) 58%, transparent); line-height: 1.15; margin-top: 1px; }

/* Champ de recherche, ouvre la palette */
.side-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 30px;
  padding: 0 7px 0 9px;
  margin-bottom: 12px;
  border-radius: var(--r-sm);
  background: var(--side-field);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--ink-2);
  font-size: 0.815rem;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.side-search:hover { color: var(--ink); background: var(--side-active); }
[data-theme="dark"] .side-search { border-color: rgba(255, 255, 255, 0.09); }
.side-search svg { width: 13px; height: 13px; flex: none; }
.side-search kbd { margin-left: auto; }

kbd {
  font-family: var(--font);
  font-size: 0.68rem;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  color: var(--ink-3);
  line-height: 1.4;
}

.side-label {
  font-family: var(--font-mono);
  font-size: 0.615rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 42%, transparent);
  padding: 10px 8px 5px;
}

.side-nav { display: flex; flex-direction: column; gap: 1px; }

.tab {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: var(--r-sm);
  font-size: 0.865rem;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  letter-spacing: -0.008em;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.tab:hover { background-color: var(--side-hover); color: var(--ink); }
.tab .t-ic { width: 15px; height: 15px; flex: none; opacity: 0.75; }
.tab .t-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.635rem;
  color: color-mix(in srgb, var(--ink) 38%, transparent);
}
.tab[aria-current="page"] {
  background-color: var(--side-active);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.tab[aria-current="page"] .t-ic { opacity: 1; }

.side-foot { margin-top: auto; padding-top: 10px; }

.side-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 4px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}
[data-theme="dark"] .side-actions { border-top-color: rgba(255, 255, 255, 0.08); }

.icon-btn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: var(--r-xs);
  color: var(--ink-3);
  border: 1px solid transparent;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.icon-btn:hover { background-color: var(--side-hover); color: var(--ink); }
.icon-btn svg { width: 15px; height: 15px; }

.lang-switch {
  display: flex;
  align-items: center;
  padding: 2px;
  border-radius: var(--r-xs);
  background: var(--side-field);
  border: 1px solid rgba(255, 255, 255, 0.45);
  position: relative;
  margin-left: auto;
}
[data-theme="dark"] .lang-switch { border-color: rgba(255, 255, 255, 0.08); }
.lang-switch button {
  position: relative;
  z-index: 1;
  width: 26px; height: 22px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-3);
  transition: color var(--t-fast) var(--ease);
}
.lang-switch button[aria-pressed="true"] { color: var(--ink); }
.lang-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 26px; height: 22px;
  border-radius: 4px;
  background: var(--side-active);
  box-shadow: var(--shadow-xs);
  transition: transform var(--t) var(--ease-spring);
}
.lang-switch[data-lang="en"] .lang-thumb { transform: translateX(26px); }

/* ---------- 3. Panneau de contenu ---------- */

/* Le fond de bureau remonte doucement en bas du panneau, comme une signature */
.view::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(90px, 16vh, 190px);
  pointer-events: none;
  z-index: 2;
  background-image: linear-gradient(180deg,
    transparent 0%,
    color-mix(in srgb, var(--wall-4) 14%, transparent) 55%,
    color-mix(in srgb, var(--wall-3) 26%, transparent) 100%);
}

.view {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 10px 10px 10px 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 0.5px rgba(28, 28, 30, 0.07), 0 6px 18px -10px rgba(40, 30, 45, 0.28);
}
[data-theme="dark"] .view {
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.07), 0 6px 18px -10px rgba(0, 0, 0, 0.6);
}

/* Barre supérieure façon navigateur */
.viewbar {
  flex: none;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
}

.viewbar .vb-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.855rem;
  font-weight: 550;
  letter-spacing: -0.012em;
  flex: none;
  padding-right: 4px;
}
.viewbar .vb-title svg { width: 14px; height: 14px; color: var(--ink-3); }

.viewbar .vb-sep {
  width: 1px;
  height: 16px;
  background: var(--hairline);
  flex: none;
}

.viewbar .spacer { margin-left: auto; }

/* Sous-onglets : segments façon navigateur */
.subtabs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px 0;
}
.subtabs::-webkit-scrollbar { display: none; }

.subtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding-inline: 10px;
  border-radius: var(--r-xs);
  font-size: 0.825rem;
  color: var(--ink-3);
  white-space: nowrap;
  flex: none;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.subtab:hover { background-image: var(--tint-soft); color: var(--ink-2); }
.subtab[aria-selected="true"] {
  background-color: var(--surface);
  background-image: var(--tint);
  color: var(--ink);
  font-weight: 550;
}
.subtab .st-n {
  font-family: var(--font-mono);
  font-size: 0.615rem;
  color: var(--ink-4);
}
.subtab[aria-selected="true"] .st-n { color: var(--ink-3); }
.subtab .st-label { white-space: nowrap; }

/* Corps défilant */
.viewbody {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--pad);
}
/* Accueil : le contenu démarre sous la barre, sans vide au-dessus */
.viewbody.no-scroll { display: flex; flex-direction: column; }
.viewbody.no-scroll > .viewpanel.active { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.viewpanel { display: none; animation: viewIn 0.3s var(--ease); }
.viewpanel.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } }

/* ---------- 4. Barre latérale en mode compact ---------- */

.side-toggle { display: none; }

@media (max-width: 880px) {
  body { padding: 0; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .view { margin: 0; border-radius: 0; box-shadow: none; }
  .side { padding: 10px 9px; }

  /* En tiroir, la barre latérale reprend le dégradé à son compte :
     le fond de la fenêtre n'est plus visible derrière elle. */
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    z-index: 60;
    border-right: 1px solid var(--brd);
    transform: translateX(-101%);
    transition: transform var(--t) var(--ease-soft);
    box-shadow: var(--shadow-lg);
    background: var(--wall-base);
    background-image:
      radial-gradient(120% 40% at 0% 0%, var(--wall-1) 0%, transparent 60%),
      radial-gradient(120% 40% at 100% 38%, var(--wall-3) 0%, transparent 62%),
      radial-gradient(120% 40% at 40% 100%, var(--wall-4) 0%, transparent 60%);
  }
  .side.open { transform: none; }

  .side-scrim {
    position: fixed;
    inset: 0;
    z-index: 59;
    background: rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t) var(--ease), visibility var(--t);
  }
  .side-scrim.open { opacity: 1; visibility: visible; }

  .side-toggle { display: grid; }
  .viewbar { padding-inline: 8px; }
  .viewbar .vb-title { font-size: 0.82rem; }
}

/* ---------- 5. Accueil : page de démarrage ---------- */

/* Le panneau animé prend toute la hauteur restante sous le texte */
.start { display: flex; flex-direction: column; gap: clamp(18px, 2.4vw, 30px); flex: 1; min-height: 0; }
.start-intro { flex: none; }
.start-panel { flex: 1; min-height: 260px; display: flex; }
.start-panel .win { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.start-panel .win-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.start-panel .win-cols { flex: 1; min-height: 0; }
.start-panel .win-tasks { justify-content: space-between; }
/* Vue qui doit tenir dans la fenêtre : le dernier bloc absorbe
   la hauteur restante plutôt que de pousser la vue au défilement.
   Sous 900 px la mise en page repasse en colonne et le défilement revient. */
@media (min-width: 901px) {
  /* « min-height » et non « height » : la vue remplit la fenêtre quand la place
     le permet, et s'étire au lieu de rogner son contenu quand elle manque. */
  .viewpanel.fit.active { min-height: 100%; display: flex; flex-direction: column; }
  .viewpanel.fit.active > .win { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  /* Le plancher correspond à la hauteur dont le panneau de réglages a besoin :
     en dessous, c'est lui qui se mettrait à défiler, ce qui serait pire. */
  .viewpanel.fit.active > .win > .configurator { flex: 1; min-height: 375px; }
}

.start-panel .win-chart { justify-content: center; }
.start-panel .spark { height: clamp(38px, 9vh, 74px); }
.start-panel .spark { height: auto; flex: 1; min-height: 60px; }
.start-panel .glass-weak { display: flex; flex-direction: column; }
/* Le titre s'étend sur toute la largeur ; seul le corps garde une mesure lisible */
.start-intro { max-width: none; }
.start-intro .lead { max-width: 1080px; }

/* Les deux activités côte à côte, sur toute la largeur */
.rows.rows-flat {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(20px, 3vw, 44px);
  border-bottom: 0;
  margin-top: 20px;
}
.rows.rows-flat .row-item { padding: 0; }
@media (max-width: 820px) { .rows.rows-flat { grid-template-columns: minmax(0, 1fr); gap: 16px; } }


/* La fenêtre d'aperçu se déploie sur deux colonnes quand la place le permet */
.win-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 8px; }
.win-tasks { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 780px) { .win-cols { grid-template-columns: minmax(0, 1fr); } }

.start h1 { margin-block: 12px 12px; }
.start-cta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }


/* ---------- 7. Listes ---------- */

.rows { display: flex; flex-direction: column; }
.rows > * + * { border-top: 1px solid var(--hairline); }

/* Variante sans cadre : la liste vit à même la page */
.rows-flat { border-bottom: 1px solid var(--brd); }
.rows-flat > * + * { border-top: 0; }

.row-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 0;
  transition: background-color var(--t-fast) var(--ease);
  text-align: left;
}
.row-item:hover .h4 { color: var(--ink); }
.row-item:hover .ri-meta { transform: translateX(4px); color: var(--ink-2); }
.row-item .ri-main { flex: 1; min-width: 0; }
.row-item .ri-meta {
  font-family: var(--font-mono);
  font-size: 0.635rem;
  letter-spacing: 0.06em;
  color: var(--ink-4);
  flex: none;
  padding-top: 2px;
  text-align: right;
  transition: transform var(--t) var(--ease-spring), color var(--t-fast) var(--ease);
}

/* Liste à coches */
.ticks { display: flex; flex-direction: column; gap: 7px; }
.ticks li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.855rem;
  color: var(--ink-2);
  line-height: 1.48;
}
.ticks li::before {
  content: "";
  width: 13px; height: 13px;
  flex: none;
  margin-top: 4px;
  border-radius: 3px;
  border: 1px solid var(--hairline);
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397979f' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 8px no-repeat;
}

/* ---------- 8. Timeline ---------- */

.tl { display: flex; flex-direction: column; }
.tl > * + * { border-top: 1px solid var(--brd); }

.tl-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  transition: background-color var(--t-fast) var(--ease);
}

@media (max-width: 620px) { .tl-item { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

.tl-logo {
  width: 28px; height: 28px;
  border-radius: var(--r-xs);
  border: 1px solid var(--hairline);
  object-fit: cover;
  display: block;
  flex: none;
}

.tl-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.tl-date {
  font-family: var(--font-mono);
  font-size: 0.635rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: auto;
}
.tl-role { font-size: 0.855rem; color: var(--ink-2); font-weight: 500; }
.tl-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.tl-tag {
  font-size: 0.735rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--brd);
  color: var(--ink-2);
}

/* ---------- 9. Bandeau défilant ---------- */

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; gap: 7px; width: max-content; animation: slide 50s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

.tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding-inline: 11px;
  border-radius: var(--r-sm);
  background-color: var(--surface);
  background-image: var(--tint-soft);
  border: 1px solid var(--hairline);
  font-size: 0.81rem;
  color: var(--ink-2);
  white-space: nowrap;
}
.tool .tool-dot { width: 5px; height: 5px; border-radius: 2px; flex: none; background: var(--ink-4); }

/* ---------- 10. Accordéon ---------- */

.acc > * + * { border-top: 1px solid var(--brd); }

.acc-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 0;
  text-align: left;
  font-size: 0.915rem;
  font-weight: 550;
  letter-spacing: -0.015em;
  transition: background-color var(--t-fast) var(--ease);
}
.acc-trigger:hover { color: var(--ink); }
.acc-sign {
  margin-left: auto;
  width: 18px; height: 18px;
  flex: none;
  border-radius: 4px;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  position: relative;
  transition: transform var(--t) var(--ease-spring);
}
.acc-sign::before, .acc-sign::after {
  content: "";
  position: absolute;
  background: var(--ink-2);
  border-radius: 1px;
  transition: opacity var(--t) var(--ease);
}
.acc-sign::before { width: 8px; height: 1.3px; }
.acc-sign::after { width: 1.3px; height: 8px; }
.acc-item.open .acc-sign { transform: rotate(90deg); }
.acc-item.open .acc-sign::after { opacity: 0; }

.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s var(--ease); }
.acc-item.open .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel p { padding: 0 44px 16px 0; color: var(--ink-2); font-size: 0.915rem; }

/* ---------- 11. Formulaire ---------- */

.field { display: flex; flex-direction: column; gap: 5px; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  outline: 0;
  font-size: 0.885rem;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field textarea:focus {
  border-color: var(--ink-3);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.chip-group { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding-inline: 10px;
  border-radius: var(--r-xs);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  font-size: 0.815rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.chip-radio input:checked + span {
  background-image: var(--tint-strong);
  border-color: transparent;
  color: var(--ink);
  font-weight: 600;
}
.chip-radio input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.form-status {
  font-size: 0.845rem;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  display: none;
}
.form-status.show { display: block; }
.form-status.err { color: #b4443c; border-color: rgba(180, 68, 60, 0.4); }
[data-theme="dark"] .form-status.err { color: #f08a82; }

/* Grille de la page contact */
.contact-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
@media (max-width: 980px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* Bloc de surface secondaire, utilisé dans l'aperçu du héros */
.glass-weak {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
}

/* ---------- Compétences : barres animées et valeurs qui montent ---------- */

.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 3vw, 48px); }
@media (max-width: 820px) { .skills { grid-template-columns: minmax(0, 1fr); } }

.skill-group > .idx { margin-bottom: 14px; }

.skill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 12px;
  padding-block: 9px;
  border-top: 1px solid var(--hairline);
}
.skill:first-of-type { border-top: 0; }
.skill-name { font-size: 0.9rem; color: var(--ink); font-weight: 500; }
.skill-val {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.skill-track {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
}
.skill-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background-image: var(--tint-strong);
  transition: width 1.1s var(--ease);
}
/* Un reflet traverse la barre une fois qu'elle est remplie */
.skill-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  transform: translateX(-100%);
  animation: skillSheen 2.6s var(--ease) 1.1s infinite;
}
[data-theme="dark"] .skill-fill::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}
@keyframes skillSheen { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(220%); } }

.skill:hover .skill-name { color: var(--ink); }
.skill:hover .skill-val { color: var(--ink-2); }

/* ---------- 12. Grille de références ---------- */

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}
.logo-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 15px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color var(--t-fast) var(--ease), transform var(--t) var(--ease-spring),
              background-image var(--t-fast) var(--ease);
}
.logo-cell:hover {
  transform: translateY(-2px);
  background-image: var(--tint-soft);
}
.logo-cell b {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink);
}
.logo-cell span {
  font-family: var(--font-mono);
  font-size: 0.635rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- 13. Citation ---------- */

.quote { padding: 0 0 0 clamp(14px, 1.8vw, 20px); border-left: 2px dotted var(--ink-4); }
.quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.06rem, 1.7vw, 1.28rem);
  line-height: 1.5;
  letter-spacing: -0.018em;
  font-weight: 500;
  text-wrap: pretty;
}
.quote figcaption {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-size: 0.82rem;
  color: var(--ink-3);
}
.quote figcaption .orb { width: 24px; height: 24px; }

/* ---------- 14. Bandeau d'appel ---------- */

.cta-band {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--brd);
  background-color: var(--surface);
  background-image: var(--tint-soft);
  padding: clamp(20px, 2.6vw, 32px);
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--hairline-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline-soft) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 70%);
}
.cta-band > * { position: relative; }

/* ---------- 15. Palette de commandes ---------- */

.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 18, 24, 0.28);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: start center;
  padding-top: min(14vh, 120px);
  padding-inline: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s var(--ease), visibility 0.18s;
}
.palette-backdrop.open { opacity: 1; visibility: visible; }

.palette {
  width: min(560px, 100%);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--brd);
  box-shadow: var(--shadow-lg), 0 30px 70px -25px rgba(20, 18, 24, 0.4);
  overflow: hidden;
  transform: scale(0.97) translateY(-8px);
  opacity: 0;
  transition: transform 0.24s var(--ease-spring), opacity 0.18s var(--ease);
}
.palette-backdrop.open .palette { transform: none; opacity: 1; }

.palette-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--hairline);
}
.palette-input-row svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.palette-input { flex: 1; background: none; border: 0; outline: 0; font-size: 0.94rem; letter-spacing: -0.012em; }
.palette-input::placeholder { color: var(--ink-4); }

.palette-list { max-height: min(48vh, 380px); overflow-y: auto; padding: 6px; overscroll-behavior: contain; }

.palette-group-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  padding: 8px 10px 4px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  text-align: left;
  color: var(--ink-2);
  font-size: 0.875rem;
  transition: background-color 0.1s var(--ease), color 0.1s var(--ease);
}
.palette-item .p-icon {
  width: 25px; height: 25px;
  display: grid; place-items: center;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  flex: none;
}
.palette-item .p-icon svg { width: 13px; height: 13px; }
.palette-item .p-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.665rem;
  color: var(--ink-4);
}
.palette-item[aria-selected="true"] { background-image: var(--tint); color: var(--ink); }
.palette-item[aria-selected="true"] .p-icon {
  background-image: var(--tint-strong);
  border-color: transparent;
  color: var(--ink);
}

.palette-empty { padding: 24px 16px; text-align: center; color: var(--ink-3); font-size: 0.87rem; }

.palette-foot {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 13px;
  border-top: 1px solid var(--hairline);
  background-color: var(--surface-2);
  background-image: var(--tint-soft);
  font-size: 0.72rem;
  color: var(--ink-3);
}
.palette-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 16. Notification ---------- */

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  translate: -50% 140%;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--brd);
  box-shadow: var(--shadow-lg);
  font-size: 0.845rem;
  transition: translate 0.34s var(--ease-spring);
}
.toast.show { translate: -50% 0; }
.toast svg { width: 14px; height: 14px; color: var(--ink-2); }

/* ============================================================
   17. Micro-animations
   Discrètes, déclenchées par l'intention : survol, sélection,
   entrée d'une vue. Jamais de mouvement gratuit en continu,
   sauf l'onglet actif qui reste vivant.
   ============================================================ */

/* Icônes de la barre latérale : fixes.
   L'onglet ouvert échange son icône contre une grille de points animée,
   une onde en chevron qui traverse la grille en boucle. */
.tab .t-ic { flex: none; }

.t-dots {
  display: none;
  grid-template-columns: repeat(3, 4px);
  gap: 1.5px;
  width: 15px;
  flex: none;
}
.t-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.15;
}

.tab[aria-current="page"] .t-ic { display: none; }
.tab[aria-current="page"] .t-dots { display: grid; }
.tab[aria-current="page"] .t-dots i { animation: pixelOn 650ms ease-in-out infinite; }

/* Onde en chevron : (colonne + distance à la ligne centrale) x 90 ms */
.tab[aria-current="page"] .t-dots i:nth-child(1) { animation-delay: 90ms; }
.tab[aria-current="page"] .t-dots i:nth-child(2) { animation-delay: 180ms; }
.tab[aria-current="page"] .t-dots i:nth-child(3) { animation-delay: 270ms; }
.tab[aria-current="page"] .t-dots i:nth-child(4) { animation-delay: 0ms; }
.tab[aria-current="page"] .t-dots i:nth-child(5) { animation-delay: 90ms; }
.tab[aria-current="page"] .t-dots i:nth-child(6) { animation-delay: 180ms; }
.tab[aria-current="page"] .t-dots i:nth-child(7) { animation-delay: 90ms; }
.tab[aria-current="page"] .t-dots i:nth-child(8) { animation-delay: 180ms; }
.tab[aria-current="page"] .t-dots i:nth-child(9) { animation-delay: 270ms; }

@keyframes pixelOn {
  0%, 100% { opacity: 0.15; }
  45% { opacity: 1; }
}

/* Anneau de marque en rotation lente */
.orb { padding: 1.5px; }
.orb::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--orb);
  animation: orbSpin 14s linear infinite;
}
.orb img { position: relative; z-index: 1; }
@keyframes orbSpin { to { transform: rotate(360deg); } }

/* Sous-onglets : le numéro s'efface au profit du libellé quand il est actif */
.subtab .st-n { transition: opacity var(--t) var(--ease), transform var(--t) var(--ease-spring); }
.subtab[aria-selected="true"] .st-n { transform: translateX(-1px); }
.subtab:hover .st-n { opacity: 0.55; }

/* Icônes encadrées : léger relief au survol du parent */
.ic-box { transition: transform var(--t) var(--ease-spring), border-color var(--t-fast) var(--ease); }
.row-item:hover .ic-box,
.tile:hover .ic-box { transform: translateY(-1px) scale(1.06); }

/* Outils du bandeau : petite élévation individuelle */
.tool { transition: transform var(--t) var(--ease-spring), color var(--t-fast) var(--ease); }
.tool:hover { transform: translateY(-2px); color: var(--ink); }

/* Étiquettes de la timeline : apparition en cascade au survol de la ligne */
.tl-tag { transition: transform var(--t) var(--ease-spring), border-color var(--t-fast) var(--ease); }

.tl-item:hover .tl-tag:nth-child(1) { transform: translateY(-1px); transition-delay: 0ms; }
.tl-item:hover .tl-tag:nth-child(2) { transform: translateY(-1px); transition-delay: 40ms; }
.tl-item:hover .tl-tag:nth-child(3) { transform: translateY(-1px); transition-delay: 80ms; }
.tl-item:hover .tl-tag:nth-child(4) { transform: translateY(-1px); transition-delay: 120ms; }
.tl-item:hover .tl-tag:nth-child(5) { transform: translateY(-1px); transition-delay: 160ms; }

/* Pastille du logo de la timeline */
.tl-logo { transition: transform var(--t) var(--ease-spring), background-color var(--t-fast) var(--ease); }
.tl-item:hover .tl-logo { transform: rotate(-4deg) scale(1.06); }

/* Champ de recherche : la loupe pivote légèrement */
.side-search svg { transition: transform var(--t) var(--ease-spring); }
.side-search:hover svg { transform: rotate(-12deg) scale(1.1); }

/* Cellules de références : lever au survol */
.logo-cell { transition: transform var(--t) var(--ease-spring), color var(--t-fast) var(--ease), background-image var(--t-fast) var(--ease); }
.logo-cell:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .tab[aria-current="page"] .t-dots i,
  .orb::before { animation: none; }
}




/* Emplacement carré, pour un logo */

/* Figure complète : emplacement, légende */
.shot {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
/* Illustration rattachée à un bloc : elle se glisse sous l'en-tête du bloc
   qu'elle montre et en prend la largeur, au lieu de flotter entre deux
   sections sans lien avec ni l'une ni l'autre. */
.panel-media { margin: -6px 0 18px; }
.panel-media img {
  aspect-ratio: auto;
  width: 100%;
  height: clamp(148px, 20vh, 212px);
  object-fit: cover;
  border-radius: var(--r-md);
}


.shot figcaption {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Vignette de logo : un carré compact au-dessus du nom, dans le même
   esprit que la pastille de la timeline. */
.ref-logo {
  width: 46px; height: 46px;
  border-radius: var(--r-sm);
  border: 1px solid var(--hairline);
  object-fit: cover;
  display: block;
  margin-bottom: 9px;
}
.logo-cell-plain { justify-content: center; }
