:root {
  color-scheme: light;
  font-size: 16px;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  --bg: #f4f3ff;
  --surface: #ffffff;
  --text: #101019;
  --text-subtle: #4b4b63;
  --accent: #6c63ff;
  --accent-strong: #4a43d6;
  --border: #dedcef;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050505;
  --surface: #111017;
  --text: #f4f4ff;
  --text-subtle: #b7b6d3;
  --accent: #8f88ff;
  --accent-strong: #b0a8ff;
  --border: #2d2b3d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, rgba(108, 99, 255, 0.15), transparent 55%), var(--bg);
  color: var(--text);
}

.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(12, 9, 37, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 35px rgba(12, 9, 37, 0.18);
}

/* Contact button fixed next to theme toggle */
.top-contact {
  position: fixed;
  top: 1.5rem;
  right: calc(1.5rem + 48px + 0.75rem); /* width of toggle + gap */
  padding: 0.55rem 1.3rem;
  font-size: 0.95rem;
  box-shadow: 0 12px 28px rgba(108,99,255,0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

@media (max-width: 560px) {
  .top-contact {
    right: 1.5rem;
    top: calc(1.5rem + 52px); /* stack below toggle on small screens */
  }
}

.theme-toggle__icon {
  width: 22px;
  height: 22px;
  stroke: var(--text);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  position: absolute;
  transition: opacity 0.25s ease, transform 0.25s ease;
  opacity: 0;
  transform: scale(0.8);
}

.theme-toggle__icon--moon {
  fill: var(--text);
  stroke: none;
}

[data-theme="dark"] .theme-toggle {
  border-color: rgba(176, 168, 255, 0.4);
}

[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: scale(1);
}

[data-theme="light"] .theme-toggle__icon--sun {
  opacity: 1;
  transform: scale(1);
}

.hero {
  padding: 4rem 1.5rem 3.5rem; /* extra bottom space before tabs */
}

.hero__content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent-strong);
  margin-bottom: 0.5rem;
}

.intro {
  color: var(--text-subtle);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(108, 99, 255, 0.25);
}

.btn.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn.tertiary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px) scale(1.01);
}

main {
  padding: 0 1.5rem 1.5rem;
}

.contact-page {
  max-width: 720px;
  margin: 0 auto 0;
  padding: 0 1.5rem 2.5rem;
}

.tabs {
  max-width: 960px;
  margin: 0 auto 2rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tabs__button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tabs__button.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.tab-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 360ms cubic-bezier(.22,.61,.36,1), transform 360ms cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
  pointer-events: none;
}
.tab-section.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.tab-panels {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 0;
  min-height: calc(100vh - 260px); /* occupe la hauteur sous le hero + footer */
  transition: height 360ms cubic-bezier(.22,.61,.36,1);
}

.tarif-filters {
  max-width: 1100px;
  margin: 0 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-subtle);
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(12, 9, 37, 0.06);
}

.filter-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-strong);
  box-shadow: 0 8px 22px rgba(108, 99, 255, 0.25);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Fade cycle on tab change */
@keyframes panelFadeCycle {
  0% { opacity: 0; filter: blur(3px); }
  40% { opacity: 0.35; filter: blur(2px); }
  100% { opacity: 1; filter: blur(0); }
}

.tab-panels.fade-cycle {
  animation: panelFadeCycle 360ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .tab-section {
    transition: none;
    transform: none !important;
  }
  .tab-panels { transition: none; }
}

/* v202411232055 - Same layout as services-grid */
.projects {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.services-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-card.is-hidden {
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  pointer-events: none;
}

.service-card {
  transition: opacity 220ms ease, transform 220ms ease, box-shadow 200ms ease;
}

.card,
.contact-card,
.service-card,
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: 0 10px 35px rgba(12, 9, 37, 0.08);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.projects .card {
  margin-bottom: 0;
}

.contact-card,
.service-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-card ul,
.service-card ul {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0.4rem;
  display: grid;
  gap: 0.9rem;
}

.contact-card li span {
  color: var(--text-subtle);
  font-size: 0.9rem;
  display: block;
}

.contact-card a {
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
}

.service-card .price {
  font-size: 2.1rem;
  margin: 0;
}

.service-card ul li {
  position: relative;
  padding-left: 1.3rem;
}

.service-card ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-strong);
}

.service-card .btn {
  align-self: flex-start;
}

.card__eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2rem;
  color: var(--text-subtle);
  margin: 0;
}

.card h2,
.service-card h3 {
  margin: 0.2rem 0 0.6rem;
}

.card p,
.contact-card p,
.service-card p {
  margin: 0;
  color: var(--text-subtle);
}

/* Expanded expertise styling */
.expertise-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  font-weight: 500;
}

.expertise-list {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem 1.2rem;
}
.expertise-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.95rem;
  color: var(--text-subtle);
}
.expertise-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 0.55rem;
}

@media (min-width: 800px) {
  .expertise-list {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

.site-footer {
  text-align: center;
  padding: 0.75rem 1rem 0.75rem;
  color: var(--text-subtle);
}

.site-footer a {
  color: var(--accent-strong);
  text-decoration: none;
}

@media (min-width: 720px) {
  .card {
    justify-content: space-between;
  }
}

@media (min-width: 960px) {
  .projects {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }
}

@media (min-width: 1300px) {
  .projects {
    grid-template-columns: repeat(3, minmax(320px, 1fr));
  }
}
