/* Navigation */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 4rem;
  background: rgba(245,240,255,.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: background .4s;
}

[data-theme="dark"] nav {
  background: rgba(8,6,15,.72);
}

.nav-logo {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--v1), var(--p1), var(--b1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
}

.nav-links a {
  font-size: .73rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  transition: color .25s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--v1), var(--p1));
  transition: width .3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.btn-theme {
  font-family: var(--font-b);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .38rem 1rem;
  transition: all .25s;
}

.btn-theme:hover {
  border-color: var(--v1);
  color: var(--v1);
}

/* Boutons */
.btn-p {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 2rem;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--v2), var(--p2));
  color: #fff;
  font-family: var(--font-b);
  font-size: .82rem;
  letter-spacing: .04em;
  border: none;
  box-shadow: 0 0 32px var(--gv);
  transition: transform .3s, box-shadow .3s;
}

.btn-p:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 60px var(--gv), 0 10px 40px var(--gp);
}

.btn-s {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 2rem;
  border-radius: 100px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
  font-family: var(--font-b);
  font-size: .82rem;
  letter-spacing: .04em;
  transition: all .3s;
}

.btn-s:hover {
  border-color: var(--b2);
  color: var(--b2);
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 4rem;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--v1),
    var(--p1) 40%,
    var(--b2) 70%,
    transparent
  );
}

.tl-item {
  position: relative;
  margin-bottom: 2.8rem;
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity .6s, transform .6s;
}

.tl-item.vis {
  opacity: 1;
  transform: translateX(0);
}

.tl-dot {
  position: absolute;
  left: -2.95rem;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--v1);
  box-shadow: 0 0 14px var(--v1);
}

.tl-item:nth-child(2n) .tl-dot { background: var(--p1); box-shadow: 0 0 14px var(--p1); }
.tl-item:nth-child(3n) .tl-dot { background: var(--b2); box-shadow: 0 0 14px var(--b2); }
.tl-item:nth-child(4n) .tl-dot { background: var(--c1); box-shadow: 0 0 14px var(--c1); }

.tl-sprint {
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted2);
  margin-bottom: .3rem;
}

.tl-title {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .4rem;
}

.tl-desc {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 620px;
}

/* ── ORGANISME ── */
.organisme-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 3rem;
}

.organisme-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.organisme-logo img {
  max-width: 400px;
  opacity: .85;
}

.organisme-text {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.organisme-text .btn-p {
  align-self: flex-start;
}

.organisme-text p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

.organisme-text strong {
  color: var(--text);
  font-weight: 400;
}


/* ── INFO GRID ── */
.info-grid {
  display: flex;
  flex-direction: column;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.info-cell {
  background: var(--bg);
  padding: 1rem 2.2rem;
  transition: background .3s;
}

.info-cell:hover { background: var(--surface2); }

.info-cell-num {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--v1), var(--p1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .6rem;
  display: block;
}

.info-cell h3 {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .5rem;
}

.info-cell p {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── RAPPORTS GRID ── */
.rapports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3.5rem;
}

.rapport-card {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 3rem;
  position: relative;
  overflow: hidden;
  transition: border-color .4s, transform .4s;
  animation: float-slow 6s ease-in-out infinite;
}

.rapport-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity .5s;
}

.rapport-card:nth-child(1)::before {
  background: radial-gradient(ellipse at top right, rgba(192,132,252,.12), transparent 65%);
}

.rapport-card:nth-child(2)::before {
  background: radial-gradient(ellipse at bottom left, rgba(96,165,250,.10), transparent 65%);
}

.rapport-card:nth-child(2) {
  animation-delay: 3s;
}

.rapport-card:hover {
  border-color: var(--border2);
  transform: translateY(-4px);
}

.rapport-card:hover::before { opacity: 1; }

.rapport-card > * {
  position: relative;
  z-index: 1;
}

.rapport-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--v1);
  margin-bottom: 1.5rem;
}

.rapport-label::before {
  content: '';
  width: 16px;
  height: 1px;
  background: currentColor;
}

.rapport-title {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.1;
  margin-bottom: 1.2rem;
}

.rapport-desc {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2.2rem;
}

/* ── PROSE ── */

.prose h3 {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: .55rem;
}

.prose h3:first-child { margin-top: 0; }

.prose p {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 1.2rem;
}

.prose strong { color: var(--text); font-weight: 400; }

/* Rapport de lancement - Présentation du projet */
/* ── PROJET FULL WIDTH ── */
.projet-full {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 1.5rem;
}

.projet-block h3 {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .55rem;
}

.projet-block p {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.8;
}

.projet-block strong {
  color: var(--text);
  font-weight: 400;
}

.projet-block--sep {
  margin-top: 2rem;
}

/* ── ÉQUIPE PROJET ── */
.team-intro {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.8rem;
}

.section--team {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.team-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}

.team-avatar {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .78rem;
  color: #fff;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.team-name {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
}

.team-role {
  font-size: .72rem;
  color: var(--muted);
  margin-top: .2rem;
}

.team-desc {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

@media (max-width: 768px) {
  .team-row { grid-template-columns: 1fr; }
}


/* ── DEUX COLONNES ── */
.deux-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 3rem;
}

/* ── FEAT LIST ── */
.feat-list { display: flex; flex-direction: column; }

.feat-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.feat-item:first-child { border-top: 1px solid var(--border); }

.feat-num {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1.8rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--v1), var(--p1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 4rem;
  opacity: .7;
}

.feat-content h3 {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .35rem;
}

.feat-content p {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── PLANNING SUBTITLE ── */
.planning-subtitle {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .8rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding-left: 2.5rem;
}

/* ── STACK 3D ── */
.stack-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  margin-top: 4rem;
}

.stack-scene {
  perspective: 1200px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stack-3d {
  transform-style: preserve-3d;
  transform: rotateX(22deg) rotateY(-18deg);
  transition: transform .7s ease;
  width: 90%;
  position: relative;
  height: 360px;
}

.stack-scene:hover .stack-3d {
  transform: rotateX(14deg) rotateY(-8deg);
}

.s-layer {
  position: absolute;
  left: 0; right: 0;
  height: 54px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 1.4rem;
  gap: .8rem;
  font-family: var(--font-d);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  border: 1px solid;
  cursor: default;
  transition: transform .3s, box-shadow .3s;
  transform-style: preserve-3d;
}

.s-layer:hover { transform: translateZ(16px) !important; }

.s-layer:nth-child(1) { bottom:284px; background:rgba(192,132,252,.1); border-color:rgba(192,132,252,.4); color:var(--v1); transform:translateZ(0); }
.s-layer:nth-child(2) { bottom:220px; background:rgba(244,114,182,.09); border-color:rgba(244,114,182,.35); color:var(--p1); transform:translateZ(-12px); }
.s-layer:nth-child(3) { bottom:156px; background:rgba(129,140,248,.09); border-color:rgba(129,140,248,.35); color:var(--b1); transform:translateZ(-24px); }
.s-layer:nth-child(4) { bottom:92px;  background:rgba(52,211,153,.08);  border-color:rgba(52,211,153,.3);  color:#34d399; transform:translateZ(-36px); }
.s-layer:nth-child(5) { bottom:28px;  background:rgba(103,232,249,.08); border-color:rgba(103,232,249,.3); color:var(--c1); transform:translateZ(-48px); }

.s-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .85;
  flex-shrink: 0;
}

.stack-details { display: flex; flex-direction: column; gap: .8rem; }

.s-detail {
  display: flex;
  gap: 1.2rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color .3s, background .3s;
}

.s-detail:hover { border-color: var(--v1); background: var(--surface); }

.s-detail-tag {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .75rem;
  color: var(--v1);
  min-width: 80px;
  padding-top: .1rem;
  letter-spacing: .04em;
}

.s-detail p {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── VEILLE ── */
.veille-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-top: 3rem;
}

.veille-card {
  background: var(--bg);
  padding: 2rem;
  transition: background .3s;
  position: relative;
  overflow: hidden;
}

.veille-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity .5s, transform .5s;
  transform: scale(.5);
}

.veille-card:nth-child(1)::before { background: var(--gv); }
.veille-card:nth-child(2)::before { background: var(--gp); }
.veille-card:nth-child(3)::before { background: var(--gb); }
.veille-card:nth-child(4)::before { background: rgba(52,211,153,.1); }

.veille-card:hover::before { opacity: 1; transform: scale(1.5); }
.veille-card:hover { background: var(--surface2); }

.veille-tag {
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--v1);
  margin-bottom: .8rem;
  display: block;
}

.veille-card:nth-child(2) .veille-tag { color: var(--p1); }
.veille-card:nth-child(3) .veille-tag { color: var(--b2); }
.veille-card:nth-child(4) .veille-tag { color: #34d399; }

.veille-card h3 {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .6rem;
}

.veille-card p {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.65;
}

.veille-verdict {
  display: inline-block;
  margin-top: .8rem;
  font-size: .72rem;
  padding: .25rem .75rem;
  border-radius: 100px;
  border: 1px solid currentColor;
}

/* ── COMING SOON ── */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  text-align: center;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.cs-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--b2);
  border: 1px solid rgba(96,165,250,.25);
  border-radius: 100px;
  padding: .5rem 1.2rem;
}

.cs-title {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  color: var(--muted2);
}

.cs-desc {
  font-size: .9rem;
  color: var(--muted2);
  max-width: 440px;
  line-height: 1.7;
}

/* Footer */
footer {
  position: relative;
  z-index: 2;
  padding: 2rem 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1.1rem;
  background: linear-gradient(90deg, var(--v1), var(--p1), var(--b1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

footer p {
  font-size: .75rem;
  color: var(--muted);
}


/* ── ARROW TIMELINE ── */
.arrow-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 2rem;
}

.at-item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 1.5rem;
  row-gap: .5rem;
  align-items: center;
}

.at-num {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--v1), var(--p1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  grid-row: 1;
  grid-column: 1;
  min-width: 4rem;
}

.at-arrow-wrap {
  grid-row: 1;
  grid-column: 2;
  display: flex;
  align-items: center;
}

.at-arrow {
  position: relative;
  height: auto;
  min-height: 38px;
  border-radius: 4px 100px 100px 4px;
  display: flex;
  align-items: center;
  padding: .6rem 2rem .6rem 1.2rem;
  min-width: 0;
  max-width: 100%;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%, 16px 50%);
}

.at-arrow span {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  white-space: normal;
  word-break: break-word;
}

.at-arrow::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 16px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: rgba(255,255,255,.15);
}



.at-title {
  grid-row: 2;
  grid-column: 2;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: .95rem;
  color: var(--text);
  padding-left: .2rem;
}

.at-desc {
  grid-row: 3;
  grid-column: 2;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.65;
  padding-left: .2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.at-item:last-child .at-desc {
  border-bottom: none;
}

/* Bouton scroll vers le haut */
.btn-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v2), var(--p2));
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px var(--gv);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .3s, transform .3s;
  z-index: 100;
}

.btn-top.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mentions légales */

.section-ml {
  max-height: 60vh !important;
}


/* Grille 3 colonnes */
  .plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
  }

  .plan-col {
    display: flex;
    flex-direction: column;
  }

  /* Numéro + frise sur la même ligne */
  .at-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.1rem;
  }

  /* Le numéro ne rétrécit pas */
  .at-header .at-num {
    flex-shrink: 0;
  }

  /* La frise prend tout l'espace restant, sans padding parasite */
  .at-arrow {
    flex: 1;
    display: flex;
    align-items: center;
    height: 30px;
    padding: 0 1.5rem 0 0.75rem;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
    min-width: 0;
  }

  .at-arrow span {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Titre avec margin-bottom */
  .at-title {
    margin-top: 0.2rem;
    margin-bottom: 0.75rem;
  }

  /* Description sans bordure */
  .at-desc {
    border: none !important;
    padding-bottom: 0.75rem;
  }

  #presentation-projet .prose p {
  text-align: justify;
}

#presentation-projet .projet-block--sep {
  margin-top: .8rem;
}

  /* Responsive : 1 colonne sur mobile */
  @media (max-width: 768px) {
    .plan-grid {
      grid-template-columns: 1fr;
    }
  }

  
/* ── RAPPORT FINAL — screen / code / lightbox / tabs / illus ── */

.screen-wrap {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border2);
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}
.screen-bar {
  background: var(--bg3);
  padding: .55rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid var(--border);
}
.screen-dot { width: 10px; height: 10px; border-radius: 50%; }
.screen-bar .url { margin-left: .5rem; font-size: .68rem; color: var(--muted2); }
.screen-wrap img { width: 100%; display: block; cursor: zoom-in; }

.code-block {
  background: #0d0b18;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
}
.code-bar {
  background: #151022;
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.code-bar .filename { margin-left: .5rem; font-size: .68rem; color: rgba(255,255,255,0.35); font-family: monospace; }
.code-block pre { margin: 0; padding: 1.5rem; overflow-x: auto; font-family: 'Fira Code', monospace; font-size: .72rem; line-height: 1.7; color: #e2d9f3; }

/* Syntax highlighting */
.t-kw { color: #c084fc; }
.t-fn { color: #60a5fa; }
.t-str { color: #86efac; }
.t-num { color: #fbbf24; }
.t-cm { color: rgba(255,255,255,0.25); font-style: italic; }
.t-op { color: #f472b6; }
.t-pr { color: #67e8f9; }

/* Illus rows */
.illus-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.illus-row > * { min-width: 0; }
.illus-row.reverse { direction: rtl; }
.illus-row.reverse > * { direction: ltr; }
.illus-num { font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted2); margin-bottom: .3rem; }
.illus-title { font-family: var(--font-d); font-weight: 700; font-size: 1.2rem; margin-bottom: .5rem; }
.illus-desc { font-size: .82rem; color: var(--muted); line-height: 1.65; margin-bottom: 1.2rem; }
.screen-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Tabs */
.tabs-wrap { margin-bottom: 3rem; }
.tabs-nav {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.tab-btn {
  font-family: var(--font-b);
  font-size: .78rem;
  font-weight: 500;
  padding: .6rem 1.2rem;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
  position: relative;
  bottom: -1px;
  background: transparent;
}
.tab-btn:hover { color: var(--text); background: var(--surface); }
.tab-btn.active { color: var(--v1); border-color: var(--border); background: var(--bg); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--r-lg);
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }

@media (max-width: 900px) {
  .illus-row, .illus-row.reverse { grid-template-columns: 1fr; direction: ltr; }
  .screen-duo { grid-template-columns: 1fr; }
}

/* ── FIN RAPPORT FINAL ── */

/* Planning two-col grid (desktop default) */
.planning-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 1rem;
  align-items: start;
}

/* Tabs : défilement horizontal sur petit écran */
@media (max-width: 640px) {
  .tabs-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1px;
  }
  .tabs-nav::-webkit-scrollbar { display: none; }
  .tab-btn { flex-shrink: 0; }
}

@media (max-width: 768px) {

  /* Nav */
  nav {
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    gap: .6rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 1.5rem;
    padding-top: .6rem;
    border-top: 1px solid var(--border);
  }

  /* Layouts */
  .deux-col {
    grid-template-columns: 1fr !important;
    margin-top: 2rem;
  }

  /* Planning grid */
  .planning-cols {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Timeline */
  .timeline {
    margin-top: 2rem;
  }

  /* Code blocks */
  .code-block pre {
    font-size: .68rem;
  }

  .organisme-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .organisme-logo img {
    max-width: 240px;
    margin: 0 auto;
  }

  /* Feat list */
  .feat-item {
    gap: 1rem;
  }

  /* Timeline */
  .at-item {
    grid-template-columns: 2.5rem 1fr;
    column-gap: 1rem;
  }

  .at-arrow-wrap {
    padding-left: 0 !important;
  }

  .at-num {
    font-size: 1.2rem;
  }

  /* Stack 3D */
  .stack-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stack-scene {
    height: 260px;
  }

  /* Grilles */
  .rapports-grid {
    grid-template-columns: 1fr;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .veille-grid {
    grid-template-columns: 1fr;
  }

  /* Planning subtitle */
  .planning-subtitle {
    padding-left: 0;
  }

  /* Planning — évite les débordements */
  .plan-col {
    min-width: 0;
  }

  .at-title, .at-desc {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
  }

  .at-arrow span {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
}