/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #0f0f0f;
  --surface: #191919;
  --surface2: #212121;
  --surface3: #2a2a2a;
  --accent: #4d9fff;
  --accent-dim: rgba(77,159,255,0.12);
  --text: #e6e6e6;
  --text-muted: #888;
  --border: rgba(255,255,255,0.07);
  --radius: 14px;
  --shadow: 0 12px 40px rgba(0,0,0,0.5);
}

body {
  font-family: 'DM Sans', sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-child.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== HEADER ===== */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-contact {
  text-align: center;
  padding: 10px 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.header-contact a {
  color: var(--accent);
  text-decoration: none;
}
.header-contact a:hover { text-decoration: underline; }

.header-hero {
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 40px 60px;
  max-width: 1100px;
  margin: auto;
}

.header-photo-wrap {
  flex-shrink: 0;
}

.header-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(77,159,255,0.12);
}

.header-text {
  flex: 1;
}

.header-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin: 0 0 6px;
  font-weight: 600;
}

header h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
  letter-spacing: 0.2px;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== NAV ===== */
nav {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 0 20px;
  flex-wrap: wrap;
}

nav a {
  color: var(--text-muted);
  padding: 15px 18px;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover, nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== BUTTONS ===== */
.bouton {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 11px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.bouton:hover {
  background: #78b9ff;
  transform: translateY(-2px);
}

.bouton-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.bouton-outline:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
section {
  padding: 60px 40px;
  max-width: 1100px;
  margin: auto;
}

section h2 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.2px;
}

/* ===== PRESENTATION ===== */
.presentation p {
  line-height: 1.85;
  color: #bbb;
  max-width: 720px;
  font-size: 15px;
}

.presentation strong { color: var(--text); }

/* ===== SKILLS GRID ===== */
.competence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.carte {
  background: var(--surface);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.3s, border-color 0.3s;
}

.carte:hover {
  transform: translateY(-4px);
  border-color: rgba(77,159,255,0.4);
}

.carte h3 {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--accent);
}

.carte p {
  margin: 5px 0;
  font-size: 13.5px;
  color: #aaa;
}

/* ===== TIMELINE ===== */
.timeline {
  margin-top: 28px;
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  align-items: start;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(77,159,255,0.2);
}

.timeline-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  padding-top: 3px;
  line-height: 1.5;
}

.timeline-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}

.timeline-company {
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 8px;
  font-weight: 500;
}

.timeline-content p {
  font-size: 13.5px;
  color: #aaa;
  line-height: 1.7;
  margin: 0;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.timeline-tags span {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
}

.experiences-note {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0;
  padding-left: 28px;
}

/* ===== CTA ===== */
.cta {
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 60px;
}

/* ===== PROJETS PAGE ===== */
.projets-intro {
  color: var(--text-muted);
  font-size: 14px;
  margin: 4px 0 36px;
}

.carousel-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}

/* ===== PROJECT CARDS ===== */
.card-front {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.card-front:hover {
  transform: translateY(-5px);
  border-color: rgba(77,159,255,0.5);
  box-shadow: 0 12px 40px rgba(77,159,255,0.1);
}

.card-icon { font-size: 2rem; line-height: 1; }

.card-front h3 {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.card-desc {
  font-size: 13px;
  color: #999;
  line-height: 1.6;
  margin: 0;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.card-tags span {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
}

.card-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== MODAL ===== */
.card-gallery {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(740px, 94vw);
  max-height: 88vh;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  box-shadow: var(--shadow);
  z-index: 200;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.22s, transform 0.22s;
}

.card-gallery.open {
  display: flex;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.gallery-header {
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gallery-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  padding-right: 36px;
}

.gallery-desc {
  padding: 14px 22px;
  font-size: 13.5px;
  color: #aaa;
  line-height: 1.7;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.close-btn:hover { background: var(--surface3); }

/* ===== SLIDES ===== */
.slides {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
  background: #0d0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slides img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 360px;
  animation: fadeSlide 0.3s ease;
}

.slides img.active { display: block; }

.slides.single img {
  display: block;
  max-height: 280px;
  width: auto;
  max-width: 100%;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.slide-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
}

.slide-controls button {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.slide-controls button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.dots { display: flex; gap: 6px; align-items: center; }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface3);
  border: 1px solid #555;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.3);
}

.card-link {
  display: block;
  text-align: center;
  padding: 12px;
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  border-top: 1px solid var(--border);
  transition: background 0.2s;
}
.card-link:hover { background: var(--accent-dim); }

/* ===== OVERLAY ===== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 100;
  backdrop-filter: blur(5px);
}
.overlay.visible { display: block; }

/* ===== CONTACT PAGE ===== */
.contact-intro {
  color: var(--text-muted);
  font-size: 15px;
  margin: 4px 0 36px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 36px;
  align-items: start;
}

.contact-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-info-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.info-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 0 0 3px;
  font-weight: 600;
}

.contact-info a:not(.bouton) {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}
.contact-info a:not(.bouton):hover { text-decoration: underline; }
.contact-info p { margin: 0; font-size: 14px; color: #aaa; }

.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: 'Syne', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 11px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  resize: vertical;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
}

.form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group select option {
  background: var(--surface2);
}

.form-submit {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  justify-content: center;
}

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
}

.form-success span { font-size: 3rem; }
.form-success p { color: #aaa; font-size: 15px; }

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 28px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-hero { padding: 28px 20px; gap: 20px; }
  .header-photo { width: 80px; height: 80px; }
  section { padding: 40px 20px; }
  .carousel-wrapper { grid-template-columns: 1fr; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 22px; }
}

@media (max-width: 500px) {
  .header-hero { flex-direction: column; text-align: center; }
  .header-actions { justify-content: center; }
  nav a { padding: 12px 10px; font-size: 12px; }
}