/* ==========================================================================
   styles.css — Refonte 2026 du site CV de José Gonzalez
   Stack : vanilla CSS3, pas de build, pas de framework.
   ========================================================================== */

/* 1. FONTS
   Inter pour UI/texte, JetBrains Mono pour accents (labels, dates, tags).
   Auto-hébergées dans /fonts/, font-display: swap pour éviter FOIT. */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* 2. TOKENS (CSS custom properties) */
:root {
  /* Couleurs */
  --bg: #0b1220;
  --bg-elevated: #111a2d;
  --border: #1e293b;
  --fg: #f1f5f9;
  --fg-muted: #94a3b8;
  --fg-dim: #a8b5c8;
  --accent: #ed7f0e;
  --accent-soft: #fbbf24;
  --accent-bg: rgba(237, 127, 14, 0.12);
  --accent-border: rgba(237, 127, 14, 0.3);

  /* Typographie */
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  /* Espacement (multiples de 8px) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;
  --space-8: 4rem;
  --space-12: 6rem;
  --space-16: 8rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Layout */
  --container-max: 1120px;
  --header-height: 64px;
}

/* 3. RESET */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-ui);
  font-size: clamp(0.95rem, 1vw + 0.5rem, 1.05rem);
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-soft);
}
button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
}
ul, ol {
  list-style: none;
}

/* 4. UTILITIES */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}

/* 5. TYPOGRAPHIE */
h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 1.5vw, 1.35rem); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.mono {
  font-family: var(--font-mono);
}
.label-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* 6. FOCUS VISIBLE */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 7. HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--fg);
}
.brand::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
}
.nav-primary ul {
  display: flex;
  gap: clamp(1rem, 2vw, 1.75rem);
}
.nav-primary a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  transition: color 0.15s;
}
.nav-primary a:hover,
.nav-primary a.active {
  color: var(--accent);
}
.nav-contact {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  transition: border-color 0.15s, color 0.15s;
}
.nav-contact:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fg);
  position: relative;
  transition: background 0.2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.2s;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* 8. HERO */
.hero {
  padding: clamp(3rem, 10vh, 6rem) 0 clamp(3rem, 8vh, 5rem);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--fg-muted);
  font-weight: 400;
  margin-bottom: 1.75rem;
  line-height: 1.4;
}
.hero-pitch {
  font-size: clamp(0.98rem, 1.1vw, 1.1rem);
  color: var(--fg);
  max-width: 60ch;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  max-width: 36rem;
}
.stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
}
.stat-num {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent-soft);
  letter-spacing: -0.02em;
}
.stat-lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-top: 0.5rem;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.15s;
  min-height: 44px;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--bg);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn svg {
  width: 16px;
  height: 16px;
}
.hero-photo {
  width: clamp(150px, 20vw, 220px);
  height: clamp(150px, 20vw, 220px);
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 9. SECTION */
.section {
  padding: clamp(3rem, 8vw, 5rem) 0;
  border-top: 1px solid var(--border);
}
.section-title {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.section-title .num {
  font-family: var(--font-mono);
  color: var(--fg-dim);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  flex-shrink: 0;
}
.section-title h2 {
  flex: 1;
}

/* 10. TIMELINE EXPÉRIENCES */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.xp {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
}
.xp-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}
.xp-duration,
.xp-location {
  display: block;
  color: var(--fg-dim);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: normal;
  margin-top: 0.4rem;
}
.xp-duration {
  font-style: italic;
}
.xp-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}
.xp-company {
  font-size: 0.95rem;
  color: var(--fg-muted);
  margin-bottom: 0.75rem;
}
.xp-desc {
  color: var(--fg);
  margin-bottom: 0.75rem;
  max-width: 65ch;
  text-align: justify;
  hyphens: auto;
}
.xp-bullets {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}
.xp-bullets li {
  color: var(--fg);
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
  position: relative;
  max-width: 65ch;
  text-align: justify;
  hyphens: auto;
}
.xp-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.xp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.6rem;
  background: var(--accent-bg);
  color: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 11. EXPANDABLE (groupes Condor, Technilum) */
.xp-details-toggle {
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.15s, background 0.15s;
}
.xp-details-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.xp-details-toggle[aria-expanded="true"] .toggle-label-closed { display: none; }
.xp-details-toggle[aria-expanded="false"] .toggle-label-open { display: none; }
.xp-details {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  border-left: 2px solid var(--accent);
  margin-top: 0;
  padding-left: 1.5rem;
}
.xp-details.open {
  max-height: 5000px;
  margin-top: 1.5rem;
}
.xp-details .xp {
  grid-template-columns: 130px 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.xp-details .xp-date {
  font-size: 0.72rem;
}

/* 12. FORMATION */
.formation-mba {
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  padding: 1.75rem;
  border-radius: var(--radius-md);
  position: relative;
  margin-bottom: 2rem;
}
.formation-mba::before {
  content: "★ 2026";
  position: absolute;
  top: -12px;
  right: 16px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 10px;
  letter-spacing: 0.1em;
  border-radius: 3px;
}
.formation-mba h3 {
  color: var(--accent-soft);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.formation-mba .formation-date {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.formation-mba .formation-meta {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.formation-list {
  display: flex;
  flex-direction: column;
}
.formation-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
}
.formation-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.formation-item .formation-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.formation-item .formation-title {
  color: var(--fg);
  font-size: 0.95rem;
}
.formation-org {
  font-weight: 600;
  color: var(--accent-soft);
  margin-right: 0.4rem;
}

.formation-group-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 2rem 0 1rem;
}

/* 13. COMPÉTENCES */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.skill-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius-md);
}
.skill-card h3 {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.skill-card p {
  color: var(--fg);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0;
}

/* 14. ENTREPRENEURIAT / EXTRA */
.extra-main {
  padding: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}
.extra-main h3 {
  color: var(--accent-soft);
  margin-bottom: 1rem;
  font-size: 1.15rem;
}
.extra-main p {
  max-width: 65ch;
}
.extra-balance {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.extra-passions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.passion-tag {
  padding: 0.5rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-size: 0.9rem;
}
.passion-tag a {
  color: var(--fg);
}
.passion-tag a:hover {
  color: var(--accent);
}

/* 15. FOOTER */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: clamp(3rem, 6vw, 5rem);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-links a {
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-links svg {
  width: 20px;
  height: 20px;
}
.footer-legal {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
}

/* 16. CONTACT PAGE */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 6vw, 4rem) 0;
}
.contact-info h1 {
  margin-bottom: 1rem;
}
.contact-info p {
  color: var(--fg-muted);
  margin-bottom: 2rem;
  max-width: 40ch;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  color: var(--fg);
  transition: border-color 0.15s;
}
.contact-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.contact-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}
.contact-form-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.contact-form-wrapper iframe {
  display: block;
  width: 100%;
  border: 0;
  min-height: 1100px;
}

/* 17. REVEAL ON SCROLL
   Progressive enhancement : sans JS, les sections restent visibles.
   La classe `.js` est ajoutée par main.js au chargement. */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* 18. RESPONSIVE */
@media (max-width: 768px) {
  .nav-primary ul {
    display: none;
  }
  .nav-primary.open ul {
    display: flex;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-contact {
    order: -1;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-photo {
    order: -1;
    margin: 0 0 1.5rem 0;
  }
  .hero-stats {
    grid-template-columns: 1fr 1fr;
    max-width: 100%;
  }
  .hero-stats .stat:nth-child(3) {
    grid-column: 1 / -1;
  }

  .xp {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .xp-details .xp {
    grid-template-columns: 1fr;
  }

  .formation-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
  .hero-stats .stat:nth-child(3) {
    grid-column: auto;
  }
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .btn {
    justify-content: center;
  }
}

/* 19. PREFERS REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* 20. PRINT */
@media print {
  .site-header,
  .site-footer,
  .xp-details-toggle,
  .hero-cta,
  .nav-toggle {
    display: none;
  }
  body {
    background: white;
    color: black;
  }
  .xp-details {
    max-height: none !important;
    margin-top: 1rem;
    border: 0;
    padding-left: 0;
  }
}
