/*
  Composants de base — Laboratoire Ledarath
  Structure (header sticky, burger < 920px, footer riche, boutons pilule, cartes)
  reprise de Digital Smile Maker (ANALYSE.md §1). Couleurs et contenus propres à Ledarath.
*/

/* ============ Boutons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: var(--button-padding-y) var(--button-padding-x);
  border-radius: var(--button-radius);
  border: 1.5px solid transparent;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

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

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

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

.btn-secondary:hover {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

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

.btn-accent:hover {
  background: #2F6272;
  color: #fff;
}

.section-dark .btn-primary {
  background: #fff;
  color: var(--color-bg-dark);
}

.section-dark .btn-primary:hover {
  background: var(--color-primary-light);
}

/* ============ Cartes ============ */

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.card-media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
}

.card-media-wrap {
  position: relative;
}

.card-media-wrap .card-media {
  margin-bottom: var(--space-md);
}

.card-media-wrap__badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
}

.partner-highlight-logo {
  display: block;
  width: 160px;
  height: 64px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: var(--space-md);
}

.card h3, .card h4 {
  color: var(--color-primary);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
}

/* ============ Vidéo différée (RGPD) ============ */

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-embed__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: var(--space-lg);
  text-align: center;
}

.video-embed__play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.video-embed__placeholder .body-sm {
  color: var(--color-text-on-dark-muted);
  max-width: 320px;
}

/* ============ Carte différée (RGPD) ============ */

.map-embed {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-embed__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: var(--space-lg);
  text-align: center;
}

.map-embed__pin {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.map-embed__placeholder .body-sm {
  color: var(--color-text-muted);
  max-width: 320px;
}

/* ============ En-tête ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-sm);
}

.site-header__logo img {
  height: auto;
  width: 190px;
  max-width: 297px;
}

@media (max-width: 919px) {
  .site-header__logo img {
    width: 140px;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list a {
  color: var(--color-text);
  font-weight: var(--font-weight-regular);
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
  color: var(--color-primary);
  text-decoration: none;
}

.site-header__burger {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2xs);
  cursor: pointer;
}

.burger__bun,
.burger__meat {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-text);
  margin: 6px 0;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

@media (max-width: 919px) {
  .site-nav {
    position: fixed;
    inset: 0;
    top: 64px;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-lg) var(--container-padding);
    transform: translateX(100%);
    transition: transform var(--transition-fast);
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    width: 100%;
  }

  .site-header__burger {
    display: block;
  }

  .site-header__burger[aria-expanded="true"] .burger__bun:first-child {
    transform: translateY(8px) rotate(45deg);
  }

  .site-header__burger[aria-expanded="true"] .burger__meat {
    opacity: 0;
  }

  .site-header__burger[aria-expanded="true"] .burger__bun:last-child {
    transform: translateY(-8px) rotate(-45deg);
  }
}

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

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 680px;
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--color-bg-dark);
}

.hero__media img,
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (prefers-reduced-motion: reduce) {
  .hero__media video {
    display: none;
  }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(11, 32, 54, 0.55), rgba(11, 32, 54, 0.75));
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin-inline: auto;
}

.hero__content h1,
.hero__content p {
  color: #fff;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

/* ============ En-tête de page intérieure ============ */

.page-hero {
  background: var(--color-bg-dark);
  color: #fff;
  padding-block: var(--space-2xl);
  text-align: center;
}

.page-hero h1,
.page-hero p {
  color: #fff;
}

.page-hero p {
  max-width: 680px;
  margin-inline: auto;
  color: var(--color-text-on-dark-muted);
}

/* ============ Frise chronologique ============ */

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--color-border);
  max-width: 760px;
}

.timeline li {
  position: relative;
  padding: 0 0 var(--space-xl) var(--space-xl);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--color-border);
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline .timeline__date {
  display: block;
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin-bottom: var(--space-3xs);
}

/* ============ Galerie / lightbox ============ */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 919px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 599px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

.gallery__item {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: none;
  padding: 0;
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-fast);
}

.gallery__item:hover img {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(11, 32, 54, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(90vw, 1000px);
  max-height: 85vh;
  width: auto;
  border-radius: var(--radius-sm);
}

.lightbox__close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: var(--space-2xs);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox__nav--prev { left: var(--space-lg); }
.lightbox__nav--next { right: var(--space-lg); }

/* ============ Équipe ============ */

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

.team-card img {
  border-radius: var(--radius-md);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: var(--space-sm);
}

.team-card h3 {
  margin-bottom: var(--space-3xs);
  font-size: var(--font-size-h5);
}

.team-card .role {
  color: var(--color-accent);
  font-weight: var(--font-weight-medium);
}

/* ============ Pied de page ============ */

.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark-muted);
  padding-block: var(--space-2xl) var(--space-lg);
}

.site-footer a {
  color: var(--color-text-on-dark);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border-on-dark);
}

@media (max-width: 919px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

@media (max-width: 599px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

.site-footer__col h6 {
  color: #fff;
  margin-bottom: var(--space-sm);
}

.site-footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
}

.social-link__icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-top: var(--space-lg);
  font-size: var(--font-size-body-sm);
}

/* ============ Grilles utilitaires ============ */

.grid {
  display: grid;
  gap: var(--space-lg);
}

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

@media (max-width: 919px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 599px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (max-width: 919px) {
  .split {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* ============ Badges / tags ============ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3xs);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-medium);
  padding: var(--space-3xs) var(--space-sm);
  border-radius: var(--radius-pill);
}

/* ============ Formulaires ============ */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  margin-bottom: var(--space-md);
}

.field label {
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-body-sm);
}

.field input,
.field textarea,
.field select {
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--color-primary);
}

/* honeypot anti-spam : masqué visuellement, laissé accessible au DOM pour piéger les robots */
.field-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-message {
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-medium);
}

.form-message--success {
  background: var(--color-bg-alt);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.form-message--error {
  background: var(--color-bg-alt);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

/* ============ Logos partenaires ============ */

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xl);
}

.partner-logos img {
  max-height: 48px;
  width: auto;
}

.partner-logos img.partner-logos__nobel {
  max-height: 72px;
}
