/* ==========================================================================
   MODERN THEME - YACINE HARRACHE | BTS SIO SLAM 2ÈME ANNÉE
   Design System: Refonte Thème Lumineux (Blanc / Gris perle & Beige)
   Accents: Bleu Royal (#2563eb / #1d4ed8) & Bleu Nuit (#0f172a / #1e293b)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cabin:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Surfaces & Fonds (Thème Blanc / Gris perle / Légère nuance beige) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-card-alt: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.92);

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-card: #e2e8f0;
  --border-glow: rgba(37, 99, 235, 0.35);
  --border-focus: rgba(29, 78, 216, 0.5);

  /* Couleurs de la charte : Bleu Royal & Bleu Nuit */
  --accent-primary: #2563eb;
  /* Bleu Royal */
  --accent-royal: #1d4ed8;
  /* Bleu Royal Profond */
  --accent-navy: #0f172a;
  /* Bleu Nuit */
  --accent-navy-subtle: #1e293b;
  --accent-secondary: #3b82f6;
  /* Bleu Vif */
  --accent-tertiary: #1e40af;
  /* Bleu Nuit Marine */
  --accent-cyan: #0284c7;
  /* Cyber Cyan */
  --accent-emerald: #059669;
  /* Vert SLAM */
  --accent-amber: #d97706;
  /* Or / Trophée */

  /* Dégradés */
  --gradient-main: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  --gradient-royal: linear-gradient(135deg, #0f172a 0%, #1e40af 50%, #2563eb 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --gradient-glow: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(59, 130, 246, 0.12) 100%);
  --gradient-gold: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);

  /* Typographie */
  --text-primary: #0f172a;
  /* Bleu Nuit (Haute Lisibilité) */
  --text-secondary: #334155;
  /* Gris Ardoise */
  --text-muted: #64748b;
  /* Gris Atténué */
  --text-inverse: #ffffff;

  /* Ombres portées */
  --shadow-sm: 0 2px 5px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 16px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 25px -5px rgba(37, 99, 235, 0.25);
  --shadow-glow-royal: 0 10px 30px -5px rgba(37, 99, 235, 0.3);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font-display: 'Cabin', sans-serif;
  --font-sans: 'Cabin', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-family-sans-serif: 'Cabin', sans-serif;
  --font-family-monospace: 'IBM Plex Mono', monospace;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  font-family: inherit;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}

body, button, input, select, textarea, optgroup,
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
p, a, label, table, th, td, code, pre, kbd, samp, strong, b, em, span, div, li, ul, ol,
.btn, .nav-link, .badge, .form-control, .tooltip, .popover, .dropdown-menu, .modal, .card,
.tech_pill, .timeline_date, .timeline_alt_date, .stat-number, .metric-val, .badge-modern,
.counter, [class*="number"], [class*="badge"], [class*="stat"], [class*="pill"], [class*="metric"],
.section_title_modern, .hero_title, .navbar-brand, .timeline_title, .timeline_alt_title, .card-title {
  font-family: var(--font-sans);
}

/* Preserve icon fonts */
.fa, [class*="fa-"], [class^="fa-"] {
  font-family: 'FontAwesome' !important;
}

.lnr, [class*="lnr-"], [class^="lnr-"] {
  font-family: 'Linearicons-Free' !important;
}

/* Background ambient subtle royal blue glow */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  left: -150px;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  top: 35%;
  right: -200px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.05) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Override Bootstrap default navbar background */
.navbar {
  background: transparent !important;
}

.navbar-light {
  background-color: transparent !important;
}

.navbar-light .navbar-nav .nav-link {
  color: #334155 !important;
}

.skill_logos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 36px;
  margin-bottom: 14px;
}

.skill_logos img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.skill_logos img:hover {
  transform: translateY(-2px);
}

.skill_catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.skill_token {
  display: flex;
  min-width: 0;
  min-height: 82px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.skill_token img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.skill_token > i {
  color: var(--accent-primary);
  font-size: 26px;
  line-height: 34px;
}

.skill_token_text {
  justify-content: center;
}

.skill_token:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.bento_card[href]:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 3px;
}

.header_area .navbar.navbar-light {
  background: rgba(255, 255, 255, 0.9) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-primary);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

a:hover {
  color: var(--accent-royal);
  text-decoration: none;
}

/* ==========================================================================
   Modern Floating Pill Navbar
   ========================================================================== */
.header_area {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  background: transparent !important;
  transition: all 0.3s ease;
}

.header_area .container {
  max-width: 1200px;
}

.header_area .navbar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 60px;
  padding: 8px 24px;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 0 20px -5px rgba(37, 99, 235, 0.1);
  transition: all 0.3s ease;
}

.header_area .navbar:hover {
  border-color: rgba(37, 99, 235, 0.3);
}

.navbar-brand.logo_h img {
  height: 38px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-brand.logo_h:hover img {
  transform: scale(1.06);
}

.navbar-nav .nav-item {
  margin: 0 4px;
}

.navbar-nav .nav-link {
  font-family: var(--font-sans);
  color: #334155 !important;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px !important;
  border-radius: var(--radius-full);
  transition: all 0.25s ease;
}

.navbar-nav .nav-item:hover>.nav-link {
  color: var(--accent-primary) !important;
  background: rgba(37, 99, 235, 0.08);
}

.navbar-nav .nav-item.active>.nav-link {
  color: #ffffff !important;
  background: var(--gradient-main);
  box-shadow: 0 4px 15px -2px rgba(37, 99, 235, 0.4);
}

/* Modern Dropdown Menu */
.navbar-nav .dropdown-menu {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-md);
  padding: 8px;
  margin-top: 12px;
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.12), var(--shadow-glow);
  min-width: 200px;
}

.navbar-nav .dropdown-menu .nav-item {
  margin: 2px 0;
}

.navbar-nav .dropdown-menu .nav-link {
  color: #334155 !important;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 14px !important;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
}

.navbar-nav .dropdown-menu .nav-link:hover,
.navbar-nav .dropdown-menu .nav-item.active .nav-link {
  color: #1d4ed8 !important;
  background: rgba(37, 99, 235, 0.08);
  transform: translateX(4px);
}

/* Mobile Toggler */
.navbar-toggler {
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.navbar-toggler .icon-bar {
  background: var(--accent-navy) !important;
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  margin: 4px 0;
  transition: all 0.2s;
}

/* ==========================================================================
   Page Container & Content Area
   ========================================================================== */
.page_content_area {
  min-width: 0;
  padding-top: 120px;
  padding-bottom: 90px;
}

.page_content_area.pt-5 {
  padding-top: 110px !important;
}

/* Page Section Header */
.section_header {
  margin-bottom: 40px;
}

.section_badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-royal);
  border: 1px solid rgba(37, 99, 235, 0.2);
  margin-bottom: 14px;
}

.section_title_modern {
  font-size: 34px;
  font-weight: 800;
  color: var(--accent-navy);
  line-height: 1.25;
  margin-bottom: 12px;
}

.section_title_modern span {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section_desc_modern {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 720px;
  line-height: 1.7;
}

/* ==========================================================================
   Bento Cards & Surfaces
   ========================================================================== */
.bento_card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.bento_card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.25), transparent);
}

.bento_card:hover {
  transform: translateY(-5px);
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 16px 30px -10px rgba(15, 23, 42, 0.1), var(--shadow-glow);
}

/* ==========================================================================
   Images nettes & anti-flou (Fix: transform GPU subpixel blur)
   ========================================================================== */

/* Toutes les images : rendu net garanti */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Images dans les cartes projet : isolation du compositing parent */
.bento_card img,
.bento_card .img-fluid {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
  filter: none !important;
}

/* Photo de profil : rendu ultra-net */
.rounded-circle {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  image-rendering: -webkit-optimize-contrast;
}

.bento_card.card_featured {
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.bento_card.card_glow_purple:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 16px 30px -10px rgba(15, 23, 42, 0.1), var(--shadow-glow-royal);
}

/* ==========================================================================
   Badges, SLAM & SISR Tags, Tech Pills
   ========================================================================== */
.tech_pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  margin: 3px;
  transition: all 0.2s ease;
}

.tech_pill:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.3);
}

.tech_pill_accent {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.22);
}

/* SLAM (Développement) : Badge Vert */
.badge-slam {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857 !important;
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* SISR (Réseaux & Systèmes) : Badge Bleu */
.badge-sisr {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8 !important;
  border: 1px solid rgba(37, 99, 235, 0.35);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status_indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-emerald);
}

.status_dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse_dot 2s infinite;
}

@keyframes pulse_dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ==========================================================================
   Modern Buttons (Bleu Royal & Bleu Nuit)
   ========================================================================== */
.btn_modern_primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--gradient-main);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 28px;
  border-radius: var(--radius-full);
  border: none;
  box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn_modern_primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 28px -4px rgba(37, 99, 235, 0.55);
  color: #ffffff !important;
}

.btn_modern_secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  color: var(--accent-navy) !important;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
  transition: all 0.3s ease;
}

.btn_modern_secondary:hover {
  background: #f8fafc;
  border-color: var(--accent-primary);
  color: var(--accent-royal) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}

/* ==========================================================================
   Timeline Component
   ========================================================================== */
.modern_timeline {
  position: relative;
  padding-left: 28px;
}

.modern_timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-primary) 0%, rgba(37, 99, 235, 0.15) 100%);
}

.timeline_node {
  position: relative;
  margin-bottom: 26px;
}

.timeline_node::before {
  content: '';
  position: absolute;
  top: 4px;
  left: -28px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.timeline_date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-royal);
  margin-bottom: 3px;
}

.timeline_title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 5px;
}

/* ==========================================================================
   Alternating Full-Width Timeline Component
   ========================================================================== */
.timeline_alternating {
  position: relative;
  padding: 30px 0 20px 0;
  max-width: 1050px;
  margin: 0 auto;
}

/* Center vertical line */
.timeline_alternating::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-royal) 50%, rgba(37, 99, 235, 0.2) 100%);
  border-radius: var(--radius-full);
}

.timeline_alt_item {
  position: relative;
  width: 50%;
  padding: 16px 45px;
  box-sizing: border-box;
}

/* Left items */
.timeline_alt_item.left {
  left: 0;
  text-align: right;
}

/* Right items */
.timeline_alt_item.right {
  left: 50%;
  text-align: left;
}

/* Horizontal connector line from center line to card */
.timeline_alt_item::before {
  content: '';
  position: absolute;
  top: 36px;
  height: 2px;
  background: rgba(37, 99, 235, 0.25);
  z-index: 1;
}

.timeline_alt_item.left::before {
  right: 0;
  width: 45px;
}

.timeline_alt_item.right::before {
  left: 0;
  width: 45px;
}

/* Center round dot ○ */
.timeline_alt_item::after {
  content: '';
  position: absolute;
  top: 27px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), 0 4px 12px rgba(37, 99, 235, 0.35);
  z-index: 3;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline_alt_item.left::after {
  right: -10px;
}

.timeline_alt_item.right::after {
  left: -10px;
}

.timeline_alt_item:hover::after {
  transform: scale(1.3);
  background: var(--accent-primary);
  border-color: #ffffff;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.25), 0 6px 16px rgba(37, 99, 235, 0.5);
}

/* Content Box */
.timeline_alt_content {
  padding: 22px 24px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  width: 100%;
  max-width: 450px;
  text-align: left;
  position: relative;
  z-index: 2;
}

.timeline_alt_item.left .timeline_alt_content {
  margin-left: auto;
}

.timeline_alt_item.right .timeline_alt_content {
  margin-right: auto;
}

.timeline_alt_content:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -4px rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.35);
  border-left-color: var(--accent-royal);
}

.timeline_alt_date {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-royal);
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.timeline_alt_year {
  margin-left: auto;
}

.timeline_alt_title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-navy);
  margin-bottom: 6px;
}

.timeline_alt_desc {
  font-size: 13.5px;
  color: #64748b;
  margin: 0;
  line-height: 1.55;
}

/* Responsive for mobile and tablets (< 992px) */
@media (max-width: 991.98px) {
  .timeline_alternating::before {
    left: 20px;
  }

  .timeline_alt_item {
    width: 100%;
    padding-left: 60px;
    padding-right: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .timeline_alt_item.left,
  .timeline_alt_item.right {
    left: 0;
    text-align: left;
  }

  .timeline_alt_item.left::before,
  .timeline_alt_item.right::before {
    left: 20px;
    width: 40px;
  }

  .timeline_alt_item.left::after,
  .timeline_alt_item.right::after {
    left: 10px;
    right: auto;
  }

  .timeline_alt_item.left .timeline_alt_content,
  .timeline_alt_item.right .timeline_alt_content {
    margin-left: 0;
    max-width: 100%;
  }
}

/* ==========================================================================
   Project Filters & Grid
   ========================================================================== */
.portfolio_filter_modern {
  margin-bottom: 36px;
}

.portfolio_filter_modern ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  padding: 6px;
  margin: 0 auto 30px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  width: fit-content;
}

.portfolio_filter_modern ul li {
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: transparent;
  color: #475569;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}

.portfolio_filter_modern ul li:hover {
  color: var(--accent-navy);
  background: rgba(255, 255, 255, 0.8);
}

.portfolio_filter_modern ul li.active {
  background: var(--gradient-main);
  color: #ffffff;
  box-shadow: 0 4px 15px -2px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   Modern CV Document Showcase
   ========================================================================== */
.cv_frame_container {
  background: #ffffff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 15px 35px -5px rgba(15, 23, 42, 0.08), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.cv_toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

.cv_preview_img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.3s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  image-rendering: -webkit-optimize-contrast;
}

/* ==========================================================================
   Modern Footer
   ========================================================================== */
.footer_modern {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 60px 0 30px;
  position: relative;
}

.footer_modern .footer_logo img {
  height: 40px;
  width: auto;
  margin-bottom: 16px;
}

.footer_social_links {
  display: flex;
  gap: 10px;
}

.footer_social_btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  font-size: 15px;
  transition: all 0.3s ease;
}

.footer_social_btn:hover {
  background: var(--gradient-main);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.footer_copyright {
  border-top: 1px solid #e2e8f0;
  padding-top: 25px;
  margin-top: 40px;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Contact Page Inputs
   ========================================================================== */
.contact_label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-navy);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.contact_input_wrap {
  position: relative;
}

.contact_input_wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 14px;
  pointer-events: none;
}

textarea.contact_input~i {
  display: none;
}

.contact_input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px 12px 40px;
  color: #0f172a;
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: all 0.25s ease;
}

textarea.contact_input {
  padding: 14px 16px;
  border-radius: 12px;
}

.contact_input::placeholder {
  color: #94a3b8;
}

.contact_input:focus {
  border-color: var(--accent-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.contact_input option {
  background: #ffffff;
  color: #0f172a;
}

/* ==========================================================================
   Theme toggle button
   ========================================================================== */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.theme-toggle-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
  color: #1d4ed8;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991px) {
  .header_area .navbar {
    border-radius: 16px;
    padding: 12px 18px;
  }

  .navbar-nav {
    padding: 15px 0 5px;
  }

  .navbar-nav .nav-item {
    margin: 4px 0;
  }

  .section_title_modern {
    font-size: 26px;
  }
}

/* ==========================================================================
   Lenis Smooth Inertia Scroll Styles
   ========================================================================== */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* ==========================================================================
   Custom Interactive Studio Cursor (Dot + Trailing Ring)
   ========================================================================== */
@media (min-width: 992px) {
  html[data-cursor-mode="custom"],
  html[data-cursor-mode="custom"] body,
  html[data-cursor-mode="custom"] *,
  html[data-cursor-mode="custom"] *::before,
  html[data-cursor-mode="custom"] *::after,
  html[data-cursor-mode="custom"] *:hover,
  html[data-cursor-mode="custom"] *:active,
  html[data-cursor-mode="custom"] *:focus,
  html[data-cursor-mode="custom"] *:focus-within,
  html[data-cursor-mode="custom"] a,
  html[data-cursor-mode="custom"] a:hover,
  html[data-cursor-mode="custom"] a:active,
  html[data-cursor-mode="custom"] a:focus,
  html[data-cursor-mode="custom"] button,
  html[data-cursor-mode="custom"] button:hover,
  html[data-cursor-mode="custom"] button:active,
  html[data-cursor-mode="custom"] button:focus,
  html[data-cursor-mode="custom"] input,
  html[data-cursor-mode="custom"] select,
  html[data-cursor-mode="custom"] textarea,
  html[data-cursor-mode="custom"] label,
  html[data-cursor-mode="custom"] .nav-link,
  html[data-cursor-mode="custom"] .dropdown-item,
  html[data-cursor-mode="custom"] .dropdown-menu,
  html[data-cursor-mode="custom"] .cursor_toggle_btn {
    cursor: none !important;
  }
}

.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999999;
  opacity: 0;
  /* NO transform here — JS handles positioning + centering */
  transition: width 0.18s cubic-bezier(0.25, 1, 0.5, 1),
    height 0.18s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.7);
  will-change: transform;
}

.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(37, 99, 235, 0.6);
  background-color: transparent;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999998;
  opacity: 0;
  /* NO transform here — JS handles positioning + centering */
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s ease,
    background-color 0.2s ease,
    opacity 0.2s ease;
  will-change: transform;
}

/* Custom Cursor States — hover/active only touch width/height/color, NOT transform */
.custom-cursor-ring.cursor-hover {
  width: 54px;
  height: 54px;
  border-color: rgba(37, 99, 235, 0.8);
  background-color: rgba(37, 99, 235, 0.06);
}

.custom-cursor-dot.cursor-hover {
  width: 11px;
  height: 11px;
  background-color: var(--accent-royal);
  box-shadow: 0 0 14px rgba(29, 78, 216, 0.9);
}

.custom-cursor-ring.cursor-active {
  width: 22px;
  height: 22px;
  background-color: rgba(37, 99, 235, 0.18);
  border-color: var(--accent-royal);
}

.custom-cursor-dot.cursor-active {
  width: 5px;
  height: 5px;
}

/* Hidden on mobile/touch screens (< 992px) */
@media (max-width: 991.98px) {
  .custom-cursor-dot,
  .custom-cursor-ring {
    display: none !important;
  }
}

html[data-cursor-mode="system"] .custom-cursor-dot,
html[data-cursor-mode="system"] .custom-cursor-ring {
  display: none !important;
}

/* ==========================================================================
   Cursor Toggle Switch in Navigation
   ========================================================================== */
.cursor_toggle_btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-navy);
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  user-select: none;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.cursor_toggle_btn:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: var(--accent-primary);
  color: var(--accent-royal);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.cursor_toggle_btn:active {
  transform: translateY(0);
}

.cursor_toggle_indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.cursor_toggle_indicator .indicator_dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.6);
  transition: all 0.25s ease;
}

.cursor_toggle_indicator .indicator_ring {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #059669;
  opacity: 0.5;
  animation: cursorPulse 2s infinite ease-in-out;
}

@keyframes cursorPulse {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.1;
  }

  100% {
    transform: scale(0.8);
    opacity: 0.8;
  }
}

.cursor_toggle_btn.mode-system {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.cursor_toggle_btn.mode-system .cursor_toggle_indicator .indicator_dot {
  background: #94a3b8;
  box-shadow: none;
}

/* ==========================================================================
   Scroll Reveal — éléments invisibles au départ, révélés au scroll
   ========================================================================== */

/* État initial : caché, décalé vers le bas */
[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

/* État révélé */
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Délais de stagger pour les groupes d'éléments */
[data-reveal][data-delay="1"] {
  transition-delay: 0.08s;
}

[data-reveal][data-delay="2"] {
  transition-delay: 0.16s;
}

[data-reveal][data-delay="3"] {
  transition-delay: 0.24s;
}

[data-reveal][data-delay="4"] {
  transition-delay: 0.32s;
}

[data-reveal][data-delay="5"] {
  transition-delay: 0.40s;
}

[data-reveal][data-delay="6"] {
  transition-delay: 0.48s;
}

/* Variante : apparition depuis la gauche */
[data-reveal="left"] {
  opacity: 0;
  transform: translateX(-30px);
}

[data-reveal="left"].revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Variante : apparition depuis la droite */
[data-reveal="right"] {
  opacity: 0;
  transform: translateX(30px);
}

[data-reveal="right"].revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Variante : simple fade */
[data-reveal="fade"] {
  opacity: 0;
  transform: none;
}

[data-reveal="fade"].revealed {
  opacity: 1;
}

.cursor_toggle_btn.mode-system .cursor_toggle_indicator .indicator_ring {
  display: none;
}

/* ==========================================================================
   Responsive — index.html & portfolio.html
   ========================================================================== */

/* ---- Tablette & Desktop intermédiaire (< 992px) ---- */
@media (max-width: 991.98px) {

  /* Hero section: texte centré sur mobile */
  .page_content_area .row.align-items-center:first-child .col-lg-7 {
    text-align: center;
  }

  .page_content_area .row.align-items-center:first-child .col-lg-7 .d-flex.flex-wrap {
    justify-content: center;
  }

  .page_content_area .row.align-items-center:first-child .col-lg-7 .d-flex.flex-wrap.mt-4 {
    justify-content: center;
  }

  /* Photo profil hero : légèrement réduite */
  .page_content_area .row.align-items-center:first-child .col-lg-5 img.rounded-circle {
    width: 180px !important;
    height: 180px !important;
  }

  /* Titre hero : taille réduite */
  .section_title_modern[style*="42px"] {
    font-size: 32px !important;
  }

  /* Portfolio.html : CV en haut, parcours en dessous */
  .col-lg-8.order-1.order-lg-1,
  .col-lg-4.order-2.order-lg-2 {
    width: 100%;
  }

  /* Footer responsive tablette */
  .footer_modern {
    padding: 40px 0 20px;
  }

  .footer_copyright {
    text-align: center;
    font-size: 12.5px;
  }

  .footer_social_links {
    justify-content: center;
    margin-top: 10px;
  }
}

/* ---- Mobile (< 768px) ---- */
@media (max-width: 767.98px) {

  /* Padding top du main réduit */
  .page_content_area {
    padding-top: 100px !important;
  }

  .portfolio_filter_modern ul {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
  }

  .portfolio_filter_modern ul li {
    flex: 1 1 100%;
    min-width: 0;
    text-align: left;
  }

  /* Hero : taille titre encore réduite */
  .section_title_modern[style*="42px"] {
    font-size: 26px !important;
    line-height: 1.3 !important;
  }

  /* Hero : sous-titre */
  h2[style*="20px"] {
    font-size: 16px !important;
  }

  /* Hero : boutons pleine largeur sur très petit écran */
  .page_content_area .d-flex.flex-wrap[style*="gap: 14px"] {
    flex-direction: column;
    align-items: stretch;
  }

  .page_content_area .d-flex.flex-wrap[style*="gap: 14px"] a {
    text-align: center;
    justify-content: center;
  }

  /* Key metrics: scroll horizontal si nécessaire */
  .d-flex.flex-wrap.mt-4.pt-3.border-top {
    gap: 12px !important;
  }

  /* Grille compétences : 2 colonnes sur mobile */
  .col-lg-3.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Cartes projets pleine largeur sur mobile */
  .col-lg-4.col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Section stage : empilé */
  .col-lg-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Photo profil sur mobile */
  .page_content_area .row.align-items-center:first-child .col-lg-5 img.rounded-circle {
    width: 150px !important;
    height: 150px !important;
  }

  /* Bento card padding réduit */
  .bento_card {
    padding: 18px !important;
  }

  /* CV preview pleine largeur */
  .cv_frame_container {
    padding: 12px !important;
  }

  .cv_preview_img {
    border-radius: 6px !important;
  }

  /* Footer centré sur mobile */
  .footer_modern {
    text-align: center;
    padding: 30px 0 15px;
  }

  .footer_modern .footer_logo {
    display: flex;
    justify-content: center;
  }

  .footer_modern .footer_logo img {
    margin-bottom: 8px;
  }

  .footer_copyright {
    font-size: 11.5px;
    margin-top: 20px;
    padding-top: 15px;
  }
}

/* ---- Très petit mobile (< 480px) ---- */
@media (max-width: 479.98px) {

  /* Grille compétences : 1 colonne */
  .col-lg-3.col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Section header responsive */
  .col-12.d-flex.justify-content-between.align-items-center.mb-4.flex-wrap {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }

  /* Métriques hero : wrap plus compact */
  .d-flex.flex-wrap.mt-4.pt-3.border-top > div {
    min-width: 60px;
  }

  /* Footer responsive tablette */
  .footer_modern {
    padding: 40px 0 20px;
  }

  .footer_modern .footer_logo img {
    margin-bottom: 10px;
  }

  .footer_copyright {
    margin-top: 25px;
    padding-top: 20px;
    font-size: 12px;
    text-align: center;
  }

  /* Footer social links centré */
  .footer_social_links {
    justify-content: center;
  }
}