/* ===== Portfolio public — design sombre (inspiré du design d'origine) ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #0d1117; }
body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #e6edf3;
}
::selection { background: #ff7b3544; color: #e6edf3; }
a { color: inherit; }

@keyframes floaty { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #0d1117; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 6px; border: 3px solid #0d1117; }

.mono { font-family: 'JetBrains Mono', monospace; }

/* fond quadrillé "circuit" */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(#ffffff09 1px, transparent 1px),
                    linear-gradient(90deg, #ffffff09 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 90%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 90%);
}

.wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* ===== Header ===== */
header.site {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px); background: #0d1117d9;
  border-bottom: 1px solid #30363d;
}
.navbar { display: flex; align-items: center; gap: 24px; padding: 14px 28px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .logo {
  display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center;
  background: #ff7b35; color: #0d1117; border-radius: 7px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.brand .name { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: #e6edf3; font-weight: 500; }
nav.links { margin-left: auto; display: flex; align-items: center; gap: 26px; }
nav.links a {
  font-size: 15px; color: #8b949e; text-decoration: none;
  padding: 4px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
nav.links a:hover { color: #e6edf3; border-bottom-color: #ff7b35; }
.btn-cta {
  font-size: 14px; font-weight: 600; color: #0d1117; background: #ff7b35;
  border: none; border-radius: 7px; padding: 8px 16px; cursor: pointer; text-decoration: none;
  display: inline-block; transition: background .15s;
}
.btn-cta:hover { background: #ff9255; }

/* ===== Boutons génériques ===== */
.btn {
  font-size: 15px; font-weight: 600; border-radius: 8px; padding: 13px 22px;
  cursor: pointer; text-decoration: none; display: inline-block; transition: all .15s; border: 1px solid transparent;
}
.btn-primary { color: #0d1117; background: #ff7b35; }
.btn-primary:hover { background: #ff9255; }
.btn-ghost { color: #e6edf3; background: transparent; border-color: #30363d; }
.btn-ghost:hover { border-color: #ff7b35; }

/* ===== Hero ===== */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 72px 0 56px; }
.eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #ff7b35; letter-spacing: .04em; margin: 0 0 18px; }
.hero h1 { font-size: 54px; line-height: 1.04; font-weight: 700; margin: 0 0 20px; letter-spacing: -0.02em; }
.hero p.sub { font-size: 18px; line-height: 1.6; color: #8b949e; margin: 0 0 28px; max-width: 520px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.status { display: flex; align-items: center; gap: 9px; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #8b949e; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff7b35; box-shadow: 0 0 0 4px #ff7b3525; }
.hero-visual { position: relative; }
.hero-visual .tab {
  position: absolute; top: -14px; left: 18px; z-index: 2; font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: #0d1117; background: #58a6ff; padding: 4px 10px; border-radius: 5px; font-weight: 700;
}
.hero-visual .frame {
  width: 100%; height: 380px; border: 1px solid #30363d; border-radius: 14px;
  background: #0f141a center/cover no-repeat; display: flex; align-items: center; justify-content: center;
  color: #6e7681; font-family: 'JetBrains Mono', monospace; font-size: 13px; text-align: center; padding: 20px;
}
.hero-visual .hero-img {
  width: 100%; height: 380px; object-fit: cover; display: block;
  border: 1px solid #30363d; border-radius: 14px; cursor: zoom-in;
}
.hero-visual .chip {
  position: absolute; bottom: -16px; right: -12px; z-index: 2; background: #161b22; border: 1px solid #30363d;
  border-radius: 10px; padding: 12px 16px; font-family: 'JetBrains Mono', monospace; animation: floaty 5s ease-in-out infinite;
}
.hero-visual .chip .lbl { font-size: 11px; color: #8b949e; }
.hero-visual .chip .val { font-size: 18px; color: #3fb950; font-weight: 700; }

/* ===== Sections ===== */
section.block { padding: 48px 0; border-top: 1px solid #21262d; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.kicker { font-size: 13px; font-family: 'JetBrains Mono', monospace; color: #ff7b35; letter-spacing: .08em; text-transform: uppercase; margin: 0; }
.see-all { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #58a6ff; background: none; border: none; cursor: pointer; text-decoration: none; }

/* ===== Grilles cartes ===== */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { border: 1px solid #30363d; border-radius: 12px; padding: 22px; background: #0f141a; transition: border-color .15s; }
.card:hover { border-color: #ff7b35; }
.card .ico {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 9px;
  background: #161b22; border: 1px solid #30363d; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; margin-bottom: 16px;
}
.card h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.card p { font-size: 14px; line-height: 1.55; color: #8b949e; margin: 0; }

/* ===== Projets ===== */
.proj-list { display: flex; flex-direction: column; gap: 24px; }
.proj-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
  border: 1px solid #30363d; border-radius: 16px; padding: 24px; background: #0f141a;
}
.proj-row .media { width: 100%; height: 300px; border-radius: 12px; border: 1px solid #30363d; overflow: hidden; background: #161b22; position: relative; }
.proj-row .media img,
.proj-row .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-row .media img.zoomable { cursor: zoom-in; }

/* ===== Carrousel de projet ===== */
.carousel { position: relative; width: 100%; height: 100%; }
.carousel .slides { position: absolute; inset: 0; }
.carousel .slide {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  transition: opacity .5s ease;
}
.carousel .slide.active { opacity: 1; pointer-events: auto; }
.carousel .slide img.zoomable, .carousel .slide video.zoomable { cursor: zoom-in; }
.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid #30363d; background: #0d1117cc; color: #e6edf3;
  font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
}
.car-arrow:hover { background: #ff7b35; color: #0d1117; border-color: #ff7b35; }
.car-prev { left: 10px; }
.car-next { right: 10px; }
.car-dots { position: absolute; bottom: 10px; left: 0; right: 0; z-index: 3; display: flex; gap: 6px; justify-content: center; }
.car-dot { width: 7px; height: 7px; border-radius: 50%; background: #ffffff66; cursor: pointer; transition: background .15s; }
.car-dot.active { background: #ff7b35; }
.proj-row .media .ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #6e7681; font-family: 'JetBrains Mono', monospace; font-size: 13px; text-align: center; padding: 20px; }
.proj-row .num { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #8b949e; margin-bottom: 12px; }
.proj-row h2 { font-size: 28px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }
.proj-row p { font-size: 15px; line-height: 1.65; color: #8b949e; margin: 0 0 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #c9d1d9; border: 1px solid #30363d; border-radius: 6px; padding: 4px 10px; background: #161b22; }
.gallery { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.gallery img, .gallery video { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid #30363d; display: block; }
.gallery img.zoomable { cursor: zoom-in; }
.empty-note { color: #6e7681; font-family: 'JetBrains Mono', monospace; font-size: 14px; padding: 40px 0; text-align: center; }

/* ===== About / tools ===== */
.grid-about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: start; }
.about-lead { font-size: 21px; line-height: 1.55; margin: 0 0 18px; color: #e6edf3; font-weight: 500; }
.about-body { font-size: 15px; line-height: 1.65; margin: 0; color: #8b949e; }
.tool-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.tool { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #c9d1d9; border: 1px solid #30363d; border-radius: 7px; padding: 8px 13px; background: #0f141a; }

/* ===== Contact ===== */
.grid-contact { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: start; }
form.contact { border: 1px solid #30363d; border-radius: 16px; padding: 28px; background: #0f141a; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #8b949e; }
.field input, .field textarea {
  font-family: 'Space Grotesk', sans-serif; font-size: 15px; color: #e6edf3; background: #0d1117;
  border: 1px solid #30363d; border-radius: 8px; padding: 12px 14px; outline: none; resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: #ff7b35; }
.robot-check {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px solid #30363d; border-radius: 8px; padding: 12px 14px; background: #0d1117;
  font-size: 14px; color: #c9d1d9; align-self: flex-start;
}
.robot-check:hover { border-color: #ff7b35; }
.robot-check input { width: 18px; height: 18px; accent-color: #ff7b35; cursor: pointer; }

.contact-cards { display: flex; flex-direction: column; gap: 12px; }
.contact-card {
  display: flex; align-items: center; gap: 14px; border: 1px solid #30363d; border-radius: 12px;
  padding: 18px; background: #0f141a; text-decoration: none; transition: border-color .15s;
}
.contact-card:hover { border-color: #58a6ff; }
.contact-card .ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 9px; background: #161b22; border: 1px solid #30363d; font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; }
.contact-card .lbl { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: #8b949e; }
.contact-card .val { font-size: 15px; color: #e6edf3; font-weight: 500; }

/* ===== Lightbox (photo en grand) ===== */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(1, 4, 9, 0.92); align-items: center; justify-content: center;
  padding: 32px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox-stage { display: flex; align-items: center; justify-content: center; }
.lightbox-stage img, .lightbox-stage video { max-width: 95vw; max-height: 90vh; border-radius: 10px; box-shadow: 0 20px 60px -10px #000; display: block; }
.lightbox-close {
  position: fixed; top: 18px; right: 26px; font-size: 40px; line-height: 1;
  color: #e6edf3; cursor: pointer; font-family: 'Space Grotesk', sans-serif; user-select: none; z-index: 1002;
}
.lightbox-close:hover { color: #ff7b35; }
.lightbox-arrow {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 1002;
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid #30363d; background: #0d1117cc; color: #e6edf3;
  font-size: 34px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
}
.lightbox-arrow:hover { background: #ff7b35; color: #0d1117; border-color: #ff7b35; }
.lightbox .lb-prev { left: 22px; }
.lightbox .lb-next { right: 22px; }
@media (max-width: 600px) {
  .lightbox-arrow { width: 44px; height: 44px; font-size: 26px; }
  .lightbox .lb-prev { left: 10px; }
  .lightbox .lb-next { right: 10px; }
}

/* ===== Bandeaux de notification (devis envoyé / erreur) ===== */
.notice { border-radius: 10px; padding: 14px 18px; margin: 0 0 22px; font-size: 15px; line-height: 1.5; }
.notice.ok  { background: #11271a; border: 1px solid #2ea04355; color: #56d364; }
.notice.err { background: #2a1416; border: 1px solid #ff6b6b55; color: #ff8a8a; }

/* ===== Footer ===== */
footer.site { border-top: 1px solid #21262d; margin-top: auto; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 28px; max-width: 1180px; margin: 0 auto; }
.footer-row .tagline { display: flex; align-items: center; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #8b949e; }
.footer-row .copy { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #6e7681; }
.footer-row .logo-sm { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; background: #ff7b35; color: #0d1117; border-radius: 6px; font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: 13px; }

/* ===== Responsive ===== */
@media (max-width: 980px) and (min-width: 760px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 759px) {
  nav.links { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 38px; }
  .grid3, .grid2, .grid-about, .grid-contact, .proj-row { grid-template-columns: 1fr !important; }
  .grid-about { gap: 16px; }
  .proj-row .media { height: 220px; }
}
