/*
Theme Name: SERVO
Theme URI: https://servo.fr
Author: SERVO
Author URI: https://servo.fr
Description: Thème officiel SERVO — habille les blocs SERVO et se connecte à SERVO via le plugin SERVO Connector (embarqué). Conçu pour remplacer le thème du site d'un client géré depuis SERVO.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: servo
*/

/* ==========================================================================
   Styles de base du thème. Le gros du rendu passe par theme.json + les blocs
   SERVO (fournis par le plugin) qui s'appuient sur les variables --site-*.
   ========================================================================== */

:root {
  --servo-container: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--site-foreground, #0f172a);
  background: var(--site-background, #ffffff);
  font-family: var(--site-font-body, system-ui, sans-serif);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--site-font-heading, var(--site-font-body, system-ui, sans-serif));
  line-height: 1.2;
}

a { color: var(--site-primary, #2563eb); }

img { max-width: 100%; height: auto; }

.servo-container {
  width: 100%;
  max-width: var(--servo-container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Header / footer */
.servo-site-header,
.servo-site-footer {
  border-color: var(--site-muted, #f1f5f9);
}
.servo-site-header .servo-container,
.servo-site-footer .servo-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}
.servo-site-header { border-bottom: 1px solid var(--site-muted, #f1f5f9); }
.servo-site-footer { border-top: 1px solid var(--site-muted, #f1f5f9); margin-top: 4rem; }
.servo-brand { font-weight: 700; font-size: 1.125rem; text-decoration: none; color: var(--site-foreground, #0f172a); }
.servo-nav ul, .servo-site-footer ul { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.servo-nav a, .servo-site-footer a { text-decoration: none; color: var(--site-foreground, #0f172a); }

.servo-main { min-height: 50vh; }
.servo-404 { text-align: center; padding-block: 5rem; }

/* ==========================================================================
   Blocs SERVO (rendus par le plugin, habillés par le thème via --site-*)
   ========================================================================== */
.servo-block { position: relative; }
.servo-align-left { text-align: left; }
.servo-align-center { text-align: center; }
.servo-align-right { text-align: right; }

.servo-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--site-border-radius, 0.5rem);
  font-weight: 600;
  text-decoration: none;
}
.servo-btn--primary { background: var(--site-primary, #2563eb); color: #fff; }
.servo-btn--ghost { background: transparent; color: inherit; border: 1px solid currentColor; }

/* Hero */
.servo-hero { display: flex; align-items: center; }
.servo-hero[style*="background-image"] { color: #fff; }
.servo-hero__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
.servo-hero__inner { position: relative; z-index: 1; }
.servo-hero.servo-align-center .servo-hero__inner { margin-inline: auto; }
.servo-hero__title { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0 0 1rem; }
.servo-hero__subtitle { font-size: 1.125rem; opacity: 0.9; margin: 0 0 1.5rem; }
.servo-hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.servo-hero.servo-align-center .servo-hero__actions { justify-content: center; }
.servo-hero.servo-align-right .servo-hero__actions { justify-content: flex-end; }

/* Texte */
.servo-text__title { font-size: 1.75rem; margin: 0 0 1rem; }
.servo-text__body { font-size: 1.0625rem; }
.servo-text__body > :where(p):first-child { margin-top: 0; }
.servo-text__body :where(p) { margin: 0 0 1rem; }

/* CTA */
.servo-cta { text-align: center; }
.servo-cta__title { font-size: 1.875rem; margin: 0 0 0.75rem; }
.servo-cta__desc { font-size: 1.0625rem; opacity: 0.9; margin: 0 0 1.5rem; }
.servo-cta__actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.servo-btn--outline { background: transparent; color: var(--site-primary, #2563eb); border: 1px solid var(--site-primary, #2563eb); }

/* Image */
.servo-image__figure { margin: 0 auto; }
.servo-image__img { display: block; width: 100%; height: auto; }
.servo-image__img.is-rounded { border-radius: var(--site-border-radius, 0.5rem); }
.servo-image__img.is-shadow { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
.servo-image__figure figcaption { font-size: 0.85rem; opacity: 0.7; margin-top: 0.5rem; text-align: center; }

/* Galerie */
.servo-gallery__title { text-align: center; margin: 0 0 1.5rem; }
.servo-gallery__grid { display: grid; }
.servo-gallery__grid figure { margin: 0; }
.servo-gallery__grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--site-border-radius, 0.5rem); }
.servo-gallery__grid figcaption { font-size: 0.8rem; opacity: 0.7; margin-top: 0.25rem; }

/* Vidéo */
.servo-video__title { text-align: center; margin: 0 0 1rem; }
.servo-video__frame { position: relative; padding-top: 56.25%; }
.servo-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--site-border-radius, 0.5rem); }
.servo-video__caption { text-align: center; font-size: 0.85rem; opacity: 0.7; margin-top: 0.5rem; }

/* Séparateur */
.servo-divider__line { border: 0; border-top: 1px solid var(--site-muted, #e2e8f0); margin: 0; }
.servo-divider__dots { text-align: center; letter-spacing: 0.5rem; color: var(--site-muted-foreground, #94a3b8); }

/* Points forts */
.servo-features__title { text-align: center; margin: 0 0 0.5rem; }
.servo-features__subtitle { text-align: center; opacity: 0.8; margin: 0 0 2rem; }
.servo-features__grid { display: grid; gap: 1.5rem; }
.servo-features--list .servo-features__item { display: flex; gap: 1rem; align-items: flex-start; text-align: left; }
.servo-features__icon { font-size: 1.75rem; line-height: 1; margin-bottom: 0.5rem; color: var(--site-primary, #2563eb); }
.servo-features__item-title { font-size: 1.125rem; margin: 0 0 0.35rem; }
.servo-features__item-desc { opacity: 0.85; margin: 0; }

/* Témoignages */
.servo-testimonials__title { text-align: center; margin: 0 0 0.5rem; }
.servo-testimonials__subtitle { text-align: center; opacity: 0.8; margin: 0 0 2rem; }
.servo-testimonials__grid { display: grid; gap: 1.5rem; }
.servo-testimonials__item { margin: 0; padding: 1.5rem; border: 1px solid var(--site-muted, #e2e8f0); border-radius: var(--site-border-radius, 0.5rem); }
.servo-testimonials__rating { color: #f5b301; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.servo-testimonials__quote { margin: 0 0 1rem; font-size: 1.0625rem; }
.servo-testimonials__author { display: flex; align-items: center; gap: 0.75rem; }
.servo-testimonials__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.servo-testimonials__name { display: block; }
.servo-testimonials__meta { font-size: 0.85rem; opacity: 0.7; }

/* Tarifs */
.servo-pricing__title { text-align: center; margin: 0 0 0.5rem; }
.servo-pricing__subtitle { text-align: center; opacity: 0.8; margin: 0 0 2rem; }
.servo-pricing__grid { display: grid; gap: 1.5rem; align-items: start; }
.servo-pricing__plan { padding: 1.75rem; border: 1px solid var(--site-muted, #e2e8f0); border-radius: var(--site-border-radius, 0.5rem); text-align: center; }
.servo-pricing__plan.is-highlighted { border-color: var(--site-primary, #2563eb); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08); }
.servo-pricing__plan-name { margin: 0 0 0.75rem; }
.servo-pricing__amount { font-size: 2.25rem; font-weight: 700; }
.servo-pricing__period { opacity: 0.7; }
.servo-pricing__desc { opacity: 0.85; }
.servo-pricing__features { list-style: none; padding: 0; margin: 1.25rem 0; text-align: left; }
.servo-pricing__features li { padding: 0.35rem 0 0.35rem 1.5rem; position: relative; }
.servo-pricing__features li::before { content: "✓"; position: absolute; left: 0; color: var(--site-primary, #2563eb); }

/* FAQ */
.servo-faq__title { text-align: center; margin: 0 0 0.5rem; }
.servo-faq__subtitle { text-align: center; opacity: 0.8; margin: 0 0 2rem; }
.servo-faq__item { border-bottom: 1px solid var(--site-muted, #e2e8f0); padding: 1rem 0; }
.servo-faq__question { cursor: pointer; font-weight: 600; list-style: none; }
.servo-faq__question::-webkit-details-marker { display: none; }
.servo-faq__answer { padding-top: 0.75rem; opacity: 0.9; }

/* Carte */
.servo-map__title { text-align: center; margin: 0 0 0.5rem; }
.servo-map__address { text-align: center; opacity: 0.8; margin: 0 0 1rem; }
.servo-map__frame { border-radius: var(--site-border-radius, 0.5rem); overflow: hidden; }

/* Formulaire de contact */
.servo-contact__title { text-align: center; margin: 0 0 0.5rem; }
.servo-contact__subtitle { text-align: center; opacity: 0.8; margin: 0 0 2rem; }
.servo-contact__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.servo-contact__field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.servo-contact__field label { font-weight: 600; font-size: 0.9rem; }
.servo-contact__field input,
.servo-contact__field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--site-muted, #e2e8f0);
  border-radius: var(--site-border-radius, 0.5rem);
  font: inherit;
  background: var(--site-background, #fff);
  color: inherit;
}
.servo-contact__field input:focus,
.servo-contact__field textarea:focus { outline: 2px solid var(--site-primary, #2563eb); outline-offset: 1px; }
.servo-contact__status { margin-top: 1rem; font-size: 0.9rem; }
.servo-contact__status.is-success { color: #16a34a; }
.servo-contact__status.is-error { color: #dc2626; }
