/* ============================================================
   PROJET-IT — components.css
   Boutons, cartes, badges, formulaires, listes
   ============================================================ */

/* ------------------------------------------------------------
   Boutons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease),
    background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 166, 251, 0.42);
}

.btn--dark {
  background: var(--navy-800);
  color: #fff;
}
.btn--dark:hover {
  background: var(--navy-700);
  color: #fff;
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--outline {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn--outline:hover {
  background: var(--blue-soft);
  color: var(--navy-700);
}

.btn--sm {
  padding: 10px 18px;
  font-size: 0.85rem;
}

/* ------------------------------------------------------------
   Cartes service
   ------------------------------------------------------------ */
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease),
    border-color var(--speed) var(--ease);
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 166, 251, 0.35);
}
.service-card__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  flex: none;
}
.service-card__icon svg {
  width: 26px;
  height: 26px;
}
.service-card h3 {
  font-size: 1.12rem;
}
.service-card p {
  font-size: 0.94rem;
  color: var(--text-muted);
  flex: 1;
}
.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}
.service-card__link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--speed) var(--ease);
}
.service-card:hover .service-card__link svg {
  transform: translateX(4px);
}

/* Variante pour section sombre */
.section--dark .service-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}
.section--dark .service-card h3 {
  color: #fff;
}
.section--dark .service-card p {
  color: #a9c0d6;
}
.section--dark .service-card__icon {
  background: rgba(0, 166, 251, 0.15);
  color: var(--cyan);
}

/* ------------------------------------------------------------
   Cartes valeur / processus / témoignage
   ------------------------------------------------------------ */
.value-card {
  padding: 26px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  height: 100%;
}
.value-card__num {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.1em;
}
.value-card h3 {
  margin: 8px 0 10px;
}
.value-card p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

.step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.step__badge {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-brand);
}
.step h3 {
  margin-bottom: 6px;
}
.step p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

.testimonial {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.testimonial__quote {
  font-size: 1rem;
  color: var(--text);
  flex: 1;
}
.testimonial__author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: none;
}
.testimonial__author strong {
  display: block;
  font-size: 0.95rem;
  color: var(--navy-800);
}
.testimonial__author span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   Blocs de détail service (page Services)
   ------------------------------------------------------------ */
.service-detail {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 24px;
  align-items: start;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.service-detail__icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--blue-soft);
  color: var(--blue);
}
.service-detail__icon svg {
  width: 34px;
  height: 34px;
}
.service-detail h3 {
  margin-bottom: 10px;
}
.service-detail p {
  color: var(--text-muted);
  margin-bottom: 16px;
}
.service-detail .check-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
}
.service-detail .check-list li {
  margin-bottom: 0;
}
.service-detail__meta {
  grid-column: 1 / -1;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 640px) {
  .service-detail {
    grid-template-columns: 1fr;
  }
  .service-detail .check-list {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   Listes à cocher
   ------------------------------------------------------------ */
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.98rem;
}
.check-list li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / contain no-repeat;
  background-color: var(--green);
}
.section--dark .check-list li {
  color: #dbe7f3;
}

/* ------------------------------------------------------------
   Badges de technologie / tags
   ------------------------------------------------------------ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-700);
}
.section--dark .tag {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #dbe7f3;
}

/* ------------------------------------------------------------
   Formulaire de contact
   ------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

.contact-info-card {
  border-radius: var(--radius-lg);
  background: var(--grad-dark);
  color: #dbe7f3;
  padding: clamp(1.6rem, 3vw, 2.2rem);
}
.contact-info-card h3 {
  color: #fff;
  margin-bottom: 6px;
}
.contact-info-card .lead {
  color: #a9c0d6;
}
.contact-info-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-info-item__icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: rgba(0, 166, 251, 0.16);
  color: var(--cyan);
  display: grid;
  place-items: center;
}
.contact-info-item__icon svg {
  width: 22px;
  height: 22px;
}
.contact-info-item strong {
  display: block;
  color: #fff;
  font-size: 0.95rem;
}
.contact-info-item a,
.contact-info-item span {
  color: #a9c0d6;
  font-size: 0.92rem;
  word-break: break-word;
}
.contact-info-item a:hover {
  color: var(--cyan);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-sm);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-field--full {
  grid-column: 1 / -1;
}
.form-field label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-800);
}
.form-field label .req {
  color: #e11d48;
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fff;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.form-field textarea {
  min-height: 150px;
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #a3b1c0;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 166, 251, 0.15);
}
.form-field.is-invalid input,
.form-field.is-invalid textarea {
  border-color: #e11d48;
}
.form-field__error {
  font-size: 0.8rem;
  color: #e11d48;
  display: none;
}
.form-field.is-invalid .form-field__error {
  display: block;
}

/* Champ honeypot (anti-spam) — masqué aux humains */
.form-field--hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.form-status {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
}
.form-status.is-visible {
  display: flex;
}
.form-status--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.form-status--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.btn--loading {
  opacity: 0.75;
  pointer-events: none;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------------
   Alertes / messages flash
   ------------------------------------------------------------ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 0.92rem;
}
.alert--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert--info {
  background: var(--blue-soft);
  color: #0c4a6e;
  border: 1px solid #bae6fd;
}

/* ------------------------------------------------------------
   Badges (promo, rupture de stock)
   ------------------------------------------------------------ */
.badge {
  position: absolute;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 1;
  color: #fff;
}
.badge--discount {
  top: 12px;
  left: 12px;
  background: #e11d48;
}
.badge--stock {
  top: 12px;
  right: 12px;
  background: var(--navy-800);
}

/* ------------------------------------------------------------
   Prix (avec prix barré) & étoiles
   ------------------------------------------------------------ */
.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.price-row__compare {
  color: var(--text-muted);
  font-size: 0.85em;
}
.stars {
  color: var(--amber);
}

/* ------------------------------------------------------------
   Bouton flottant WhatsApp
   ------------------------------------------------------------ */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 900;
  transition: transform var(--speed) var(--ease);
}
.whatsapp-float:hover {
  transform: scale(1.08);
}
.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}
@media (max-width: 640px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 50px;
    height: 50px;
  }
}
