/* ════════════════════════════════════════════════════════════
   style.css — Feuille de Route
   Charte In Extenso 2023 · Mode clair · Barlow Condensed
   ════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────
   1. PALETTE
   ────────────────────────────────────────────────────────── */
:root {
  --c-tomate:    #ef4130;
  --c-tangerine: #f58220;
  --c-mimosa:    #ffcb05;
  --c-azur:      #a1daf8;
  --c-bonbon:    #e33e80;
  --c-canari:    #f9ec00;
  --c-celeste:   #00aadb;
  --c-lavande:   #8981b5;
  --c-verteau:   #94d1be;
  --c-violine:   #583f99;
  --c-menthol:   #6bb989;
  --c-nuit:      #00002c;

  --step-color:  var(--c-violine);

  --gold-light:  #E8C97A;
  --gold:        #C9A84C;
  --gold-dim:    #8B6420;

  --bg:          #fafaf7;
  --bg-card:    #ffffff;
  --bg-soft:    #f0eee8;
  --text:        #1a1a2e;
  --text-soft:   #5c5c6e;
  --text-mute:   #9a9aa8;
  --border:      rgba(0, 0, 44, 0.08);

  --ease-out:    cubic-bezier(.16, 1, .3, 1);
}

/* ──────────────────────────────────────────────────────────
   2. RESET + BASE
   ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body { height: auto; }
button { background: none; border: none; font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, 'SFMono-Regular', monospace; font-size: .9em;
       background: var(--bg-soft); padding: 1px 6px; border-radius: 2px; }

#canvas-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* ──────────────────────────────────────────────────────────
   3. CURSEUR custom
   ────────────────────────────────────────────────────────── */
.page-app * { cursor: none !important; }
.page-app #cursor {
  position: fixed; width: 12px; height: 12px;
  pointer-events: none; z-index: 9999;
}
.page-app #cursor::before {
  content: ''; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 8px; height: 8px;
  background: var(--step-color, var(--c-violine));
  box-shadow: 0 0 8px currentColor;
  transition: background .4s;
}

/* ──────────────────────────────────────────────────────────
   4. BRAND — ROADMAP.OBD (sup)
   ────────────────────────────────────────────────────────── */
.brand { text-align: center; line-height: 1.05; }

.brand-l1 {
  font-weight: 800; font-style: italic;
  font-size: clamp(48px, 8vw, 120px);
  color: var(--c-nuit);
  letter-spacing: -.025em;
}
.brand-l1 .brand-sup {
  font-size: 0.22em;
  font-weight: 700;
  font-style: normal;
  vertical-align: super;
  letter-spacing: .04em;
  color: var(--c-violine);
  margin-left: -.04em;
  position: relative;
  top: -.15em;
  display: inline-block;
}
.brand-l2 {
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 32px);
  color: var(--text);
  letter-spacing: .06em; text-transform: uppercase;
  margin-top: 6px;
}
.brand-l3 {
  font-weight: 300; font-style: italic;
  font-size: clamp(13px, 1.4vw, 17px);
  color: var(--text-soft);
  margin-top: 14px; letter-spacing: .03em;
}
.brand-l4 {
  font-weight: 600;
  font-size: clamp(12px, 1.3vw, 16px);
  color: var(--c-violine);
  letter-spacing: .15em; text-transform: uppercase;
  margin-top: 4px;
}

.brand--big .brand-l1   { font-size: clamp(56px, 10vw, 160px); }
.brand--small .brand-l1 { font-size: clamp(32px, 4vw, 56px); }
.brand--small .brand-l2 { font-size: clamp(13px, 1.5vw, 18px); }

/* ──────────────────────────────────────────────────────────
   4-bis. TITRE (sober : Nuit → gris ardoise foncé)
   ────────────────────────────────────────────────────────── */
.title-rainbow {
  background: linear-gradient(180deg,
    #00002c 0%,
    #1f1f30 55%,
    #4a4a5e 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 44, 0.18));
}

/* Grand titre de page (utilisé sur app.php?view=roadmap, view-build, adminvisu) */
.rm-page-title {
  font-weight: 800;
  font-style: italic;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: .03em;
  text-align: center;
  margin: 30px auto 40px;
  white-space: nowrap;
}

/* ──────────────────────────────────────────────────────────
   5. LOGIN PAGE
   ────────────────────────────────────────────────────────── */
.page-login .login-wrap {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 60px; padding: 40px 20px;
}
.login-card {
  display: flex; flex-direction: column; gap: 16px;
  width: 100%; max-width: 380px;
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--c-violine);
  box-shadow: 0 8px 32px rgba(0, 0, 44, .06);
}
.login-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .25em; color: var(--text-soft); }
.login-input {
  width: 100%; padding: 14px 16px;
  font-family: inherit; font-size: 18px; font-weight: 400;
  color: var(--c-nuit); background: var(--bg);
  border: 1px solid var(--border); border-radius: 0;
  outline: none; transition: border-color .2s, background .2s;
}
.login-input:focus { border-color: var(--c-violine); background: var(--bg-card); }
.login-btn {
  margin-top: 8px; padding: 14px 20px;
  font-size: 14px; font-weight: 700;
  letter-spacing: .25em; text-transform: uppercase;
  color: #fff; background: var(--c-nuit);
  border: 2px solid var(--c-nuit);
  transition: all .25s var(--ease-out);
}
.login-btn:hover { background: var(--c-violine); border-color: var(--c-violine); letter-spacing: .35em; }
.login-error {
  padding: 10px 14px; font-size: 13px;
  color: var(--c-tomate); background: rgba(239, 65, 48, .08);
  border-left: 3px solid var(--c-tomate);
}
.login-foot {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 400;
  letter-spacing: .2em; color: var(--text-mute);
  text-transform: uppercase;
}
.login-foot .dot {
  width: 6px; height: 6px;
  background: var(--c-menthol);
  transform: rotate(45deg);
  animation: blink 2s ease-in-out infinite;
}

/* ──────────────────────────────────────────────────────────
   6. APP — vues (welcome / roadmap / build)
   ────────────────────────────────────────────────────────── */
.view {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity .8s var(--ease-out), visibility .8s;
}
.view.is-active { opacity: 1; visibility: visible; }

.view-welcome { gap: 60px; padding: 40px; }
.view-welcome .brand { animation: brandReveal 1.2s var(--ease-out) both; }

.cta-start {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 20px 40px;
  font-size: 18px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: #fff; background: var(--c-nuit);
  border: 2px solid var(--c-nuit);
  transition: all .35s var(--ease-out);
  animation: brandReveal 1s .5s var(--ease-out) both;
}
.cta-start:hover {
  background: var(--c-violine); border-color: var(--c-violine);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(88, 63, 153, .25);
}
.cta-start .cta-arrow { font-size: 22px; transition: transform .35s var(--ease-out); }
.cta-start:hover .cta-arrow { transform: translateX(8px); }

.welcome-tip {
  font-size: 12px; font-weight: 300; font-style: italic;
  letter-spacing: .12em; color: var(--text-mute);
  animation: brandReveal 1s 1s var(--ease-out) both;
  margin-top: 8px;
}

/* ──────────────────────────────────────────────────────────
   6.2 ROADMAP — vue finale
   ────────────────────────────────────────────────────────── */
.view-roadmap, .view-build {
  position: relative; display: block; inset: auto;
  min-height: 100vh;
  padding: 40px clamp(20px, 4vw, 60px) 80px;
  overflow-y: auto;
}
.view-roadmap.is-active,
.view-build.is-active { position: static; }
.view-roadmap:not(.is-active),
.view-build:not(.is-active) { display: none; }

.rm-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  animation: brandReveal .8s var(--ease-out) both;
}
.rm-period {
  display: flex; align-items: center; gap: 14px;
  font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--c-violine);
  font-size: clamp(13px, 1.4vw, 16px);
  padding-top: 12px;
}
.rm-period-arrow { display: inline-block; font-size: 1.4em; color: var(--text-mute); }

.rm-build-bar {
  display: flex; justify-content: center;
  margin: 0 auto 50px;
}

.cta-build {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 16px 32px;
  font-size: 15px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: #fff; background: var(--c-violine);
  border: 2px solid var(--c-violine);
  transition: all .3s var(--ease-out);
  animation: brandReveal .8s .2s var(--ease-out) both;
}
.cta-build:hover {
  background: var(--c-nuit); border-color: var(--c-nuit);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 44, .2);
}
.cta-build-icon { font-size: 18px; }

.rm-section { margin-bottom: 70px; }
.rm-section-title {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 30px;
}
.rm-section-num {
  font-weight: 800; font-style: italic;
  font-size: 38px; color: var(--c-violine);
  line-height: 1;
}
.rm-section-name {
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 26px);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text);
}
.rm-section-bar {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--c-violine) 0%, transparent 100%);
}

.axes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.axe-card {
  position: relative;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--axe-color, var(--c-violine));
  cursor: pointer;
  transition: all .35s var(--ease-out);
  overflow: hidden;
  opacity: 0; transform: translateY(20px);
  animation: cardReveal .6s var(--ease-out) forwards;
}
.axe-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--axe-color, var(--c-violine));
  opacity: 0; transition: opacity .35s; z-index: 0;
}
.axe-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0, 0, 44, .12); }
.axe-card:hover::before { opacity: .06; }
.axe-card > * { position: relative; z-index: 1; }

.axe-num {
  display: inline-block; padding: 4px 10px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .25em; color: #fff;
  background: var(--axe-color, var(--c-violine));
  margin-bottom: 14px;
}
.axe-title {
  font-weight: 700; font-size: 19px; line-height: 1.25;
  color: var(--c-nuit);
  margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .02em;
}
.axe-desc {
  font-weight: 400; font-size: 14px; line-height: 1.5;
  color: var(--text-soft);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .4s var(--ease-out), opacity .4s, margin-top .4s;
}
.axe-card:hover .axe-desc,
.axe-card:focus-within .axe-desc {
  max-height: 800px; opacity: 1; margin-top: 12px;
}
.axe-desc ul { margin: 6px 0 0; padding-left: 16px; }
.axe-desc li { padding: 3px 0; }
.axe-tag {
  display: inline-block; margin-top: 14px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .2em; color: var(--axe-color, var(--c-violine));
  text-transform: uppercase;
}
.axe-tag::before { content: '◆ '; font-size: 9px; }

/* Timeline livraisons */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0; position: relative;
}
.timeline::before {
  content: ''; position: absolute;
  top: 18px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--c-tomate) 0%, var(--c-tangerine) 33%,
    var(--c-mimosa) 66%, var(--c-bonbon) 100%);
  z-index: 0;
}
.tl-month {
  position: relative;
  padding: 50px 16px 20px;
  text-align: center;
  border-right: 1px dashed var(--border);
  cursor: pointer;
  opacity: 0; transform: translateY(20px);
  animation: cardReveal .6s var(--ease-out) forwards;
}
.tl-month:last-child { border-right: none; }
.tl-marker {
  position: absolute; top: 8px; left: 50%;
  width: 22px; height: 22px;
  background: var(--month-color, var(--c-violine));
  transform: translateX(-50%) rotate(45deg);
  z-index: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 44, .15);
  transition: transform .35s var(--ease-out);
}
.tl-month:hover .tl-marker { transform: translateX(-50%) rotate(45deg) scale(1.3); }
.tl-month-name {
  font-weight: 700; font-size: 18px;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--c-nuit); margin-bottom: 8px;
}
.tl-month-headline {
  font-weight: 400; font-style: italic;
  font-size: 13px; line-height: 1.4;
  color: var(--text-soft);
  max-width: 220px; margin: 0 auto 12px;
}
.tl-details {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .5s var(--ease-out), opacity .4s;
  text-align: left; padding: 0 4px;
}
.tl-month:hover .tl-details,
.tl-month:focus-within .tl-details {
  max-height: 800px; opacity: 1; margin-top: 8px;
}
.tl-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0;
  font-size: 13px; font-weight: 400; line-height: 1.4;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
}
.tl-item:last-child { border-bottom: none; }
.tl-item::before {
  content: '◆'; font-size: 8px;
  color: var(--month-color, var(--c-violine));
  margin-top: 5px; flex-shrink: 0;
}
.tl-item.is-done {
  color: var(--c-menthol);
  text-decoration: line-through;
  text-decoration-color: rgba(107, 185, 137, .4);
}
.tl-item.is-done::before { color: var(--c-menthol); }

.rm-footer {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 11px; font-weight: 300; font-style: italic;
  letter-spacing: .25em; color: var(--text-mute);
  text-transform: uppercase;
}
.rm-footer .dot {
  width: 6px; height: 6px;
  background: var(--c-violine);
  transform: rotate(45deg);
  animation: blink 2s ease-in-out infinite;
}

/* ──────────────────────────────────────────────────────────
   6.3 VUE BUILD — Construire la feuille de route
   ────────────────────────────────────────────────────────── */
.back-inline {
  font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-soft);
  border: 1px solid var(--border);
  padding: 8px 14px; background: var(--bg-card);
  transition: all .25s;
}
.back-inline:hover { color: var(--c-violine); border-color: var(--c-violine); }

.build-header-actions {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.cta-plan-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: #fff; background: var(--c-violine);
  border: 1px solid var(--c-violine);
  transition: all .25s var(--ease-out);
}
.cta-plan-link:hover {
  background: var(--c-nuit); border-color: var(--c-nuit);
  transform: translateX(2px);
  box-shadow: 0 6px 16px rgba(88, 63, 153, .25);
}

.build-meta {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: 12px;
  margin: -20px auto 30px;
  font-size: 14px;
  color: var(--text-soft);
}
.build-meta-label { letter-spacing: .15em; text-transform: uppercase; font-weight: 600; }
.build-meta-value {
  font-size: 22px; font-weight: 800; font-style: italic;
  color: var(--c-violine);
}
.build-meta-sep { color: var(--text-mute); }
.build-meta-hint { font-style: italic; color: var(--text-mute); }

.build-blocks {
  display: flex; flex-direction: column;
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto;
}
.build-block-wrap {
  opacity: 0; transform: translateY(20px);
  animation: cardReveal .5s var(--ease-out) forwards;
}

.build-block {
  display: flex; align-items: center;
  gap: 18px;
  padding: 18px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 6px solid var(--axe-color, var(--c-violine));
  text-align: left;
  transition: all .3s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.build-block::before {
  content: ''; position: absolute;
  inset: 0;
  background: var(--axe-color, var(--c-violine));
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.build-block > * { position: relative; z-index: 1; }
.build-block:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(0, 0, 44, .08);
}
.build-block:hover::before { opacity: .05; }

.build-block .bb-num {
  font-size: 11px; font-weight: 700;
  letter-spacing: .25em; text-transform: uppercase;
  color: #fff;
  background: var(--axe-color, var(--c-violine));
  padding: 4px 10px;
  flex-shrink: 0;
}
.build-block .bb-title {
  flex: 1;
  font-weight: 700;
  font-size: clamp(16px, 1.8vw, 20px);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-nuit);
}
.build-block .bb-hours {
  font-weight: 800; font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--axe-color, var(--c-violine));
  flex-shrink: 0;
}

.build-block-wrap.is-open .build-block {
  border-bottom: none;
  border-left-width: 6px;
}

.build-detail {
  max-height: 0; overflow: hidden;
  opacity: 0;
  background: var(--bg-soft);
  border-left: 6px solid var(--axe-color, var(--c-violine));
  border-right: 1px solid var(--border);
  transition: max-height .4s var(--ease-out), opacity .3s, padding .3s;
}
.build-block-wrap.is-open .build-detail {
  max-height: 800px;
  opacity: 1;
  padding: 14px 24px 18px;
}

.build-tasks {
  list-style: none;
  padding: 0; margin: 0;
}
.bd-task {
  display: flex; justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px dashed rgba(0, 0, 44, .08);
}
.bd-task:last-child { border-bottom: none; }
.bd-task-label {
  flex: 1;
  color: var(--text);
}
.bd-task-label::before {
  content: '◆ '; font-size: 9px;
  color: var(--axe-color, var(--c-violine));
  margin-right: 4px;
}
.bd-task-hours {
  font-weight: 700;
  color: var(--axe-color, var(--c-violine));
  flex-shrink: 0;
  min-width: 50px;
  text-align: right;
}
.bd-task--empty { color: var(--text-mute); font-style: italic; text-align: center; }
.bd-task--empty::before { display: none; }

.build-tip {
  text-align: center;
  margin-top: 40px;
  font-size: 12px;
  font-style: italic;
  color: var(--text-mute);
  letter-spacing: .04em;
}
.build-tip a { color: var(--c-violine); text-decoration: underline; }

/* ──────────────────────────────────────────────────────────
   7. ANIMATION PAGE (roadmap.anim.php)
   ────────────────────────────────────────────────────────── */
.anim-splash {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 40px; padding: 40px;
  opacity: 0;
  transition: opacity .8s var(--ease-out);
}
.anim-splash.is-active { opacity: 1; }
.anim-splash.is-out { opacity: 0; pointer-events: none; }

.anim-splash-title {
  font-weight: 800; font-style: italic;
  font-size: clamp(32px, 5vw, 64px);
  letter-spacing: .04em;
  text-align: center;
  white-space: nowrap;
  animation: brandReveal 1s var(--ease-out) both;
}
.anim-splash .cta-start { animation: brandReveal 1s .3s var(--ease-out) both; }
.anim-splash .cta-start .cta-arrow { font-size: 16px; transform: scale(0.9); }
.anim-splash .cta-start:hover .cta-arrow { transform: scale(1.1) translateX(2px); }
.anim-splash .welcome-tip { animation: brandReveal 1s .6s var(--ease-out) both; }

.view-intro {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  opacity: 0; visibility: hidden;
  transition: opacity .8s var(--ease-out), visibility .8s;
  gap: 0; padding: 30px 20px 60px;
  padding-top: clamp(30px, 6vh, 70px);
}
.view-intro.is-active { opacity: 1; visibility: visible; }

#intro-title {
  font-weight: 800; font-style: italic;
  font-size: clamp(28px, 4.4vw, 56px);
  letter-spacing: .04em;
  margin-bottom: 20px; text-align: center;
  white-space: nowrap;
  opacity: 0; transform: translateY(24px);
  transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out);
}
#intro-title.vis { opacity: 1; transform: translateY(0); }

#prog-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  opacity: 0; transition: opacity .8s ease;
  margin-bottom: 24px;
}
#prog-wrap.vis { opacity: 1; }
#prog-track { width: 320px; height: 2px; background: var(--border); position: relative; overflow: hidden; }
#prog-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--step-color, var(--c-violine));
  box-shadow: 0 0 8px currentColor;
}

#step-zone {
  flex: 1; width: 100%; max-width: 760px;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 12px; padding: 0 20px;
}

#step-diamond {
  width: 38px; height: 38px;
  background: var(--step-color);
  transform: rotate(45deg) scale(0);
  margin-bottom: 4px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--step-color) 35%, transparent);
  transition: transform .9s var(--ease-out), background .5s ease;
}
#step-diamond.vis {
  transform: rotate(45deg) scale(1);
  animation: diamondBlink 1.4s 1s ease-in-out infinite;
}
#step-diamond.out { transform: rotate(45deg) scale(0); animation: none; }

@keyframes diamondBlink {
  0%, 100% { opacity: 1; box-shadow: 0 8px 24px color-mix(in srgb, var(--step-color) 35%, transparent); }
  50%      { opacity: 0.5; box-shadow: 0 10px 36px color-mix(in srgb, var(--step-color) 70%, transparent); }
}

#step-num {
  font-size: 12px; font-weight: 700;
  letter-spacing: .55em;
  color: var(--text-soft);
  text-transform: uppercase;
  opacity: 0; transform: translateY(8px);
  transition: opacity .6s ease, transform .6s var(--ease-out);
}
#step-num.vis { opacity: 1; transform: translateY(0); }

#step-name {
  font-weight: 800; font-style: italic;
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.1;
  color: var(--step-color);
  letter-spacing: -.01em;
  margin-bottom: 4px;
  text-shadow: 0 2px 24px color-mix(in srgb, var(--step-color) 25%, transparent);
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s var(--ease-out), color .5s ease;
}
#step-name.vis { opacity: 1; transform: translateY(0); }

#step-subname {
  font-weight: 600; font-style: italic;
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.1;
  color: var(--step-color);
  letter-spacing: .05em;
  margin-top: -2px;
  margin-bottom: 8px;
  opacity: 0; transform: translateY(8px);
  transition: opacity .6s ease, transform .6s var(--ease-out), color .5s ease;
}
#step-subname.vis { opacity: 1; transform: translateY(0); }
#step-subname:empty { display: none; }

.step-block {
  width: 100%; margin-top: 14px;
  opacity: 0; transform: translateY(12px);
  transition: opacity .7s ease, transform .7s var(--ease-out);
}
.step-block.vis { opacity: 1; transform: translateY(0); }

.step-label {
  display: flex; align-items: center; justify-content: center;
  gap: 18px;
  font-size: clamp(15px, 1.9vw, 21px);
  font-weight: 800; font-style: italic;
  letter-spacing: .22em; text-transform: uppercase;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 45%, var(--gold-dim) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(184, 146, 59, 0.22));
}
.sl-line { width: 60px; height: 1.5px; background: linear-gradient(90deg, transparent, var(--gold)); }
.sl-line:last-child { background: linear-gradient(90deg, var(--gold), transparent); }

.step-body--objectif {
  font-style: italic;
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: 600; color: var(--text);
  max-width: 640px; line-height: 1.5; margin: 0 auto;
}

.step-body--details {
  list-style: none; padding: 0; margin: 0 auto;
  max-width: 660px; text-align: left;
  font-size: clamp(15px, 1.65vw, 18px);
  font-weight: 400; color: var(--text); line-height: 1.5;
}
.step-body--details li {
  position: relative;
  padding: 8px 0 8px 28px;
  border-bottom: 1px solid rgba(0, 0, 44, 0.05);
  opacity: 0; transform: translateY(8px);
}
.step-body--details li:last-child { border-bottom: none; }
.step-body--details li::before {
  content: '◆'; position: absolute;
  left: 4px; top: 11px;
  color: var(--step-color);
  font-size: 10px; transition: color .4s;
}
.step-block.vis .step-body--details li { animation: liReveal .55s var(--ease-out) forwards; }
.step-block.vis .step-body--details li:nth-child(1) { animation-delay: .05s; }
.step-block.vis .step-body--details li:nth-child(2) { animation-delay: .30s; }
.step-block.vis .step-body--details li:nth-child(3) { animation-delay: .55s; }
.step-block.vis .step-body--details li:nth-child(4) { animation-delay: .80s; }
.step-block.vis .step-body--details li:nth-child(5) { animation-delay: 1.05s; }
.step-block.vis .step-body--details li:nth-child(6) { animation-delay: 1.30s; }
.step-block.vis .step-body--details li:nth-child(7) { animation-delay: 1.55s; }
.step-block.vis .step-body--details li:nth-child(8) { animation-delay: 1.80s; }

#skip-btn {
  position: fixed; bottom: 38px; right: 50px; z-index: 60;
  font-size: 10px; font-weight: 600;
  letter-spacing: .35em; color: var(--text-soft);
  text-transform: uppercase;
  border: 1px solid var(--border);
  padding: 10px 20px; background: var(--bg-card);
  opacity: 0; pointer-events: none; transition: all .3s;
}
#skip-btn.vis { opacity: 1; pointer-events: all; }
#skip-btn:hover {
  color: var(--step-color, var(--c-violine));
  border-color: var(--step-color, var(--c-violine));
  background: rgba(88, 63, 153, .04);
}

#mute-btn {
  position: fixed; bottom: 38px; right: 175px; z-index: 60;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-soft);
  border: 1px solid var(--border); background: var(--bg-card);
  opacity: 0; pointer-events: none; transition: all .3s;
}
#mute-btn.vis { opacity: 1; pointer-events: all; }
#mute-btn:hover {
  color: var(--step-color, var(--c-violine));
  border-color: var(--step-color, var(--c-violine));
}
#mute-btn .mute-off { display: none; font-weight: 300; }
#mute-btn.is-muted .mute-on { display: none; }
#mute-btn.is-muted .mute-off { display: inline; }

#end-canvas { position: fixed; inset: 0; z-index: 56; pointer-events: none; display: none; }

/* ──────────────────────────────────────────────────────────
   8. BOUTONS UTILITAIRES (déconnexion, retour, admin)
   ────────────────────────────────────────────────────────── */

/* Barre groupée fixe en haut à droite (vue roadmap + build) */
.top-toolbar {
  position: fixed; top: 24px; right: 28px; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; justify-content: flex-end;
  max-width: calc(100vw - 56px);
}
/* Quand un bouton est dans la toolbar, il perd son positionnement fixe individuel */
.top-toolbar > * {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
}
/* Cacher Retour roadmap par défaut (visible uniquement quand vue Construire active) */
.back-inline.is-hidden { display: none !important; }

.logout-btn {
  position: fixed; top: 24px; right: 28px; z-index: 100;
  padding: 8px 14px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-soft);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all .25s;
}
.logout-btn:hover { color: var(--c-tomate); border-color: var(--c-tomate); }

.back-btn {
  position: fixed; top: 24px; left: 28px; z-index: 100;
  padding: 8px 14px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-soft);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all .25s;
}
.back-btn:hover { color: var(--c-violine); border-color: var(--c-violine); }

.admin-btn {
  position: fixed; top: 24px; right: 175px; z-index: 100;
  padding: 8px 14px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--c-violine);
  background: var(--bg-card);
  border: 1px solid var(--c-violine);
  transition: all .25s;
}
.admin-btn:hover {
  color: #fff; background: var(--c-violine);
}

/* ──────────────────────────────────────────────────────────
   8-bis. PAGE ADMIN (adminvisu.php)
   ────────────────────────────────────────────────────────── */
.page-admin .admin-wrap {
  position: relative; z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px clamp(20px, 4vw, 60px) 80px;
}

.admin-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  animation: brandReveal .8s var(--ease-out) both;
}
.admin-meta {
  display: flex; flex-direction: column; align-items: flex-end;
  padding-top: 12px;
}
.admin-meta-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--text-soft);
}
.admin-meta-value {
  font-weight: 800; font-style: italic;
  font-size: clamp(28px, 3.2vw, 40px);
  color: var(--c-violine);
}

.admin-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
  font-size: 14px;
  font-style: italic;
  color: var(--text-soft);
  line-height: 1.55;
}

.admin-axes {
  display: flex; flex-direction: column;
  gap: 30px;
}

.ax-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 5px solid var(--axe-color, var(--c-violine));
  padding: 24px 28px;
  opacity: 0; transform: translateY(20px);
  animation: cardReveal .5s var(--ease-out) forwards;
}

.ax-head {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.ax-num {
  font-size: 11px; font-weight: 700;
  letter-spacing: .25em; text-transform: uppercase;
  color: #fff;
  background: var(--axe-color, var(--c-violine));
  padding: 4px 10px;
  flex-shrink: 0;
}
.ax-title {
  flex: 1;
  font-weight: 700;
  font-size: clamp(17px, 1.9vw, 22px);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-nuit);
}
.ax-subtitle {
  font-style: italic; font-weight: 600;
  font-size: .85em;
  color: var(--axe-color, var(--c-violine));
  letter-spacing: .05em;
  text-transform: none;
}
.ax-total {
  font-weight: 800; font-style: italic;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--axe-color, var(--c-violine));
}
.ax-drift {
  font-size: 11px; font-weight: 400; font-style: italic;
  color: var(--c-tomate);
  letter-spacing: .04em;
}

.ax-tasks {
  list-style: none; padding: 0; margin: 0;
}
.ax-task {
  display: flex; justify-content: space-between;
  align-items: baseline; gap: 16px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px dashed rgba(0, 0, 44, .06);
}
.ax-task:last-child { border-bottom: none; }
.ax-task-label { flex: 1; color: var(--text); }
.ax-task-label::before {
  content: '◆ '; font-size: 9px;
  color: var(--axe-color, var(--c-violine));
  margin-right: 4px;
}
.ax-task-hours {
  font-weight: 700;
  color: var(--axe-color, var(--c-violine));
  flex-shrink: 0; min-width: 50px; text-align: right;
}
.ax-task--empty { color: var(--text-mute); font-style: italic; }
.ax-task--empty::before { display: none; }

.admin-footer-note {
  margin-top: 60px;
  text-align: center;
  font-size: 12px;
  font-style: italic;
  color: var(--text-mute);
}

/* ──────────────────────────────────────────────────────────
   8-ter. PAGE PLAN (roadmap.plan.php) — drag & drop timeline
   ────────────────────────────────────────────────────────── */
.page-plan .plan-wrap {
  position: relative; z-index: 1;
  max-width: 1500px;
  margin: 0 auto;
  padding: 40px clamp(20px, 4vw, 60px) 80px;
}

.plan-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  animation: brandReveal .8s var(--ease-out) both;
}
.plan-toolbar {
  display: flex; align-items: center; gap: 18px;
  padding-top: 12px;
}
.plan-tool-btn {
  font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-soft);
  border: 1px solid var(--border);
  padding: 8px 14px;
  background: var(--bg-card);
  transition: all .25s;
}
.plan-tool-btn:hover {
  color: var(--c-tomate); border-color: var(--c-tomate);
}
.plan-tool-info {
  font-size: 13px;
  color: var(--text-mute);
  letter-spacing: .04em;
  font-style: italic;
  min-width: 220px;
  text-align: right;
}
.plan-tool-info.is-active { color: var(--c-violine); font-style: normal; }
.plan-tool-info .pi-axe {
  font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; font-size: 11px;
  margin-right: 8px;
}

.plan-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.55;
}
.plan-intro strong { color: var(--c-violine); }

/* ── TIMELINE ── */
.plan-timeline {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0;
  margin: 0 auto 40px;
  overflow: visible;
}

.plan-months {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  padding-left: 200px; /* espace label gauche */
}
.plan-month {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 8px 4px;
  border-right: 1px solid var(--border);
  text-align: center;
  position: relative;
}
.plan-month:last-child { border-right: none; }
.plan-month.is-locked {
  background: rgba(0, 0, 44, 0.07);
}
.plan-month.is-reduced {
  background: rgba(245, 130, 32, 0.08);
}
.plan-month-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--c-nuit);
}
.plan-month-year {
  font-size: 9px; font-weight: 400;
  letter-spacing: .15em;
  color: var(--text-mute);
  margin-top: 2px;
}
.plan-month-cap {
  font-size: 9px; font-weight: 600;
  letter-spacing: .08em;
  color: var(--text-soft);
  margin-top: 4px;
  text-transform: uppercase;
}
.plan-month-cap-detail {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--text-mute);
  font-style: italic;
  margin-top: 1px;
  text-transform: none;
}
.pmc-tag {
  font-size: 8px;
  font-weight: 700;
  margin-left: 2px;
  color: var(--c-violine);
  letter-spacing: .12em;
}
.plan-month.is-locked .plan-month-cap {
  color: var(--text-mute);
  font-style: italic;
}
.plan-month.is-reduced .plan-month-cap {
  color: var(--c-tangerine);
  font-weight: 700;
}

/* Grille verticale (lignes mois) */
.plan-grid {
  position: absolute;
  top: 80px; /* sous l'en-tête mois (4 lignes : label, year, cap, detail) */
  left: 200px;
  right: 0;
  bottom: 0;
  pointer-events: none;
}
.plan-grid-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.plan-grid-locked {
  position: absolute;
  top: 0; bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 44, 0.04) 0,
    rgba(0, 0, 44, 0.04) 6px,
    transparent 6px,
    transparent 12px
  );
  pointer-events: none;
}
.plan-grid-reduced {
  position: absolute;
  top: 0; bottom: 0;
  background: rgba(245, 130, 32, 0.05);
  pointer-events: none;
}

/* ── ROWS ── */
.plan-rows {
  display: flex; flex-direction: column;
}
.plan-row {
  display: flex;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
  opacity: 0; transform: translateX(-12px);
  animation: planRowReveal .5s var(--ease-out) forwards;
}
.plan-row:last-child { border-bottom: none; }

@keyframes planRowReveal {
  to { opacity: 1; transform: translateX(0); }
}

.plan-row-label {
  width: 200px; flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: center;
  gap: 2px;
  padding: 10px 14px;
  border-left: 4px solid var(--c-violine);
  border-right: 1px solid var(--border);
  background: var(--bg-soft);
}
.prl-num {
  font-size: 10px; font-weight: 700;
  letter-spacing: .25em; text-transform: uppercase;
  color: var(--text-soft);
}
.prl-title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
  color: var(--c-nuit);
  line-height: 1.15;
}
.prl-hours {
  font-size: 11px; font-weight: 600;
  color: var(--text-mute);
  font-style: italic;
}

.plan-row-track {
  position: relative;
  flex: 1;
  min-height: 64px;
  background: transparent;
  /* lignes verticales mois sont dans .plan-grid (absolute par-dessus) */
}

/* ── BLOCS REPRÉSENTATIFS draggables (style Gantt) ── */
.plan-block {
  position: absolute;
  top: 12px;
  height: 40px;
  background: var(--c-violine);
  border: none;
  border-radius: 3px;
  color: #fff;
  cursor: grab;
  touch-action: none;
  display: flex; align-items: center;
  gap: 10px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 44, .15);
  transition: box-shadow .2s, transform .2s, opacity .2s;
  user-select: none;
  z-index: 2;
}
.plan-block:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 44, .25);
  transform: translateY(-1px);
  z-index: 4;
}
.plan-block.is-dragging {
  cursor: grabbing;
  box-shadow: 0 8px 20px rgba(0, 0, 44, .3);
  z-index: 10;
  transition: none;
  opacity: 0.92;
}
.plan-block:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
}
.pb-label {
  flex: 1;
  overflow: hidden; text-overflow: ellipsis;
}
.pb-hours {
  font-style: italic;
  font-weight: 800;
  background: rgba(0, 0, 44, 0.18);
  padding: 2px 6px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ── Badge dépendance dans label ── */
.prl-dep {
  font-size: 9px;
  font-weight: 600;
  color: var(--c-violine);
  letter-spacing: .05em;
  margin-top: 4px;
  font-style: italic;
}

/* ── ACCORDÉON détail tâches ── */
.plan-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
}
.plan-row-detail {
  flex: 0 0 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease-out), opacity .3s ease;
  opacity: 0;
  background: var(--bg-soft);
  border-top: 1px dashed var(--border);
}
.plan-row.is-expanded .plan-row-detail {
  max-height: 800px;
  opacity: 1;
}
.prd-inner {
  padding: 16px 24px 20px;
}
.prd-header {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.prd-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.prd-title strong { color: var(--c-nuit); font-weight: 800; }
.prd-progress {
  display: flex; align-items: center; gap: 10px;
}
.prd-progress-bar {
  display: inline-block;
  width: 140px; height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.prd-progress-fill {
  display: block; height: 100%;
  transition: width .4s var(--ease-out);
}
.prd-progress-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: .04em;
}

.prd-tasks {
  list-style: none;
  padding: 0; margin: 0;
}
.prd-task {
  display: grid;
  grid-template-columns: 24px 1fr minmax(80px, 200px) 50px;
  gap: 14px;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed rgba(0, 0, 44, .06);
}
.prd-task:last-child { border-bottom: none; }
.prd-task-icon {
  text-align: center;
  font-weight: 800;
  color: var(--axe-color, var(--c-violine));
  font-size: 14px;
}
.prd-task-label {
  color: var(--text);
  line-height: 1.35;
}
.prd-task.is-done .prd-task-icon { color: var(--c-menthol); }
.prd-task.is-done .prd-task-label {
  color: var(--text-mute);
  text-decoration: line-through;
  text-decoration-color: rgba(107, 185, 137, .5);
}
.prd-task.is-done .prd-task-cursor {
  opacity: .55;
}
.prd-task-cursor {
  display: inline-block;
  height: 8px;
  border-radius: 2px;
  min-width: 8px;
  transition: width .3s ease, opacity .3s;
}
.prd-task-hours {
  font-weight: 700;
  font-style: italic;
  font-size: 12px;
  color: var(--axe-color, var(--c-violine));
  text-align: right;
}
.prd-task.is-done .prd-task-hours { color: var(--c-menthol); }
.prd-empty {
  font-size: 13px;
  font-style: italic;
  color: var(--text-mute);
  text-align: center;
  padding: 12px 0;
}

/* ── Hint dépendance dans summary ── */
.ps-dep {
  font-size: 10px;
  font-style: italic;
  color: var(--c-violine);
  margin-left: 6px;
  letter-spacing: .04em;
}

/* ──────────────────────────────────────────────────────────
   Section "Activités récurrentes" + "Projets"
   ────────────────────────────────────────────────────────── */
.plan-section-header {
  display: flex; align-items: center;
  padding: 10px 18px 8px;
  font-size: 10px; font-weight: 700;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--text-mute);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.psh-text::before {
  content: '◆';
  font-size: 8px;
  margin-right: 8px;
  color: var(--c-violine);
}

.plan-section-separator {
  height: 8px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.plan-recurring-section {
  background: var(--bg-card);
}

.plan-row--recurring {
  min-height: 44px;
  background: rgba(0, 0, 44, 0.015);
}
.plan-row--recurring:hover {
  background: rgba(0, 0, 44, 0.03);
}

.plan-row-label--recurring {
  display: flex; flex-direction: row; align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg-card);
}
.prl-rec-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}
.prl-rec-title {
  font-size: 12px; font-weight: 700;
  color: var(--c-nuit);
  text-transform: uppercase;
  letter-spacing: .04em;
  flex: 1;
  line-height: 1.15;
}
.prl-rec-info {
  display: block;
  font-size: 9px; font-weight: 400;
  font-style: italic;
  color: var(--text-mute);
  letter-spacing: .04em;
  margin-left: 18px;
  width: 100%;
}
/* Mise en grille pour gérer le wrap proprement */
.plan-row-label--recurring {
  display: grid;
  grid-template-columns: 14px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  row-gap: 2px;
  column-gap: 8px;
}
.plan-row-label--recurring .prl-rec-dot { grid-row: 1; grid-column: 1; }
.plan-row-label--recurring .prl-rec-title { grid-row: 1; grid-column: 2; }
.plan-row-label--recurring .prl-rec-info { grid-row: 2; grid-column: 1 / span 2; margin-left: 0; }

/* Chevron pour indiquer qu'on peut dérouler */
.prl-rec-chevron {
  display: inline-block;
  font-size: 11px;
  margin-left: 6px;
  color: var(--text-mute);
  transition: transform .25s ease;
}
.plan-row--recurring.is-expanded .prl-rec-chevron {
  transform: rotate(180deg);
  color: var(--c-violine);
}
.plan-row-label--recurring.is-clickable {
  cursor: pointer;
  transition: background .15s;
}
.plan-row-label--recurring.is-clickable:hover {
  background: var(--bg-soft);
}
.plan-row--recurring.is-expanded .plan-row-label--recurring {
  background: var(--bg-soft);
}

.plan-row-track--recurring {
  position: relative;
  min-height: 56px;
}

/* ── ACCORDÉON par agence (sous Visites) ── */
.plan-row-detail--agencies {
  background: var(--bg-soft);
}
.plan-row--recurring.is-expanded .plan-row-detail--agencies {
  max-height: 1200px;
}
.pra-inner {
  padding: 12px 0 16px;
}
.pra-header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 4px 18px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.pra-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--c-nuit);
}
.pra-stats {
  font-size: 11px;
  font-style: italic;
  color: var(--text-soft);
}
.pra-stats strong {
  color: var(--c-violine);
  font-weight: 800;
  font-style: italic;
  font-size: 14px;
}

.pra-pole-header {
  display: flex; align-items: center;
  gap: 8px;
  padding: 8px 18px 4px;
  margin-top: 8px;
  border-left: 3px solid var(--c-violine);
}
.pra-pole-header:first-of-type { margin-top: 0; }
.pra-pole-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
  flex-shrink: 0;
}
.pra-pole-name {
  font-size: 11px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: .15em;
  text-transform: uppercase;
  flex: 1;
}
.pra-pole-count {
  font-size: 10px;
  font-style: italic;
  color: var(--text-mute);
  letter-spacing: .04em;
}

.pra-agency-row {
  display: flex;
  min-height: 32px;
  border-bottom: 1px dashed rgba(0, 0, 44, 0.05);
}
.pra-agency-row:last-child { border-bottom: none; }

.pra-agency-label {
  width: 200px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 40px 1fr 30px;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 24px;
  font-size: 12px;
}
.pra-agency-abbrev {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}
.pra-agency-name {
  color: var(--text);
  line-height: 1.2;
}
.pra-agency-count {
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  text-align: right;
  color: var(--text-mute);
}

.pra-agency-track {
  position: relative;
  flex: 1;
  min-height: 32px;
}
.pra-agency-marker {
  top: 16px !important;     /* recentre dans la row 32px */
  width: 9px !important;
  height: 9px !important;
}

/* ──────────────────────────────────────────────────────────
   Études d'impact — section accordéon + drag-reorder + on/off
   ────────────────────────────────────────────────────────── */

/* Section wrapper (fermé par défaut) */
.plan-etudes-section {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.plan-section-header--toggle {
  cursor: pointer;
  transition: background .15s;
  display: flex; align-items: center;
}
.plan-section-header--toggle:hover { background: var(--bg-soft); }
.psh-count {
  font-size: 10px;
  font-weight: 600;
  font-style: italic;
  color: #00aadb;
  margin-left: auto;
  margin-right: 12px;
  letter-spacing: .04em;
}
.psh-chevron {
  font-size: 12px;
  color: var(--text-mute);
  transition: transform .25s ease;
  margin-right: 4px;
}
.plan-etudes-section.is-open .psh-chevron { transform: rotate(180deg); color: #00aadb; }

/* Timeline row des losanges (toujours visible) */
.plan-row--etude-timeline {
  min-height: 50px;
  display: flex;
  border-bottom: 1px solid var(--border);
}
.plan-row-label--etude-tl {
  display: flex; flex-direction: column;
  justify-content: center; gap: 2px;
  padding: 8px 14px;
  background: var(--bg-card);
}

/* Accordion body (études list — hidden by default) */
.plan-etudes-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .4s var(--ease-out), opacity .3s ease;
  background: var(--bg-soft);
  border-top: 1px dashed var(--border);
}
.plan-etudes-section.is-open .plan-etudes-body {
  max-height: 2000px;
  opacity: 1;
}

/* Études list */
.etudes-list {
  padding: 12px 18px 16px;
}
.etude-item {
  display: grid;
  grid-template-columns: 28px 44px 36px 1fr auto 32px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid #00aadb;
  margin-bottom: 6px;
  transition: box-shadow .2s, opacity .2s;
  position: relative;
}
.etude-item:last-child { margin-bottom: 0; }
.etude-item.is-disabled {
  opacity: .5;
  border-left-color: var(--text-mute);
}
.etude-item.is-disabled .ei-title { text-decoration: line-through; color: var(--text-mute); }
.etude-item:hover { box-shadow: 0 4px 12px rgba(0, 0, 44, .08); }
.etude-item.is-reordering {
  box-shadow: 0 8px 24px rgba(0, 0, 44, .18);
  opacity: .9;
}

/* Drag handle */
.ei-drag {
  font-size: 16px;
  color: var(--text-mute);
  cursor: grab;
  touch-action: none;
  user-select: none;
  text-align: center;
  letter-spacing: 2px;
  line-height: 1;
}
.ei-drag:hover { color: #00aadb; }
.etude-item.is-reordering .ei-drag { cursor: grabbing; color: #00aadb; }

/* Toggle on/off */
.ei-toggle {
  display: inline-flex;
  align-items: center;
  width: 36px; height: 20px;
  background: var(--text-mute);
  border-radius: 10px;
  padding: 2px;
  cursor: pointer;
  transition: background .2s;
  border: none;
  flex-shrink: 0;
}
.ei-toggle.is-on { background: #00aadb; }
.ei-toggle-dot {
  display: block;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 44, .2);
}
.ei-toggle.is-on .ei-toggle-dot { transform: translateX(16px); }

/* Priority badge */
.ei-priority {
  font-weight: 800;
  font-style: italic;
  font-size: 16px;
  text-align: center;
  letter-spacing: -.02em;
}

/* Title */
.ei-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--c-nuit);
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.25;
}

/* Period badge */
.ei-period {
  font-size: 10px;
  font-weight: 600;
  font-style: italic;
  color: var(--text-soft);
  letter-spacing: .06em;
  white-space: nowrap;
}
.ei-overflow {
  color: var(--c-tomate);
  font-weight: 700;
  font-style: normal;
}

/* Expand button */
.ei-expand {
  font-size: 12px;
  color: var(--text-mute);
  border: none;
  background: none;
  cursor: pointer;
  transition: transform .2s, color .2s;
  padding: 4px;
}
.ei-expand:hover { color: #00aadb; }
.etude-item.is-expanded .ei-expand { transform: rotate(180deg); color: #00aadb; }

/* Detail accordion inside item */
.ei-detail {
  grid-column: 1 / -1;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .35s var(--ease-out), opacity .25s, padding .25s;
}
.etude-item.is-expanded .ei-detail {
  max-height: 500px;
  opacity: 1;
  padding-top: 12px;
}

/* Losange élargi (barre hexagonale) */
.plan-etude-block {
  position: absolute;
  top: 10px;
  height: 30px;
  background: var(--etude-color, #00aadb);
  cursor: default;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  clip-path: polygon(12px 0%, calc(100% - 12px) 0%, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0% 50%);
  transition: filter .2s, transform .2s;
  z-index: 2;
  border: none;
  touch-action: none;
  user-select: none;
}
.plan-etude-block:hover {
  filter: brightness(1.15);
  transform: scaleY(1.1);
  z-index: 4;
}
.plan-etude-block.is-overflow { opacity: .45; }
.peb-diamond { font-size: 10px; opacity: .8; }
.peb-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.peb-period {
  font-style: italic; font-weight: 800; font-size: 13px;
  background: rgba(0, 0, 44, 0.15);
  padding: 2px 8px; border-radius: 2px;
}

/* Réutilisation des styles de détail (question, details, footer) */
.ei-detail .ped-question { margin-top: 0; }

.prl-etude-num {
  font-size: 9px; font-weight: 700;
  letter-spacing: .25em; text-transform: uppercase;
  color: #00aadb;
}
.prl-etude-title {
  font-size: 12px; font-weight: 700;
  color: var(--c-nuit); line-height: 1.2;
  text-transform: uppercase; letter-spacing: .02em;
}

.ped-question {
  font-style: italic;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 3px solid #00aadb;
  background: rgba(0, 170, 219, 0.05);
}

.ped-details {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.ped-details li {
  position: relative;
  padding: 6px 0 6px 24px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  border-bottom: 1px dashed rgba(0, 0, 44, 0.05);
}
.ped-details li:last-child { border-bottom: none; }
.ped-details li::before {
  content: '◆';
  position: absolute;
  left: 4px; top: 8px;
  font-size: 8px;
  color: #00aadb;
}

.ped-footer {
  font-size: 11px;
  font-style: italic;
  color: var(--text-mute);
  letter-spacing: .04em;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

/* Marqueurs récurrents (petits losanges) */
.plan-marker {
  position: absolute;
  top: 22px;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow:
    0 1px 3px rgba(0, 0, 44, 0.15),
    0 0 6px currentColor;
  transition: transform .2s, box-shadow .2s;
  cursor: help;
  z-index: 1;
}
.plan-marker:hover {
  transform: translate(-50%, -50%) rotate(45deg) scale(1.6);
  box-shadow:
    0 2px 6px rgba(0, 0, 44, 0.25),
    0 0 12px currentColor;
  z-index: 5;
}
.plan-marker--clickable { cursor: pointer; }
.plan-marker.is-assigned {
  width: 10px; height: 10px;
  box-shadow:
    0 0 0 2px #fff,
    0 2px 6px rgba(0, 0, 44, 0.2),
    0 0 10px currentColor;
}

/* Label (abréviation) sous le marqueur affecté */
.plan-marker-label {
  position: absolute;
  top: 32px;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  padding: 1px 3px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
}

/* Bump hauteur des rows récurrentes pour accommoder le label */
.plan-row--recurring { min-height: 56px; }
.plan-row-track--recurring { min-height: 56px; }

/* ── Popover affectation visite ── */
.visit-popover {
  position: absolute;
  z-index: 1000;
  width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow:
    0 12px 32px rgba(0, 0, 44, 0.18),
    0 4px 12px rgba(0, 0, 44, 0.08);
  padding: 14px 16px 12px;
  font-family: 'Barlow Condensed', sans-serif;
  animation: vpReveal .2s ease-out;
}
@keyframes vpReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.vp-head-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--c-nuit);
}
.vp-head-sub {
  font-size: 10px;
  font-weight: 600;
  font-style: italic;
  color: var(--text-soft);
  letter-spacing: .04em;
}
.vp-pole {
  margin-bottom: 10px;
}
.vp-pole:last-of-type { margin-bottom: 0; }
.vp-pole-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.vp-pole-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
}
.vp-agencies {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.vp-agency {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
}
.vp-agency:hover {
  background: var(--bg-card);
  border-color: var(--vp-pole-color, var(--c-violine));
  color: var(--vp-pole-color, var(--c-violine));
}
.vp-agency.is-active {
  background: var(--vp-pole-color, var(--c-violine));
  color: #fff;
  border-color: var(--vp-pole-color, var(--c-violine));
}
.vp-agency-abbrev {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  opacity: .65;
}
.vp-agency.is-active .vp-agency-abbrev { opacity: .9; }
.vp-agency-name {
  font-weight: 600;
}
.vp-clear {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--c-tomate);
  background: rgba(239, 65, 48, 0.06);
  border: 1px solid rgba(239, 65, 48, 0.25);
  cursor: pointer;
  transition: all .15s;
}
.vp-clear:hover {
  background: rgba(239, 65, 48, 0.12);
  border-color: var(--c-tomate);
}

/* ── RÉSUMÉ ── */
.plan-summary {
  display: flex; flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 30px;
}
.ps-head, .ps-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  padding: 12px 18px;
  font-size: 13px;
  align-items: center;
}
.ps-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.ps-row {
  border-bottom: 1px solid var(--border);
  border-left: 4px solid var(--c-violine);
}
.ps-row:last-child { border-bottom: none; }
.ps-row .ps-name { color: var(--text); }
.ps-row .ps-months { font-size: 11px; color: var(--text-mute); font-style: italic; }
.ps-overflow {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--c-tomate);
  background: rgba(239, 65, 48, .12);
  padding: 1px 6px;
  border-radius: 2px;
  margin-left: 6px;
}
.ps-footer {
  display: flex; flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 12px;
  color: var(--text-soft);
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  letter-spacing: .04em;
}
.ps-footer strong {
  color: var(--c-violine);
  font-weight: 800;
  font-style: italic;
  font-size: 14px;
}
.ps-cap-detail {
  font-size: 10px;
  font-weight: 400;
  font-style: italic;
  color: var(--text-mute);
  letter-spacing: .04em;
  margin-left: 4px;
}
.pi-dur {
  font-size: 11px;
  font-style: italic;
  color: var(--text-mute);
  margin-left: 4px;
}

.plan-tip {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  font-style: italic;
  color: var(--text-mute);
  letter-spacing: .04em;
}

/* ──────────────────────────────────────────────────────────
   9. KEYFRAMES
   ────────────────────────────────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}
@keyframes brandReveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cardReveal { to { opacity: 1; transform: translateY(0); } }
@keyframes liReveal   { to { opacity: 1; transform: translateY(0); } }

/* ──────────────────────────────────────────────────────────
   10. RESPONSIVE
   ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .view-welcome { gap: 40px; padding: 30px 20px; }
  .anim-splash-title { white-space: normal; line-height: 1.15; font-size: 28px; }
  #intro-title { white-space: normal; line-height: 1.15; font-size: 26px; }
  .rm-page-title { font-size: 26px; white-space: normal; line-height: 1.15; }
  #step-name { font-size: clamp(28px, 7vw, 38px); }
  #step-subname { font-size: 16px; }
  .step-body--objectif { font-size: 17px; }
  .step-body--details { font-size: 14px; }
  .step-label { font-size: 14px; letter-spacing: .18em; }
  .sl-line { width: 35px; }
  .rm-header { flex-direction: column; align-items: flex-start; }
  .rm-period { padding-top: 0; }
  .timeline { grid-template-columns: 1fr; }
  .timeline::before {
    top: 0; bottom: 0; left: 18px; right: auto;
    width: 2px; height: auto;
    background: linear-gradient(180deg,
      var(--c-tomate) 0%, var(--c-tangerine) 33%,
      var(--c-mimosa) 66%, var(--c-bonbon) 100%);
  }
  .tl-month {
    padding: 16px 16px 16px 50px;
    text-align: left;
    border-right: none;
    border-bottom: 1px dashed var(--border);
  }
  .tl-marker { top: 18px; left: 18px; transform: rotate(45deg); }
  .tl-month:hover .tl-marker { transform: rotate(45deg) scale(1.3); }
  .tl-month-headline { margin: 0 0 12px; max-width: none; }
  #skip-btn { bottom: 20px; right: 20px; }
  #mute-btn { bottom: 20px; right: 130px; }
  .back-btn { top: 16px; left: 16px; }
  .logout-btn { top: 16px; right: 16px; }
  .admin-btn { top: 16px; right: 145px; }

  .build-block { flex-direction: column; align-items: stretch; gap: 8px; }
  .build-block .bb-title { font-size: 15px; }
  .build-block .bb-hours { font-size: 18px; align-self: flex-end; }

  /* Plan responsive : scroll horizontal de la timeline */
  .plan-timeline { overflow-x: auto; }
  .plan-months { padding-left: 140px; min-width: 800px; }
  .plan-grid { left: 140px; min-width: 660px; top: 80px; }
  .plan-rows { min-width: 800px; }
  .plan-row-label { width: 140px; }
  .prl-title { font-size: 11px; }
  .ps-head, .ps-row {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
  .ps-head span:nth-child(4), .ps-row span:nth-child(4) { display: none; }
  .plan-tool-info { min-width: 0; text-align: left; }
  .ps-footer { flex-direction: column; gap: 8px; }
}
