/* ===== Portfolio Jules Chandonnay — feuille de style commune ===== */

:root {
  --bg: #ffffff;
  --bg-secondary: #f8f9fa;
  --text: #1a1a1a;
  --text-muted: #666666;
  --text-light: #999999;
  --accent: #3b82f6;
  --accent-dark: #1e40af;
  --accent-light: #dbeafe;
  --border: #e5e7eb;
  --radius-sm: 6px;
  --radius: 12px;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="dark"] {
  --bg: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --text: #f5f5f5;
  --text-muted: #b0b0b0;
  --text-light: #808080;
  --accent: #60a5fa;
  --accent-dark: #93c5fd;
  --accent-light: rgba(96, 165, 250, 0.1);
  --border: #2d2d2d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

/* Les ancres ne passent plus sous le header fixe */
section[id] {
  scroll-margin-top: 70px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  overflow-x: hidden;
}

/* ===== FOND ANIMÉ ===== */
body::before {
  content: '';
  position: fixed;
  inset: -60px; /* déborde pour que la translation ne laisse pas de bande vide */
  background: linear-gradient(135deg, 
    var(--accent) 0%, 
    rgba(59, 130, 246, 0.1) 25%, 
    rgba(0, 0, 0, 0.05) 50%, 
    var(--accent-light) 75%, 
    var(--bg) 100%);
  animation: gradientShift 15s ease-in-out infinite;
  z-index: -2;
  pointer-events: none;
}

@keyframes gradientShift {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate(50px, 50px) scale(1.05);
    opacity: 0.6;
  }
}

/* Formes flottantes de fond */
body::after {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
  animation: floatBackground 30s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes floatBackground {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(30px, -30px); }
  50% { transform: translate(-30px, 30px); }
  75% { transform: translate(30px, 30px); }
}

/* ===== ANIMATIONS AU SCROLL ===== */
/* (uniquement si JS actif : sinon le contenu resterait invisible) */
.js .fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.js .fade-in {
  opacity: 0;
  transition: opacity 0.8s ease 0.2s;
}

.js .fade-in.visible {
  opacity: 1;
}

/* ===== HEADER / NAV ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 70px;
  transition: all 0.3s ease;
}

[data-theme="dark"] header {
  background: rgba(15, 15, 15, 0.95);
}

.nav-wrap {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  cursor: pointer;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

nav a:hover {
  color: var(--accent);
}

nav a.active {
  color: var(--accent);
  font-weight: 600;
}

/* Toggle Dark Mode */
.theme-toggle {
  width: 50px;
  height: 26px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  padding: 2px;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 3px;
  transition: all 0.3s ease;
}

.theme-toggle.dark .theme-toggle-circle {
  left: 27px;
}

/* Bouton menu mobile (caché sur grand écran) */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== MAIN CONTENT ===== */
main {
  padding-top: 70px;
  position: relative;
  z-index: 1;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-child {
  border-bottom: none;
}

/* ===== HERO ===== */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  padding: 6rem 0 4rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 1.2rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero p.lede {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 65ch;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.badges {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.badge:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.25);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
  transform: translateY(-2px);
}

/* ===== SECTION HEADINGS ===== */
.section-head {
  margin-bottom: 3rem;
}

.section-kicker {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 60ch;
}

/* ===== SKILL CARDS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: left 0.5s ease;
}

.skill-card:hover::before {
  left: 100%;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.1);
}

.skill-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--text);
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.skill-card p {
  color: var(--text-muted);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.85rem;
  top: 0.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
  transition: all 0.3s ease;
}

.timeline-item:hover::before {
  transform: scale(1.3);
  box-shadow: 0 0 15px var(--accent);
}

.tag-date {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
  display: inline-block;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-item h3 {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-weight: 700;
}

.timeline-item p {
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 65ch;
}

/* ===== PROJECT CARDS ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.1);
}

.project-status {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-card h3 {
  margin-bottom: 0.8rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
}

.project-card p {
  color: var(--text-muted);
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: var(--bg);
  font-weight: 500;
  transition: all 0.3s ease;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.project-link {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.project-link:hover {
  color: var(--accent-dark);
  gap: 0.8rem;
}

/* ===== COMPÉTENCES (cartes par catégorie) ===== */
.level-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: -1.5rem 0 2rem;
}

.skills-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 720px) {
  .skills-board { grid-template-columns: 1fr; }
}

.skill-group {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.skill-group:hover {
  border-color: var(--accent);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.1);
}

.skill-group h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  color: var(--text);
}

.skill-group ul {
  list-style: none;
}

.skill-group li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
}

.level {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid var(--accent);
  flex-shrink: 0;
}

.level-3 { background: var(--accent); color: #fff; }
.level-2 { background: var(--accent-light); color: var(--accent); }
.level-1 { background: transparent; color: var(--text-muted); border-color: var(--border); }
[data-theme="dark"] .level-3 { color: #0f0f0f; }

/* ===== ENTREPRISE ===== */
.key-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.key-figure {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
}

.key-figure strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.key-figure span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.company-wide {
  grid-column: 1 / -1;
}

.company-list {
  list-style: none;
  position: relative;
  z-index: 1;
}

.company-list li {
  color: var(--text-muted);
  padding: 0.35rem 0 0.35rem 1.2rem;
  position: relative;
  line-height: 1.6;
}

.company-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.company-list strong {
  color: var(--text);
}

.company-list.two-cols {
  columns: 2 280px;
  column-gap: 2rem;
}

.company-list.two-cols li {
  break-inside: avoid;
}

/* ===== PROJETS : procédures ===== */
.project-status.status-progress {
  color: #d97706;
}

.project-docs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  width: fit-content;
  transition: all 0.3s ease;
}

.doc-link:hover {
  background: var(--accent);
  color: #fff;
}

.btn.doc-missing {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border);
  cursor: default;
  transform: none;
  box-shadow: none;
}

.doc-link.doc-missing {
  color: var(--text-light);
  border-color: var(--border);
  background: transparent;
  cursor: default;
}

/* ===== TABLEAU DE SYNTHÈSE E4 ===== */
.synthese-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.synthese-info {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.synthese-info h3 {
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 700;
}

.synthese-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.synthese-actions {
  display: flex;
  gap: 0.8rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.pdf-preview {
  width: 100%;
  height: min(80vh, 800px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 1.4rem;
  background: #fff;
}

/* ===== VEILLE ===== */
.veille-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.8rem;
}

.veille-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.veille-filter {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.veille-filter:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.veille-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.veille-status {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.veille-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

.watch-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  animation: fadeInArticle 0.5s ease-out;
}

@keyframes fadeInArticle {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.watch-card:hover,
.watch-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
  transform: translateY(-3px);
}

.watch-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-light);
  margin-bottom: 0.7rem;
}

.watch-source {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.watch-cat {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.watch-card h4 {
  font-size: 1rem;
  line-height: 1.45;
  margin-bottom: 0.6rem;
  color: var(--text);
  font-weight: 700;
}

.watch-excerpt {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
  flex-grow: 1;
}

.watch-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  margin-top: auto;
}

.watch-card.skeleton {
  min-height: 190px;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}

@keyframes skeleton {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.veille-error {
  grid-column: 1 / -1;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text-muted);
}

.veille-error ul {
  margin-top: 0.8rem;
  padding-left: 1.2rem;
}

.veille-error a {
  color: var(--accent);
  font-weight: 600;
}

.refresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
  display: inline-block;
}

.refresh-dot.off {
  background: #f59e0b;
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ===== CONTACT ===== */
.contact-section {
  padding: 6rem 0 !important;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(0, 400px);
  gap: 2rem;
  align-items: start;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.contact-form {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  max-width: 600px;
}

.contact-form label {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 700;
  display: block;
  margin-bottom: 0.6rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text);
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-info {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 400px;
}

.contact-info h3 {
  margin-bottom: 1.2rem;
  color: var(--text);
  font-weight: 700;
}

.contact-info ul {
  list-style: none;
}

.contact-info li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-info li:last-child {
  border-bottom: none;
}

.contact-info a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--accent-dark);
}

.form-message {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.form-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  display: block;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  display: block;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

footer h3 {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

footer ul {
  list-style: none;
}

footer li {
  margin-bottom: 0.7rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--accent);
}

.copyright {
  text-align: center;
  color: var(--text-light);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

[data-theme="dark"] .form-message.success {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.4);
}

[data-theme="dark"] .form-message.error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.4);
}

/* ===== MENTIONS LÉGALES ===== */
.legal-dialog {
  max-width: 600px;
  width: calc(100% - 32px);
  margin: auto;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  line-height: 1.7;
}
.legal-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
.legal-dialog h2 { color: var(--text); margin-bottom: 1rem; font-size: 1.4rem; }
.legal-dialog p { margin-bottom: 0.9rem; font-size: 0.95rem; }
.legal-dialog strong { color: var(--text); }
.legal-dialog a { color: var(--accent); }
.legal-dialog form { margin-top: 1.2rem; }

/* ===== RESPONSIVE ===== */
/* Menu burger : les 8 liens ne tiennent plus sur une ligne en dessous de ~1080px */
@media (max-width: 1080px) {
  .menu-toggle {
    display: inline-flex;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: none;
  }

  nav.open {
    display: block;
  }

  nav ul {
    flex-direction: column;
    gap: 0;
    width: 90%;
    margin: auto;
    padding: 0.5rem 0;
  }

  nav a {
    display: block;
    padding: 0.8rem 0;
    font-size: 1rem;
  }
}

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

  .hero {
    padding: 4rem 0 3rem;
  }

  section {
    padding: 4rem 0;
  }

  .skills-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  header {
    height: 60px;
  }

  main {
    padding-top: 60px;
  }

  .nav-wrap {
    width: 95%;
  }

  section[id] {
    scroll-margin-top: 60px;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .container {
    width: 95%;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .timeline {
    padding-left: 1.8rem;
  }

  .timeline-item::before {
    left: -2.25rem;
    width: 12px;
    height: 12px;
  }

  .header-controls {
    gap: 0.8rem;
  }
}

/* Respecte le réglage "réduire les animations" du système */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .fade-in, .js .fade-in-up { opacity: 1; transform: none; }
}

/* =====================================================================
   AJOUTS — mise en conformité grille E4
   ===================================================================== */

/* ----- Placeholders [À COMPLÉTER] : bien visibles ----- */
mark.todo {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border: 1px dashed rgba(217, 119, 6, 0.6);
  border-radius: 4px;
  padding: 0 0.3em;
  font-weight: 600;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

[data-theme="dark"] mark.todo {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.5);
}

/* ----- Navigation : 9 liens ----- */
nav ul {
  gap: 1.4rem;
}

nav a {
  font-size: 0.9rem;
}

.section-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.timeline-item a,
.skill-card a,
.fiche a:not(.doc-link):not(.tag) {
  color: var(--accent);
  font-weight: 600;
}

/* ----- Stages dans la frise ----- */
.timeline-sub {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-light) !important;
  margin-bottom: 0.6rem;
}

.timeline-list {
  color: var(--text-muted);
  line-height: 1.7;
  padding-left: 1.2rem;
  max-width: 65ch;
}

.timeline-list ul {
  padding-left: 1.2rem;
  list-style: circle;
}

/* ----- Filtres (projets) ----- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.filter-chip {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

[data-theme="dark"] .filter-chip.active,
[data-theme="dark"] .veille-filter.active {
  color: #0f0f0f;
}

/* ----- Cartes projets ----- */
.project-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.project-card-head .project-status {
  margin-bottom: 0;
}

.cadre-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg);
}

.cadre-formation  { border-color: rgba(59, 130, 246, 0.5); color: var(--accent); }
.cadre-alternance { border-color: rgba(16, 185, 129, 0.5); color: #059669; }
.cadre-personnel  { border-color: rgba(168, 85, 247, 0.5); color: #9333ea; }
[data-theme="dark"] .cadre-alternance { color: #34d399; }
[data-theme="dark"] .cadre-personnel  { color: #c084fc; }

.project-title-link {
  color: var(--text);
  text-decoration: none;
}

.project-title-link:hover {
  color: var(--accent);
}

.project-docs {
  flex-direction: row;
  flex-wrap: wrap;
}

.doc-link.doc-primary {
  background: var(--accent);
  color: #fff;
}

[data-theme="dark"] .doc-link.doc-primary {
  color: #0f0f0f;
}

.doc-link.doc-primary:hover {
  background: var(--accent-dark);
}

.empty-note {
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* ----- Compétences : niveau + preuves ----- */
.level-legend {
  margin: -1.5rem 0 2rem;
}

.skill-group li {
  display: block;
}

.skill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.level-todo {
  background: transparent;
  border: 1px dashed rgba(217, 119, 6, 0.6);
  color: #b45309;
  white-space: normal;
}

.level-todo mark.todo {
  border: none;
  background: none;
  padding: 0;
}

.skill-proofs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 400;
}

.proof-label {
  color: var(--text-light);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.proof-link {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}

.proof-link:hover {
  border-bottom-style: solid;
}

/* ----- Cadre de l'alternance / listes d'infos ----- */
.info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 2rem;
  position: relative;
  z-index: 1;
}

.info-list dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.info-list dd {
  color: var(--text-muted);
}

/* ----- Certifications ----- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.cert-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.cert-card:hover {
  border-color: var(--accent);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.1);
  transform: translateY(-3px);
}

.cert-org {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cert-card h3 {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 700;
}

.cert-meta {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  flex-grow: 1;
  align-content: start;
}

.cert-meta div {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cert-meta dt {
  color: var(--text-light);
  min-width: 52px;
}

.cert-meta dd {
  color: var(--text-muted);
}

/* ----- Veille : blocs ----- */
.veille-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}

.veille-step {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.veille-block h3 {
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.veille-block > p {
  color: var(--text-muted);
}

.veille-dispositif {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.veille-dispositif h4 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.veille-dispositif p,
.veille-dispositif li {
  color: var(--text-muted);
}

.veille-dispositif a {
  color: var(--accent);
  font-weight: 600;
}

.veille-articles {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.veille-article {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.3rem 1.5rem;
}

.veille-article time {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-light);
}

.veille-article h4 {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0.3rem 0 0.5rem;
}

.veille-article p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.veille-article strong {
  color: var(--text);
}

.veille-article-source {
  font-size: 0.85rem !important;
}

.veille-rss {
  background: transparent;
  border-style: dashed;
}

.veille-rss-intro {
  margin-bottom: 1.2rem;
}

/* ----- Fiche projet ----- */
.fiche-page main {
  min-height: 70vh;
}

.fiche-section {
  padding: 3rem 0 5rem;
  border-bottom: none;
}

.fiche-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.back-link {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.fiche-head {
  margin-bottom: 2rem;
}

.fiche-head .project-card-head {
  justify-content: flex-start;
}

.fiche-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.fiche-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.fiche-wide {
  grid-column: 1 / -1;
}

.fiche-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.fiche-card h1 {
  color: var(--text);
  margin-bottom: 0.8rem;
}

.fiche-card h2 {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.fiche-card > p {
  color: var(--text-muted);
  line-height: 1.7;
}

.fiche-card .tag-row {
  margin-bottom: 0;
}

.problem-list {
  display: grid;
  gap: 1rem;
}

.problem-item {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.problem,
.solution {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  color: var(--text-muted);
}

.problem { border-left: 3px solid #f59e0b; }
.solution { border-left: 3px solid #10b981; }

.problem-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.bloc1-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  color: var(--text);
}

.bloc1-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.bloc1-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}

[data-theme="dark"] .bloc1-check { color: #0f0f0f; }

.fiche-note {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.proof-title {
  font-size: 1rem;
  color: var(--text);
  margin: 1.2rem 0 0.8rem;
}

.proof-title:first-of-type {
  margin-top: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: transform 0.3s ease;
}

.gallery-item a:hover img {
  transform: scale(1.02);
}

.gallery-item figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.img-placeholder {
  aspect-ratio: 16 / 10;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem;
  text-align: center;
  color: var(--text-light);
  background: var(--bg);
}

.img-placeholder code {
  font-family: var(--mono);
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--text-muted);
}

.fiche-links {
  padding-top: 0;
  border-top: none;
}

.fiche-video {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

span.doc-link.doc-missing mark.todo {
  border: none;
  background: none;
  padding: 0;
}

.fiche-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  text-decoration: none;
  transition: border-color 0.3s ease;
}

.pager-link:hover {
  border-color: var(--accent);
}

.pager-link.next {
  text-align: right;
}

.pager-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.pager-title {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ----- Responsive des ajouts ----- */
@media (max-width: 768px) {
  .fiche-grid,
  .problem-item,
  .fiche-pager {
    grid-template-columns: 1fr;
  }

  .pager-link.next {
    text-align: left;
  }

  .veille-block {
    padding: 1.3rem;
  }
}

/* ----- Impression (bouton « Imprimer / PDF » des fiches) ----- */
@media print {
  header, footer, .fiche-toolbar, .fiche-pager, .menu-toggle, .theme-toggle { display: none !important; }
  body::before, body::after { display: none !important; }
  main { padding-top: 0 !important; }
  body { background: #fff !important; color: #000 !important; }
  .js .fade-in, .js .fade-in-up { opacity: 1 !important; transform: none !important; }
  .fiche-card, .problem, .solution { break-inside: avoid; }
}

/* ----- Veille : points clés du sujet ----- */
.veille-keypoints {
  margin-top: 1rem;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.veille-keypoints strong {
  color: var(--text);
}

/* ----- Veille : définition du sujet ----- */
.veille-block > p.veille-definition {
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.9rem;
  color: var(--text);
}

.veille-definition strong {
  font-family: var(--mono);
  color: var(--accent);
}

/* ----- Certifications : détail des modules ----- */
.cert-modules {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cert-modules summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  list-style: none;
}

.cert-modules summary::-webkit-details-marker { display: none; }

.cert-modules summary::after {
  content: ' ▾';
}

.cert-modules[open] summary::after {
  content: ' ▴';
}

.cert-modules ol {
  margin-top: 0.6rem;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
}

.cert-modules li span:first-child {
  margin-right: 0.4rem;
}

.cert-score {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
