﻿/* ============================
   Modern Portfolio Stylesheet
   ============================ */

:root {
  /* Color Scheme */
  color-scheme: dark;
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1419;
  --bg-tertiary: #151b26;
  --text-primary: #f0f4f8;
  --text-secondary: #a8b2d1;
  --accent-primary: #4a9eff;
  --accent-secondary: #2d7dd2;
  --accent-glow: rgba(74, 158, 255, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);

  /* Spacing & Typography */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 80px;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, rgba(74, 158, 255, 0.1), rgba(45, 125, 210, 0.05));
  --gradient-card: linear-gradient(145deg, rgba(21, 27, 38, 0.95), rgba(15, 20, 25, 0.95));
}

/* ============================
   Reset & Base Styles
   ============================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 2rem);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Subtle gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(74, 158, 255, 0.08), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(45, 125, 210, 0.06), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Canvas background */
canvas#hero-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.4;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  padding-top: var(--header-height);
}

/* ============================
   Header & Navigation
   ============================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  box-shadow: var(--shadow-sm);
}

.logo a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.logo a:hover {
  color: var(--accent-primary);
}

.site-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.site-nav a.nav-cta {
  background: var(--accent-primary);
  color: var(--bg-primary);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
}

.site-nav a.nav-cta:hover {
  background: var(--accent-secondary);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

/* ============================
   Hero Section
   ============================ */

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================
   Buttons
   ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  font-size: 1rem;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.btn.primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn.primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(74, 158, 255, 0.4);
}

.btn.primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn.primary:hover::after {
  left: 100%;
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(4px);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

/* ============================
   Section Containers
   ============================ */

.section-container {
  padding: clamp(4rem, 10vw, 8rem) clamp(1.5rem, 5vw, 4rem);
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.section-heading {
  margin-bottom: 3rem;
}

.section-heading.centered {
  text-align: center;
}

.eyebrow {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-heading p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
}

.section-heading.centered p {
  margin: 0 auto;
}

/* ============================
   Service Grid & Cards
   ============================ */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
  transform-style: preserve-3d;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, var(--accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(74, 158, 255, 0.2);
}

.service-card:hover::before {
  opacity: 1;
}

.aos-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.service-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

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

/* ============================
   Process Steps
   ============================ */

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.process-step {
  text-align: center;
  padding: 2rem;
  position: relative;
}

.step-number {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  line-height: 1;
}

.process-step h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.process-step p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================
   About Section
   ============================ */

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.credentials {
  list-style: none;
  margin-top: 2rem;
  display: grid;
  gap: 0.75rem;
}

.credentials li {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-placeholder {
  width: min(100%, 400px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--border-subtle);
  box-shadow: 0 0 60px var(--accent-glow);
  position: relative;
}

.visual-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================
   Portfolio Placeholder
   ============================ */

.portfolio-placeholder {
  text-align: center;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.placeholder-card {
  padding: 3rem 2rem;
  background: var(--gradient-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.placeholder-icon {
  font-size: 3rem;
}

.placeholder-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============================
   FAQ Section
   ============================ */

.faq-container {
  max-width: 900px;
  margin: 3rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.faq-item {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  transform-style: preserve-3d;
}

.faq-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0;
  transition: opacity var(--transition);
}

.faq-item:hover::before {
  opacity: 1;
}

.faq-item:hover {
  border-color: rgba(74, 158, 255, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.faq-item h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.faq-item p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

.faq-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ============================
   Expandable Text (Read More)
   ============================ */

.expandable-text {
  position: relative;
}

.text-full {
  display: none;
}

.text-full.expanded {
  display: inline;
}

.read-more-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(74, 158, 255, 0.1);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.read-more-btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}

.read-more-btn.expanded::before {
  content: "Voir moins";
}

.read-more-btn:not(.expanded)::before {
  content: "Voir plus";
}

/* Hide button text, use ::before pseudo-element instead */
.read-more-btn {
  font-size: 0;
}

.read-more-btn::before {
  font-size: 0.875rem;
}

/* ============================
   Internal Links & Section Intro
   ============================ */

.internal-link {
  color: var(--accent-primary);
  text-decoration: underline;
  font-weight: 500;
  transition: color var(--transition-base);
}

.internal-link:hover {
  color: var(--accent-secondary);
}

.section-intro {
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: center;
}

/* ============================
   Contact Section
   ============================ */

.contact-form {
  max-width: 700px;
  margin: 3rem auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.contact-form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 0.9rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form button[type="submit"] {
  grid-column: 1 / -1;
  margin-top: 1rem;
}

.form-status {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.95rem;
  min-height: 1.5rem;
  color: var(--text-secondary);
}

.form-status.success {
  color: #4ade80;
}

.form-status.error {
  color: #f87171;
}

/* ============================
   Footer
   ============================ */

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  margin-top: 6rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-info .separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8rem;
}

.footer-section h4 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.footer-section p,
.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.6;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer-section a:hover {
  color: var(--accent-primary);
}

.footer-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================
   AOS & Animations
   ============================ */

article.service-card[data-aos],
.process-step[data-aos] {
  will-change: transform, opacity;
}

.reduce-motion [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ============================
   Mobile Menu Toggle (Hamburger)
   ============================ */

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.hamburger-box {
  width: 30px;
  height: 24px;
  display: inline-block;
  position: relative;
}

.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: -2px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 30px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 4px;
  position: absolute;
  transition-property: transform;
  transition-duration: 0.15s;
  transition-timing-function: ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: "";
  display: block;
}

.hamburger-inner::before {
  top: -10px;
}

.hamburger-inner::after {
  bottom: -10px;
}

/* Hamburger Active State */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-inner {
  transform: rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-inner::before {
  top: 0;
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-inner::after {
  bottom: 0;
  transform: rotate(-90deg);
}

/* ============================
   Responsive Design
   ============================ */

@media (max-width: 768px) {
  .site-header {
    padding: 0 1.5rem;
  }

  .mobile-menu-toggle {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 40px;
    height: 40px;
    max-width: 40px;
    max-height: 40px;
    overflow: hidden;
  }

  .mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    display: block;
  }


  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    max-width: 100%;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transform: translateY(-150%);
    transition: transform var(--transition);
    z-index: 99;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .site-nav.is-open {
    transform: translateY(0);
    box-shadow: var(--shadow-lg);
  }

  .site-nav a {
    font-size: 1.1rem;
    width: 100%;
    text-align: center;
    display: block;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-section {
    width: 100%;
  }

  .footer-nav {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }
}

html,
body {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.hero {
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}