/* style.css */
:root {
  --bg: #f3f5f7;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;

  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #ecfdf5;

  --accent-soft: #fffbeb;

  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --radius-sm: 12px;

  --maxw: 1060px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f6f7f9 0%, #eef2f7 100%);
  line-height: 1.45;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.page {
  min-height: 100vh;
}

.container {
  width: min(var(--maxw), calc(100% - 32px));
  margin-inline: auto;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  padding: 20px 0 12px;
}

.brand-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 16px;

  /* Logo centré + titre en dessous */
  justify-items: center;
  align-items: center;
  text-align: center;
}

.logo-wrap {
  width: 100%;
  max-width: 100%;
  min-height: 140px;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-wrap.logo-placeholder {
  color: #64748b;
  font-size: 12px;
  text-align: center;
  padding: 12px;
}

.logo {
  width: 50%;        /* ~2x plus petit */
  max-width: 110px;  /* sécurité visuelle */
  height: auto;
  object-fit: contain;
  object-position: center;
  margin-inline: auto;
}

@media (max-width: 480px) {
  .logo {
    width: 42%;
    max-width: 95px;
  }

  .logo-wrap {
    min-height: 120px;
  }
}

.hero-content {
  width: 100%;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.2;
  text-align: center;
}

.hero-content p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-success {
  border-color: #a7f3d0;
  background: var(--primary-soft);
  color: #065f46;
}

/* =========================================================
   NOTICE
   ========================================================= */
.notice-card {
  margin-top: 12px;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfeff 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.notice-card h2 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.notice-card p {
  margin: 0;
  color: #14532d;
  font-size: 0.92rem;
}

/* =========================================================
   SERVICE CARDS
   ========================================================= */
.service-card {
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.service-card-featured {
  border-color: #99f6e4;
  box-shadow:
    0 0 0 2px rgba(13, 148, 136, 0.14),
    var(--shadow);
}

/* ===== MEDIA : TOUTES LES IMAGES EN CARRÉ ===== */
.service-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* classe gardée pour lisibilité dans le HTML */
.service-media--square {
  aspect-ratio: 1 / 1;
}

/* Affiche l'image entière (pas coupée) */
.service-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 14px;
  background: transparent;
}

/* ✅ Utilisée sur Lave-linge / Sèche-linge pour harmoniser avec le pack */
.service-media--same-pack img {
  object-fit: contain;
}

/* Placeholder si image absente */
.service-media.media-placeholder {
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

.service-body {
  padding: 14px;
}

.service-top {
  display: grid;
  gap: 10px;
}

.service-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.service-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
}

.service-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.price-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.price {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
}

.service-actions {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(15, 118, 110, 0.22);
}

.btn-secondary {
  background: #fff;
  color: #0f172a;
  border-color: var(--line);
}

/* Services grid */
.services-grid {
  display: grid;
  gap: 14px;
}

/* =========================================================
   INFO CARDS
   ========================================================= */
.info-grid {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.info-card h4 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.info-card ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.info-card li + li {
  margin-top: 4px;
}

.contact-line {
  margin-top: 8px !important;
}

.contact-line a {
  color: #0f766e;
  text-decoration: none;
}

.contact-line a:hover {
  text-decoration: underline;
}

/* Small note */
.small-note {
  margin: 14px 0 20px;
  border: 1px solid #fde68a;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.small-note p {
  margin: 0;
  font-size: 0.84rem;
  color: #78350f;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 18px 0 26px;
}

.site-footer p {
  margin: 0;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

/* =========================================================
   PAGES D'INSTRUCTIONS (lavage / sechage / pack)
   ========================================================= */
.instructions-page {
  padding-bottom: 20px;
}

.steps-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.step-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  overflow: hidden;
}

.step-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 6px 12px rgba(15, 118, 110, 0.22);
}

.step-head h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.step-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Photos d'étapes */
.step-image {
  width: 100%;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.step-image img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: transparent;
}

/* Cas d'une étape avec 2 photos */
.step-image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.step-image-grid .step-image {
  min-height: 160px;
}

/* Placeholder si image absente */
.step-image.media-placeholder {
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
}

/* Bloc de section dans la page pack */
.instruction-block {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
}

.instruction-block-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
}

.instruction-block-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.instruction-block-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Actions en bas / en haut */
.instruction-actions {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.instruction-actions-top {
  margin-top: 14px;
}

/* =========================================================
   DESKTOP / TABLET
   ========================================================= */
@media (min-width: 760px) {
  .brand-card {
    /* force logo puis titre en dessous, même en desktop */
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    text-align: center;
    padding: 18px;
  }

  .service-top {
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 16px;
  }

  .service-actions {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .service-actions .btn-secondary {
    white-space: nowrap;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* ✅ Harmoniser visuellement les images des 2 cartes simples avec le pack */
  .service-media--same-pack {
    height: 320px;      /* proche du bloc pack desktop */
    aspect-ratio: auto; /* évite un carré trop grand selon la largeur de carte */
  }

  .service-media--same-pack img {
    width: 100%;
    height: 100%;
    max-width: 320px;
    max-height: 320px;
    margin: auto;
    object-fit: contain;
    object-position: center;
    padding: 14px;
  }

  /* Pages instructions */
  .step-card {
    padding: 16px;
  }

  .step-image-grid {
    grid-template-columns: 1fr 1fr;
  }

  .instruction-actions {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .instruction-actions-top {
    grid-template-columns: auto auto;
    justify-content: start;
  }
}

@media (min-width: 980px) {
  .container {
    width: min(var(--maxw), calc(100% - 48px));
  }

  .service-card-featured {
    display: grid;
    grid-template-columns: 320px 1fr;
    align-items: start;
  }

  .service-card-featured .service-media {
    border-bottom: 0;
    border-right: 1px solid var(--line);
    aspect-ratio: 1 / 1; /* pack reste carré en desktop */
    min-height: 0;
    height: auto;
    align-self: start;
  }
}