/**
 * ==============================================================================
 * ELYCTRA — DESIGN SYSTEM SOBRE & MINIMALISTE (STYLE APPLE)
 * ==============================================================================
 */

/* ------------------------------------------------------------------------------
 * 1. DESIGN TOKENS
 * ------------------------------------------------------------------------------ */
:root {
  /* Palette Mode Sombre Sobre */
  --bg: #0b0b0c;
  --surface: #131315;
  --surface-hover: #18181b;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(255, 255, 255, 0.08);
  --line-hover: rgba(255, 255, 255, 0.14);
  --accent: #d7263d;
  --accent-hover: #b81e32;

  /* Statuts */
  --success: #30d158;
  --warning: #ffd60a;
  --danger: #ff453a;

  /* Dimensions & Formes */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --max: 1080px;
  --space-section: clamp(72px, 10vw, 128px);

  /* Typographie */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Aliases de compatibilite avec l'existant */
  --brand: var(--accent);
  --brand-light: rgba(215, 38, 61, 0.12);
  --brand-border: rgba(215, 38, 61, 0.25);
  --bg-base: var(--bg);
  --bg-surface: var(--surface);
  --bg-elevated: var(--surface-hover);
  --ink-primary: var(--text);
  --ink-secondary: var(--muted);
  --ink-muted: var(--muted);
  --ink-border: var(--line);
  --color-text-primary: var(--text);
  --color-text-secondary: var(--muted);
  --void: var(--bg);
}

/* ------------------------------------------------------------------------------
 * 2. RESET & BASE ELEMENTS
 * ------------------------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--text);
  color: #0b0b0c;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

a:hover {
  text-decoration: underline;
  color: var(--text);
}

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

/* Accessibilite : Focus-visible & Skip link */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--text);
  color: #0b0b0c;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--accent);
}

/* ------------------------------------------------------------------------------
 * 3. LAYOUT & CONTAINERS
 * ------------------------------------------------------------------------------ */
.app-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main, .main {
  flex-grow: 1;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Espacement vertical des sections */
section {
  padding: clamp(48px, 8vw, 84px) 0;
}

/* ------------------------------------------------------------------------------
 * 4. TYPOGRAPHY
 * ------------------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  margin-top: 0;
  font-weight: 600;
}

.display-title, h1.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

.section-title, h2.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--text);
}

.lead-text, .section-subtitle, .hero-lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 0;
}

p {
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 1rem;
}

p strong, p b {
  color: var(--text);
}

/* ------------------------------------------------------------------------------
 * 5. NAVIGATION (CRIMSON-NAVBAR SOBRE)
 * ------------------------------------------------------------------------------ */
.crimson-navbar {
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 16px 0;
}

.navbar-brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-brand-group:hover {
  text-decoration: none;
}

.navbar-brand-logo {
  height: 24px;
  width: auto;
}

.navbar-brand-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.crimson-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.crimson-nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.crimson-nav-link:hover, .crimson-nav-link.active {
  color: var(--text);
  text-decoration: none;
}

/* ------------------------------------------------------------------------------
 * 6. BUTTONS (STYLE SOBRE TYPE APPLE)
 * ------------------------------------------------------------------------------ */
.btn-primary-solid,
.btn-primary-link,
.btn-glow-primary,
.btn-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background-color: var(--text);
  color: #0b0b0c !important;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--text);
  transition: opacity 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary-solid:hover,
.btn-primary-link:hover,
.btn-glow-primary:hover,
.btn-brand:hover {
  opacity: 0.88;
  color: #0b0b0c !important;
  text-decoration: none;
}

.btn-secondary-outline,
.btn-subtle,
.btn-glow-outline,
.btn-outline-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background-color: transparent;
  color: var(--text) !important;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background-color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-secondary-outline:hover,
.btn-subtle:hover,
.btn-glow-outline:hover,
.btn-outline-custom:hover {
  background-color: var(--surface-hover);
  border-color: var(--line-hover);
  color: var(--text) !important;
  text-decoration: none;
}

/* ------------------------------------------------------------------------------
 * 7. CARDS & SURFACES
 * ------------------------------------------------------------------------------ */
.offer-card,
.step-card,
.faq-item,
.cta-card,
.project-card,
.glass-card-hover,
.card-custom,
.auth-card,
.card-ovh {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.offer-card:hover,
.step-card:hover,
.faq-item:hover,
.project-card:hover,
.glass-card-hover:hover {
  background-color: var(--surface-hover);
  border-color: var(--line-hover);
}

/* Offres */
.offer-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.offer-price-block {
  margin: 16px 0;
}

.offer-price {
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.offer-price-note {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.offer-desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.offer-features-list {
  padding-left: 0;
  list-style: none;
}

.offer-features-list li {
  padding: 10px 0;
  color: var(--muted);
  font-size: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  gap: 10px;
}

.offer-features-list li::before {
  content: "•";
  color: var(--text);
  font-weight: bold;
}

/* Etapes Methode */
.step-number {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.step-text {
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

/* FAQ */
.faq-q {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.faq-a {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* CTA Final */
.cta-card {
  padding: clamp(36px, 6vw, 64px) clamp(24px, 4vw, 48px);
}

.cta-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  color: var(--text);
}

.cta-link-secondary {
  color: var(--muted);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cta-link-secondary:hover {
  color: var(--text);
}

/* A propos */
.about-text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

/* ------------------------------------------------------------------------------
 * 8. REALISATIONS & SHOWCASE (GRILLE PLATE SOBRE)
 * ------------------------------------------------------------------------------ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.project-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  background-color: #000;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.project-card-media img,
.project-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-card-media img,
.project-card:hover .project-card-media video {
  transform: scale(1.02);
}

.project-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.project-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.project-card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 16px;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.project-tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid var(--line);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

/* Filtres de projets */
.filter-btn {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  background-color: var(--surface-hover);
  color: var(--text);
  border-color: var(--line-hover);
}

.filter-btn.active {
  background-color: var(--text);
  color: #0b0b0c;
  border-color: var(--text);
  font-weight: 600;
}

/* ------------------------------------------------------------------------------
 * 9. FORMULAIRES & MODULES (RDV / AUDIT / AUTH)
 * ------------------------------------------------------------------------------ */
.form-control,
.form-select {
  background-color: var(--surface) !important;
  border: 1px solid var(--line) !important;
  color: var(--text) !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  transition: border-color 0.15s ease !important;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(255, 255, 255, 0.28) !important;
  box-shadow: none !important;
  outline: none !important;
}

.form-control::placeholder {
  color: #52525b !important;
}

.form-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}

/* Date pills & Time slots pour rdv.php */
.date-pill-btn {
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
}

.date-pill-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--line-hover);
}

.date-pill-btn.btn-brand-active {
  background: var(--text) !important;
  color: #0b0b0c !important;
  border-color: var(--text) !important;
  font-weight: 600;
}

.time-slot-btn {
  font-size: 13px;
  padding: 10px 0;
  border-radius: 8px;
  font-weight: 500;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
}

.time-slot-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--line-hover);
}

.time-slot-btn.slot-active {
  background: var(--text) !important;
  color: #0b0b0c !important;
  border-color: var(--text) !important;
  font-weight: 600;
}

/* Badges simples */
.badge-agency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------------------
 * 10. FOOTER SOBRE
 * ------------------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 72px 0 36px;
  background-color: var(--bg);
}

.footer-brand-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.footer-heading {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 14px;
}

.footer-link {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--text);
  text-decoration: none;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.social-link:hover {
  border-color: var(--line-hover);
  color: var(--text);
  text-decoration: none;
}

/* ------------------------------------------------------------------------------
 * 11. ACCESSIBILITÉ & MOTION
 * ------------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
