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

:root {
  --bg: #0c0c0e;
  --bg2: #141416;
  --bg3: #1c1c1f;
  --accent: #ff4d1c;
  --text: #f0f0f0;
  --muted: #888;
  --border: rgba(255, 255, 255, 0.07);
  --radius: 14px;
  --T: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 5%;
  backdrop-filter: blur(20px);
  background: rgba(12, 12, 14, 0.85);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 6px;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 5% 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 75% 50%, rgba(255, 77, 28, 0.13) 0%, transparent 60%),
    radial-gradient(ellipse 30% 30% at 20% 80%, rgba(255, 140, 0, 0.07) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 77, 28, 0.1);
  border: 1px solid rgba(255, 77, 28, 0.25);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.hero-name .line2 {
  color: var(--accent);
}

.hero-title {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(240, 240, 240, 0.75);
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
}

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
}

.hero-img-wrap:first-child {
  grid-row: span 2;
  aspect-ratio: 3/5;
}

.hero-img-wrap:not(:first-child) {
  aspect-ratio: 3/4;
}

.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}

.hero-img-wrap:hover img {
  transform: scale(1.04);
}

/* ── BOUTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--T);
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: #e03a0c;
  transform: translateY(-2px);
}

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

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* ── SECTIONS ── */
section {
  padding: 90px 5%;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 50px;
}

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 500px;
}

/* ── À PROPOS ── */
#apropos {
  background: var(--bg2);
}

.apropos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: start;
}

.apropos-text p {
  color: rgba(240, 240, 240, 0.75);
  line-height: 1.8;
  margin-bottom: 18px;
  font-size: 1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.skill-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: var(--T);
}

.skill-chip:hover {
  border-color: rgba(255, 77, 28, 0.3);
  background: rgba(255, 77, 28, 0.05);
}

.skill-icon {
  width: 30px;
  height: 30px;
  background: rgba(255, 77, 28, 0.12);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}

/* ── EXPÉRIENCE ── */
#experience {
  background: var(--bg);
}

.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1px 1fr;
  gap: 0 30px;
  padding-bottom: 44px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-date {
  text-align: right;
  padding-top: 4px;
}

.timeline-date .period {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
  display: block;
}

.timeline-date .location {
  font-size: 0.76rem;
  color: rgba(136, 136, 136, 0.6);
  margin-top: 3px;
  display: block;
}

.timeline-line {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

.timeline-connector {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 8px;
}

.timeline-item:last-child .timeline-connector {
  display: none;
}

.timeline-company {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}

.timeline-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.timeline-tasks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.timeline-tasks li {
  font-size: 0.88rem;
  color: rgba(240, 240, 240, 0.65);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}

.timeline-tasks li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.78rem;
}

/* ── PORTFOLIO / DOSSIERS ── */
#portfolio {
  background: var(--bg2);
}

.type-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.type-btn {
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: var(--T);
  letter-spacing: 0.04em;
}

.type-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

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

.folders-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.folder-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: transform var(--T), box-shadow var(--T), border-color var(--T);
  display: flex;
  flex-direction: column;
}

.folder-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 77, 28, 0.3);
}

.folder-cover {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #1a1a1e;
}

.folder-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}

.folder-card:hover .folder-cover img {
  transform: scale(1.07);
}

.folder-count {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.folder-thumbs {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 3px;
  padding: 3px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  opacity: 0;
  transition: opacity .3s ease;
}

.folder-card:hover .folder-thumbs {
  opacity: 1;
}

.folder-thumbs img {
  flex: 1;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
}

.folder-info {
  padding: 14px 16px;
  flex: 1;
}

.folder-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.folder-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.folder-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.folder-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .25s, transform .25s;
}

.folder-card:hover .folder-open-btn {
  opacity: 1;
  transform: translateX(0);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}

.modal-back {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--T);
}

.modal-back:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.modal-title-wrap {
  flex: 1;
}

.modal-cat-type {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-count {
  font-size: 0.82rem;
  color: var(--muted);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
}

.modal-masonry {
  columns: 4;
  column-gap: 14px;
}

.modal-img-wrap {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--bg3);
}

.modal-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .4s ease;
}

.modal-img-wrap:hover img {
  transform: scale(1.04);
}

.modal-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity .25s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.modal-img-wrap:hover .modal-img-overlay {
  opacity: 1;
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  padding: 20px;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 10px;
  transform: scale(0.96);
  transition: transform .3s;
}

.lightbox.open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity .2s;
  background: none;
  border: none;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  backdrop-filter: blur(8px);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── FORMATION ── */
#formation {
  background: var(--bg);
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.edu-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: var(--T);
}

.edu-card:hover {
  border-color: rgba(255, 77, 28, 0.3);
  transform: translateY(-3px);
}

.edu-year {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.edu-school {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.edu-degree {
  font-size: 0.83rem;
  color: var(--muted);
}

/* ── CONTACT ── */
#contact {
  background: var(--bg2);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.big-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.big-title em {
  font-style: normal;
  color: var(--accent);
}

.contact-text p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 14px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: var(--T);
}

.contact-link:hover {
  border-color: rgba(255, 77, 28, 0.4);
  background: rgba(255, 77, 28, 0.05);
  transform: translateX(6px);
}

.contact-link-icon {
  width: 38px;
  height: 38px;
  background: rgba(255, 77, 28, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-deco {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.deco-img {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg3);
}

.deco-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.deco-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.deco-row .deco-img {
  aspect-ratio: 1;
}

/* ── FOOTER ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 28px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

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

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}

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

.fade-in-delay-1 { transition-delay: .1s; }
.fade-in-delay-2 { transition-delay: .2s; }
.fade-in-delay-3 { transition-delay: .3s; }

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .folders-grid    { grid-template-columns: repeat(3, 1fr); }
  .modal-masonry   { columns: 3; }
}

@media (max-width: 900px) {
  .folders-grid    { grid-template-columns: repeat(2, 1fr); }
  .modal-masonry   { columns: 2; }
}

@media (max-width: 768px) {
  .nav-links                          { display: none; }
  .hero-grid                          { grid-template-columns: 1fr; }
  .hero-visual                        { display: none; }
  .apropos-grid, .contact-inner       { grid-template-columns: 1fr; gap: 36px; }
  .contact-deco                       { display: none; }
  .timeline-item                      { grid-template-columns: 1fr; }
  .timeline-date                      { text-align: left; padding-bottom: 6px; }
  .timeline-line                      { display: none; }
  .edu-grid                           { grid-template-columns: 1fr; }
  .folders-grid                       { grid-template-columns: repeat(2, 1fr); }
  .modal-masonry                      { columns: 2; }
  section                             { padding: 64px 20px; }
}

@media (max-width: 480px) {
  .folders-grid  { grid-template-columns: 1fr; }
  .modal-masonry { columns: 1; }
}
