
  /* THÈME SOMBRE (défaut) */
:root {
  --bg:      #0d0d0d;
  --surface: #161616;
  --border:  #2a2a2a;
  --accent:  #b8ff57;
  --text:    #e8e8e8;
  --muted:   #8f8f8f;
  --radius:  16px;
  --nav-bg:  rgba(13,13,13,0.9);
  --font-main: "Valve Pulp";
  --font-second: "Valve Oracle Medium";
}

/* THÈME CLAIR
   Quand <html> a l'attribut data-theme="light",
   on écrase les variables avec des valeurs claires*/

[data-theme="light"] {
  --bg:      #f5f5f0;
  --surface: #ffffff;
  --border:  #e0e0d8;
  --accent:  #3a7d0a;
  --text:    #1a1a1a;
  --muted:   #8f8f8f;
  --nav-bg:  rgba(245,245,240,0.92);
}


[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3 { color: #111; }

[data-theme="light"] .about-text  { color: #444; }
[data-theme="light"] .veille-body { color: #555; }
[data-theme="light"] .veille-list li { color: #555; }
[data-theme="light"] .veille-list strong { color: #111; }
[data-theme="light"] .skill-card:hover { background: #f0f0ea; }
[data-theme="light"] .modal-box { background: #fff; }
[data-theme="light"] #modal-title { color: #111; }
[data-theme="light"] .project-img { background: #eee; }
[data-theme="light"] .btn-dark { background: #e8e8e2; color: #222; }
[data-theme="light"] .btn-dark:hover { background: #d8d8d0; }
[data-theme="light"] iframe { background: #eee; }
[data-theme="light"] .home-tag { color: var(--accent); border-color: var(--accent); }

@font-face {
  font-family: 'VALVE Oracle Medium';
  src:
       url('polices/valveoracle-medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'VALVE Oracle SemiBold';
  src:
       url('polices/valveoracle-semibold.ttf ') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'VALVE Pulp';
  src:
       url('polices/valvepulp-bold.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Transition douce sur tout le body quand on bascule de thème */
body { transition: background 0.3s, color 0.3s; }

/* base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Barre de navigation*/
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 100;
}

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

nav a {
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
}

nav a:hover { color: var(--text); }
nav a.active { color: var(--bg); background: var(--accent); }

/* Bouton toggle thème dans la navbar */
#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  width: 34px; height: 34px;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

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

/* Page du portfolio */
#app {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

.page {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.page.active  { display: block; }
.page.visible { opacity: 1; transform: none; }

/* Typographie */
h1 {
  font-family: var(--font-second);
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: #fff;
}

h2 {
  font-family: var(--font-second);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 32px;
}

h3 {
  font-family: var(--font-second);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 32px 0 12px;
}

p { color: var(--text); }

.divider {
  width: 40px; height: 3px;
  background: var(--accent);
  margin: 16px 0 32px;
  border-radius: 2px;
}

/* Page principale */
#page-home { padding-top: 60px; }

.home-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 28px;
}

.home-desc {
  font-size: 18px;
  color: var(--muted);
  max-width: 480px;
  margin: 24px 0 56px;
  line-height: 1.7;
}

.home-links { display: flex; flex-wrap: wrap; gap: 12px; }

.home-link {
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  background: none;
}

.home-link:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }

/* ── ABOUT / PARCOURS ── */
.about-text { font-size: 18px; color: #aaa; line-height: 1.8; max-width: 640px; }
.about-text + .about-text { margin-top: 16px; }
 
.info-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 8px; }
.info-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
}
.info-card-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.info-card-value { font-size: 16px; font-weight: 500; color: var(--text); }
 
/* Compétences */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 40px 0 16px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.skill-card:hover { border-color: var(--accent); background: #1e1e1e; transform: translateY(-4px); }
.skill-card i { font-size: 38px; display: block; margin-bottom: 10px; }
.skill-card p { font-size: 13px; font-weight: 500; color: var(--muted); }

/* Projets */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.project-card:hover { border-color: #444; transform: translateY(-4px); }

.project-img {
  width: 100%; height: 180px;
  background: #1e1e1e;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px;
  margin-bottom: 20px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

.project-card h3 { margin: 0 0 8px; font-size: 18px; }
.project-card p  { font-size: 14px; color: var(--muted); line-height: 1.6; }

.project-langs { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }

.project-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.show-more-wrap { margin-top: 20px; }

/* Boutons */
.btn {
  font-family: var(--font-main);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 8px; border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  display: inline-block;
}
.btn:hover { transform: translateY(-1px); }

.btn-accent { background: var(--accent); color: var(--bg); }
.btn-accent:hover { background: #d0ff77; }

.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: #555; }

.btn-dark { background: #222; color: var(--text); }
.btn-dark:hover { background: #2e2e2e; }

/* Rapport et CV de stage */
.stage-block + .stage-block { margin-top: 60px; }

iframe {
  width: 100%; height: 680px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 20px;
  background: #111;
}

/* ── VEILLE ── */
.veille-body { font-size: 16px; color: #999; line-height: 1.8; max-width: 680px; }
.veille-body + .veille-body { margin-top: 14px; }
 
.veille-list { list-style: none; }
.veille-list li {
  font-size: 15px; color: #999; padding: 12px 0;
  border-bottom: 1px solid var(--border); line-height: 1.6;
}
.veille-list li:last-child { border-bottom: none; }
.veille-list strong { color: var(--text); }
.veille-source {
  display: inline-block; margin-top: 4px;
  font-size: 12px; color: var(--muted);
}
.veille-source a { color: var(--accent); text-decoration: none; }
.veille-source a:hover { text-decoration: underline; }
 
/* Grille points forts / faibles */
.pros-cons-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px;
}
.pros-cons-grid .col {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
}
.pros-cons-grid .col-title {
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px;
}
.col-title.pro  { color: var(--accent); }
.col-title.con  { color: #ff6b6b; }
.pros-cons-grid ul { list-style: none; }
.pros-cons-grid li { font-size: 14px; color: var(--muted); padding: 6px 0; border-bottom: 1px solid var(--border); line-height: 1.5; }
.pros-cons-grid li:last-child { border-bottom: none; }
 
/* Alerte outils */
.veille-alert {
  background: #1a1a00; border: 1px solid #555500;
  border-radius: var(--radius); padding: 18px 22px; margin-top: 8px;
  font-size: 15px; color: #bbb; line-height: 1.7;
}
.veille-alert strong { color: var(--text); display: block; margin-bottom: 6px; }
.veille-tools-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 8px;
}
.veille-tool {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
}
.veille-tool-name { font-weight: 700; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.veille-tool-desc { font-size: 13px; color: var(--muted); }
 
/* Avis perso */
.avis-card {
  background: var(--surface); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 24px; font-size: 16px; color: #aaa;
  line-height: 1.8; max-width: 680px; margin-top: 8px;
}

/* Contact */
.contact-grid { display: flex; flex-direction: column; gap: 12px; max-width: 400px; }

.contact-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}

.contact-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 2px; }
.contact-row a { color: var(--text); text-decoration: none; font-size: 15px; transition: color 0.2s; }
.contact-row a:hover { color: var(--accent); }

/* Modal */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal.show { opacity: 1; pointer-events: auto; }

.modal-box {
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  max-width: 420px; width: 90%;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.25s;
  position: relative;
}
.modal.show .modal-box { transform: scale(1); }

.modal-close {
  position: absolute; top: 14px; right: 18px;
  font-size: 22px; color: var(--muted);
  cursor: pointer; background: none; border: none; line-height: 1;
}
.modal-close:hover { color: var(--text); }

#modal-icon  { font-size: 60px; margin-bottom: 14px; }
#modal-title { font-family: var(--font-main); font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 10px; }
#modal-desc  { font-size: 15px; color: var(--muted); line-height: 1.7; }