/* Components & Sections */

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--creme);
  border-bottom: 1px solid rgba(28, 28, 30, 0.1);
  padding: var(--spacing-s) 0;
  z-index: var(--z-header);
  transition: var(--transition-medium);
}

.header__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--anthracite);
  letter-spacing: 0.05em;
}

/* Navigation */
.nav__list {
  display: flex;
  gap: var(--spacing-m);
}

.nav__link {
  color: var(--gris-texte);
  font-size: var(--small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

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

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
}

/* ── Hero Slideshow ── */
.hero-slides {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.hero-slide--active {
  opacity: 1;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s;
}
.hero-dot--active {
  background: rgba(255,255,255,0.95);
}

.hero__title {
  font-size: var(--h1);
  color: var(--anthracite);
  margin-bottom: var(--spacing-m);
}

.hero__subtitle {
  font-size: var(--h3);
  color: var(--gris-texte);
  font-weight: 300;
  margin-bottom: var(--spacing-l);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: var(--small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  transition: var(--transition-medium);
  border: 1px solid;
}

.btn--primary {
  background: var(--cuivre);
  color: var(--creme);
  border-color: var(--cuivre);
}

.btn--primary:hover {
  background: var(--cuivre-clair);
  border-color: var(--cuivre-clair);
}

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

.btn--outline:hover {
  background: var(--anthracite);
  color: var(--creme);
}

/* Section Header */
.section__header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section__title {
  font-size: var(--h2);
  color: var(--anthracite);
  margin-bottom: var(--spacing-s);
}

.section__subtitle {
  font-size: 1.1rem;
  color: var(--gris-texte);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Cards */
.card {
  background: white;
  padding: var(--spacing-l);
  transition: var(--transition-medium);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(28, 28, 30, 0.08);
}

.card__title {
  font-size: var(--h3);
  color: var(--anthracite);
  font-weight: 500;
  margin-bottom: var(--spacing-s);
}

.card__text {
  color: var(--gris-texte);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Footer */
.footer {
  background: var(--anthracite);
  color: var(--creme);
  padding: var(--spacing-m) 0 var(--spacing-s);
  margin-top: var(--spacing-xxl);
}

.footer__text {
  color: var(--gris-texte);
  font-size: var(--small);
  font-weight: 500;
  text-align: center;
  margin-top: var(--spacing-s);
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  width: 30px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.menu-toggle__bar {
  width: 100%;
  height: 2px;
  background: var(--anthracite);
  transition: var(--transition-fast);
}

/* Formulaire */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-m);
}

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

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

.form-label {
  font-size: var(--small);
  font-weight: 500;
  color: var(--anthracite);
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-textarea {
  padding: 1rem;
  font-family: var(--font-body);
  font-size: var(--body);
  color: var(--anthracite);
  background: white;
  border: 1px solid var(--gris-texte);
  transition: var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--cuivre);
}

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

/* Legacy mobile rules removed — consolidated in responsive section below */

/* Contact Success Message */
.contact-success {
  text-align: center;
  padding: var(--spacing-l);
  background: var(--white);
  border: 2px solid var(--cuivre);
  max-width: 600px;
  margin: 0 auto;
}

/* Thank You Page */
.thank-you-card {
  padding: var(--spacing-xl) var(--spacing-l);
  background: var(--white);
  max-width: 700px;
  margin: var(--spacing-xl) auto 0;
}

.thank-you-icon {
  color: var(--cuivre);
  margin: 0 auto var(--spacing-m);
  display: block;
}

/* Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--cuivre);
  outline-offset: 2px;
}

/* Utility Classes */
.section--white {
  background: var(--white);
}

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

.hero-spacing {
  padding-top: calc(var(--spacing-xxl) + 60px);
}

.subtitle-constrained {
  max-width: 600px;
  margin: 0 auto;
}

.gap-l {
  gap: var(--spacing-l);
}

.mt-l {
  margin-top: var(--spacing-l);
}

.mb-m {
  margin-bottom: var(--spacing-m);
}

.mb-s {
  margin-bottom: var(--spacing-s);
}

.text-left {
  text-align: left;
}

.mb-l {
  margin-bottom: var(--spacing-l);
}

/* ============================================
   IMMERSIVE SECTIONS (univers.html, heroes)
   ============================================ */

/* Parallax sections */
.parallax-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  padding: var(--spacing-xl) 0;
}

/* Floating cards */
.immersive-card {
  max-width: 600px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--spacing-xl);
  border-radius: 2px;
}

.immersive-card--right {
  margin-left: auto;
}

/* ============================================
   TABLET — max 1024px
   ============================================ */
@media (max-width: 1024px) {
  .hero {
    min-height: 85vh;
    padding-top: 80px;
  }

  .card {
    padding: var(--spacing-m);
  }

  .btn {
    padding: 0.875rem 2rem;
  }
}

/* ============================================
   MOBILE — max 768px
   ============================================ */
@media (max-width: 768px) {
  /* Navigation mobile */
  .nav {
    display: none;
  }

  .nav--open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--creme);
    padding: var(--spacing-m);
    border-top: 1px solid rgba(28, 28, 30, 0.1);
    box-shadow: 0 4px 12px rgba(28, 28, 30, 0.08);
  }

  .nav--open .nav__list {
    flex-direction: column;
    gap: var(--spacing-s);
  }

  .nav--open .nav__link {
    display: block;
    padding: var(--spacing-xs) 0;
    font-size: 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  /* Hero mobile */
  .hero {
    min-height: 70vh;
    min-height: 70dvh;
    padding: var(--spacing-xl) var(--spacing-s);
    padding-top: 80px;
    background-attachment: scroll !important;
  }

  .hero__title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .hero__subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: var(--spacing-m);
  }

  /* Boutons empilés sur mobile */
  .hero .flex--center {
    flex-direction: column;
    gap: var(--spacing-s);
    width: 100%;
  }

  .hero .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  /* Grilles magazine réalisations — 1 colonne sur mobile */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Form */
  .form-grid {
    grid-template-columns: 1fr;
  }

  /* Touch targets minimum 44px */
  .btn {
    min-height: 44px;
    padding: 0.875rem 1.5rem;
  }

  .form-input,
  .form-textarea,
  select.form-input {
    min-height: 44px;
    font-size: 16px; /* Prevent iOS zoom on focus */
  }

  .nav__link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Cards */
  .card {
    padding: var(--spacing-m);
  }

  /* Hero spacing for sub-pages */
  .hero-spacing {
    padding-top: calc(var(--spacing-xl) + 60px);
  }

  /* Footer links stack */
  .footer .flex--center {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  /* Section header */
  .section__header {
    margin-bottom: var(--spacing-l);
  }

  /* Subtitle constrained - full width on mobile */
  .subtitle-constrained {
    max-width: 100%;
    padding: 0 var(--spacing-xs);
  }
}

/* ============================================
   SMALL MOBILE — max 480px
   ============================================ */
@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .section__title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .card__title {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
  }

  .container {
    width: 92%;
    padding: 0 var(--spacing-xs);
  }

  .btn {
    font-size: 0.8rem;
    padding: 0.75rem 1.25rem;
  }
}

/* ============================================
   TABLET — Immersive sections (1024px)
   ============================================ */
@media (max-width: 1024px) {
  .parallax-section {
    min-height: 70vh;
  }

  .immersive-card {
    max-width: 500px;
    padding: var(--spacing-l);
  }
}

/* ============================================
   MOBILE — Immersive sections (768px)
   ============================================ */
@media (max-width: 768px) {
  .parallax-section {
    min-height: auto;
    padding: var(--spacing-xl) 0;
    background-attachment: scroll !important;
  }

  .immersive-card {
    max-width: 100%;
    padding: var(--spacing-l) var(--spacing-m);
  }

  .immersive-card--right {
    margin-left: 0;
  }

}

/* ============================================
   SMALL MOBILE — Immersive (480px)
   ============================================ */
@media (max-width: 480px) {
  .parallax-section {
    padding: var(--spacing-l) 0;
  }

  .immersive-card {
    padding: var(--spacing-m);
  }
}

/* ============================================
   TOUCH DEVICES — Parallax kill
   Catches ALL phones + tablets (iPhone, iPad, Android)
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  .parallax-section {
    background-attachment: scroll !important;
  }
}

/* iOS Safari specific — belt and suspenders */
@supports (-webkit-touch-callout: none) {
  .parallax-section {
    background-attachment: scroll !important;
  }
}

/* Dynamic viewport height for iOS Safari address bar */
@supports (min-height: 100dvh) {
  .hero {
    min-height: 100dvh;
  }
  .parallax-section {
    min-height: 80dvh;
  }
  @media (max-width: 768px) {
    .hero {
      min-height: 70dvh;
    }
    .parallax-section {
      min-height: auto;
    }
  }
}
