/* Reset léger & base typographique */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  color: #e5e7eb;
  background-color: #020617;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #1e293b 0, #020617 55%);
  min-height: 100vh;
}

/* Liens & texte */
a {
  color: #a5b4fc;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Layout global */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
}

.section h1,
.section h2,
.section h3 {
  margin-top: 0;
  color: #f9fafb;
}

.section h1 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  margin-bottom: 0.75rem;
}

.section h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.section-intro {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  color: #9ca3af;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(to right, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.9));
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: conic-gradient(from 180deg, #f97316, #ec4899, #6366f1, #22c55e, #f97316);
  color: #020617;
  font-weight: 800;
  font-size: 0.9rem;
}

.logo-text-block {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text-main {
  font-weight: 600;
  font-size: 0.95rem;
}

.logo-text-sub {
  font-size: 0.78rem;
  color: #cbd5f5;
}

/* Nav */
.nav {
  display: flex;
  gap: 1rem;
}

.nav-link {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: #e5e7eb;
  border: 1px solid transparent;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.nav-link:hover {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 163, 184, 0.5);
  text-decoration: none;
}

.nav-link-active {
  background: linear-gradient(to right, #f97316, #ec4899, #6366f1);
  color: #0f172a;
  font-weight: 600;
}

/* Hero */
.hero {
  padding-top: 3rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.6fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.2rem, 3.5vw, 2.8rem);
}

.hero-subtitle {
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  color: #d1d5db;
  max-width: 32rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.hero-note {
  font-size: 0.9rem;
  color: #9ca3af;
}

.hero-panel {
  border-radius: 1.5rem;
  background: radial-gradient(circle at top, #1d253b, #020617 60%);
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.6);
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
  margin-bottom: 0.75rem;
}

.hero-panel h2 {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.hero-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  color: #d1d5db;
  font-size: 0.95rem;
}
.hero-list li + li {
  margin-top: 0.35rem;
}

/* Grids */
.grid {
  display: grid;
  gap: 1.5rem;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.veille-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Cards */
.card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 1rem;
  padding: 1.25rem 1.3rem;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.8);
}

.card p {
  margin-top: 0.35rem;
  color: #d1d5db;
  font-size: 0.95rem;
}

.card-service {
  min-height: 170px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.55rem 1.3rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(to right, #f97316, #ec4899, #6366f1);
  color: #0f172a;
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-outline {
  border-color: rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
  background: transparent;
}

.btn-outline:hover {
  background: rgba(15, 23, 42, 0.9);
}

.section-cta-center {
  margin-top: 2rem;
  text-align: center;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.85rem;
  padding: 0.3rem 0.9rem;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: linear-gradient(to right, #4f46e5, #ec4899);
  border-color: transparent;
  color: #0f172a;
}

/* Projets */
.project-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.project-tech {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

/* Veille */
.veille-title a {
  color: #e5e7eb;
}
.veille-title a:hover {
  color: #a5b4fc;
}
.veille-meta {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.35rem;
}

/* Formulaire */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-row label {
  font-size: 0.9rem;
  color: #e5e7eb;
}

input[type="text"],
input[type="email"],
select,
textarea {
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
}

input::placeholder,
textarea::placeholder {
  color: #6b7280;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 1px #6366f1;
}

textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.form-note {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Alertes */
.alert {
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.alert-success {
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.6);
  color: #bbf7d0;
}

.alert-error {
  background: rgba(185, 28, 28, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.8);
  color: #fecaca;
}

.alert-error ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* Footer */
.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.95);
  margin-top: 3rem;
}

.footer-inner {
  padding: 1rem 1.5rem 1.2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #9ca3af;
}

.footer-inner a {
  color: #c4b5fd;
}

/* Responsive */
@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    order: -1;
  }
}
/* === Démos interactives === */

.demos-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .demos-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card-demo {
  padding: 1.2rem;
}

.demo-block {
  margin-top: 1rem;
  border: 1px solid #ddd;
  border-radius: 0.75rem;
  padding: 1rem;
}

.demo-message {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Zone de mouvement du carré */
#move-area {
  position: relative;
  width: 100%;
  max-width: 260px;
  height: 180px;
  border-radius: 0.75rem;
  border: 1px dashed #ccc;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

#player-square {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 0.4rem;
  background: #333;
}
/* === Démos liées aux projets === */

.demo-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}

#projects-filter-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 0;
}

#projects-filter-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

#projects-filter-list li:last-child {
  border-bottom: none;
}

.mini-planning {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.mini-planning-slot {
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #ddd;
  font-size: 0.8rem;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.mini-planning-slot.is-active {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}
