/* ─────────────────────────────────────────────────────────
   Louison Chevalier — style.css
   ───────────────────────────────────────────────────────── */

:root {
  --primary: #353596;
  --primary-dim: rgba(53, 53, 150, .15);
  --primary-border: rgba(53, 53, 150, .35);
  --white: #fff;
  --muted: rgba(255, 255, 255, .45);
  --torch-x: 50vw;
  --torch-y: 50vh;
}

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

html { scroll-behavior: smooth; }

body {
  background: #000;
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

/* ─── Torch overlay ─────────────────────────────────────── */
#torch {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background: radial-gradient(
    circle 300px at var(--torch-x) var(--torch-y),
    transparent 0%,
    rgba(0, 0, 0, .55) 45%,
    rgba(0, 0, 0, .96) 75%
  );
  transition: background .04s linear, opacity .6s ease;
}

/* ─── Custom cursor ─────────────────────────────────────── */
#cursor {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 400;
  transition: width .2s ease, height .2s ease, background .2s ease;
}

#cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(255,255,255,.4);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 399;
  transition: width .35s cubic-bezier(.16,1,.3,1),
              height .35s cubic-bezier(.16,1,.3,1),
              border-color .3s ease,
              background .3s ease;
}

/* Hover sur liens / boutons / cards */
body.cursor-hover #cursor {
  width: 10px; height: 10px;
  background: var(--primary);
}

body.cursor-hover #cursor-ring {
  width: 56px; height: 56px;
  border-color: rgba(53,53,150,.7);
  background: rgba(53,53,150,.06);
}

/* Hover sur texte cliquable (h1, titres) */
body.cursor-text #cursor {
  width: 3px; height: 22px;
  border-radius: 2px;
  background: var(--white);
}

body.cursor-text #cursor-ring {
  width: 0; height: 0;
  border-color: transparent;
}

/* ─── Light toggle ──────────────────────────────────────── */
#lightToggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: rgba(53,53,150,.12);
  border: 1px solid rgba(53,53,150,.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 999px;
  color: rgba(255,255,255,.55);
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: none;
  transition: background .3s, border-color .3s, color .3s;
}

#lightToggle:hover {
  background: rgba(53,53,150,.25);
  border-color: rgba(53,53,150,.6);
  color: var(--white);
}

body.light-on #lightToggle {
  background: rgba(53,53,150,.3);
  border-color: var(--primary);
  color: var(--white);
}

/* ─── Light-on mode — torch désactivé ───────────────────── */
body.light-on #torch {
  opacity: 0;
  pointer-events: none;
}

/* ─── Sections ──────────────────────────────────────────── */
section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 8vw;
}

/* ─── Reveal animations ─────────────────────────────────── */
.reveal,
.reveal-h1 .line {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}

.reveal.visible,
.reveal-h1 .line.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-h1 .line:nth-child(2) { transition-delay: .1s; }

/* ─── Hero ──────────────────────────────────────────────── */
.eyebrow {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1.2rem;
  font-weight: 500;
}

h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(4.5rem, 13vw, 11rem);
  line-height: .92;
  letter-spacing: -.03em;
  color: var(--white);
}

.tagline {
  margin-top: 1.8rem;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
}

.tagline em {
  font-style: normal;
  color: rgba(255,255,255,.3);
  font-size: .9em;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2.5rem;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

.dot-live {
  flex-shrink: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #4ade80; }
  50%       { opacity: .5; box-shadow: 0 0 3px #4ade80; }
}

/* ─── Headings ──────────────────────────────────────────── */
h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 3rem;
}

/* ─── Separator ─────────────────────────────────────────── */
.sep {
  width: 48px; height: 2px;
  background: var(--primary);
  border-radius: 2px;
  margin-bottom: 2.5rem;
}

/* ─── Glass card ────────────────────────────────────────── */
.glass-card {
  background: var(--primary-dim);
  border: 1px solid var(--primary-border);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-radius: 20px;
  padding: 2.4rem;
  transition: background .3s, border-color .3s, transform .3s;
}

.glass-card:hover {
  background: rgba(53, 53, 150, .22);
  border-color: rgba(53, 53, 150, .6);
  transform: translateY(-4px);
}

.glass-card.inline {
  border-radius: 999px;
  padding: .5rem 1.2rem;
}

/* ─── Section intro ─────────────────────────────────────── */
.section-intro {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 600px;
  margin-top: -1.5rem;
  margin-bottom: 3rem;
}

/* ─── Skills grid ───────────────────────────────────────── */
.glass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

/* Stagger les cards */
.glass-grid .glass-card:nth-child(1) { transition-delay: .05s; }
.glass-grid .glass-card:nth-child(2) { transition-delay: .12s; }
.glass-grid .glass-card:nth-child(3) { transition-delay: .19s; }
.glass-grid .glass-card:nth-child(4) { transition-delay: .26s; }
.glass-grid .glass-card:nth-child(5) { transition-delay: .33s; }

.card-icon {
  width: 38px; height: 38px;
  color: var(--primary);
  margin-bottom: 1.2rem;
  opacity: .85;
}

.glass-card h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: .75rem;
}

.glass-card p {
  font-size: .88rem;
  line-height: 1.75;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.3rem;
}

.tag {
  font-size: .68rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: rgba(53, 53, 150, .15);
  border: 1px solid rgba(53, 53, 150, .35);
  color: rgba(255, 255, 255, .55);
}

/* ─── Carousel ──────────────────────────────────────────── */
.carousel-wrap {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.carousel-track {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  width: max-content;
  animation: scroll 22s linear infinite;
}


@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.logo-item {
  flex-shrink: 0;
  width: 160px; height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-item svg,
.logo-item img {
  width: 100%; height: 100%;
  object-fit: contain;
  opacity: .6;
  transition: opacity .3s;
}

.logo-item:hover svg,
.logo-item:hover img { opacity: 1; }

/* ─── Contact / Footer ──────────────────────────────────── */
#contact {
  justify-content: flex-end;
  min-height: auto;
  padding-top: 5rem;
  padding-bottom: 3rem;
  gap: 0;
}

#refs {
  min-height: auto;
  padding-bottom: 5rem;
}

.contact-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4rem;
  width: 100%;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.contact-left { flex: 1; }
.contact-left h2 { margin-bottom: 1rem; }

.contact-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2rem;
}

.contact-sub {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: 0;
}

.contact-link {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 2rem);
  color: var(--white);
  text-decoration: none;
  position: relative;
  letter-spacing: -.01em;
  text-align: right;
}

.contact-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s cubic-bezier(.16, 1, .3, 1);
}

.contact-link:hover::after { transform: scaleX(1); }

/* ─── Social links ──────────────────────────────────────── */
.social-links {
  display: flex;
  gap: .75rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: rgba(255,255,255,.55);
  font-size: .75rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color .3s, background .3s, border-color .3s, transform .3s;
}

.social-btn:hover {
  color: var(--white);
  background: rgba(53, 53, 150, .22);
  border-color: rgba(53, 53, 150, .6);
  transform: translateY(-2px);
}

/* ─── Footer bar ────────────────────────────────────────── */
.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 2rem;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.2);
}

.mentions-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.2);
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: none;
  transition: color .3s;
  padding: 0;
}

.mentions-btn:hover { color: rgba(255,255,255,.6); }

/* ─── Modal mentions légales ────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  padding: 2rem;
  animation: fadeIn .25s ease;
}

.modal-overlay[hidden] { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  position: relative;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  animation: slideUp .3s cubic-bezier(.16,1,.3,1);
}

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

.modal-box h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}

.modal-box p {
  font-size: .88rem;
  line-height: 1.75;
  color: var(--muted);
}

.modal-box p strong {
  color: var(--white);
  display: block;
  margin-bottom: .3rem;
}

.modal-box a {
  color: rgba(53,53,150,.9);
  text-decoration: none;
}

.modal-box a:hover { text-decoration: underline; }

.modal-close {
  position: absolute;
  top: 1.2rem; right: 1.4rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: none;
  transition: color .2s;
  line-height: 1;
}

.modal-close:hover { color: var(--white); }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  section  { padding: 70px 6vw; }
  h1       { font-size: clamp(2.2rem, 12vw, 3.5rem); }
  #cursor, #cursor-ring { display: none; }
  body     { cursor: auto; }
  #torch        { opacity: 0 !important; pointer-events: none; }
  #lightToggle  { display: none; }

  .contact-sub { font-size: .85rem; }
  .contact-top { flex-direction: column; align-items: flex-start; gap: 2.5rem; }
  .contact-right { align-items: flex-start; }
  .contact-link { text-align: left; }
  .contact-link::after { transform-origin: left; }
  .footer-bar { flex-direction: column; gap: .5rem; text-align: center; }
}
