:root {
  --bg-top: #0a1231;
  --bg-mid: #111b47;
  --bg-bottom: #140b2f;
  --surface: rgba(20, 26, 56, 0.82);
  --surface-soft: rgba(28, 33, 73, 0.8);
  --text: #eef2ff;
  --text-dim: #bdc7f2;
  --accent: #7cb3ff;
  --accent-2: #f38dff;
  --border: #5d69b8;
  --ok: #86e2c3;
  --error: #ff92b9;
  --radius: 14px;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background: linear-gradient(rgba(8, 14, 44, 0.6), rgba(16, 8, 42, 0.74)), url(../img/background.png) no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(45deg, rgba(128, 186, 255, 0.14) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(243, 141, 255, 0.12) 25%, transparent 25%);
  background-size: 24px 24px;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.2;
  margin-top: 0;
  color: #f6f0ff;
}

p {
  margin-top: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding-bottom: 2rem;
}

.site-header {
  position: sticky;
  top: 0.8rem;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(8, 13, 34, 0.58);
  border: 1px solid rgba(145, 160, 255, 0.36);
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(7, 10, 28, 0.45);
  width: min(1120px, calc(100% - 1.25rem));
  margin-inline: auto;
}

.site-header .container,
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
}

.site-header .container {
  padding-block: 0.72rem;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(149, 168, 255, 0.52);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.main-nav a:not(.btn) {
  color: var(--text-dim);
  position: relative;
  padding: 0.45rem 0.65rem;
  border-radius: 9px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav a:not(.btn):hover {
  color: #f8e4ff;
  background: rgba(146, 157, 255, 0.14);
}

.main-nav a.active-nav:not(.btn) {
  color: #f8e4ff;
  background: rgba(146, 157, 255, 0.16);
}

.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7cb3ff, #f38dff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s ease;
}

.main-nav a:not(.btn):hover::after {
  transform: scaleX(1);
}

.main-nav a.active-nav:not(.btn)::after {
  transform: scaleX(1);
}

.btn {
  display: inline-block;
  border: 1px solid #98a3ff;
  background: linear-gradient(135deg, #73c2ff 0%, #8e82ff 55%, #f18fff 100%);
  color: #120f2c;
  border-radius: 10px;
  padding: 0.75rem 1.15rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(245, 231, 255, 0.55), 0 8px 18px rgba(17, 9, 43, 0.38);
}

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

.btn-sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
}

.btn-outline {
  background: rgba(20, 25, 52, 0.68);
  border-color: rgba(141, 156, 255, 0.6);
  color: var(--text);
}

.hero {
  padding: 4.4rem 0 3.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  align-items: stretch;
  justify-items: center;
  text-align: center;
}

.hero-grid > div {
  max-width: 880px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.hero-logo {
  width: 340px;
  height: 340px;
  object-fit: contain;
  display: block;
  margin: 0 auto 1.1rem;
  border-radius: 0;
  box-shadow: none;
  animation: float-logo 4.8s ease-in-out infinite;
  filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.44))
  drop-shadow(0 0 16px rgba(126, 175, 255, 0.45))
  drop-shadow(0 0 12px rgba(244, 148, 255, 0.35));
}

@keyframes float-logo {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin-bottom: 1rem;
}

.lead {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 62ch;
  margin-inline: auto;
}

.hero-actions {
  margin-top: 1.7rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-card {
  background:
    linear-gradient(180deg, rgba(33, 43, 94, 0.86), rgba(23, 19, 63, 0.88));
  border: 1px solid rgba(134, 150, 255, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.hero-card h2 {
  font-size: 1.2rem;
}

.hero-card ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-dim);
}

.hero-card li + li {
  margin-top: 0.6rem;
}

.section {
  --section-accent: #8ca2ff;
  --section-glow: rgba(140, 162, 255, 0.18);
  --section-bg: rgba(17, 23, 54, 0.68);
  padding: 4rem 0;
}

.section .container {
  background: linear-gradient(180deg, var(--section-bg), rgba(13, 18, 45, 0.72));
  border: 1px solid rgba(146, 160, 255, 0.34);
  border-left: 4px solid var(--section-accent);
  border-radius: 22px;
  box-shadow: 0 20px 38px rgba(5, 10, 28, 0.35), 0 0 0 1px var(--section-glow);
  padding: clamp(1.6rem, 3vw, 2.3rem);
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1.45rem;
}

.section-note {
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.section-note code {
  background: rgba(124, 179, 255, 0.14);
  border: 1px solid rgba(141, 156, 255, 0.5);
  border-radius: 6px;
  padding: 0.08rem 0.35rem;
}

.section-alt {
  background: linear-gradient(180deg, rgba(28, 35, 84, 0.55), rgba(21, 15, 58, 0.3));
}

#services {
  --section-accent: #78cbff;
  --section-glow: rgba(120, 203, 255, 0.2);
  --section-bg: rgba(15, 32, 60, 0.72);
}

#portfolio {
  --section-accent: #b28dff;
  --section-glow: rgba(178, 141, 255, 0.2);
  --section-bg: rgba(27, 23, 67, 0.72);
}

#avis {
  --section-accent: #ff9ac6;
  --section-glow: rgba(255, 154, 198, 0.2);
  --section-bg: rgba(51, 23, 56, 0.7);
}

#apropos {
  --section-accent: #8de4d2;
  --section-glow: rgba(141, 228, 210, 0.2);
  --section-bg: rgba(19, 44, 56, 0.68);
}

#devis {
  --section-accent: #ffd07a;
  --section-glow: rgba(255, 208, 122, 0.2);
  --section-bg: rgba(52, 40, 20, 0.72);
}

.cards,
.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.projects-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
}

.projects-viewport {
  overflow: hidden;
  padding: 0.55rem 0.45rem 0.8rem;
}

.projects-track {
  display: flex;
  gap: 0;
  width: 100%;
  transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  padding: 0.1rem 0.1rem 0.35rem;
}

.projects-viewport::-webkit-scrollbar {
  display: none;
}

.project-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.project-page .project {
  max-width: 100%;
}

.carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(141, 156, 255, 0.6);
  background: rgba(20, 25, 52, 0.75);
  color: #eef2ff;
  cursor: pointer;
  font-size: 1.1rem;
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.card,
.project,
.about-meta,
.quote-form {
  background: var(--surface);
  border: 1px solid rgba(138, 153, 255, 0.42);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.card p,
.project p {
  color: var(--text-dim);
  margin-bottom: 0;
}

.project-tag {
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  color: #f3a7ff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.about {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.3rem;
}

.about-main .hero-card {
  margin-top: 1.2rem;
}

.about p {
  color: var(--text-dim);
}

.reviews-section {
  text-align: center;
}

.reviews-intro {
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0 auto 1.6rem;
}

.reviews-carousel {
  width: min(780px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
}

.reviews-viewport {
  overflow: hidden;
}

.reviews-track {
  display: flex;
  width: 100%;
  transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.review-item {
  flex: 0 0 100%;
  background: var(--surface);
  border: 1px solid rgba(138, 153, 255, 0.42);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  text-align: left;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.review-name {
  font-weight: 700;
}

.review-rating {
  font-size: 0.92rem;
  color: #ffd24d;
}

.review-text {
  margin: 0.6rem 0 0;
  color: var(--text-dim);
  line-height: 1.6;
}

.reviews-dots {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.review-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(158, 167, 255, 0.68);
  background: transparent;
  cursor: pointer;
}

.review-dot.active {
  background: linear-gradient(140deg, #ffc3dd, #ff9ac6);
  border-color: #ff9ac6;
  box-shadow: 0 0 0 4px rgba(255, 154, 198, 0.16);
}

.reviews-cta {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.reviews-note {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 24, 0.72);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  width: min(560px, 100%);
  background: linear-gradient(180deg, rgba(36, 25, 55, 0.95), rgba(24, 18, 47, 0.95));
  border: 1px solid rgba(255, 154, 198, 0.42);
  border-radius: 18px;
  padding: 1.3rem;
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.45);
}

.modal-dialog h2 {
  margin-bottom: 1rem;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  border: 0;
  background: transparent;
  color: #ffd9ea;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.review-form {
  display: grid;
  gap: 0.7rem;
  background: var(--surface-soft);
  border: 1px solid rgba(138, 153, 255, 0.42);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.section-quote {
  padding-bottom: 4rem;
}

.quote-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.25rem;
}

.quote-form {
  display: grid;
  gap: 0.7rem;
  background: var(--surface-soft);
}

label {
  font-size: 0.9rem;
  color: var(--text-dim);
}

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(134, 149, 255, 0.45);
  background: rgba(16, 22, 51, 0.82);
  color: var(--text);
  padding: 0.8rem;
  font: inherit;
  margin-bottom: 0.2rem;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--text-dim);
  font-size: 0.92rem;
}

.check-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 0.2rem;
  accent-color: #9fb0ff;
  flex: 0 0 auto;
}

.check-row a {
  color: #e8dcff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.check-row a:hover {
  color: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(175, 145, 255, 0.65);
  border-color: transparent;
}

.form-message {
  min-height: 1.25rem;
  font-size: 0.92rem;
  margin: 0.4rem 0 0;
}

.form-message.ok {
  color: var(--ok);
}

.form-message.error {
  color: var(--error);
}

.site-footer {
  border-top: 1px solid rgba(141, 156, 255, 0.46);
  background: rgba(10, 14, 35, 0.64);
  margin-top: 1.2rem;
}

.site-footer p,
.site-footer a {
  color: var(--text-dim);
  margin: 0;
}

.site-footer .container {
  flex-direction: column;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.footer-links a {
  color: #e4d8ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-links a:hover {
  color: #ffffff;
}

@media (max-width: 920px) {
  .hero-grid,
  .cards,
  .about,
  .quote-grid {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    width: 250px;
    height: 250px;
  }

  .project-page {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 700px) {
  .site-header {
    top: 0.5rem;
    width: calc(100% - 1rem);
  }

  .main-nav a:not(.btn) {
    display: none;
  }
}
