/* ============================================================
   DO'Elec – Feuille de style principale
   Palette : blanc dominant, violet #4B2A9B, accent rouge #E11B22
   Mobile-first
   ============================================================ */

:root {
  --violet: #4B2A9B;
  --violet-dark: #38207a;
  --violet-soft: #f5f3fb;
  --red: #E11B22;
  --ink: #221c35;
  --gray: #5c5670;
  --border: #e9e6f2;
  --white: #ffffff;
  --shadow: 0 6px 24px rgba(34, 28, 53, 0.08);
  --shadow-hover: 0 10px 30px rgba(75, 42, 155, 0.14);
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

img { max-width: 100%; display: block; }

a { color: var(--violet); }

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--violet);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--red);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--violet);
  color: var(--violet);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-light {
  background: var(--white);
  color: var(--violet);
}
.btn-light:hover {
  background: var(--violet-soft);
}

.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow); }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.65rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}
.brand-text { line-height: 1.2; }
.brand-text strong {
  display: block;
  font-size: 1.15rem;
  color: var(--violet);
}
.brand-text small {
  color: var(--gray);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-nav {
  display: none;
  align-items: center;
  gap: 1.4rem;
}
.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--red); }
.main-nav .nav-cta { color: var(--white); }
.main-nav .nav-cta:hover { color: var(--white); }

/* Burger */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--violet);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu mobile ouvert */
.main-nav.open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 0.5rem 1.25rem 1.25rem;
}
.main-nav.open a {
  padding: 0.8rem 0.25rem;
  border-bottom: 1px solid var(--border);
}
.main-nav.open .nav-cta {
  margin-top: 0.9rem;
  border-bottom: none;
  padding: 0.8rem 1.6rem;
}

/* ---------- Hero ---------- */
.hero { padding-block: 3rem 3.5rem; }

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker {
  color: var(--red);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--violet);
}
.hero h1 .accent { color: var(--red); }

.hero-text {
  color: var(--gray);
  max-width: 34rem;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.75rem;
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
}
.hero-badges li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}
.hero-badges svg {
  width: 15px;
  height: 15px;
  color: var(--red);
}

.hero-visual { display: none; }
.hero-visual img {
  width: min(320px, 100%);
  margin-inline: auto;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

/* ---------- Sections ---------- */
.section { padding-block: 4rem; }
.section-soft { background: var(--violet-soft); }

.section-kicker {
  color: var(--red);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}

.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  color: var(--violet);
  margin: 0 0 0.8rem;
  line-height: 1.25;
}

.section-intro {
  color: var(--gray);
  max-width: 42rem;
  margin: 0 0 2.25rem;
}

/* ---------- Cartes services ---------- */
.cards-grid {
  display: grid;
  gap: 1.25rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--violet-soft);
  color: var(--violet);
  border-radius: 14px;
  margin-bottom: 1rem;
  transition: background 0.2s ease, color 0.2s ease;
}
.card:hover .card-icon {
  background: var(--red);
  color: var(--white);
}
.card-icon svg { width: 26px; height: 26px; }

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  color: var(--ink);
}

.card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--gray);
  font-size: 0.93rem;
  display: grid;
  gap: 0.35rem;
}
.card ul li::marker { color: var(--red); }

.card-cta {
  background: var(--violet);
  border-color: var(--violet);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.4rem;
}
.card-cta h3 { color: var(--white); font-size: 1.25rem; }
.card-cta p { margin: 0 0 1rem; color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }
.card-cta .btn-primary {
  background: var(--white);
  color: var(--violet);
}
.card-cta .btn-primary:hover {
  background: var(--red);
  color: var(--white);
}

/* ---------- Qui suis-je ---------- */
.about-grid {
  display: grid;
  gap: 2rem;
}

.about-text p {
  color: var(--gray);
  margin: 0 0 1rem;
}
.about-text p:first-of-type { margin-top: 0; }

.about-panel {
  background: var(--violet-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  height: fit-content;
}
.about-panel h3 {
  margin: 0 0 1rem;
  color: var(--violet);
  font-size: 1.1rem;
}

.check-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  color: var(--ink);
  font-size: 0.95rem;
}
.check-list li {
  padding-left: 1.7rem;
  position: relative;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  background: var(--red);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M20 6L9 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"><path fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M20 6L9 17l-5-5"/></svg>') center / contain no-repeat;
}

/* ---------- Galerie ---------- */
.gallery-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}

.gallery-item {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* Placeholder si la photo n'est pas encore fournie */
.gallery-item.missing img { display: none; }
.gallery-item.missing::before {
  content: "Photo à venir";
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, var(--violet-soft) 0%, #ece7f8 100%);
  color: var(--violet);
  font-weight: 500;
  font-size: 0.9rem;
}

.gallery-item figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  border-top: 1px solid var(--border);
}

/* ---------- Avis clients ---------- */
.reviews-grid {
  display: grid;
  gap: 1.25rem;
}

.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.stars {
  color: var(--red);
  letter-spacing: 3px;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.review-card blockquote {
  margin: 0 0 1rem;
  color: var(--gray);
  font-size: 0.95rem;
  flex: 1;
}

.review-card footer {
  font-weight: 600;
  color: var(--violet);
  font-size: 0.92rem;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 2rem;
}

.contact-info h3 {
  color: var(--violet);
  font-size: 1.3rem;
  margin: 0 0 1rem;
}

.contact-info address {
  font-style: normal;
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}
.contact-info address p {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--ink);
}
.contact-info svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--red);
  margin-top: 0.2em;
}
.contact-info a {
  color: var(--violet);
  font-weight: 500;
}

.contact-zone {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 0.93rem;
  color: var(--gray);
}
.contact-zone strong { color: var(--ink); }

.contact-legal {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--gray);
}

/* Formulaire */
.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
}

.hidden-field { display: none; }

.form-row {
  display: grid;
  gap: 1rem;
}

.form-field { margin-bottom: 1rem; }

.form-field label {
  display: block;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field textarea { resize: vertical; }

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(75, 42, 155, 0.15);
}

.form-note {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
  color: var(--gray);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--violet);
  color: var(--white);
  margin-top: 0;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
  padding-block: 2.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-brand img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--white);
  object-fit: cover;
}
.footer-brand strong { font-size: 1.15rem; }
.footer-brand p {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer-info p {
  margin: 0 0 0.4rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
}
.footer-info a {
  color: var(--white);
  font-weight: 500;
}

.footer-cta { align-self: center; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-block: 1rem;
  text-align: center;
}
.footer-bottom p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Page merci ---------- */
.thanks-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
}
.thanks-page h1 {
  color: var(--violet);
  margin: 0 0 0.75rem;
}
.thanks-page p {
  color: var(--gray);
  margin: 0 0 1.75rem;
}

/* ============================================================
   Écrans moyens et larges
   ============================================================ */
@media (min-width: 640px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .main-nav { display: flex; }

  .hero { padding-block: 4.5rem 5rem; }
  .hero-grid { grid-template-columns: 1.4fr 1fr; }
  .hero-visual { display: block; }

  .about-grid { grid-template-columns: 1.6fr 1fr; align-items: start; }
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1.3fr; align-items: start; }
  .footer-grid { grid-template-columns: 1.2fr 1.2fr auto; align-items: center; }
}

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