/* ============================================================
   PORTFOLIO DEVOPS - styles.css (sobre)
   ============================================================ */

/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary:   #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #e2e8f0;
  --text-muted:   #8896aa;
  --text-soft:    #94a3b8;
  --accent-cyan:  #06b6d4;
  --accent-green: #10b981;
  --accent-purple:#8b5cf6;
  --accent-orange:#f59e0b;
  --border:       #1e293b;
  --border-light: #334155;
  --radius:       10px;
  --transition:   .2s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  line-height: 1.6;
  overflow-x: hidden;
}

::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

/* ===== HELPERS ===== */
.tag-row { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.tag-row.center { justify-content: center; }

/* ===== BADGE ===== */
.badge {
  display: inline-flex; align-items: center;
  padding: .22rem .72rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; white-space: nowrap;
  letter-spacing: .03em;
  transition: box-shadow .2s ease, transform .15s ease, background .2s ease;
}
.badge:hover {
  transform: translateY(-1px);
}
.badge-cyan {
  background: linear-gradient(135deg, rgba(6,182,212,.2), rgba(6,182,212,.07));
  color: #a5f3fc;
  border: 1px solid rgba(6,182,212,.38);
  text-shadow: 0 0 12px rgba(6,182,212,.4);
}
.badge-cyan:hover {
  box-shadow: 0 0 14px rgba(6,182,212,.28), 0 2px 8px rgba(0,0,0,.4);
}
.badge-green {
  background: linear-gradient(135deg, rgba(16,185,129,.2), rgba(16,185,129,.07));
  color: #6ee7b7;
  border: 1px solid rgba(16,185,129,.38);
  text-shadow: 0 0 12px rgba(16,185,129,.35);
}
.badge-green:hover {
  box-shadow: 0 0 14px rgba(16,185,129,.25), 0 2px 8px rgba(0,0,0,.4);
}
.badge-purple {
  background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(139,92,246,.07));
  color: #d4bbff;
  border: 1px solid rgba(139,92,246,.38);
  text-shadow: 0 0 12px rgba(139,92,246,.4);
}
.badge-purple:hover {
  box-shadow: 0 0 14px rgba(139,92,246,.3), 0 2px 8px rgba(0,0,0,.4);
}
.badge-orange {
  background: linear-gradient(135deg, rgba(245,158,11,.18), rgba(245,158,11,.06));
  color: #fde68a;
  border: 1px solid rgba(245,158,11,.36);
  text-shadow: 0 0 12px rgba(245,158,11,.35);
}
.badge-orange:hover {
  box-shadow: 0 0 14px rgba(245,158,11,.25), 0 2px 8px rgba(0,0,0,.4);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.35rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none;
  transition: all var(--transition); letter-spacing: .01em;
}
.btn-lg { padding: .72rem 1.75rem; font-size: .92rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #fff;
  box-shadow: 0 4px 18px rgba(6,182,212,.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(6,182,212,.45);
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-outline:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(6,182,212,.45);
  color: #fff;
  transform: translateY(-1px);
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: rgba(6,182,212,.25);
}
.card-highlight {
  border-color: rgba(6,182,212,.25);
  background: rgba(6,182,212,.05);
}

/* ===== HEADER ===== */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15,23,42,.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 0 rgba(6,182,212,.15), 0 4px 24px rgba(0,0,0,.35);
}
/* Ligne gradient en bas du header */
header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(6,182,212,.5) 30%, rgba(139,92,246,.5) 70%, transparent 100%);
}

.header-inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 0 2rem; height: 64px;
}

/* ===== LOGO ===== */
.logo {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; flex-shrink: 0;
}
.logo-monogram {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800; color: #fff; letter-spacing: .03em;
  flex-shrink: 0;
}
.logo-text {
  font-size: .95rem; font-weight: 700; color: var(--text-primary);
  letter-spacing: .01em; line-height: 1;
}
.logo-accent { color: var(--accent-cyan); }
.logo-available {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(16,185,129,.25);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 2px rgba(16,185,129,.25); }
  50%       { box-shadow: 0 0 0 5px rgba(16,185,129,.1); }
}

/* ===== HOTBAR ===== */
.hotbar { display: flex; gap: .5rem; list-style: none; }

.hotbar-btn {
  display: flex; align-items: center; gap: .45rem;
  padding: .5rem 1rem; border-radius: 8px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-soft); font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all .18s ease; white-space: nowrap;
  font-family: inherit; position: relative; letter-spacing: .01em;
}
.hotbar-btn i { font-size: .78rem; opacity: .8; transition: opacity .18s; }
.hotbar-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.18);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.hotbar-btn:hover i { opacity: 1; }
.hotbar-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(6,182,212,.25), rgba(139,92,246,.2));
  border-color: rgba(6,182,212,.45);
  box-shadow: 0 0 0 1px rgba(6,182,212,.2) inset, 0 4px 14px rgba(6,182,212,.15);
}
.hotbar-btn.active i { opacity: 1; color: var(--accent-cyan); }
/* Indicateur bas sur le bouton actif */
.hotbar-btn.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 15%; right: 15%; height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 2px 2px 0 0;
}

.menu-toggle {
  display: none; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-light);
  color: var(--text-primary); padding: .45rem .6rem;
  border-radius: 8px; cursor: pointer; font-size: .9rem;
  transition: all var(--transition);
  position: absolute; right: 1.25rem;
}
.menu-toggle:hover { background: rgba(255,255,255,.1); border-color: var(--accent-cyan); }

/* ===== MAIN / SECTIONS ===== */
main { max-width: 1140px; margin: 0 auto; padding: 80px 2rem 5rem; }

.section { display: none; animation: fadeIn .35s ease; }
.section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem); font-weight: 700;
  margin-bottom: .35rem; color: var(--text-primary);
}
.section-subtitle { color: var(--text-muted); margin-bottom: 2.5rem; font-size: clamp(.82rem, 2vw, .9rem); }

.sub-title {
  font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-muted); margin-bottom: 1.1rem;
}

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ==================================================
   SECTION 1 - ACCUEIL
   ================================================== */
.hero {
  min-height: calc(100vh - 100px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 2.5rem 0 4rem;
  gap: 0;
}

/* Badge disponibilité */
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.75rem;
}

.status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent-green);
  box-shadow: 0 0 0 0 rgba(16,185,129,.5);
  animation: statusPulse 2s ease-out infinite;
}
@keyframes statusPulse {
  0%   { box-shadow: 0 0 0 0   rgba(16,185,129,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(16,185,129, 0); }
  100% { box-shadow: 0 0 0 0   rgba(16,185,129, 0); }
}

/* Zone centrale : texte à gauche, photo à droite */
.hero-main {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;       /* la photo s'étire sur la hauteur du texte */
  gap: 3.5rem;
  margin-bottom: 2.5rem;
}

.hero-text {
  display: flex; flex-direction: column;
  justify-content: space-between;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800; line-height: 1.05; margin-bottom: .55rem;
  color: var(--text-primary); letter-spacing: -.02em;
}
.hero h1 .name {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: .92rem; color: var(--text-muted);
  margin-bottom: 1.1rem; font-weight: 500;
}

.hero-desc {
  font-size: .93rem; line-height: 1.75;
  color: var(--text-soft); margin-bottom: 1.25rem; max-width: min(60%, 520px);
}

/* Bloc IUT (logo + texte formation) */
.iut-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem 2.5rem;
  margin-top: 2rem;
  align-items: center;
  max-width: 100%;
  justify-items: end;
}
.iut-logo {
  display: block;
  width: min(280px, 38vw);
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius);
  padding: 1rem 1.35rem;
  flex-shrink: 0;
}
.iut-text {
  margin: 0;
  font-size: .93rem;
  color: var(--text-soft);
  line-height: 1.75;
  text-align: right;
  width: min(70%, 640px);
}

.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Photo - colle en haut, s'étire jusqu'en bas des boutons */
.hero-photo-col {
  width: 260px; flex-shrink: 0;
  position: relative;
}
.hero-photo-col::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(6,182,212,.35) 0%, transparent 55%);
  pointer-events: none; z-index: 0;
}
.hero-photo {
  display: block; position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  border-radius: 13px;
}

/* Stats + terminal sous la zone principale */
.hero-bottom {
  display: flex; align-items: flex-start; gap: 3rem; flex-wrap: wrap;
}
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 1.7rem; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: .68rem; color: var(--text-muted); margin-top: .2rem; }

/* Terminal */
.terminal-box {
  background: #0a0f1a; border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.1rem 1.4rem;
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: .78rem; 
  max-width: min(100%, 480px);
  height: 180px;
}
.terminal-header {
  display: flex; align-items: center; gap: .35rem; margin-bottom: .9rem;
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.terminal-dot.red    { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green  { background: #28c840; }
.terminal-title { font-size: .68rem; color: var(--text-muted); margin-left: .4rem; }

.terminal-line { display: flex; align-items: center; gap: .4rem; }
.t-prompt   { color: var(--accent-green); user-select: none; }
.t-cmd      { color: var(--text-primary); }
.terminal-output { color: var(--text-muted); margin-top: .5rem; line-height: 1.9; font-size: .78rem; }
.t-highlight { color: var(--accent-cyan); }

.cursor-blink {
  display: inline-block; width: 7px; height: 13px;
  background: var(--accent-cyan); vertical-align: middle;
  animation: blinkAnim .9s step-end infinite;
}
@keyframes blinkAnim { 0%,100%{ opacity:1; } 50%{ opacity:0; } }

/* ==================================================
   MARQUEE OUTILS
   ================================================== */
.marquee-wrap {
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  display: flex; flex-direction: column; gap: .75rem;
}

/* Fondu sur les bords gauche et droite */
.marquee-wrap::before,
.marquee-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0;
  width: 140px; z-index: 2; pointer-events: none;
}
.marquee-wrap::before { left:  0; background: linear-gradient(to right, var(--bg-primary), transparent); }
.marquee-wrap::after  { right: 0; background: linear-gradient(to left,  var(--bg-primary), transparent); }

.marquee-row { overflow: hidden; }

.marquee-track {
  display: flex; gap: .6rem;
  width: max-content;
  animation: marqueeLeft 35s linear infinite;
}
.marquee-track.marquee-reverse {
  animation: marqueeRight 35s linear infinite;
}

/* Pause au survol */
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }

@keyframes marqueeLeft  { from { transform: translateX(0);    } to { transform: translateX(-50%); } }
@keyframes marqueeRight { from { transform: translateX(-50%); } to { transform: translateX(0);    } }

.marquee-item {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .7rem .9rem; min-width: 74px;
  flex-shrink: 0;
}
.marquee-item:hover img { opacity: 1; }
.marquee-item img { width: 28px; height: 28px; object-fit: contain; }
.marquee-item span { font-size: .62rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

/* ==================================================
   SECTION 2 - COMPÉTENCES
   ================================================== */
.skills-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem; margin-bottom: 2.5rem;
}

.skill-category {
  background: var(--bg-secondary); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color var(--transition);
}
.skill-category:hover { border-color: var(--border-light); }

.skill-cat-header {
  margin-bottom: 1.25rem; padding-bottom: .9rem;
  border-bottom: 1px solid var(--border-light);
}

.skill-cat-label {
  font-size: .85rem; font-weight: 700; margin-bottom: .2rem;
}
.skill-cat-label.cyan   { color: var(--accent-cyan); }
.skill-cat-label.green  { color: var(--accent-green); }
.skill-cat-label.purple { color: var(--accent-purple); }
.skill-cat-label.orange { color: var(--accent-orange); }
.skill-cat-sub { font-size: .72rem; color: var(--text-muted); }

.skill-items { display: flex; flex-direction: column; gap: .8rem; }
.skill-item  { display: flex; flex-direction: row; align-items: center; gap: .75rem; }
.skill-info  { display: contents; }
.skill-name  { font-size: .93rem; font-weight: 500; color: var(--text-soft); white-space: nowrap; flex: 0 0 auto; min-width: 140px; order: 1; }
.skill-bar   { flex: 1; order: 2; }
.skill-pct   { font-size: .82rem; color: var(--text-muted); font-family: monospace; white-space: nowrap; flex: 0 0 60px; text-align: right; order: 3; }

.skill-bar { height: 3px; background: rgba(255,255,255,.06); border-radius: 9999px; overflow: hidden; }
.skill-fill { height: 100%; border-radius: 9999px; width: 0; transition: width 1.1s ease; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple)); }
.fill-cyan   { background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple)); }
.fill-green  { background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan)); }
.fill-purple { background: var(--accent-purple); }
.fill-orange { background: var(--accent-orange); }

/* Certifications */
.certs-section { margin-top: 2rem; }
.certs-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .75rem; margin-top: .75rem;
}
.cert-card {
  background: var(--bg-secondary); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  transition: border-color var(--transition);
}
.cert-card:hover { border-color: rgba(6,182,212,.3); }
.cert-name { font-size: .85rem; font-weight: 600; }
.cert-year { font-size: .7rem; color: var(--text-muted); margin-top: .2rem; }

/* ==================================================
   SECTION 3 - CV WEB
   ================================================== */
.cv-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }

/* Timeline */
.timeline { position: relative; padding-left: 1.25rem; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: var(--border-light);
}
.timeline-item { position: relative; margin-bottom: 1.75rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.35rem; top: .35rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-cyan);
  transition: background .5s ease;
}
.timeline-item.reveal.visible::before {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
}
.timeline-date {
  font-size: .82rem; font-weight: 600; font-family: monospace;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.timeline-title { font-weight: 700; margin: .2rem 0 .1rem; font-size: 1rem; }
.timeline-place { font-size: .88rem; color: var(--text-muted); }
.timeline-desc  { font-size: .93rem; color: var(--text-muted); margin-top: .3rem; line-height: 1.65; }

.cv-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.cv-list li { font-size: .93rem; color: var(--text-soft); padding-left: 1rem; position: relative; }
.cv-list li::before { content: '–'; position: absolute; left: 0; color: var(--accent-cyan); }

/* Bannière CV */
.cv-download-banner {
  border: 1px solid var(--border-light); border-radius: var(--radius);
  padding: 1.5rem 2rem; margin-top: 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  background: var(--bg-secondary);
}
.cv-download-banner .btn { flex-shrink: 0; }
.cv-download-text h3 { font-size: 1rem; font-weight: 700; }
.cv-download-text p  { font-size: .78rem; color: var(--text-muted); margin-top: .2rem; }

/* ==================================================
   SECTION 4 - EXPÉRIENCES
   ================================================== */
.stage-nav {
  display: flex;
  gap: .3rem;
  margin-bottom: 1.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: .3rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.stage-nav::-webkit-scrollbar { display: none; }
.stage-nav-btn {
  flex: 1;
  min-width: 130px;
  padding: .72rem 1rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all .18s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .07rem;
  position: relative;
}
.tab-header {
  display: flex; align-items: center; gap: .35rem;
}
.tab-header i {
  font-size: .65rem; color: var(--text-muted); transition: color .18s;
}
.stage-nav-btn.active .tab-header i { color: var(--accent-cyan); }
.stage-nav-btn:hover .tab-header i  { color: var(--text-soft); }
.tab-type {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text-muted);
  transition: color .18s;
}
.tab-company {
  font-size: .93rem; font-weight: 700; color: var(--text-soft);
  line-height: 1.25; transition: color .18s;
}
.tab-period {
  font-size: .75rem; color: var(--text-muted); margin-top: .04rem;
  transition: color .18s;
}
.stage-nav-btn:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
  transform: translateY(-1px);
}
.stage-nav-btn:hover .tab-company { color: var(--text-primary); }
.stage-nav-btn.active {
  background: linear-gradient(135deg, rgba(6,182,212,.2), rgba(139,92,246,.15));
  /* border-color: rgba(6,182,212,.45);
  box-shadow: inset 0 0 0 1px rgba(6,182,212,.2), 0 4px 14px rgba(6,182,212,.12); */
}

.stage-nav-btn.active .tab-type    { color: rgba(6,182,212,.7); }
.stage-nav-btn.active .tab-company { color: #fff; }
.stage-nav-btn.active .tab-period  { color: rgba(6,182,212,.6); }

.stage-view        { display: none; }
.stage-view.active { display: block; animation: slideInUp .28s cubic-bezier(0.16,1,0.3,1); }
.stage-view > * + * { margin-top: 2.25rem; }

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stage-header {
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1rem;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
}
.stage-header::before { display: none; }
.stage-header::after  { display: none; }
.stage-header-glow-bar { display: none; }

/* Koesio - violet #4f46b8 */
.stage-header--koesio {
  background: rgba(79,70,184,.08);
  border: 1px solid rgba(79,70,184,.3);
}
.stage-header--koesio .stage-company { color: #c7c4f5; }
.stage-header--koesio .stage-logo {
  background: rgba(79,70,184,.15);
  border-color: rgba(79,70,184,.35);
}
.stage-header--koesio .stage-stat-chip:hover {
  background: rgba(79,70,184,.12);
  border-color: rgba(79,70,184,.3);
}

/* Crous Grenoble-Alpes - rouge #e01020 */
.stage-header--crous {
  background: rgba(224,16,32,.07);
  border: 1px solid rgba(224,16,32,.28);
}
.stage-header--crous .stage-company { color: #fca5a5; }
.stage-header--crous .stage-logo {
  background: transparent;
  border-color: rgba(224,16,32,.3);
  padding: 2px;
}
.stage-header--crous .stage-stat-chip i { color: #f87171; }
.stage-header--crous .stage-stat-chip:hover {
  background: rgba(224,16,32,.08);
  border-color: rgba(224,16,32,.3);
}

.stage-header-left {
  display: flex; gap: 1rem; align-items: flex-start; flex: 1; min-width: 0;
}
.stage-company { font-size: 1.12rem; font-weight: 800; color: #f1f5f9; }
.stage-company-name { color: #f1f5f9; }
.stage-logo {
  width: 44px; height: 44px; border-radius: 10px; object-fit: contain; padding: 3px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  flex-shrink: 0;
}

/* Badge statut expérience */
.stage-status {
  display: inline-flex; align-items: center; gap: .32rem;
  padding: .22rem .65rem; border-radius: 20px;
  font-size: .66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  white-space: nowrap; flex-shrink: 0;
}
.stage-status.status-active {
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25); color: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,.13);
}
.stage-status.status-done {
  background: rgba(148,163,184,.08); border: 1px solid rgba(148,163,184,.18); color: var(--text-muted);
}
.stage-status-dot {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0;
}
.status-active .stage-status-dot { animation: pulse-status 1.6s ease-in-out infinite; }
@keyframes pulse-status {
  0%, 100% { opacity: 1; }
  50%       { opacity: .35; }
}

/* Ligne de stats rapides */
.stage-stats-row {
  display: flex; gap: .15rem; flex-wrap: wrap; margin-top: .35rem;
}
.stage-stat-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .9rem;
  background: transparent; border: 1px solid transparent;
  border-radius: 8px; font-size: .88rem; font-weight: 600;
  color: var(--text-soft); letter-spacing: .01em; white-space: nowrap;
  transition: all .18s ease;
}
.stage-stat-chip:hover {
  color: #fff;
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.stage-stat-chip i { font-size: .65rem; color: var(--accent-cyan); opacity: .85; }

/* Bloc intro stage : image grande + carte entreprise */
.stage-hero-split {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(260px, 0.95fr);
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}
/* Permet aux flex enfants de se comprimer correctement dans la grille */
.stage-hero-split > * {
  min-height: 0;
}

.stage-hero-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.stage-hero-side > div {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Colonne gauche : même hauteur que la droite (grille stretch) ; image sans scroll */
.stage-hero-col-left {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  height: 100%;
}
.stage-tools-under-img {
  padding: 0.85rem 1rem 1rem;
  flex-shrink: 0;
}
.stage-hero-col-left .stage-figure {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.stage-hero-col-left .stage-figure-scroll {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stage-hero-col-left .stage-figure .stage-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}
.stage-hero-col-left .stage-figure-caption {
  flex-shrink: 0;
}

.stage-card-divider {
  margin: 1.15rem 0 1rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light) 15%, var(--border-light) 85%, transparent);
  border: 0;
}

/* Missions principales (carte stage Koesio) */
.stage-intro-missions-card .missions-block-title {
  margin-bottom: 0.65rem;
}
.missions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.mission-item {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0.95rem 0.8rem 1.1rem;
  border-radius: 0 10px 10px 0;
  background: rgba(15,23,42,.45);
  border: 1px solid rgba(255,255,255,.06);
  border-left: 2px solid rgba(6,182,212,.45);
  position: relative; overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.mission-item::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,182,212,.04), transparent 50%);
  pointer-events: none;
}
.mission-item:hover {
  border-left-color: rgba(6,182,212,.7);
  background: rgba(6,182,212,.05);
}
.mission-title {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.mission-desc {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.65;
}
.mission-context {
  position: relative; overflow: hidden;
  margin: 1.1rem 0 0;
  padding: 0.95rem 1rem 0.95rem 1.25rem;
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text-muted);
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.06);
  border-left: none;
  border-radius: 0 10px 10px 0;
}
.mission-context::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 2px;
}
.mission-context::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,182,212,.04), transparent 50%);
  pointer-events: none;
}
.mission-context > * { position: relative; z-index: 1; }
.mission-context strong {
  color: var(--accent-cyan);
  font-weight: 700;
}

.stage-figure {
  margin: 0;
  background: rgba(30, 41, 59, .55);
  /* border: 1px solid var(--border-light); */
  border-radius: var(--radius);
  padding: 0.65rem 0.65rem 0.5rem;
  display: flex;
  flex-direction: column;
  min-height: min(52vh, 420px);
}
.stage-figure-scroll {
  flex: 1;
  min-height: min(48vh, 380px);
  max-height: min(82vh, 780px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--radius) - 4px);
}
/* Image carrée / grande : s'adapte à la largeur de la colonne, hauteur plafonnée ; scroll si besoin */
.stage-figure .stage-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(78vh, 720px);
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  border-radius: var(--radius);
}
.stage-figure-video {
  margin-bottom: 1rem;
  min-height: 0;
}
.stage-figure-video .stage-figure-scroll {
  min-height: min(40vh, 320px);
  max-height: min(70vh, 560px);
}
.stage-video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: min(68vh, 540px);
  border-radius: var(--radius);
  background: #0a0f1a;
}
.stage-figure-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
}
.stage-img-full-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
}
.stage-img-full-link:hover { text-decoration: underline; }

/* Schéma sur fond clair */
.stage-schema-card { padding: 0 0 1rem; }
.stage-schema-frame {
  background: #d2d9e2;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.stage-schema-scroll {
  overflow: auto;
  max-height: min(75vh, 620px);
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.stage-img-schema {
  display: block;
  width: auto;
  max-width: max(100%, 480px);
  height: auto;
  max-height: min(72vh, 600px);
  object-fit: contain;
  object-position: top center;
  margin: 0 auto;
}
.stage-schema-hint {
  font-size: 0.82rem;
  text-align: center;
  margin-top: 0.6rem;
  color: var(--text-muted);
}
.stage-schema-hint a {
  color: var(--accent-cyan);
  font-weight: 600;
  text-decoration: none;
}
.stage-schema-hint a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .stage-hero-split {
    grid-template-columns: 1fr;
  }
  .stage-figure-scroll {
    min-height: min(40vh, 320px);
    max-height: min(70vh, 640px);
    overflow: auto;
  }
  .stage-figure .stage-img {
    max-width: 100%;
    max-height: min(65vh, 560px);
  }
  /* Colonne image + outils : pas d’égalisation de hauteur, image sans scroll */
  .stage-hero-col-left {
    height: auto;
  }
  .stage-hero-col-left .stage-figure {
    flex: 0 1 auto;
    min-height: 0;
  }
  .stage-hero-col-left .stage-figure-scroll {
    flex: 0 1 auto;
    min-height: min(36vh, 280px);
    max-height: min(52vh, 420px);
    overflow: hidden;
  }
  .stage-hero-side {
    height: auto;
  }
  .stage-hero-side > div {
    flex: none;
  }
}
.exp-text { font-size: .93rem; color: var(--text-soft); line-height: 1.75; margin-top: .45rem; }

.stage-role { font-size: .93rem; font-weight: 500; color: #64748b; margin-top: .28rem; }
.stage-meta    { font-size: .82rem; color: var(--text-muted); margin-top: .3rem; }

.stage-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-top: 1.25rem; }
.stage-body-full { grid-template-columns: 1fr; }
.stage-body-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stage-section-title {
  font-size: .72rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: .85rem;
  display: flex; align-items: center; gap: .5rem;
}
.stage-section-title::before {
  content: '';
  display: inline-block;
  width: 3px; height: 11px; min-width: 3px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 2px; flex-shrink: 0;
}
.stage-section-title i { color: var(--accent-cyan); font-size: .68rem; }

.task-list { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.task-list li {
  display: flex; gap: .65rem; align-items: flex-start;
  font-size: .93rem; color: var(--text-soft); line-height: 1.68;
}
.task-list li::before {
  content: '';
  display: block;
  width: 4px; height: 4px; min-width: 4px;
  border-radius: 1px;
  background: rgba(6,182,212,.4);
  flex-shrink: 0;
  margin-top: .58em;
}
.task-list strong { color: var(--text-primary); }

/* Feature cards (CROUS + autres) */
.stage-feature-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem;
}
.stage-feature-card {
  background: transparent;
  border: none;
  border-left: 2px solid rgba(6,182,212,.28);
  border-radius: 0; padding: .7rem 0 .7rem 1rem;
  display: flex; flex-direction: column; gap: .3rem;
  transition: border-color var(--transition);
}
.stage-feature-card:hover { border-color: rgba(6,182,212,.6); transform: none; }
.stage-feature-card-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(6,182,212,.1);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: var(--accent-cyan); margin-bottom: .4rem; flex-shrink: 0;
}
.stage-feature-card-title { font-size: .93rem; font-weight: 700; color: var(--text-primary); }
.stage-feature-card-desc  { font-size: .86rem; color: var(--text-soft); line-height: 1.65; margin-top: .15rem; }

/* Deux visuels côte à côte dans la section stage */
.exp-vis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.1rem;
}
.exp-vis-grid .exp-block {
  display: flex;
  flex-direction: column;
}
.exp-vis-grid .stage-schema-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.exp-vis-grid .stage-schema-scroll {
  flex: 1;
  max-height: none;
  overflow: hidden;
  align-items: stretch;
}
.exp-vis-grid .stage-img-schema {
  width: 100%;
  max-width: 100%;
  max-height: none;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
@media (max-width: 700px) {
  .exp-vis-grid { grid-template-columns: 1fr; }
}

/* ── Crous : overrides accent rouge ── */
#stage-2 .stage-section-title::before {
  background: linear-gradient(180deg, #ef4444, #dc2626);
}
#stage-2 .stage-section-title i { color: #f87171; }
#stage-2 .exp-block--accent {
  border-left-color: rgba(239,68,68,.4);
  background: rgba(239,68,68,.04);
}
#stage-2 .stage-feature-card { border-left-color: rgba(239,68,68,.28); }
#stage-2 .stage-feature-card:hover { border-left-color: rgba(239,68,68,.65); }
#stage-2 .stage-feature-card-icon { background: rgba(239,68,68,.1); color: #f87171; }
#stage-2 .task-list li::before { background: rgba(239,68,68,.45); }

/* ── Blocs de contenu sans cadre (style sobre) ── */
.exp-block { padding: 0; }
.exp-block--accent {
  padding: .75rem 1rem .75rem 1.1rem;
  border-left: 2px solid rgba(6,182,212,.35);
  background: rgba(6,182,212,.03);
  border-radius: 0 8px 8px 0;
}
/* Intro missions / outils : padding vertical sans cadre */
.stage-intro-missions-card { padding: 0; }

/* ==================================================
   SECTION 5 - PROJETS
   ================================================== */
.projects-filter {
  display: flex; gap: .3rem; margin-bottom: 2rem; flex-wrap: wrap;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: .3rem;
}
.filter-btn {
  padding: .38rem .9rem; border-radius: 8px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); font-size: .88rem; font-weight: 600;
  cursor: pointer; transition: all .18s ease; position: relative;
  font-family: inherit; white-space: nowrap;
}
.filter-btn:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.1);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.filter-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(6,182,212,.2), rgba(139,92,246,.15));
  border-color: rgba(6,182,212,.45);
  box-shadow: inset 0 0 0 1px rgba(6,182,212,.2), 0 4px 14px rgba(6,182,212,.12);
}

.projects-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
  max-width: 1140px;
  margin: 0 auto;
}

.project-card {
  background: var(--bg-secondary); border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}
.project-preview-wrap {
  aspect-ratio: 16 / 9;
  background: var(--bg-primary);
  overflow: hidden;
  flex-shrink: 0;
}
.project-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}
.project-card:hover .project-preview {
  transform: scale(1.05);
}
.project-card-body {
  padding: 1.15rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
/* Trait de couleur en haut selon la catégorie */
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 1;
}
.project-card.reseau::before { background: var(--accent-cyan); }
.project-card.prog::before   { background: var(--accent-green); }
.project-card.devops::before { background: var(--accent-purple); }

.project-card:hover { border-color: rgba(6,182,212,.35); transform: translateY(-2px); }

.project-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: .75rem; margin-bottom: .6rem;
}
.project-badges { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; flex-shrink: 0; }

.project-title { font-size: 1rem; font-weight: 700; }
.project-desc  { font-size: .93rem; color: var(--text-muted); line-height: 1.65; flex: 1; margin-bottom: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.project-footer {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border-light); padding-top: .7rem; margin-top: auto;
}
.project-tech-stack { display: flex; flex-wrap: wrap; gap: .25rem; }
.project-link {
  color: var(--text-muted); font-size: .84rem; text-decoration: none;
  display: flex; align-items: center; gap: .25rem;
  transition: color var(--transition); white-space: nowrap; flex-shrink: 0;
}
.project-link:hover { color: var(--text-primary); }

/* Pagination projets (max 3 cartes visibles par page) */
.projects-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.projects-pagination[hidden] {
  display: none !important;
}
.pagination-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pagination-btn:hover:not(:disabled) {
  border-color: rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
}
.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pagination-info {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 4.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ==================================================
   SECTION 6 - PROJETS PERSOS
   ================================================== */
.perso-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }

.perso-card {
  background: var(--bg-secondary); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color var(--transition);
}
.perso-card:hover { border-color: rgba(6,182,212,.3); }
.perso-card[data-project-detail] { cursor: pointer; }
.perso-title { font-weight: 700; margin-bottom: .5rem; font-size: 1rem; }
.perso-desc  { font-size: .93rem; color: var(--text-muted); line-height: 1.65; margin-bottom: .75rem; }

.contact-cta {
  margin-top: 3rem; padding: 2.25rem 2rem;
  background: var(--bg-secondary); border: 1px solid var(--border-light);
  border-radius: var(--radius);
}
.contact-cta h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: .4rem; }
.contact-cta p  { color: var(--text-muted); font-size: .88rem; margin-bottom: 1.25rem; }
.contact-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Perso redesign */
.perso-contact-hero {
  text-align: center;
  padding: 3.5rem 2rem 2.5rem;
  margin-bottom: 1.5rem;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(6,182,212,.07) 0%, transparent 70%);
  border-bottom: 1px solid var(--border-light);
}
.perso-availability-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .04em;
  color: var(--accent-cyan);
  background: rgba(6,182,212,.08); border: 1px solid rgba(6,182,212,.2);
  border-radius: 999px; padding: .3rem .85rem;
  margin-bottom: 1.25rem;
}
.perso-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  animation: pulse 2s ease-in-out infinite;
}
.perso-contact-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: .75rem;
}
.perso-contact-sub {
  color: var(--text-muted); font-size: .93rem; line-height: 1.7;
  max-width: 520px; margin: 0 auto 1.75rem;
}
.perso-contact-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

.perso-info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin-bottom: 2.5rem;
}
.perso-info-card {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  background: var(--bg-secondary); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 1.1rem .75rem;
  text-align: center; transition: border-color var(--transition);
}
.perso-info-card:hover { border-color: rgba(6,182,212,.25); }
.perso-info-icon { font-size: 1rem; color: var(--accent-cyan); margin-bottom: .15rem; }
.perso-info-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.perso-info-value { font-size: .88rem; font-weight: 600; color: var(--text-primary); overflow-wrap: break-word; word-break: break-word; max-width: 100%; }

.perso-section-label {
  font-size: .88rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .45rem;
}
.perso-section-label i { color: var(--accent-cyan); }

.perso-card:hover .perso-card-svg { transform: scale(1.01); }

.perso-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .75rem;
}
.perso-card-status {
  display: flex; align-items: center; gap: .35rem;
  font-size: .7rem; font-weight: 600; color: #10b981;
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.2);
  border-radius: 999px; padding: .2rem .65rem;
}
.perso-card-status .perso-dot {
  background: #10b981; box-shadow: 0 0 5px #10b981;
}

.perso-card-svg-wrap {
  border-radius: 8px; overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
}
.perso-card-svg {
  width: 100%; display: block;
  transition: transform .3s ease;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border-light);
  padding: 1.25rem 2rem; text-align: center;
  color: var(--text-muted); font-size: .78rem;
}

/* ==================================================
   RESPONSIVE
   ================================================== */
@media (max-width: 960px) {
  .hero-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
  }
  .hero-photo-col {
    display: block;
    width: 130px;
    height: 130px;
    margin: 0 auto 1.5rem;
    order: -1;
    border-radius: 50%;
    overflow: hidden;
  }
  .hero-photo-col::before { border-radius: 50%; }
  .hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
  }
  .cv-layout  { grid-template-columns: 1fr; gap: 2rem; }
  .stage-body { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .stage-feature-grid { grid-template-columns: 1fr; }
  .stage-feature-grid .stage-feature-card[style*="span 2"] { grid-column: span 1 !important; }
}

@media (max-width: 540px) {
  .stage-nav-btn { min-width: 110px; padding: .62rem .75rem; }
  .tab-company   { font-size: .8rem; }
  .stage-stats-row { gap: .4rem; }
  .stage-stat-chip { font-size: .7rem; padding: .25rem .6rem; }
}

@media (max-width: 720px) {
  .hotbar {
    display: none; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(15,23,42,.97);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: .6rem .75rem; gap: .2rem; z-index: 999;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
  }
  .hotbar.open { display: flex; }
  .hotbar-btn  { width: 100%; justify-content: flex-start; }
  .hotbar-btn.active::after { display: none; }
  .menu-toggle { display: flex; }
  main { padding: 72px 1.25rem 4rem; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 1.5rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .hero-bottom { flex-direction: column; gap: 1.5rem; }
}

@media (max-width: 480px) {
  main { padding: 68px 1rem 3rem; }
  .hero h1 { font-size: 1.7rem; }
  .hero-stats { gap: 1.25rem; }
}

/* ===== LIGHTBOX (images .memory-image) ===== */
.memory-image {
  cursor: pointer;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-active {
  opacity: 1;
  visibility: visible;
}
.lightbox--light {
  background: rgba(255, 255, 255, 0.97);
}
.lightbox--light .lightbox-close {
  background: rgba(0, 0, 0, 0.12);
  color: #1e293b;
}
.lightbox--light .lightbox-close:hover {
  background: rgba(0, 0, 0, 0.22);
}
.lightbox--light .lightbox-image {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.lightbox-image {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox-active .lightbox-image {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10001;
  color: #fff;
  font-size: 1.35rem;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg) scale(1.1);
}

.lightbox-close i {
  pointer-events: none;
}

@media (max-width: 768px) {
  .lightbox-close {
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .lightbox-image {
    max-width: 95%;
    max-height: 85vh;
  }
}

/* ===== PAGES DÉTAIL PROJET (projets/*.html) ===== */
.project-detail-body {
  min-height: 100vh;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.project-detail-header {
  position: relative;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.project-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
  transition: color var(--transition);
}

.project-detail-back:hover {
  color: #22d3ee;
}

.project-detail-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.35rem 3rem;
}

.project-detail-hero {
  margin-bottom: 2rem;
}

.project-detail-hero h1 {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 800;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.project-detail-kicker {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.project-detail-lead {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.project-detail-section {
  margin-bottom: 2rem;
}

.project-detail-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 0.65rem;
}

.project-detail-section p,
.project-detail-section li {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.75;
}

.project-detail-section ul {
  padding-left: 1.2rem;
  margin: 0.35rem 0 0;
}

.project-detail-section li {
  margin-bottom: 0.35rem;
}

.project-detail-figure {
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.project-detail-figure figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.5rem 0.85rem;
  border-top: 1px solid var(--border-light);
}

.project-detail-figure-img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

.project-detail-pre {
  background: #0b1222;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 0.45rem 0;
  overflow-x: auto;
}

.project-detail-pre code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.86rem;
  color: #a5d6ff;
}

.project-detail-note {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.project-detail-body > footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--border-light);
}

#projectsGrid .project-card[data-project-detail] {
  cursor: pointer;
}

#projectsGrid .project-card[data-project-detail]:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* ===== DÉTAIL PROJET - composants enrichis ===== */

/* Section h2 avec icône et trait coloré */
.pd-section {
  margin-bottom: 2.25rem;
}
.pd-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}
.pd-section-title i {
  color: var(--accent-cyan);
  font-size: 0.9rem;
}
.pd-section-title.green i  { color: var(--accent-green); }
.pd-section-title.purple i { color: var(--accent-purple); }
.pd-section-title.orange i { color: var(--accent-orange); }

.pd-text {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

/* Cards de stats (chiffres clés) */
.pd-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.pd-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-align: center;
}
.pd-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.pd-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Bloc citation / email */
.pd-quote {
  background: rgba(6,182,212,.05);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}
.pd-quote-body {
  color: var(--text-soft);
  font-size: 0.93rem;
  line-height: 1.75;
  font-style: italic;
}
.pd-quote-meta {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 600;
}

/* Liste à puces stylée */
.pd-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pd-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.65;
  text-align: start;
}
.pd-list li code {
  white-space: nowrap;
}
.pd-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
}
.pd-list.green li::before  { background: var(--accent-green); }
.pd-list.purple li::before { background: var(--accent-purple); }
.pd-list.orange li::before { background: var(--accent-orange); }

/* Tableau technique */
.pd-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}
.pd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.pd-table thead {
  background: var(--bg-secondary);
}
.pd-table th {
  padding: 0.6rem 0.85rem;
  text-align: left;
  font-weight: 700;
  color: var(--text-soft);
  white-space: nowrap;
  border-bottom: 1px solid var(--border-light);
}
.pd-table td {
  padding: 0.55rem 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(51,65,85,.45);
  vertical-align: top;
}
.pd-table tr:last-child td {
  border-bottom: none;
}
.pd-table code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  color: #a5d6ff;
  background: rgba(165,214,255,.08);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
.pd-table-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Flux / étapes */
.pd-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0.75rem 0;
}
.pd-flow-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  position: relative;
  padding-bottom: 1rem;
}
.pd-flow-step:last-child {
  padding-bottom: 0;
}
.pd-flow-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 28px;
}
.pd-flow-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
  flex-shrink: 0;
  z-index: 1;
}
.pd-flow-connector {
  width: 2px;
  flex: 1;
  min-height: 18px;
  background: var(--border-light);
  margin-top: 2px;
}
.pd-flow-step:last-child .pd-flow-connector {
  display: none;
}
.pd-flow-content {
  padding-top: 0.3rem;
  flex: 1;
}
.pd-flow-content strong {
  color: var(--text-soft);
  font-size: 0.93rem;
  display: block;
  margin-bottom: 0.15rem;
}
.pd-flow-content span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Grille tech stack */
.pd-tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

/* Bilan personnel */
.pd-bilan {
  background: linear-gradient(135deg, rgba(16,185,129,.07) 0%, rgba(6,182,212,.05) 100%);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2.5rem;
}
.pd-bilan-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.pd-bilan-title i {
  color: var(--accent-green);
}
.pd-bilan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}
.pd-bilan-card {
  background: rgba(15,23,42,.5);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.pd-bilan-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.pd-bilan-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.pd-bilan-placeholder {
  font-size: 0.93rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.7;
}

/* Bloc code CLI */
.pd-cli-block {
  margin: 0.4rem 0;
}
.pd-cli-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media (max-width: 600px) {
  .pd-stats { grid-template-columns: repeat(2, 1fr); }
  .pd-bilan-grid { grid-template-columns: 1fr; }
  .pd-two-col { grid-template-columns: 1fr !important; }
}

/* ===== KTREE TERMINAL DEMO ===== */
.ktree-term-wrap {
  margin: 0.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #1e293b;
}
.ktree-term-hero {
  margin-top: 0;
  margin-bottom: 1.75rem;
}
.ktree-term {
  background: #06090f;
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', ui-monospace, monospace;
}
.ktree-term-titlebar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  background: #0d1321;
  border-bottom: 1px solid #1e293b;
  user-select: none;
}
.ktree-term-title-text {
  font-size: 0.68rem;
  color: #374151;
  margin-left: 0.3rem;
  flex: 1;
  font-family: 'Manrope', system-ui, sans-serif;
}
.ktree-replay-btn {
  background: transparent;
  border: 1px solid #1e293b;
  color: #374151;
  border-radius: 4px;
  width: 24px;
  height: 20px;
  cursor: pointer;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.ktree-replay-btn:hover { color: #06b6d4; border-color: #06b6d4; }
.ktree-term-body {
  padding: 0.7rem 1rem 0.9rem;
  height: 460px;
  overflow-y: auto;
  overflow-x: auto;
  font-size: 0.69rem;
  line-height: 1.45;
  white-space: pre;
}
.ktree-ln  { display: block; }
/* Ligne vide visible (innerHTML vide = 0 px de hauteur) */
.ktree-blank-line {
  display: block;
  min-height: 1em;
  line-height: 1.45;
  user-select: none;
}
/* colors */
.kc-prompt { color: #22c55e; }
.kc-cmd    { color: #f1f5f9; }
.kc-dn     { color: #2d3748; }
.kc-dim    { color: #1a2233; }
.kc-bar-hi { color: #d97706; }
.kc-bar-lo { color: #78350f; }
.kc-sz-hi  { color: #f59e0b; }
.kc-sz-lo  { color: #92400e; }
.kc-sz-z   { color: #1a2233; }
.kc-f-hi   { color: #fbbf24; }
.kc-f-lo   { color: #b45309; }
.kc-f-z    { color: #1a2233; }
.kc-name   { color: #e2e8f0; }
.kc-branch { color: #374151; }
.kc-recap  { color: #0891b2; }
.kc-rsep   { color: #1e2d3d; }
.kc-rcval  { color: #22d3ee; font-weight: 600; }
.kc-cur    { color: #22c55e; animation: blinkAnim .9s step-end infinite; }
/* reveal */
@keyframes ktreeLineIn { from { opacity:0; } to { opacity:1; } }
.ktree-ln-in { animation: ktreeLineIn 0.18s ease forwards; }

/* === RÉALISATION DU PROJET (alternating steps) === */
.pd-realisation {
  margin: 3rem 0 2rem;
}
.pd-realisation-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}
.pd-realisation-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 3px;
  background: #06b6d4;
  border-radius: 2px;
  margin: 0.5rem auto 2.5rem;
}
.pd-real-step {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-bottom: 3.5rem;
}
.pd-real-step.reverse {
  flex-direction: row-reverse;
}
.pd-real-media {
  flex: 0 0 45%;
  border-radius: 12px;
  overflow: hidden;
}
.pd-real-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.pd-real-logo-panel {
  background: #f8fafc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2.5rem 2rem;
  min-height: 160px;
}
.pd-real-logo-panel img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.pd-real-content {
  flex: 1;
  min-width: 0;
}
.pd-real-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.pd-real-num {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  background: #06b6d4;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-real-step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.pd-real-text {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 0.95rem;
}
.pd-schema-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 200px;
  border: 2px dashed #334155;
  border-radius: 12px;
  color: #475569;
  font-size: 0.9rem;
  font-family: 'JetBrains Mono', monospace;
}
.pd-schema-placeholder i {
  font-size: 2.5rem;
  color: #334155;
}

@media (max-width: 700px) {
  .pd-real-step,
  .pd-real-step.reverse {
    flex-direction: column;
  }
  .pd-real-media { flex: none; width: 100%; }
}

/* =======================================================
   RESPONSIVE GLOBAL — tablette paysage (≤ 1024px)
   ======================================================= */
@media (max-width: 1024px) {
  .hero-desc { max-width: 80%; }

  .stage-body { gap: 1.75rem; }

  .perso-contact-hero { padding: 2.5rem 1.5rem 2rem; }
}

/* =======================================================
   RESPONSIVE GLOBAL — tablette portrait (≤ 768px)
   ======================================================= */
@media (max-width: 768px) {

  /* Hero */
  .hero-desc { max-width: 100%; }
  .hero-actions { flex-direction: column; gap: .75rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* IUT block */
  .iut-block {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.25rem;
    text-align: center;
  }
  .iut-logo { width: min(220px, 55vw); }
  .iut-text  { width: 100%; text-align: center; }

  /* Section titles */
  .section-title    { font-size: 1.35rem; }
  .section-subtitle { margin-bottom: 1.75rem; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; }

  /* Certifications */
  .certs-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }

  /* CV */
  .cv-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .cv-download-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1rem;
  }
  .cv-download-banner .btn { width: 100%; justify-content: center; }
  .timeline-title { font-size: .95rem; }
  .timeline-desc  { font-size: .88rem; }

  /* Skill bars : nom + % ligne 1, barre ligne 2 */
  .skill-item  { flex-wrap: wrap; gap: .2rem .5rem; }
  .skill-name  { min-width: unset; white-space: normal; flex: 1; font-size: .88rem; order: 1; }
  .skill-pct   { flex: 0 0 auto; font-size: .78rem; order: 2; }
  .skill-bar   { flex: 0 0 100%; order: 3; }

  /* Card padding réduit */
  .card { padding: 1rem 1.1rem; }

  /* Experiences nav tabs */
  .stage-nav { gap: .35rem; }
  .stage-nav-btn { min-width: 120px; }

  /* Stage body */
  .stage-hero { flex-direction: column; gap: 1.25rem; }
  .stage-hero-text { text-align: center; }

  /* Perso contact */
  .perso-contact-hero { padding: 2rem 1rem 1.75rem; }
  .perso-contact-actions { flex-direction: column; align-items: center; }
  .perso-contact-actions .btn { width: min(100%, 320px); justify-content: center; }

  /* Perso info row */
  .perso-info-row {
    grid-template-columns: repeat(2, 1fr);
    gap: .6rem;
  }
  .perso-info-card { padding: .85rem .6rem; }
  .perso-info-value { font-size: .82rem; }
  .perso-info-label { font-size: .68rem; letter-spacing: .04em; }

  /* Perso grid */
  .perso-grid { grid-template-columns: 1fr; }
}

/* =======================================================
   RESPONSIVE GLOBAL — grand mobile (≤ 640px)
   ======================================================= */
@media (max-width: 640px) {

  /* Hero */
  .hero-stats { flex-direction: column; gap: .6rem; align-items: flex-start; }

  /* Terminal hero */
  .terminal-box { height: auto; min-height: 140px; }

  /* Stage tabs : scroll horizontal propre */
  .stage-nav { padding-bottom: .5rem; }
  .stage-nav-btn { min-width: 100px; font-size: .78rem; }

  /* Stage feature grid */
  .stage-feature-grid { grid-template-columns: 1fr; }
  .stage-feature-grid .stage-feature-card[style*="span 2"] { grid-column: span 1 !important; }

  /* CV timeline */
  .timeline { padding-left: 1rem; }
  .timeline-item { margin-bottom: 1.25rem; }
  .timeline-date  { font-size: .76rem; }
  .timeline-title { font-size: .9rem; word-break: break-word; }
  .timeline-place { font-size: .82rem; }
  .cv-list li     { font-size: .87rem; }

  /* Bilan grid projet */
  .pd-bilan-grid { grid-template-columns: 1fr !important; }
}

/* =======================================================
   RESPONSIVE GLOBAL — mobile (≤ 480px)
   ======================================================= */
@media (max-width: 480px) {

  /* Perso info */
  .perso-info-row { grid-template-columns: repeat(2, 1fr); gap: .45rem; }
  .perso-info-card { padding: .75rem .5rem; }
  .perso-info-value { font-size: .78rem; }
  .perso-info-icon { font-size: .9rem; }

  /* CV skill bars encore plus serrés */
  .skill-name { font-size: .83rem; }
  .skill-pct  { font-size: .72rem; }

  /* Card padding */
  .card { padding: .85rem .9rem; }

  /* Stage stat chips */
  .stage-stats-row { flex-wrap: wrap; gap: .35rem; }
  .stage-stat-chip { font-size: .68rem; }

  /* Marquee : réduit l'item size */
  .marquee-item { min-width: 64px; gap: .3rem; }
  .marquee-item span { font-size: .58rem; }
  .marquee-item img { width: 22px; height: 22px; }

  /* Badges dans les kicker */
  .project-detail-kicker { gap: .3rem; flex-wrap: wrap; }

  /* Project detail hero */
  .project-detail-main { padding: 1.5rem 1rem 3rem; }

  /* Stats projet */
  .pd-stats { grid-template-columns: repeat(2, 1fr) !important; }
}

/* =======================================================
   RESPONSIVE GLOBAL — petit mobile (≤ 375px)
   ======================================================= */
@media (max-width: 375px) {
  main { padding: 64px .75rem 2.5rem; }

  .hero h1 { font-size: 1.55rem; }

  .perso-info-row { grid-template-columns: 1fr; }

  .stage-nav-btn { min-width: 90px; font-size: .72rem; padding: .5rem .6rem; }

  .pd-bilan-grid { grid-template-columns: 1fr !important; }
}

/* =======================================================
   BUT R&T — Référentiel de compétences DevCloud
   ======================================================= */
.but-ref-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.but-ref-title {
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.but-ref-title span { color: var(--accent-purple); }

.but-comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.but-comp-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem .9rem;
  position: relative;
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.but-comp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple), transparent);
  opacity: 0;
  transition: opacity .2s ease;
}

.but-comp-card:hover {
  border-color: rgba(139,92,246,.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139,92,246,.1);
}

.but-comp-card:hover::before { opacity: 1; }

.but-comp-header {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-bottom: .85rem;
}

.but-comp-meta { flex: 1; }

.but-comp-name {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: .45rem;
}

.but-comp-desc {
  font-size: .75rem;
  color: var(--text-soft);
  line-height: 1.45;
  margin-bottom: .5rem;
}

.but-level-track {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.but-level-label {
  font-size: .62rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-right: .1rem;
}

.but-level-dot {
  width: 18px;
  height: 5px;
  border-radius: 3px;
  background: rgba(139,92,246,.12);
  border: 1px solid rgba(139,92,246,.18);
}

.but-level-dot.active {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  box-shadow: 0 0 5px rgba(139,92,246,.45);
}

.but-comp-projects {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.but-proj-tag {
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  padding: .16rem .55rem;
  border-radius: 999px;
  font-size: .67rem;
  font-weight: 600;
  background: rgba(139,92,246,.1);
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,.2);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}

.but-proj-tag:hover {
  background: rgba(139,92,246,.22);
  border-color: rgba(139,92,246,.42);
}

.but-proj-tag-exp {
  background: rgba(6,182,212,.07);
  color: #a5f3fc;
  border-color: rgba(6,182,212,.18);
}

.but-proj-tag-exp:hover {
  background: rgba(6,182,212,.16);
  border-color: rgba(6,182,212,.38);
}

@media (max-width: 768px) {
  .but-comp-grid { grid-template-columns: 1fr; }
}
