/* COMPONENTS — Boutons, cards, badges, formulaire */

/* ────────── BOUTONS ────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ff-ui);
  font-size: 1rem;
  font-weight: 700;
  padding: .85rem 1.8rem;
  border-radius: 100px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: var(--on-dark);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-wa {
  background: var(--wa-green);
  color: #fff;
  border-color: var(--wa-green);
}
.btn-wa:hover { background: #1DB954; border-color: #1DB954; transform: translateY(-2px); }

.btn-light {
  background: var(--on-dark);
  color: var(--accent-dark);
  border-color: var(--on-dark);
}
.btn-light:hover { background: var(--bg-alt); transform: translateY(-2px); }

/* ────────── CARDS RISOGRAPH (LAY-3) ────────── */
.c-riso {
  background: var(--bg);
  border: 1.5px solid var(--text);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: 5px 5px 0 var(--accent);
  transition: transform .2s ease, box-shadow .2s ease;
}
.c-riso:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--accent);
}
@media (prefers-reduced-motion: reduce) { .c-riso { transition: none; } .c-riso:hover { transform: none; } }

/* Variante sombre (alternance) */
.c-riso--dark {
  background: var(--accent);
  border-color: var(--accent-dark);
  box-shadow: 5px 5px 0 var(--accent-dark);
}
.c-riso--dark:hover { box-shadow: 7px 7px 0 var(--accent-dark); }

/* Contraste préventif fond sombre — PIÈGE PROD #10 */
.c-riso--dark,
.c-riso--dark :where(h1,h2,h3,h4,p,li,span,a,small,strong,em,svg) {
  color: var(--on-dark);
}
.c-riso--dark .svc-num {
  color: color-mix(in srgb, var(--on-dark) 60%, transparent);
}

/* ────────── CARD AVIS ────────── */
.avis-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: 4px 4px 0 var(--accent-soft);
}

.avis-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
}
.avis-stars svg {
  width: 18px;
  height: 18px;
  color: #F59E0B;
  fill: currentColor;
}

.avis-quote {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 16px;
}

.avis-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.avis-author-name {
  font-family: var(--ff-ui);
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
}
.avis-author-date {
  font-size: .78rem;
  color: var(--text-mute);
}

.badge-google {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 9px;
}
.badge-google svg { width: 14px; height: 14px; }

/* Carte "honnête" avis sans texte */
.avis-card--meta {
  background: var(--bg-alt);
  border-style: dashed;
  box-shadow: none;
}
.avis-card--meta .avis-quote {
  font-family: var(--ff-body);
  font-style: normal;
  font-size: .9rem;
  color: var(--text-mute);
}

/* ────────── GALERIE (LAY-3: gallery = grid + lightbox) ────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-item {
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  color: #fff;
  font-size: .76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: 0;
  transition: opacity .25s;
}
.gallery-item:hover figcaption,
.gallery-item:focus-visible figcaption { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-image {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--r-md);
  display: block;
}
.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s;
  z-index: calc(var(--z-modal) + 1);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 20px; right: 20px; font-size: 1.4rem; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ────────── FAQ ACCORDION ────────── */
.faq-list { display: flex; flex-direction: column; gap: 0; }

.faq-item {
  border-top: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: 1px solid var(--border); }

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color .2s;
}
.faq-trigger:hover { color: var(--accent); }
.faq-trigger[aria-expanded="true"] { color: var(--accent); }

.faq-chevron {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  transition: transform .3s var(--ease), border-color .2s;
}
.faq-chevron::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: border-color .2s;
}
.faq-trigger[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  border-color: var(--accent);
}
.faq-trigger[aria-expanded="true"] .faq-chevron::after { border-color: var(--accent); }

.faq-answer {
  overflow: hidden;
  max-height: 0;
  padding: 0; /* PIÈGE accordion : padding 0 par défaut, appliqué dans .is-open */
  transition: max-height .35s ease, padding .35s ease;
}
.faq-answer.is-open {
  max-height: 400px;
  padding: 0 0 20px;
}
.faq-answer p {
  color: var(--text-2);
  font-size: .96rem;
  line-height: 1.7;
  max-width: 68ch;
}

/* ────────── MODAL MENTIONS LÉGALES ────────── */
#ml-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ml-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
.ml-box {
  position: relative;
  background: var(--bg);
  border-radius: var(--r-xl);
  max-width: 520px;
  width: 100%;
  padding: 36px 32px 28px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.ml-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: var(--text-2);
  transition: background .2s;
}
.ml-close:hover { background: var(--border); }
.ml-box h2 {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--text);
}
.ml-box h3 {
  font-family: var(--ff-ui);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent-2);
  margin: 18px 0 6px;
}
.ml-box p {
  font-size: .88rem;
  color: var(--text-2);
  line-height: 1.65;
}

/* ────────── STATS STRIP ────────── */
.stats-strip {
  background: var(--accent);
  color: var(--on-dark);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  text-align: center;
}
.stat-item {
  padding: 24px 16px;
  border-right: 1px solid color-mix(in srgb, var(--on-dark) 16%, transparent);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  display: block;
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
  color: var(--on-dark);
  margin-bottom: 6px;
}
.stat-label {
  display: block;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: color-mix(in srgb, var(--on-dark) 72%, transparent);
}

/* Contraste préventif stats-strip — fond sombre */
.stats-strip :where(h1,h2,h3,h4,p,span,small) { color: var(--on-dark); }

/* ────────── FORMULAIRE CONTACT ────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-2);
}
.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--ff-body);
  font-size: .96rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  width: 100%;
  min-width: 0; /* PIÈGE PROD #10 select overflow */
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea {
  resize: vertical;
  min-height: 110px;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A4740' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 36px;
}
