/* ════════════════════════════════════════════════════════
   VARIABLES & RESET
════════════════════════════════════════════════════════ */

:root {
  --gold:         #f0c84a;
  --gold-light:   #fce07a;
  --gold-dim:     #c89820;
  --purple:       #b090f0;
  --purple-dark:  #8060d0;
  --cyan:         #5de8f2;
  --cyan-dim:     #2ab8d0;
  --bg:           #2e2860;
  --bg2:          #382e70;
  --bg3:          #443880;
  --text:         #ffffff;
  --text-dim:     #ffffff;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html.custom-cursor,
html.custom-cursor body,
html.custom-cursor a,
html.custom-cursor button,
html.custom-cursor input,
html.custom-cursor label,
html.custom-cursor select,
html.custom-cursor textarea,
html.custom-cursor [onclick],
html.custom-cursor [role="button"] {
  cursor: url('cursor.cur') 1 0, url('cursor.png') 2 0, auto !important;
}

html { scroll-behavior: smooth; }

body {
  background:   var(--bg);
  color:        var(--text);
  font-family:  'Crimson Text', serif;
  font-size:    18px;
  overflow-x:   hidden;
}

.cursor, .cursor-ring, #lolCursor { display: none !important; }

/* ════════════════════════════════════════════════════════
   BARRE DE PROGRESSION
════════════════════════════════════════════════════════ */

.scroll-progress {
  position:   fixed;
  top:        0;
  left:       0;
  height:     2px;
  width:      0%;
  background: linear-gradient(to right, var(--gold-dim), var(--gold), var(--gold-light));
  box-shadow: 0 0 8px var(--gold);
  z-index:    9999;
}

/* ════════════════════════════════════════════════════════
   NAVIGATION
════════════════════════════════════════════════════════ */

nav {
  position:   fixed;
  top:        0;
  left:       0;
  right:      0;
  z-index:    500;
  padding:    24px 60px;
  display:    flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(46, 40, 96, 0.97), transparent);
}

.nav-logo {
  font-family:     'Cinzel', serif;
  font-size:       14px;
  letter-spacing:  4px;
  color:           var(--gold);
  text-transform:  uppercase;
}

.nav-links {
  display:     flex;
  gap:         40px;
  list-style:  none;
}

.nav-links a {
  font-family:     'Cinzel', serif;
  font-size:       11px;
  letter-spacing:  3px;
  color:           var(--text-dim);
  text-decoration: none;
  text-transform:  uppercase;
  position:        relative;
  transition:      color 0.3s;
}

.nav-links a::after {
  content:    '';
  position:   absolute;
  bottom:     -4px;
  left:       0;
  width:      0;
  height:     1px;
  background: var(--gold);
  transition: width 0.3s;
}

.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* ════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════ */

#hero {
  height:          100vh;
  display:         flex;
  align-items:     center;
  justify-content: center;
  position:        relative;
  overflow:        hidden;
}

.hero-grid {
  position:   absolute;
  inset:      0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(240, 200, 74, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 200, 74, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  text-align: center;
  z-index:    1;
  animation:  heroReveal 1.2s ease forwards;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-family:     'Cinzel', serif;
  font-size:       11px;
  letter-spacing:  8px;
  color:           var(--gold-dim);
  text-transform:  uppercase;
  margin-bottom:   24px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             16px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content:    '';
  width:      40px;
  height:     1px;
  background: var(--gold-dim);
}

.hero-name {
  font-family:      'Cinzel', serif;
  font-size:        clamp(48px, 8vw, 96px);
  font-weight:      900;
  line-height:      1;
  color:            transparent;
  background:       linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 40%, var(--gold-dim) 70%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip:  text;
  text-transform:   uppercase;
  letter-spacing:   4px;
  margin-bottom:    8px;
}

.hero-subtitle {
  font-family:    'Cinzel', serif;
  font-size:      clamp(14px, 2vw, 20px);
  letter-spacing: 6px;
  color:          var(--cyan);
  text-transform: uppercase;
  margin-bottom:  48px;
  opacity:        0.9;
}

.hero-cta {
  display:         inline-block;
  padding:         14px 48px;
  margin:          0 8px;
  border:          1px solid var(--gold-dim);
  font-family:     'Cinzel', serif;
  font-size:       11px;
  letter-spacing:  4px;
  text-transform:  uppercase;
  color:           var(--gold);
  text-decoration: none;
  position:        relative;
  overflow:        hidden;
  isolation:       isolate;
  transition:      color 0.3s;
}

.hero-cta::before {
  content:    '';
  position:   absolute;
  inset:      0;
  background: var(--gold);
  transform:  translateX(-101%);
  transition: transform 0.4s ease;
  z-index:    -1;
}

.hero-cta:hover { color: var(--bg); }
.hero-cta:hover::before { transform: translateX(0); }

.scroll-indicator {
  position:   absolute;
  bottom:     40px;
  left:       50%;
  transform:  translateX(-50%);
  display:    flex;
  flex-direction: column;
  align-items: center;
  gap:        8px;
  opacity: 0.35;
}

.scroll-indicator span {
  font-family:    'Cinzel', serif;
  font-size:      9px;
  letter-spacing: 4px;
  color:          var(--gold-dim);
}

.scroll-line {
  width:      1px;
  height:     40px;
  background: linear-gradient(to bottom, var(--gold-dim), transparent);
}

/* ════════════════════════════════════════════════════════
   UTILITAIRES COMMUNS
════════════════════════════════════════════════════════ */

section {
  padding:    120px 60px;
  max-width:  1200px;
  margin:     0 auto;
}

.section-header {
  display:     flex;
  align-items: center;
  gap:         24px;
  margin-bottom: 80px;
}

.section-number {
  font-family:    'Cinzel', serif;
  font-size:      11px;
  letter-spacing: 3px;
  color:          var(--gold-dim);
}

.section-title {
  font-family:    'Cinzel', serif;
  font-size:      clamp(28px, 4vw, 48px);
  font-weight:    600;
  color:          var(--gold);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.section-line {
  flex:       1;
  height:     1px;
  background: linear-gradient(to right, var(--gold-dim), transparent);
}

.reveal {
  opacity:    0;
  transform:  translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity:   1;
  transform: translateY(0);
}

.arcane-divider {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             16px;
  padding:         20px 0;
  opacity:         0.4;
}

.arcane-divider::before,
.arcane-divider::after {
  content: '';
  flex:    1;
  height:  1px;
}

.arcane-divider::before { background: linear-gradient(to right, transparent, var(--gold)); }
.arcane-divider::after  { background: linear-gradient(to left,  transparent, var(--gold)); }

.divider-gem {
  width:      8px;
  height:     8px;
  background: var(--gold);
  transform:  rotate(45deg);
}

/* ════════════════════════════════════════════════════════
   SECTION À PROPOS — CARTE FLIP
════════════════════════════════════════════════════════ */

#about {
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  padding:         120px 60px;
  max-width:       1200px;
  margin:          0 auto;
}

.about-section-header {
  display:      flex;
  align-items:  center;
  gap:          24px;
  margin-bottom: 60px;
  width:        100%;
  max-width:    500px;
}

.about-visual {
  position:    relative;
  perspective: 1400px;
  width:       100%;
  max-width:   380px;
}

.card-backdrop {
  position:   fixed;
  inset:      0;
  background: rgba(20, 16, 50, 0.92);
  z-index:    999;
  opacity:    0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.card-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.flip-card {
  width:           100%;
  aspect-ratio:    3/4;
  position:        relative;
  transform-style: preserve-3d;
  z-index:         10;
  transition:      transform 0.85s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.flip-front,
.flip-back {
  position:            absolute;
  inset:               0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border:              1px solid var(--gold-dim);
  border-radius:       2px;
  overflow:            hidden;
  display:             flex;
  flex-direction:      column;
  align-items:         center;
  justify-content:     center;
}

.flip-front {
  background: linear-gradient(135deg, #3a3070, #4e3e90, #2e2660);
}

.flip-back {
  background: linear-gradient(135deg, #342c68, #403478, #302858);
  transform:  rotateY(180deg);
  padding:    48px 44px;
  text-align: center;
  gap:        14px;
  overflow-y: auto;
}

.flip-card.is-clone .flip-back {
  padding:         60px 52px 48px;
  gap:             20px;
  justify-content: flex-start;
}

.flip-hint {
  position:       absolute;
  bottom:         16px;
  left:           50%;
  transform:      translateX(-50%);
  font-family:    'Cinzel', serif;
  font-size:      9px;
  letter-spacing: 3px;
  color:          var(--gold-dim);
  text-transform: uppercase;
  white-space:    nowrap;
  z-index:        2;
  animation:      hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1; }
}

.about-frame-corner {
  position:     absolute;
  width:        16px;
  height:       16px;
  border-color: var(--gold);
  border-style: solid;
  z-index:      1;
  pointer-events: none;
}

.about-frame-corner.tl { top: 4px;    left: 4px;   border-width: 2px 0 0 2px; }
.about-frame-corner.tr { top: 4px;    right: 4px;  border-width: 2px 2px 0 0; }
.about-frame-corner.bl { bottom: 4px; left: 4px;   border-width: 0 0 2px 2px; }
.about-frame-corner.br { bottom: 4px; right: 4px;  border-width: 0 2px 2px 0; }

.about-initials {
  font-family:         'Cinzel', serif;
  font-size:           80px;
  font-weight:         900;
  color:               transparent;
  -webkit-text-stroke: 1px var(--gold-dim);
  letter-spacing:      8px;
  opacity:             0.4;
}

.about-glow {
  position:      absolute;
  bottom:        20%;
  right:         10%;
  width:         150px;
  height:        150px;
  background:    radial-gradient(circle, rgba(176, 144, 240, 0.4), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.back-tag {
  font-family:    'Cinzel', serif;
  font-size:      11px;
  letter-spacing: 5px;
  color:          var(--cyan);
  text-transform: uppercase;
}

.back-subtitle {
  font-family:    'Cinzel', serif;
  font-size:      14px;
  letter-spacing: 4px;
  color:          var(--cyan);
  text-transform: uppercase;
  opacity:        0.8;
}

.back-divider {
  width:      60px;
  height:     1px;
  background: linear-gradient(to right, transparent, var(--gold-dim), transparent);
}

.back-text {
  font-size:   16px;
  color:       var(--text);
  line-height: 1.85;
  text-align:  left;
}

.back-text-extra {
  font-size:   15px;
  color:       var(--text);
  line-height: 1.85;
  text-align:  left;
  opacity:     0;
  transform:   translateY(10px);
  transition:  opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}

.flip-card.expanded .back-text-extra { opacity: 1; transform: translateY(0); }

.flip-card.is-clone .back-tag        { font-size: 13px; letter-spacing: 6px; }
.flip-card.is-clone .back-subtitle   { font-size: 26px; letter-spacing: 5px; margin-bottom: 4px; }
.flip-card.is-clone .back-text       { font-size: 18px; line-height: 1.95; }
.flip-card.is-clone .back-text-extra { font-size: 17px; line-height: 1.95; }

.back-stats {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   12px;
  width:                 100%;
  padding-top:           14px;
  border-top:            1px solid rgba(240, 200, 74, 0.2);
}

.back-stat-item {
  text-align:  center;
  padding:     10px 8px;
  background:  rgba(240, 200, 74, 0.07);
  border:      1px solid rgba(240, 200, 74, 0.15);
}

.back-stat-number {
  display:        block;
  font-family:    'Cinzel', serif;
  font-size:      22px;
  font-weight:    900;
  color:          var(--gold);
}

.back-stat-label {
  font-family:    'Cinzel', serif;
  font-size:      9px;
  letter-spacing: 2px;
  color:          var(--text);
  text-transform: uppercase;
}

.flip-card.is-clone .back-stat-number { font-size: 32px; }
.flip-card.is-clone .back-stat-label  { font-size: 11px; letter-spacing: 3px; }
.flip-card.is-clone .back-stat-item   { padding: 18px 12px; }

.back-skills-row {
  display:         flex;
  flex-wrap:       wrap;
  gap:             8px;
  justify-content: center;
  width:           100%;
  padding-top:     14px;
  border-top:      1px solid rgba(93, 232, 242, 0.15);
}

.back-skill-tag {
  font-family:    'Cinzel', serif;
  font-size:      11px;
  letter-spacing: 1px;
  padding:        5px 14px;
  border:         1px solid rgba(93, 232, 242, 0.3);
  color:          var(--cyan-dim);
}

.flip-card.is-clone .back-skill-tag { font-size: 14px; padding: 9px 22px; letter-spacing: 2px; }

.back-close {
  position:   absolute;
  top:        16px;
  right:      16px;
  width:      36px;
  height:     36px;
  background: none;
  border:     1px solid rgba(240, 200, 74, 0.35);
  color:      var(--gold-dim);
  font-size:  14px;
  display:    none;
  align-items: center;
  justify-content: center;
  z-index:    10;
  transition: all 0.3s;
}

.flip-card.expanded .back-close { display: flex; }
.back-close:hover { background: var(--gold); border-color: var(--gold); color: var(--bg); }

/* ════════════════════════════════════════════════════════
   SECTION PARCOURS — TIMELINE
════════════════════════════════════════════════════════ */

#timeline {
  max-width: 800px;
  margin:    0 auto;
  padding:   80px 60px;
}

.timeline-track {
  position:     relative;
  padding-left: 48px;
}

.timeline-track::before {
  content:    '';
  position:   absolute;
  left:       7px;
  top:        0;
  bottom:     0;
  width:      1px;
  background: linear-gradient(to bottom, transparent, var(--gold-dim) 15%, var(--gold-dim) 85%, transparent);
}

.timeline-item {
  position:       relative;
  padding-bottom: 56px;
  opacity:        0;
  transform:      translateX(-20px);
  transition:     opacity 0.7s ease, transform 0.7s ease;
}

.timeline-item.visible   { opacity: 1; transform: translateX(0); }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-gem {
  position:   absolute;
  left:       -41px;
  top:        4px;
  width:      14px;
  height:     14px;
  background: var(--bg);
  border:     2px solid var(--gold-dim);
  transform:  rotate(45deg);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.timeline-item.visible .timeline-gem { border-color: var(--gold); box-shadow: 0 0 12px rgba(240, 200, 74, 0.5); }
.timeline-item.current .timeline-gem { background: var(--gold); box-shadow: 0 0 20px rgba(240, 200, 74, 0.7); }

.timeline-year  { font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 4px; color: var(--gold-dim); text-transform: uppercase; margin-bottom: 8px; }
.timeline-title { font-family: 'Cinzel', serif; font-size: 20px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.timeline-sub   { font-family: 'Cinzel', serif; font-size: 12px; letter-spacing: 2px; color: var(--cyan); text-transform: uppercase; margin-bottom: 12px; }
.timeline-desc  { font-size: 15px; color: var(--text); line-height: 1.8; max-width: 500px; }

.timeline-badge {
  display:        inline-block;
  margin-top:     12px;
  padding:        4px 12px;
  border:         1px solid rgba(240, 200, 74, 0.25);
  font-family:    'Cinzel', serif;
  font-size:      9px;
  letter-spacing: 3px;
  color:          var(--gold-dim);
  text-transform: uppercase;
}

.timeline-badge.active { border-color: rgba(93, 232, 242, 0.45); color: var(--cyan); box-shadow: 0 0 12px rgba(93, 232, 242, 0.12); }

/* ════════════════════════════════════════════════════════
   SECTION COMPÉTENCES
════════════════════════════════════════════════════════ */

#skills { position: relative; }

#skills::before {
  content: '';
  position: absolute;
  inset:    0;
  pointer-events: none;
  background-image: repeating-linear-gradient(60deg, rgba(176, 144, 240, 0.07) 0px, rgba(176, 144, 240, 0.07) 1px, transparent 1px, transparent 30px);
}

.skills-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   2px;
}

.skill-card {
  position:   relative;
  padding:    40px 32px;
  background: rgba(56, 46, 112, 0.9);
  border:     1px solid rgba(176, 144, 240, 0.25);
  overflow:   hidden;
  transition: background 0.4s ease, transform 0.4s ease;
}

.skill-card::before {
  content:    '';
  position:   absolute;
  top:        0; left: 0; right: 0;
  height:     2px;
  background: linear-gradient(to right, transparent, var(--cyan), transparent);
  transform:  scaleX(0);
  transition: transform 0.4s;
}

.skill-card:hover         { background: rgba(68, 56, 128, 0.98); transform: translateY(-4px); }
.skill-card:hover::before { transform: scaleX(1); }

.skill-icon-row {
  display:         flex;
  flex-wrap:       wrap;
  gap:             16px;
  justify-content: center;
  margin-bottom:   20px;
}

.skill-icon-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.skill-icon-item img {
  width:  36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.15));
}

.skill-icon-item span {
  font-family:    'Cinzel', serif;
  font-size:      9px;
  letter-spacing: 1px;
  color:          var(--text);
  text-align:     center;
  opacity:        0.75;
  white-space:    nowrap;
  overflow:       hidden;
  text-overflow:  ellipsis;
  max-width:      48px;
  display:        block;
}

.skill-name  { font-family: 'Cinzel', serif; font-size: 14px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; margin-bottom: 16px; }
.skill-items { display: flex; flex-wrap: wrap; gap: 8px; }

.skill-tag {
  font-family:    'Cinzel', serif;
  font-size:      12px;
  letter-spacing: 1px;
  padding:        4px 12px;
  border:         1px solid rgba(93, 232, 242, 0.25);
  color:          var(--text);
  opacity:        0;
  transform:      translateX(-8px);
  transition:     opacity 0.4s ease, transform 0.4s ease, border-color 0.3s, color 0.3s;
}

.skill-card.visible .skill-tag { opacity: 1; transform: translateX(0); }
.skill-card:hover .skill-tag   { border-color: rgba(93, 232, 242, 0.6); }

/* ════════════════════════════════════════════════════════
   SECTION PROJETS
════════════════════════════════════════════════════════ */

.projects-grid {
  display:               grid;
  grid-template-columns: repeat(2, 1fr);
  gap:                   32px;
}

.project-card {
  position:   relative;
  overflow:   hidden;
  background: rgba(46, 40, 90, 0.95);
  border:     1px solid rgba(176, 144, 240, 0.25);
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
  border-color: rgba(93, 232, 242, 0.55);
  transform:    translateY(-8px);
  box-shadow:   0 30px 60px rgba(0,0,0,0.4), 0 0 40px rgba(93,232,242,0.12);
}

.project-visual {
  position:        relative;
  height:          200px;
  overflow:        hidden;
  display:         flex;
  align-items:     center;
  justify-content: center;
}

.project-visual-1 { background: linear-gradient(135deg, #3a1a70, #6030c0, #3a1a70); }
.project-visual-2 { background: linear-gradient(135deg, #102840, #1a6888, #102840); }
.project-visual-3 { background: linear-gradient(135deg, #1a1a50, #2a2880, #1a1a50); }

.project-glyph { font-size: 64px; opacity: 0.45; transition: opacity 0.4s, transform 0.4s; }
.project-card:hover .project-glyph { opacity: 0.75; transform: scale(1.1); }

.project-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, rgba(46,40,90,0.95)); }

.project-body  { padding: 28px; }
.project-type  { font-family: 'Cinzel', serif; font-size: 9px; letter-spacing: 4px; color: var(--cyan); text-transform: uppercase; margin-bottom: 12px; }
.project-title { font-family: 'Cinzel', serif; font-size: 20px; letter-spacing: 1px; color: var(--gold); margin-bottom: 12px; }
.project-desc  { font-size: 15px; color: var(--text); line-height: 1.7; margin-bottom: 20px; }
.project-tags  { display: flex; flex-wrap: wrap; gap: 8px; }

.project-tag {
  font-family:    'Cinzel', serif;
  font-size:      11px;
  letter-spacing: 1px;
  padding:        3px 10px;
  background:     rgba(240, 200, 74, 0.07);
  border:         1px solid rgba(240, 200, 74, 0.2);
  color:          var(--gold-dim);
}

.project-btn {
  display:        inline-flex;
  align-items:    center;
  gap:            8px;
  margin-top:     20px;
  padding:        10px 24px;
  border:         1px solid var(--gold-dim);
  background:     transparent;
  font-family:    'Cinzel', serif;
  font-size:      11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color:          var(--gold);
  position:       relative;
  overflow:       hidden;
  isolation:      isolate;
  transition:     color 0.3s;
}

.project-btn::before {
  content:    '';
  position:   absolute;
  inset:      0;
  background: var(--gold);
  transform:  translateX(-101%);
  transition: transform 0.35s ease;
  z-index:    0;
}

.project-btn:hover         { color: var(--bg); }
.project-btn:hover::before { transform: translateX(0); }
.project-btn span          { position: relative; z-index: 1; }

/* ════════════════════════════════════════════════════════
   SECTION CONTACT
════════════════════════════════════════════════════════ */

#contact-section {
  text-align: center;
  padding:    120px 60px;
  max-width:  1000px;
  margin:     0 auto;
}

.contact-rune  { display: block; font-size: 48px; margin-bottom: 24px; opacity: 0.4; }
.contact-title { font-family: 'Cinzel', serif; font-size: clamp(32px,5vw,56px); font-weight: 900; letter-spacing: 4px; color: var(--gold); text-transform: uppercase; margin-bottom: 24px; }
.contact-text  { font-size: 18px; font-style: italic; line-height: 1.8; color: var(--text); margin-bottom: 48px; }
.contact-links { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 16px; }

.contact-link {
  display:         flex;
  align-items:     center;
  gap:             10px;
  padding:         16px 28px;
  border:          1px solid var(--gold-dim);
  font-family:     'Cinzel', serif;
  font-size:       11px;
  letter-spacing:  3px;
  text-transform:  uppercase;
  color:           var(--gold);
  text-decoration: none;
  white-space:     nowrap;
  position:        relative;
  overflow:        hidden;
  isolation:       isolate;
  transition:      color 0.3s;
}

.contact-link::before {
  content:    '';
  position:   absolute;
  inset:      0;
  background: var(--gold);
  transform:  translateY(101%);
  transition: transform 0.4s ease;
  z-index:    -1;
}

.contact-link:hover         { color: var(--bg); }
.contact-link:hover::before { transform: translateY(0); }

/* ════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════ */

footer   { text-align: center; padding: 40px; border-top: 1px solid rgba(240,200,74,0.1); }
footer p { font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 3px; color: var(--text); text-transform: uppercase; }

/* ════════════════════════════════════════════════════════
   MODALS PRINCIPALES
════════════════════════════════════════════════════════ */

.modal-overlay {
  position:        fixed;
  inset:           0;
  background:      rgba(16, 12, 40, 0.94);
  z-index:         2000;
  display:         flex;
  align-items:     center;
  justify-content: center;
  opacity:         0;
  pointer-events:  none;
  transition:      opacity 0.4s ease;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  position:   relative;
  width:      min(96vw, 960px);
  max-height: 95vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #342c68, #201840);
  border:     1px solid rgba(176, 144, 240, 0.4);
  transform:  translateY(30px) scale(0.97);
  transition: transform 0.4s ease;
}

.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  z-index: 1;
}

.modal-corner    { position: absolute; width: 14px; height: 14px; border-color: var(--gold); border-style: solid; z-index: 10; pointer-events: none; }
.modal-corner.tl { top: 0;    left: 0;  border-width: 2px 0 0 2px; }
.modal-corner.tr { top: 0;    right: 0; border-width: 2px 2px 0 0; }
.modal-corner.bl { bottom: 0; left: 0;  border-width: 0 0 2px 2px; }
.modal-corner.br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.modal-corners-wrapper { position: sticky; bottom: 0; left: 0; right: 0; height: 0; pointer-events: none; }

.modal-header {
  position:       relative;
  padding:        52px 64px 36px;
  border-bottom:  1px solid rgba(240, 200, 74, 0.12);
  display:        flex;
  flex-direction: column;
  align-items:    center;
  text-align:     center;
}

.modal-close {
  position: absolute; top: 20px; right: 20px;
  width: 40px; height: 40px;
  background: none; border: 1px solid rgba(240,200,74,0.35);
  color: var(--gold-dim); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}

.modal-close:hover { background: var(--gold); border-color: var(--gold); color: var(--bg); }

.modal-body  { padding: 52px 64px; text-align: center; }
.modal-emoji { display: block; font-size: 72px; margin-bottom: 32px; }
.modal-type  { font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 6px; color: var(--cyan); text-transform: uppercase; margin-bottom: 12px; }
.modal-title { font-family: 'Cinzel', serif; font-size: 44px; font-weight: 600; letter-spacing: 3px; color: var(--gold); }
.modal-desc  { font-size: 20px; color: var(--text); line-height: 1.95; margin: 0 auto 40px; max-width: 720px; }

.modal-features       { margin: 0 auto 40px; max-width: 720px; text-align: left; }
.modal-features-title { font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 4px; color: #fff; text-transform: uppercase; margin-bottom: 20px; text-align: center; }

.modal-feature {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid rgba(240,200,74,0.07);
  font-size: 18px; color: #fff;
}

.modal-feature::before { content: '◆'; color: #fff; font-size: 9px; margin-top: 6px; flex-shrink: 0; }

.modal-tags { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.modal-tag {
  font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 1px;
  padding: 8px 22px;
  background: rgba(240,200,74,0.07); border: 1px solid rgba(240,200,74,0.25); color: #fff;
}

.modal-feature-btn {
  display: flex; align-items: flex-start; gap: 14px;
  width: 100%; padding: 14px 16px; margin-bottom: 6px;
  background: rgba(240,200,74,0.03); border: 1px solid rgba(240,200,74,0.1);
  color: #fff; text-align: left; position: relative; overflow: hidden;
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.modal-feature-btn::before          { content: '◆'; color: #fff; font-size: 9px; margin-top: 6px; flex-shrink: 0; transition: color 0.3s; }
.modal-feature-btn:hover            { background: rgba(240,200,74,0.09); border-color: rgba(240,200,74,0.35); transform: translateX(4px); }
.modal-feature-btn:hover::before    { color: var(--gold); }
.modal-feature-btn:hover .feat-arrow { opacity: 1; transform: translateX(0) translateY(-50%); }

.feat-title   { display: block; font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 1px; color: var(--gold); margin-bottom: 4px; }
.feat-preview { font-size: 15px; color: #fff; line-height: 1.6; }

.feat-arrow {
  position: absolute; right: 16px; top: 50%;
  transform: translateX(6px) translateY(-50%);
  font-size: 14px; color: var(--gold); opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
}

/* ════════════════════════════════════════════════════════
   SOUS-MODALS
════════════════════════════════════════════════════════ */

.submodal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,8,28,0.96);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}

.submodal-overlay.active { opacity: 1; pointer-events: all; }

.submodal {
  position:   relative;
  width:      min(94vw, 780px);
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(150deg, #302868, #1e1850, #281c5c);
  border:     1px solid rgba(93,232,242,0.28);
  transform:  translateY(20px) scale(0.98);
  transition: transform 0.35s ease;
}

.submodal-overlay.active .submodal { transform: translateY(0) scale(1); }

.submodal::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(to right, transparent, var(--cyan), transparent); }

.submodal-header { position: relative; padding: 36px 48px 24px; border-bottom: 1px solid rgba(93,232,242,0.12); text-align: center; }
.submodal-icon   { display: block; font-size: 48px; margin-bottom: 16px; }
.submodal-type   { font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 5px; color: var(--cyan); text-transform: uppercase; margin-bottom: 8px; }
.submodal-title  { font-family: 'Cinzel', serif; font-size: 26px; font-weight: 600; letter-spacing: 2px; color: var(--gold); }

.submodal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: none; border: 1px solid rgba(93,232,242,0.28);
  color: var(--cyan-dim); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}

.submodal-close:hover { background: var(--cyan); color: var(--bg); }

.submodal-body { padding: 36px 48px 48px; }
.submodal-desc { font-size: 17px; color: #fff; line-height: 1.95; margin-bottom: 28px; }
.submodal-steps { display: flex; flex-direction: column; gap: 16px; }

.submodal-step {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 20px;
  background: rgba(240,200,74,0.04); border: 1px solid rgba(240,200,74,0.1);
  border-radius: 10px;
}

.submodal-step.has-video         { transition: background 0.2s, transform 0.15s; }
.submodal-step.has-video:hover   { background: rgba(200,160,60,0.08); transform: translateX(4px); }

.step-num  { font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 2px; color: var(--gold-dim); min-width: 28px; padding-top: 2px; }
.step-text { font-size: 16px; color: #fff; line-height: 1.8; }
.step-text strong { color: #fff; }

.step-play-hint {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: #c8a03c; margin-left: 8px;
  opacity: 0.85; font-style: italic; white-space: nowrap; vertical-align: middle;
}

.step-play-hint::before {
  content: '\25B6'; font-size: 8px;
  background: rgba(200,160,60,0.15); border: 1px solid rgba(200,160,60,0.45);
  border-radius: 50%; width: 17px; height: 17px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════
   ACCORDÉON TECHNOLOGIE
════════════════════════════════════════════════════════ */

.tech-accordion {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 12px 3px 10px;
  background: rgba(93,232,242,0.08); border: 1px solid rgba(93,232,242,0.28);
  border-radius: 2px;
  font-family: 'Cinzel', serif; font-size: 0.95em; font-weight: 600; letter-spacing: 1px;
  color: var(--cyan); vertical-align: middle;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.tech-accordion:hover         { background: rgba(93,232,242,0.15); border-color: rgba(93,232,242,0.55); color: #a0f5fb; }
.tech-accordion.open          { background: rgba(93,232,242,0.12); border-color: var(--cyan); color: #fff; }
.tech-accordion .acc-arrow    { display: inline-block; font-size: 11px; opacity: 0.7; transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); }
.tech-accordion.open .acc-arrow { transform: rotate(90deg); opacity: 1; }

.tech-accordion-body      { max-height: 0; overflow: hidden; opacity: 0; margin-top: 0; transition: max-height 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.35s ease; }
.tech-accordion-body.open { max-height: 400px; opacity: 1; margin-top: 14px; }

.tech-accordion-inner {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 20px;
  background: rgba(93,232,242,0.05); border: 1px solid rgba(93,232,242,0.18);
  border-left: 3px solid rgba(93,232,242,0.45);
}

.tech-accordion-body ul          { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; }
.tech-accordion-body li          { position: relative; padding-left: 18px; font-size: 15px; color: #fff; line-height: 1.75; }
.tech-accordion-body li::before  { content: '›'; position: absolute; left: 0; top: 0; font-size: 14px; color: var(--cyan); font-weight: 900; }
.tech-accordion-body li strong   { color: #fff; }

/* ════════════════════════════════════════════════════════
   VIDEO MODAL
════════════════════════════════════════════════════════ */

.video-modal-overlay {
  display: none; position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 999999;
  background: rgba(0,0,0,0.9);
  align-items: center; justify-content: center;
  padding: 80px 20px 20px;
  box-sizing: border-box;
  touch-action: pan-y;
  overscroll-behavior: contain;
}

.video-modal-overlay.open { display: flex; }

.video-modal-wrap  { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 360px; width: 100%; }

.video-modal-inner {
  position: relative; width: 100%;
  background: #0d1117; border-radius: 18px;
  border: 1px solid rgba(200,160,60,0.5);
  overflow: hidden; box-shadow: 0 0 60px rgba(200,160,60,0.2);
  animation: videoModalIn 0.25s ease;
  touch-action: pan-y;
}

.video-modal-inner img,
.video-modal-inner canvas {
  display: block;
  width: 100% !important;
  max-height: 65vh !important;
  object-fit: contain !important;
  border-radius: 18px;
  min-height: 100px;
  touch-action: pan-y !important;
}

.video-modal-bar { display: flex; justify-content: center; width: 100%; }

@keyframes videoModalIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

.video-modal-img { display: block; width: 100%; border-radius: 18px; min-height: 100px; }
.video-modal-err { display: none; padding: 14px 16px; color: #f87171; font-size: 12px; word-break: break-all; background: #1a0808; border-top: 1px solid rgba(248,113,113,0.3); }
.video-modal-err span { color: #fca5a5; font-family: monospace; }

.video-modal-pov {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,0.85); border: 1px solid rgba(200,160,60,0.6);
  color: #c8a03c; font-size: 11px; font-weight: 700;
  padding: 5px 14px; border-radius: 20px; z-index: 999;
  letter-spacing: 1px; pointer-events: none;
}

.video-modal-close {
  position: absolute; top: 10px; right: 12px;
  background: rgba(30,30,30,0.95); color: #fff;
  border: 2px solid rgba(200,160,60,0.6); border-radius: 50%;
  width: 34px; height: 34px; font-size: 16px; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}

/* ════════════════════════════════════════════════════════
   SCROLLBAR
════════════════════════════════════════════════════════ */

::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); }

/* ════════════════════════════════════════════════════════
   PROJETS PERSONNELS
════════════════════════════════════════════════════════ */

.perso-teaser      { display: flex; align-items: center; gap: 24px; margin-top: 52px; margin-bottom: 0; }
.perso-teaser-line { flex: 1; height: 1px; background: linear-gradient(to right, transparent, rgba(93,232,242,0.3), transparent); }

.perso-teaser-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 32px;
  background: transparent; border: 1px solid rgba(93,232,242,0.3);
  font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--cyan); white-space: nowrap;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color 0.3s, border-color 0.3s;
}

.perso-teaser-btn::before     { content: ''; position: absolute; inset: 0; background: rgba(93,232,242,0.08); transform: scaleX(0); transition: transform 0.4s ease; z-index: -1; }
.perso-teaser-btn:hover::before { transform: scaleX(1); }
.perso-teaser-btn:hover       { border-color: rgba(93,232,242,0.7); }
.perso-teaser-icon            { font-size: 14px; opacity: 0.7; }
.perso-teaser-arrow           { display: inline-block; font-size: 16px; transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1); }
.perso-teaser-btn.open .perso-teaser-arrow { transform: rotate(180deg); }

.perso-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px;
  max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-16px);
  transition: max-height 0.6s cubic-bezier(0.16,1,0.3,1), opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
  margin-top: 0;
}

.perso-grid.open { max-height: 800px; opacity: 1; transform: translateY(0); margin-top: 32px; }
.perso-card .project-type { color: var(--cyan); }

.perso-card::after {
  content: 'PERSONNEL'; position: absolute; top: 12px; right: 12px;
  font-family: 'Cinzel', serif; font-size: 8px; letter-spacing: 3px;
  padding: 4px 10px; border: 1px solid rgba(93,232,242,0.4);
  color: var(--cyan); background: rgba(93,232,242,0.07); z-index: 2;
}

/* ════════════════════════════════════════════════════════
   LOGO ANIMATION (desktop)
════════════════════════════════════════════════════════ */

.project-visual img {
  animation: logoEntrance 4s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(93,232,242,0.6));
  transform-origin: center center;
}

@keyframes logoEntrance {
  0%   { transform: translateY(0px)   scale(1)    rotate(0deg);  filter: drop-shadow(0 0 10px rgba(93,232,242,0.5)); }
  25%  { transform: translateY(-12px) scale(1.06) rotate(-3deg); filter: drop-shadow(0 0 24px rgba(93,232,242,0.9)); }
  50%  { transform: translateY(-6px)  scale(1.03) rotate(0deg);  filter: drop-shadow(0 0 18px rgba(240,200,74,0.7)); }
  75%  { transform: translateY(-14px) scale(1.07) rotate(3deg);  filter: drop-shadow(0 0 28px rgba(93,232,242,1));   }
  100% { transform: translateY(0px)   scale(1)    rotate(0deg);  filter: drop-shadow(0 0 10px rgba(93,232,242,0.5)); }
}

.project-card:hover .project-visual img { animation: logoHover 0.6s ease forwards; filter: drop-shadow(0 0 32px rgba(240,200,74,1)); }

@keyframes logoHover {
  0%   { transform: scale(1)    rotate(0deg);  }
  40%  { transform: scale(1.18) rotate(-5deg); }
  70%  { transform: scale(1.14) rotate(3deg);  }
  100% { transform: scale(1.12) rotate(0deg);  }
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE MOBILE  (max-width: 768px)
════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── NAV ── */
  nav { padding: 10px 14px !important; flex-direction: column !important; align-items: center !important; gap: 6px !important; background: rgba(46,40,96,0.98) !important; }
  .nav-logo { font-size: 14px !important; letter-spacing: 3px !important; }
  .nav-links { display: flex !important; flex-wrap: wrap !important; gap: 4px 10px !important; justify-content: center !important; padding: 0 !important; margin: 0 !important; }
  .nav-links li a { font-size: 9px !important; letter-spacing: 1.5px !important; padding: 3px 6px !important; }

  /* ── HERO ── */
  #hero { padding-top: 100px !important; height: auto !important; min-height: 100svh !important; }
  .hero-grid { display: none !important; }
  .hero-name { font-size: clamp(32px,10vw,56px) !important; letter-spacing: 2px !important; }
  .hero-eyebrow { font-size: 9px !important; letter-spacing: 4px !important; margin-bottom: 16px !important; }
  .hero-subtitle { font-size: 11px !important; letter-spacing: 4px !important; margin-bottom: 32px !important; }
  .hero-cta { font-size: 10px !important; padding: 10px 20px !important; margin: 0 4px !important; letter-spacing: 2px !important; }

  /* ── SECTIONS ── */
  section, #about, #contact-section { padding: 40px 16px !important; }
  #timeline { padding: 40px 16px !important; }
  .section-header { gap: 14px !important; margin-bottom: 36px !important; }
  .section-title { font-size: clamp(18px,5.5vw,28px) !important; letter-spacing: 2px !important; }
  .section-number { font-size: 9px !important; }
  .arcane-divider { margin: 10px 0 !important; }

  /* ── ABOUT ── */
  #about { padding-top: 36px !important; padding-bottom: 36px !important; align-items: center !important; justify-content: center !important; }
  .about-section-header { margin-bottom: 24px !important; }
  .about-visual { max-width: 100% !important; width: 100% !important; display: flex !important; justify-content: center !important; align-items: center !important; }
  .flip-card { width: 75vw !important; aspect-ratio: 3/4 !important; max-width: 280px !important; height: auto !important; margin: 0 auto !important; }
  .flip-back { padding: 20px 16px !important; overflow-y: auto !important; justify-content: flex-start !important; gap: 10px !important; }
  .flip-front { padding: 16px !important; }
  .about-initials { font-size: 52px !important; }
  .back-text, .back-text-extra { font-size: 12px !important; line-height: 1.6 !important; }
  .back-skill-tag { font-size: 9px !important; padding: 4px 10px !important; }
  .back-stat-number { font-size: 17px !important; }
  .back-stat-label { font-size: 8px !important; }

  /* ── TIMELINE ── */
  .timeline-track { padding-left: 28px !important; }
  .timeline-item { padding-bottom: 32px !important; }
  .timeline-gem { left: -25px !important; }
  .timeline-year { font-size: 9px !important; letter-spacing: 2px !important; }
  .timeline-title { font-size: 15px !important; }
  .timeline-sub { font-size: 10px !important; }
  .timeline-desc { font-size: 13px !important; }

  /* ── SKILLS ── */
  .skills-grid { display: flex !important; flex-direction: column !important; gap: 2px !important; }
  .skill-card { padding: 16px !important; }
  .skill-icon-row { display: flex !important; flex-wrap: wrap !important; gap: 8px 12px !important; justify-content: center !important; margin-bottom: 10px !important; }
  .skill-icon-item { width: 40px !important; flex: 0 0 40px !important; }
  .skill-icon-item img { width: 24px !important; height: 24px !important; }
  .skill-icon-item span { font-size: 7px !important; max-width: 40px !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; display: block !important; text-align: center !important; }
  .skill-name { font-size: 11px !important; letter-spacing: 1.5px !important; margin-bottom: 10px !important; text-align: center !important; }
  .skill-items { justify-content: center !important; gap: 5px !important; }
  .skill-tag { font-size: 9px !important; padding: 3px 9px !important; }

  /* ── PROJECTS ── */
  .projects-grid, .perso-grid { grid-template-columns: 1fr !important; gap: 18px !important; }
  .project-card:hover { transform: none !important; }
  .project-visual { height: 160px !important; }
  .project-visual img { height: 90px !important; }
  .project-body { padding: 18px !important; }
  .project-title { font-size: 16px !important; }
  .project-type { font-size: 8px !important; letter-spacing: 2px !important; }
  .project-desc { font-size: 13px !important; margin-bottom: 14px !important; }
  .project-tag { font-size: 9px !important; padding: 3px 8px !important; }
  .project-btn { font-size: 10px !important; padding: 9px 18px !important; letter-spacing: 2px !important; margin-top: 14px !important; }

  /* ── PERSO TEASER ── */
  .perso-teaser { gap: 12px !important; margin-top: 32px !important; }
  .perso-teaser-btn { font-size: 9px !important; padding: 10px 18px !important; letter-spacing: 2px !important; }

  /* ── CONTACT ── */
  .contact-rune { font-size: 32px !important; margin-bottom: 16px !important; }
  .contact-title { font-size: clamp(22px,7vw,34px) !important; letter-spacing: 2px !important; margin-bottom: 16px !important; }
  .contact-text { font-size: 13px !important; margin-bottom: 28px !important; }
  .contact-links { flex-wrap: wrap !important; gap: 8px !important; max-width: 320px !important; margin: 0 auto !important; justify-content: center !important; }
  .contact-link { font-size: 10px !important; padding: 10px 0 !important; letter-spacing: 1.5px !important; flex: 0 0 calc(50% - 4px) !important; width: calc(50% - 4px) !important; justify-content: center !important; text-align: center !important; box-sizing: border-box !important; }

  /* ── MODALS ── */
  .modal { width: 96vw !important; max-height: 90svh !important; }
  .modal-header { padding: 28px 20px 20px !important; }
  .modal-body { padding: 24px 18px !important; }
  .modal-title { font-size: 20px !important; letter-spacing: 1px !important; }
  .modal-type { font-size: 9px !important; letter-spacing: 3px !important; }
  .modal-emoji { font-size: 48px !important; margin-bottom: 18px !important; }
  .modal-desc { font-size: 13px !important; margin-bottom: 20px !important; }
  .modal-feature-btn { padding: 10px 12px !important; }
  .feat-title { font-size: 11px !important; }
  .feat-preview { font-size: 11px !important; }
  .modal-tag { font-size: 10px !important; padding: 5px 12px !important; }
  .modal-features { max-width: 100% !important; }

  /* ── SOUS-MODALS ── */
  .submodal { width: 96vw !important; max-height: 88svh !important; }
  .submodal-header { padding: 24px 18px 16px !important; }
  .submodal-body { padding: 20px 16px 28px !important; }
  .submodal-icon { font-size: 36px !important; margin-bottom: 10px !important; }
  .submodal-title { font-size: 16px !important; }
  .submodal-desc { font-size: 13px !important; margin-bottom: 18px !important; }
  .submodal-step { padding: 12px 14px !important; gap: 10px !important; }
  .step-num { font-size: 10px !important; min-width: 22px !important; }
  .step-text { font-size: 12px !important; line-height: 1.6 !important; }
  .step-play-hint { font-size: 10px !important; }
  .tech-accordion { font-size: 0.85em !important; }

  /* ── VIDEO MODAL ── */
  .video-modal-overlay { padding: 60px 12px 16px !important; touch-action: pan-y !important; }
  .video-modal-wrap { max-width: 100% !important; }
  .video-modal-inner { touch-action: pan-y !important; }
  .video-modal-inner img, .video-modal-inner canvas { max-height: 55vh !important; touch-action: pan-y !important; }

  /* ── FOOTER ── */
  footer { padding: 24px 16px !important; }
  footer p { font-size: 9px !important; letter-spacing: 2px !important; }

  /* ── DÉSACTIVE ÉLÉMENTS LOURDS ── */
  .about-glow   { display: none !important; }
  .divider-gem  { animation: none !important; }
  .flip-hint    { animation: none !important; }

  /* ── LOGO : animation légère sans drop-shadow sur mobile ── */
  .project-visual img {
    animation: logoMobile 5s ease-in-out infinite !important;
    filter: none !important;
  }
}

/* ════════════════════════════════════════════════════════
   PAYSAGE MOBILE — séparé pour compatibilité maximale
   FIX CRASH : coupe toutes les animations au scroll en paysage
════════════════════════════════════════════════════════ */

@media (max-width: 768px) and (orientation: landscape) {
  /* Stopper toutes les animations — principale cause du crash en paysage */
  * {
    animation-duration:        0.01ms !important;
    animation-iteration-count: 1      !important;
    transition-duration:       0.01ms !important;
  }
  /* Le hero prend la hauteur dispo sans débordement */
  #hero { min-height: 100svh !important; }
  /* Logos projets : juste statiques en paysage */
  .project-visual img { animation: none !important; filter: none !important; }
}

/* ════════════════════════════════════════════════════════
   TRÈS PETIT ÉCRAN
════════════════════════════════════════════════════════ */

@media (max-width: 380px) {
  .hero-name    { font-size: 28px !important; }
  .modal-title  { font-size: 17px !important; }
  .nav-links li a { font-size: 8px !important; }
  .contact-link { font-size: 9px !important; padding: 9px 10px !important; }
}

/* ════════════════════════════════════════════════════════
   ANIMATION LOGO MOBILE — sans filter drop-shadow
════════════════════════════════════════════════════════ */

@keyframes logoMobile {
  0%   { transform: translateY(0px)  scale(1);    }
  40%  { transform: translateY(-8px) scale(1.04); }
  100% { transform: translateY(0px)  scale(1);    }
}

/* ════════════════════════════════════════════════════════
   SETTINGS — BOUTON NAV
════════════════════════════════════════════════════════ */

.settings-btn {
  background: none;
  border: 1px solid rgba(200,160,60,0.35);
  color: rgba(200,160,60,0.7);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.4s;
  flex-shrink: 0;
  margin-left: 8px;
  line-height: 1;
}

.settings-btn:hover {
  background: rgba(200,160,60,0.12);
  color: var(--gold);
  border-color: rgba(200,160,60,0.7);
  transform: rotate(60deg);
}

/* ════════════════════════════════════════════════════════
   SETTINGS — OVERLAY
════════════════════════════════════════════════════════ */

#settingsOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 4000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#settingsOverlay.sp-open {
  opacity: 1;
  pointer-events: all;
}

/* ════════════════════════════════════════════════════════
   SETTINGS — PANNEAU LATÉRAL
════════════════════════════════════════════════════════ */

#settingsPanel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 390px;
  max-width: 95vw;
  height: 100vh;
  background: linear-gradient(160deg, #0d0b18, #110e22, #0e0b1a);
  border-left: 1px solid rgba(200,160,60,0.22);
  z-index: 4001;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  transition: right 0.38s cubic-bezier(0.16,1,0.3,1);
  scrollbar-width: thin;
  scrollbar-color: rgba(200,160,60,0.3) transparent;
}

#settingsPanel::-webkit-scrollbar { width: 3px; }
#settingsPanel::-webkit-scrollbar-thumb { background: rgba(200,160,60,0.3); border-radius: 3px; }

#settingsPanel.sp-open {
  right: 0;
}

/* ── En-tête ── */
.sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(200,160,60,0.12);
  position: sticky;
  top: 0;
  background: linear-gradient(160deg, #0d0b18, #110e22);
  z-index: 2;
  flex-shrink: 0;
}

.sp-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--gold, #c8a03c);
  text-transform: uppercase;
}

.sp-close {
  background: none;
  border: 1px solid rgba(200,160,60,0.3);
  color: rgba(200,160,60,0.6);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.sp-close:hover {
  background: rgba(200,160,60,0.15);
  border-color: rgba(200,160,60,0.6);
  color: var(--gold);
}

/* ── Sections ── */
.sp-section {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}

.sp-section-label {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(200,160,60,0.45);
  margin-bottom: 12px;
  display: block;
}

/* ── Lignes ── */
.sp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.035);
}

.sp-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sp-row:first-of-type {
  padding-top: 0;
}

.sp-row-info span {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.82);
  margin-bottom: 2px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.sp-row-info small {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  line-height: 1.35;
}

/* ── Toggle switch ── */
.sp-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.sp-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.sp-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.25s;
  border: 1px solid rgba(255,255,255,0.08);
}

.sp-toggle-track::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), background 0.25s;
}

.sp-toggle input:checked + .sp-toggle-track {
  background: rgba(200,160,60,0.85);
  border-color: rgba(200,160,60,0.5);
}

.sp-toggle input:checked + .sp-toggle-track::before {
  transform: translateX(18px);
  background: #fff;
}

/* ── Select ── */
.sp-select {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(200,160,60,0.28);
  color: rgba(255,255,255,0.85);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.5px;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 110px;
  transition: border-color 0.2s;
}

.sp-select:hover {
  border-color: rgba(200,160,60,0.55);
}

.sp-select option {
  background: #110e22;
  color: #fff;
}

/* ── Boutons danger ── */
.sp-btn-danger {
  background: none;
  border: 1px solid rgba(220,50,50,0.28);
  color: rgba(220,50,50,0.65);
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.sp-btn-danger:hover {
  background: rgba(220,50,50,0.1);
  border-color: rgba(220,50,50,0.55);
  color: #f87171;
}

/* ── Toast de confirmation ── */
#spToast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(14,11,30,0.97);
  border: 1px solid rgba(200,160,60,0.45);
  color: var(--gold, #c8a03c);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 3px;
  padding: 10px 28px;
  border-radius: 24px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s, transform 0.22s;
  white-space: nowrap;
}

#spToast.sp-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Pied de page panneau ── */
.sp-footer {
  margin-top: auto;
  padding: 16px 24px 20px;
  font-family: 'Cinzel', serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.12);
  text-align: center;
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════
   SETTINGS — CLASSES ÉTAT APPLIQUÉES AU BODY
════════════════════════════════════════════════════════ */

/* Désactiver toutes les animations */
body.sp-no-anim *,
body.sp-no-anim *::before,
body.sp-no-anim *::after {
  animation: none !important;
  transition: none !important;
}

/* Désactiver les effets visuels lourds */
body.sp-no-fx .about-glow { display: none !important; }
body.sp-no-fx .hero-grid { opacity: 0.02 !important; }
body.sp-no-fx .project-visual img { animation: none !important; filter: none !important; }
body.sp-no-fx .skill-card:hover { transform: none !important; }
body.sp-no-fx .project-card:hover { transform: none !important; box-shadow: none !important; }
body.sp-no-fx .hero-cta::before { display: none !important; }
body.sp-no-fx .project-btn::before { display: none !important; }
body.sp-no-fx .contact-link::before { display: none !important; }
body.sp-no-fx .skill-card::before { display: none !important; }

/* Masquer la hero grid */
body.sp-no-grid .hero-grid { display: none !important; }

/* Masquer la barre de progression */
body.sp-no-prog #scrollProgress { display: none !important; }

/* Mode compact */
body.sp-compact section,
body.sp-compact #about,
body.sp-compact #timeline,
body.sp-compact #contact-section {
  padding-top: 50px !important;
  padding-bottom: 50px !important;
}

body.sp-compact .arcane-divider {
  padding: 8px 0 !important;
}

body.sp-compact .section-header {
  margin-bottom: 40px !important;
}

body.sp-compact .projects-grid {
  gap: 18px !important;
}

body.sp-compact .skills-grid {
  gap: 1px !important;
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE MOBILE — panneau settings
════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  #settingsPanel {
    width: 100vw;
    max-width: 100vw;
    right: -100vw;
  }
  #settingsPanel.sp-open {
    right: 0;
  }
  .sp-row-info span { font-size: 10px; }
  .sp-row-info small { font-size: 10px; }
}

 /* ═══ TOOLBAR BUTTONS ═══ */
  .nav-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-family: 'Cinzel', serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
  }

  .toolbar-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.04);
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .toolbar-btn:hover::before {
    opacity: 1;
  }

  .toolbar-btn:hover {
    border-color: rgba(255, 255, 255, 0.45);
    color: rgba(255, 255, 255, 0.95);
  }

  /* Active state — langue */
  .toolbar-btn.lang-btn .lang-fr,
  .toolbar-btn.lang-btn .lang-en { display: none; }
  html[lang="fr"] .toolbar-btn.lang-btn .lang-en { display: inline; }
  html[lang="en"] .toolbar-btn.lang-btn .lang-fr { display: inline; }

  /* Active state — animations */
  .toolbar-btn.anim-btn .anim-on,
  .toolbar-btn.anim-btn .anim-off { display: none; }
  html:not(.no-anim) .toolbar-btn.anim-btn .anim-off { display: inline; }
  html.no-anim .toolbar-btn.anim-btn .anim-on  { display: inline; }

  /* Indicateur lumineux animations */
  .anim-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px #4ade80;
    transition: background 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
  }
  html.no-anim .anim-dot {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: none;
  }

  /* Désactivation des animations */
  html.no-anim *,
  html.no-anim *::before,
  html.no-anim *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Tooltip au survol */
  .toolbar-btn[data-tip] {
    position: relative;
  }
  .toolbar-btn[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    font-size: 9px;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 2px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .toolbar-btn[data-tip]:hover::after {
    opacity: 1;
  }

  /* Responsive — masquer le texte sur petit écran */
  @media (max-width: 768px) {
    .toolbar-btn .btn-label { display: none; }
    .toolbar-btn { padding: 6px 10px; }
    .nav-toolbar { gap: 6px; }
  }

/* ═══════════════════════════════════════════════════════════════════
   AP PROJECT VISUALS — animations style Animal'and
   Coller à la fin de ton style.css
═══════════════════════════════════════════════════════════════════ */

/* ── Conteneur principal ── */
.ap-project-visual {
  position: relative;
  overflow: hidden;
  height: 200px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ap-dots,
.ap-glow,
.project-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Corners (mêmes que .about-frame-corner) ── */
.ap-fc {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 4;
  pointer-events: none;
}
.ap-fc::before,
.ap-fc::after {
  content: '';
  position: absolute;
  background: var(--ap-fc-color, #c8a96e);
}
.ap-fc::before { width: 100%; height: 1.5px; top: 0; left: 0; }
.ap-fc::after  { width: 1.5px; height: 100%; top: 0; left: 0; }
.ap-fc.tl { top: 8px; left: 8px; }
.ap-fc.tr { top: 8px; right: 8px; transform: scaleX(-1); }
.ap-fc.bl { bottom: 8px; left: 8px; transform: scaleY(-1); }
.ap-fc.br { bottom: 8px; right: 8px; transform: scale(-1); }

/* ── Runes décoratives ── */
.ap-rune {
  position: absolute;
  font-family: serif;
  font-size: 12px;
  color: rgba(200,169,110,0.13);
  z-index: 1;
  pointer-events: none;
  user-select: none;
}
.ap-rune.tl { top: 22px; left: 22px; }
.ap-rune.br { bottom: 22px; right: 22px; }

/* ── Particules ── */
.ap-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e8c97e;
  pointer-events: none;
  z-index: 3;
}

/* ── Glow radial derrière l'icône ── */
.ap-glow {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  animation: apGlowPulse 3s ease-in-out infinite;
}

/* ── Dot pattern visible au hover ── */
.ap-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    var(--ap-dot-color, rgba(200,169,110,0.15)) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s;
}
.ap-project-visual:hover .ap-dots { opacity: 1; }

/* ── SVG icon flottant ── */
.ap-icon-svg {
  position: relative;
  z-index: 2;
  animation: apIconFloat 4s ease-in-out infinite;
  transition: filter 0.3s;
}
.ap-project-visual:hover .ap-icon-svg {
  filter: drop-shadow(0 0 22px rgba(200,169,110,0.9)) !important;
}

/* ── Label sous l'icône ── */
.ap-icon-label {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 7.5px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  z-index: 2;
  pointer-events: none;
  animation: apIconFloat 4s ease-in-out infinite;
  animation-delay: 0.15s;
}

/* ══════════════════════
   KEYFRAMES
══════════════════════ */
@keyframes apIconFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

@keyframes apGlowPulse {
  0%, 100% { opacity: 0.45; transform: translate(-50%,-50%) scale(1); }
  50%       { opacity: 0.85; transform: translate(-50%,-50%) scale(1.18); }
}

@keyframes apP1 {
  0%   { transform: translate(0,0); opacity: 0; }
  15%  { opacity: 0.9; }
  80%  { opacity: 0.3; }
  100% { transform: translate(-30px,-54px); opacity: 0; }
}
@keyframes apP2 {
  0%   { transform: translate(0,0); opacity: 0; }
  15%  { opacity: 0.8; }
  80%  { opacity: 0.25; }
  100% { transform: translate(26px,-50px); opacity: 0; }
}
@keyframes apP3 {
  0%   { transform: translate(0,0); opacity: 0; }
  15%  { opacity: 0.7; }
  80%  { opacity: 0.2; }
  100% { transform: translate(-16px,-58px); opacity: 0; }
}
@keyframes apP4 {
  0%   { transform: translate(0,0); opacity: 0; }
  15%  { opacity: 0.65; }
  80%  { opacity: 0.2; }
  100% { transform: translate(34px,-46px); opacity: 0; }
}
@keyframes apP5 {
  0%   { transform: translate(0,0); opacity: 0; }
  15%  { opacity: 0.8; }
  80%  { opacity: 0.3; }
  100% { transform: translate(-24px,-40px); opacity: 0; }
}
@keyframes apP6 {
  0%   { transform: translate(0,0); opacity: 0; }
  15%  { opacity: 0.7; }
  80%  { opacity: 0.2; }
  100% { transform: translate(20px,-62px); opacity: 0; }
}

/* ── Désactiver les animations si l'utilisateur les coupe ── */
body.no-anim .ap-icon-svg,
body.no-anim .ap-icon-label,
body.no-anim .ap-glow,
body.no-anim .ap-particle {
  animation: none !important;
}

/* ── Fix card GSB Notes : pleine largeur (2 colonnes) ── */
#projet-ap .projects-grid .project-card.ap-full {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
}
#projet-ap .projects-grid .project-card.ap-full .ap-visuals-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
#projet-ap .projects-grid .project-card.ap-full .ap-project-visual {
  height: 220px;
  min-height: 180px;
  border-radius: 0;
}
#projet-ap .projects-grid .project-card.ap-full .ap-project-visual:first-child {
  border-radius: 12px 0 0 0;
}
#projet-ap .projects-grid .project-card.ap-full .ap-project-visual:last-child {
  border-radius: 0 12px 0 0;
}
#projet-ap .projects-grid .project-card.ap-full .ap-visual-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(180,140,255,0.4), transparent);
  align-self: stretch;
}
#projet-ap .projects-grid .project-card.ap-full .project-body {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 24px 28px;
  border-top: 1px solid rgba(180,140,255,0.2);
}
@media (max-width: 768px) {
  #projet-ap .projects-grid .project-card.ap-full {
    grid-column: auto;
    display: flex;
    flex-direction: column;
  }
  #projet-ap .projects-grid .project-card.ap-full .ap-visuals-row {
    grid-template-columns: 1fr;
  }
  #projet-ap .projects-grid .project-card.ap-full .ap-project-visual:first-child {
    border-radius: 12px 12px 0 0;
  }
  #projet-ap .projects-grid .project-card.ap-full .ap-project-visual:last-child {
    border-radius: 0;
  }
  #projet-ap .projects-grid .project-card.ap-full .project-body {
    grid-column: auto;
  }
}

/* ── MCD styles ── */
#mcd-cvs svg { position:absolute;top:0;left:0;pointer-events:none;z-index:0;overflow:visible; }
.mcd-tbl {
  position:absolute;
  border-radius:9px;
  overflow:hidden;
  border:1.5px solid transparent;
  z-index:2;
  background:var(--color-bg,#1a1a2e);
  cursor:grab;
  user-select:none;
  transition:box-shadow .18s, opacity .18s;
}
.mcd-tbl:active { cursor:grabbing; }
.mcd-tbl.mcd-dragging { box-shadow:0 8px 32px rgba(0,0,0,0.4); z-index:20; opacity:.92; }
.mcd-tbl.mcd-hi { box-shadow:0 4px 22px rgba(0,0,0,0.18);z-index:10; }
.mcd-tbl.mcd-dim { opacity:0.1; }
.mcd-head { padding:7px 12px;font-size:12px;font-weight:500;color:#fff;display:flex;align-items:center;gap:5px; cursor:grab; }
.mcd-row { display:flex;align-items:center;gap:5px;padding:4px 10px;font-size:11px;border-bottom:.5px solid rgba(255,255,255,0.07);color:#ccc; }
.mcd-row:last-child { border-bottom:none; }
.mcd-row.mcd-pk { color:#e8c97e;font-weight:500; }
.mcd-row.mcd-fk { color:#82b4ff; }
.mcd-cn { flex:1; }
.mcd-ct { color:#777;font-size:9.5px; }
.mcd-bdg { font-size:8.5px;padding:1px 4px;border-radius:3px;font-weight:600;margin-right:2px; }
.mcd-bpk { background:rgba(186,117,23,.2);color:#e8c97e; }
.mcd-bfk { background:rgba(130,180,255,.16);color:#82b4ff; }
.mcd-conn { fill:none;stroke-width:1.8;transition:stroke-opacity .15s,stroke-width .15s; }
.mcd-conn.mcd-hi { stroke-width:2.8;stroke-opacity:1!important; }
.mcd-conn.mcd-dim { stroke-opacity:.04!important; }
.mcd-fd { transition:opacity .15s; }
.mcd-fd.mcd-dim { opacity:.04!important; }
.mcd-litem { display:flex;align-items:center;gap:4px; }
.mcd-lsq { width:10px;height:10px;border-radius:2px; }
@keyframes mcd-flow { to { stroke-dashoffset:-18; } }
.mcd-fl { stroke-dasharray:6 4;animation:mcd-flow 1.2s linear infinite; }
.mcd-drag-hint {
  font-size:11px;
  color:rgba(180,140,255,0.6);
  text-align:center;
  padding:6px 0 2px;
  letter-spacing:.5px;
}

/* ════════════════════════════════════════════════════════
   ONGLETS MODAL — FONCTIONNALITÉS / VOIR LES CODES
   Ajouter à la fin de style.css
════════════════════════════════════════════════════════ */

.modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(240, 200, 74, 0.15);
  margin-bottom: 0;
  position: sticky;
  top: 0;
  background: linear-gradient(160deg, #342c68, #201840);
  z-index: 10;
  padding: 0 64px;
}

.modal-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
  margin-bottom: -1px;
}

.modal-tab-btn:hover { color: rgba(255,255,255,0.75); }
.modal-tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.modal-tab-btn .tab-icon { font-size: 14px; }

.modal-tab-panel { display: none; }
.modal-tab-panel.active { display: block; }

/* ═══ CARROUSEL DE CODE ═══ */
.code-carousel { padding: 40px 64px 52px; }

.code-carousel-header { text-align: center; margin-bottom: 36px; }
.code-carousel-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 5px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.code-carousel-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}

.code-slide { display: none; flex-direction: column; gap: 24px; }
.code-slide.active {
  display: flex;
  animation: slideCodeIn 0.35s ease;
}
@keyframes slideCodeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Window IDE */
.code-window {
  background: #0d1117;
  border: 1px solid rgba(93, 232, 242, 0.18);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 50px rgba(93,232,242,0.03);
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #161b22;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-window-dots { display: flex; gap: 6px; }
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-dot.red    { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green  { background: #28c840; }

.code-window-filename {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.4);
  margin-left: 8px;
  flex: 1;
}
.code-window-lang {
  font-family: monospace;
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(93,232,242,0.1);
  border: 1px solid rgba(93,232,242,0.2);
  color: var(--cyan);
  border-radius: 4px;
  letter-spacing: 1px;
}

.code-window-content {
  padding: 24px 28px;
  overflow-x: auto;
  max-height: 340px;
  overflow-y: auto;
}
.code-window-content::-webkit-scrollbar { width: 3px; height: 3px; }
.code-window-content::-webkit-scrollbar-thumb { background: rgba(93,232,242,0.3); border-radius: 3px; }

.code-block {
  font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
  font-size: 13.5px;
  line-height: 1.85;
  color: #e6edf3;
  white-space: pre;
}

.code-line { display: block; }
.code-line.hl {
  background: rgba(240, 200, 74, 0.09);
  border-left: 2px solid var(--gold-dim);
  margin-left: -28px;
  padding-left: 26px;
  margin-right: -28px;
  padding-right: 28px;
}

/* Tokens syntaxe */
.tk-kw   { color: #ff7b72; }
.tk-fn   { color: #d2a8ff; }
.tk-str  { color: #a5d6ff; }
.tk-num  { color: #79c0ff; }
.tk-cmt  { color: #8b949e; font-style: italic; }
.tk-cls  { color: #ffa657; }
.tk-var  { color: #e6edf3; }
.tk-op   { color: #ff7b72; }
.tk-prop { color: #79c0ff; }
.tk-tag  { color: #7ee787; }
.tk-attr { color: #ffa657; }
.tk-val  { color: #a5d6ff; }
.tk-ann  { color: #d2a8ff; }

/* Explication */
.code-explanation {
  background: rgba(240, 200, 74, 0.04);
  border: 1px solid rgba(240, 200, 74, 0.12);
  border-left: 3px solid var(--gold-dim);
  padding: 20px 24px;
  border-radius: 6px;
}
.code-explanation-title {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.code-explanation-title::before { content: '◆'; font-size: 8px; color: var(--gold-dim); }
.code-explanation-text { font-size: 15px; color: rgba(255,255,255,0.82); line-height: 1.85; }
.code-explanation-text strong { color: #fff; }
.code-explanation-text code {
  font-family: monospace;
  font-size: 13px;
  padding: 2px 7px;
  background: rgba(93,232,242,0.1);
  border: 1px solid rgba(93,232,242,0.2);
  color: var(--cyan);
  border-radius: 4px;
}

/* Navigation */
.code-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
}
.code-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid rgba(240,200,74,0.25);
  font-family: 'Cinzel', serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dim);
  cursor: pointer;
  transition: all 0.25s;
  border-radius: 2px;
}
.code-nav-btn:hover:not(:disabled) {
  background: rgba(240,200,74,0.08);
  border-color: var(--gold);
  color: var(--gold);
}
.code-nav-btn:disabled { opacity: 0.2; cursor: default; }

.code-carousel-counter {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.35);
  min-width: 60px;
  text-align: center;
}
.code-carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.code-carousel-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(240,200,74,0.2);
  border: 1px solid rgba(240,200,74,0.2);
  cursor: pointer;
  transition: all 0.25s;
}
.code-carousel-dot.active {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(240,200,74,0.7);
  transform: scale(1.3);
}

/* Responsive */
@media (max-width: 768px) {
  .modal-tabs { padding: 0 18px; overflow-x: auto; }
  .modal-tab-btn { padding: 12px 14px; font-size: 9px; letter-spacing: 1.5px; white-space: nowrap; }
  .code-carousel { padding: 20px 18px 32px; }
  .code-window-content { padding: 14px 12px; max-height: 220px; }
  .code-block { font-size: 11px; line-height: 1.7; }
  .code-explanation { padding: 14px 16px; }
  .code-explanation-text { font-size: 13px; }
  .code-nav-btn { padding: 8px 12px; font-size: 9px; }
}

.project-card.card-wide {
  grid-column: span 2;
  display: flex;
  flex-direction: row;
}
.project-card.card-wide .ap-project-visual {
  width: 50%;
  min-width: 260px;
  height: auto;
  min-height: 280px;
  flex-shrink: 0;
}
.project-card.card-wide .project-body {
  flex: 1;
}
.project-card.ap-full {
  flex-direction: column !important;
}
.project-card.ap-full .ap-project-visual {
  width: 100% !important;
  height: 220px !important;
}
@media (max-width: 768px) {
  .project-card.card-wide {
    grid-column: span 1;
    flex-direction: column;
  }
  .project-card.card-wide .ap-project-visual {
    width: 100%;
    height: 160px;
    min-height: unset;
  }
}
