/* 1. RESET & NORMALISATION */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* 2. VARIABLES CSS */
:root {
  /* Couleurs Logo */
  --logo-coral:     #F94770;
  --logo-yellow:    #F5CA4A;
  --logo-orange:    #FA9C16;
  --logo-emerald:   #30EEBE;
  --logo-cyan:      #52FFE5;
  --logo-blue:      #50BBFF;
  --logo-border:    #1C2627;

  /* Palette Site */
  --color-primary:    #1C2627;
  --color-accent:     #FA9C16;
  --color-accent-hover: #E88A00;
  --color-secondary:  #50BBFF;
  --color-warm:       #F94770;
  --color-success:    #30EEBE;

  /* Neutres */
  --color-bg:         #FAFBFC;
  --color-bg-alt:     #F0F2F5;
  --color-surface:    #FFFFFF;
  --color-text:       #1C1C1E;
  --color-text-light: #5A5A6E;
  --color-border:     #E2E5EA;

  /* Dégradé Signature */
  --gradient-logo: linear-gradient(135deg, #F94770, #FA9C16, #30EEBE, #50BBFF);

  /* Typographie */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --text-base: 1rem;       /* 16px */
  --text-sm: 0.875rem;     /* 14px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.5rem;       /* 24px */
  --text-2xl: 2rem;        /* 32px */
  --text-3xl: 2.5rem;      /* 40px */
  --text-4xl: 3.25rem;     /* 52px */
  --line-height: 1.6;

  /* Espacements */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-padding: 1.5rem;

  /* Arrondis */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(28,38,39,0.08);
  --shadow-md: 0 4px 16px rgba(28,38,39,0.1);
  --shadow-lg: 0 8px 32px rgba(28,38,39,0.12);

  /* Transitions */
  --transition: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Header */
  --header-height: 72px;
}

/* 3. TYPOGRAPHIE GLOBALE */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-sm);
}

/* 4. LAYOUT */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient-logo);
  margin: var(--space-xs) auto 0;
  border-radius: var(--radius-full);
}

.section__subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-top: calc(var(--space-sm) * -1);
  margin-bottom: var(--space-xl);
  font-size: var(--text-lg);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

/* 5. COMPOSANTS */

/* Branding Image Cropping */
.header__logo img,
.footer__brand img {
  object-fit: cover;
  object-position: center top;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn--accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn--accent:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn--full {
  width: 100%;
}

/* Cartes */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card__icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.card__title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.card__desc {
  color: var(--color-text-light);
  flex-grow: 1;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
}

.badge--success { background: rgba(48,238,190,0.1); color: #0a7a5a; }
.badge--warm { background: rgba(249,71,112,0.1); color: #b91c1c; }

/* 6. HEADER STICKY */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid;
  border-image: var(--gradient-logo) 1;
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.header--scrolled {
  box-shadow: var(--shadow-md);
}

.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-primary);
}

.header__nav {
  display: none;
}

.nav__link {
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition);
}

.nav__link:hover, .nav__link--active {
  color: var(--color-accent);
}

.header__cta {
  display: none;
}

.header__burger {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.header__burger span {
  width: 100%;
  height: 3px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.header__burger.active span:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}

.header__burger.active span:nth-child(2) {
  opacity: 0;
}

.header__burger.active span:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

.header__nav.active {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-surface);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  gap: var(--space-md);
  border-bottom: 3px solid;
  border-image: var(--gradient-logo) 1;
}

/* 7. FOOTER */
.footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.8);
  padding: var(--space-2xl) 0 var(--space-sm);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.footer__brand img {
  margin-bottom: var(--space-sm);
}

.footer__tagline {
  color: #fff;
  font-weight: 500;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer__nav a {
  transition: color var(--transition);
}

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

.footer__contact p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--space-xs);
}

.footer__contact i {
  color: var(--color-accent);
  font-size: 1.25rem;
}

.footer__contact a:hover {
  text-decoration: underline;
}

.footer__legal {
  grid-column: 1 / -1;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
}

.footer__legal a:hover {
  color: #fff;
}

/* 8. SECTIONS SPÉCIFIQUES & FORMULAIRE */

/* Hero Section */
.hero {
  padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-2xl);
  position: relative;
  background: var(--color-bg-alt);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gradient-logo);
  opacity: 0.05;
  pointer-events: none;
}

.hero__inner {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
}

.hero__cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

/* Formulaire EmailJS */
.form__honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.form__group--full {
  grid-column: 1 / -1;
}

.form__label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form__input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--transition);
  background: var(--color-surface);
}

.form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(250,156,22,0.15);
}

.form__input--error {
  border-color: var(--color-warm);
}

.form__error {
  display: none;
  color: var(--color-warm);
  font-size: var(--text-sm);
  margin-top: 0.25rem;
}

.form__input--error + .form__error {
  display: block;
}

.form__optional {
  color: var(--color-text-light);
  font-weight: 400;
  font-size: var(--text-sm);
}

.form__submit {
  margin-top: var(--space-lg);
  width: 100%;
}

.form__feedback {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
}

.form__feedback:not([hidden]) {
  display: flex;
}

.form__feedback--success {
  background: rgba(48,238,190,0.1);
  color: #0a7a5a;
}

.form__feedback--error {
  background: rgba(249,71,112,0.1);
  color: #b91c1c;
}

/* 9. UTILITAIRES & ANIMATIONS */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Component Mods */
.hero--dark {
  background: linear-gradient(135deg, rgba(28, 38, 39, 0.9), rgba(28, 38, 39, 0.95));
}
.hero--dark .hero__inner {
  color: #fff;
}
.hero--alt {
  padding: 8rem 0 4rem;
  background: var(--color-bg-alt);
}
.btn--outline-light {
  border-color: #fff;
  color: #fff;
}
.btn--outline-light:hover {
  background: #fff;
  color: var(--color-primary);
}

/* Flex & Grid Utilities */
.flex-center-y { align-items: center; display: flex; }
.html-left { text-align: left; }
.text-large { font-size: 1.1rem; }
.lh-2 { line-height: 2; }
.mt-xs { margin-top: 0.5rem; }

/* Stats Utilities */
.stat-number { font-size: 3rem; font-weight: 700; color: var(--color-primary); }
.stat-label { font-size: 1.1rem; font-weight: 500; margin-top: 0.5rem; }

/* --- PROJECT SHOWCASE (realisations.html) --- */
.projects-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  text-align: left;
}
.project-showcase {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.project-showcase:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.project-showcase__info {
  padding: var(--space-xl) var(--space-lg);
}
.project-showcase__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}
.project-showcase__desc {
  color: var(--color-text-light);
  font-size: 1.05rem;
  line-height: var(--line-height);
}
.project-showcase__media {
  height: 100%;
  overflow: hidden;
}
.project-showcase__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.project-showcase__media img:hover {
  transform: scale(1.03);
}
.image-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  height: 350px;
  background: #fff;
}
.image-grid-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 2fr 1fr;
  gap: 4px;
  height: 450px;
  background: #fff;
}
.image-grid-featured .item-main {
  grid-column: 1 / -1;
}
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
.card--project {
  padding: 0;
  overflow: hidden;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card--project:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card--project .card__img {
  height: 250px;
  width: 100%;
  object-fit: cover;
}
.card__content {
  padding: 1.5rem;
}

/* FAQ Component */
.faq-item {
  margin-bottom: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}
.faq-item summary {
  padding: 1rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-primary);
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item[open] summary {
  border-bottom: 1px solid var(--color-border);
}
.faq-answer {
  padding: 1.5rem;
  color: var(--color-text-light);
}

/* 10. MEDIA QUERIES */

/* Tablette */
@media (min-width: 768px) {
  .header__nav {
    display: flex;
    gap: var(--space-md);
  }
  
  .header__burger {
    display: none;
  }
  
  .header__cta {
    display: inline-flex;
  }

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

  .hero__cta-group {
    flex-direction: row;
    justify-content: center;
  }
  
  .form__grid {
    grid-template-columns: 1fr 1fr;
  }

  .form__submit {
    width: auto;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large Tablet / Small Desktop Projets */
@media (min-width: 992px) {
  .project-showcase {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .project-showcase__media {
    height: 100%;
    min-height: 450px;
  }
  .image-grid-2, .image-grid-featured {
    height: 100%;
  }
  .project-showcase--reverse .project-showcase__media {
    order: 2;
  }
  .project-showcase--reverse .project-showcase__info {
    order: 1;
    padding: var(--space-xl) var(--space-2xl) var(--space-xl) var(--space-xl);
  }
  .project-showcase__info {
    padding: var(--space-xl) var(--space-xl) var(--space-xl) var(--space-2xl);
  }
  .project-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop */
@media (min-width: 1200px) {
  h1 { font-size: 4rem; }
  h2 { font-size: 3rem; }

  .footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 11. REFACTOR ACCUEIL (ULTRA-PREMIUM) */

/* Hero Home */
.hero--home {
  background: linear-gradient(135deg, var(--color-surface), var(--color-bg-alt));
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-height) + var(--space-2xl)) 0 var(--space-2xl);
}
.hero--home::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 10%, rgba(250, 156, 22, 0.05), rgba(48, 238, 190, 0.05));
  pointer-events: none;
}
.hero--home .hero__title {
  font-size: var(--text-4xl);
  line-height: 1.1;
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 10;
}
.text-accent {
  background: var(--gradient-logo);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-accent-darker {
  background: linear-gradient(135deg, #df204e, #d67a01, #0ca981, #1377b7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero--home .hero__subtitle {
  font-size: var(--text-lg);
  max-width: 800px;
  margin: 0 auto var(--space-xl);
  color: var(--color-text-light);
  font-weight: 500;
  position: relative;
  z-index: 10;
}

/* Animations */
@keyframes pulse-accent {
  0% { box-shadow: 0 0 0 0 rgba(250, 156, 22, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(250, 156, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(250, 156, 22, 0); }
}
.btn--pulse {
  animation: pulse-accent 2s infinite;
}

/* Glass Panel */
.glass-panel {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}
.glass-panel-blur {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: inherit;
  z-index: 0;
}

/* Services Cards (Home) */
.card--service {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  border: 1px solid var(--color-border);
}
.card__icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: rgba(48, 238, 190, 0.1);
  color: var(--color-success);
  font-size: 2.25rem;
  margin: 0 auto var(--space-sm);
  transition: all var(--transition);
}
.card--service:hover .card__icon-wrapper {
  background: var(--color-success);
  color: #fff;
  transform: rotate(10deg) scale(1.1);
}
.card--service:nth-child(2) .card__icon-wrapper {
  background: rgba(250, 156, 22, 0.1);
  color: var(--color-accent);
}
.card--service:nth-child(2):hover .card__icon-wrapper {
  background: var(--color-accent);
  color: #fff;
}
.card--service:nth-child(3) .card__icon-wrapper {
  background: rgba(249, 71, 112, 0.1);
  color: var(--color-warm);
}
.card--service:nth-child(3):hover .card__icon-wrapper {
  background: var(--color-warm);
  color: #fff;
}

/* EMBLA CAROUSEL */
.embla {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--color-surface);
  position: relative;
  border: 1px solid var(--color-border);
}
.embla__viewport {
  overflow: hidden;
  width: 100%;
}
.embla__viewport.is-draggable {
  cursor: grab;
}
.embla__viewport.is-dragging {
  cursor: grabbing;
}
.embla__container {
  display: flex;
  user-select: none;
  -webkit-touch-callout: none;
  -khtml-user-select: none;
  -webkit-tap-highlight-color: transparent;
  margin-left: -1rem; /* spacing between slides */
}
.embla__slide {
  flex: 0 0 100%;
  min-width: 0;
  padding-left: 1rem; /* spacing between slides */
}
@media (min-width: 768px) {
  .embla__slide {
    flex: 0 0 50%; /* show 2 slides on tablet */
  }
}
@media (min-width: 1024px) {
  .embla__slide {
    flex: 0 0 33.3333%; /* show 3 slides on desktop */
  }
}
.slide__inner {
  position: relative;
  height: 380px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}
.slide__inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.slide__inner:hover img {
  transform: scale(1.04);
}
.slide__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(28,38,39,0.85), transparent);
  color: #fff;
  padding: 2.5rem 1rem 1.25rem;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: var(--font-heading);
  text-align: center;
  transition: opacity var(--transition);
}
