/* ============================================
   HK PLOMBERIE TOULOUSE — STYLE.CSS
   Design System Vanilla CSS (4 couleurs max)
   ============================================ */

:root {
  /* Palette Plombier Pro — 3 couleurs + 1 neutre */
  --primary:        #0284c7;  /* Bleu Cyan fresh & pro */
  --primary-dark:   #0369a1;  /* ~10% plus sombre */
  --background:     #ffffff;  /* Fond blanc */
  --background-alt: #f0f9ff;  /* Bleu glacier très léger pour alternance */
  --accent:         #ea580c;  /* Orange vif urgence 24/7 */
  --accent-dark:    #c2410c;  /* ~10% plus sombre */

  /* Texte */
  --text:           #0f172a;  /* Slate 900 */
  --text-light:     #475569;  /* Slate 600 */
  --card-bg:        #ffffff;

  /* Layout & Espacement */
  --space-xs: 8px;
  --space-s:  16px;
  --space-m:  24px;
  --space-l:  48px;
  --space-xl: 80px;

  --max-width: 1100px;
  --border-radius: 12px;
  --btn-radius: 8px;

  /* Typographie — System font stack obligatoire */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

/* ============================================
   RESET MINIMAL
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

/* ============================================
   TYPOGRAPHIE
   ============================================ */
h1, h2, h3 {
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(28px, 5vw, 46px);
  margin-bottom: var(--space-m);
}

h2 {
  font-size: clamp(22px, 4vw, 34px);
  margin-bottom: var(--space-s);
}

h3 {
  font-size: clamp(18px, 3vw, 22px);
  margin-bottom: var(--space-xs);
}

p {
  max-width: 65ch;
  color: var(--text-light);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-xl) auto;
}

.section-header p {
  margin: 0 auto;
  font-size: 18px;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

.section {
  padding: var(--space-xl) 0;
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-m);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.logo-badge {
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}

.badge-google {
  font-size: 11px;
  color: #b45309;
  font-weight: 700;
  background: #fef3c7;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
  display: inline-block;
  align-self: start;
}

#main-nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-m);
}

#main-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.15s;
}

#main-nav a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.icon-svg {
  display: inline-block;
  vertical-align: middle;
}

.btn-whatsapp, .btn-call {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--btn-radius);
  transition: background-color 0.2s, transform 0.15s;
}

.btn-whatsapp {
  background: #dcfce7;
  color: #15803d;
}

.btn-whatsapp:hover {
  background: #bbf7d0;
  transform: translateY(-1px);
}

.btn-call {
  background: var(--primary);
  color: #ffffff;
}

.btn-call:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px auto;
  transition: transform 0.25s, opacity 0.25s;
}

/* ============================================
   BOUTONS GENERAUX
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 28px;
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
  border: none;
  min-height: 48px; /* Touch target minimum */
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--accent);
  color: #ffffff;
}

.btn-secondary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.btn-whatsapp-green {
  background: #16a34a;
  color: #ffffff;
}

.btn-whatsapp-green:hover {
  background: #15803d;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: var(--space-xl) 0;
  background: linear-gradient(135deg, var(--background) 60%, var(--background-alt) 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--background-alt);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: var(--space-m);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

.hero-subtitle {
  font-size: 18px;
  margin-bottom: var(--space-l);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: var(--space-s);
  margin-bottom: var(--space-l);
}

.hero-trust {
  display: flex;
  gap: var(--space-m);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: var(--space-m);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
}

.trust-item svg {
  color: var(--primary);
}

.hero-image {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s;
}

.hero-image:hover img {
  transform: scale(1.02);
}

.hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  padding: var(--space-s);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  backdrop-filter: blur(4px);
}

/* ============================================
   ENGAGEMENTS / VALEURS (BANNIÈRE)
   ============================================ */
.banner-valeurs {
  background: var(--text);
  color: #ffffff;
  padding: var(--space-xl) 0;
}

.banner-valeurs h2 {
  color: #ffffff;
  margin-bottom: var(--space-xl);
  text-align: center;
}

.banner-badge {
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  margin-bottom: var(--space-xs);
}

.valeurs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-m);
}

.valeur-card {
  display: flex;
  flex-direction: column;
}

.valeur-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-xs);
  opacity: 0.8;
}

.valeur-card h3 {
  color: #ffffff;
  font-size: 18px;
  margin-bottom: var(--space-xs);
}

.valeur-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section {
  background: var(--background-alt);
  padding: var(--space-xl) 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-m);
}

.service-card {
  background: var(--card-bg);
  padding: var(--space-m);
  border-radius: var(--border-radius);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
  transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.06);
  border-color: rgba(2, 132, 199, 0.2);
}

.card-icon {
  background: var(--background-alt);
  color: var(--primary);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin-bottom: var(--space-m);
}

.service-card p {
  font-size: 14px;
}

/* ============================================
   REALISATIONS SECTION
   ============================================ */
.realisations-section {
  padding: var(--space-xl) 0;
}

.realisations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-l);
}

.realisation-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.realisation-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.4s;
}

.realisation-card:hover img {
  transform: scale(1.02);
}

.realisation-card figcaption {
  padding: var(--space-m);
  background: var(--card-bg);
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.realisation-card figcaption h3 {
  font-size: 18px;
  margin-bottom: var(--space-xs);
  color: var(--text);
}

.realisation-card figcaption p {
  font-size: 14px;
}

/* ============================================
   AVIS CLIENTS
   ============================================ */
.avis-section {
  background: var(--background-alt);
  padding: var(--space-xl) 0;
}

.google-rating-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-m);
}

.rating-number {
  font-size: 42px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.google-rating-box .stars {
  font-size: 24px;
  color: #ea580c;
  letter-spacing: 2px;
  margin: var(--space-xs) 0;
}

.rating-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
}

.avis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-m);
}

.avis-card {
  background: var(--card-bg);
  padding: var(--space-m);
  border-radius: var(--border-radius);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.avis-header {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  margin-bottom: var(--space-m);
}

.author-avatar {
  background: var(--primary);
  color: #ffffff;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 16px;
}

.avis-identity {
  flex: 1;
  min-width: 0;
}

.avis-identity h3 {
  overflow-wrap: break-word;
}

.author-sub {
  font-size: 12px;
  color: var(--text-light);
}

.avis-stars {
  flex-shrink: 0;
  white-space: nowrap;
  color: #ea580c;
  font-weight: 700;
}

.avis-body {
  font-size: 14px;
  font-style: italic;
  margin-bottom: var(--space-s);
}

.owner-reply {
  background: var(--background-alt);
  padding: var(--space-s);
  border-radius: 8px;
  font-size: 13px;
  border-left: 3px solid var(--primary);
}

.owner-reply strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

/* ============================================
   ZONE & HORAIRES
   ============================================ */
.zone-section {
  padding: var(--space-xl) 0;
}

.zone-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-xl);
  align-items: center;
}

.villes-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-s);
  list-style: none;
  margin-top: var(--space-m);
}

.villes-list li {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.villes-list li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
}

.hours-card {
  background: var(--background-alt);
  padding: var(--space-l);
  border-radius: var(--border-radius);
  border: 1px solid rgba(2, 132, 199, 0.1);
}

.hours-card h3 {
  margin-bottom: var(--space-m);
}

.hours-card ul {
  list-style: none;
  margin-bottom: var(--space-m);
}

.hours-card li {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.hours-card li:last-child {
  border-bottom: none;
}

/* ============================================
   CONTACT DIRECT
   ============================================ */
.contact-section {
  background: var(--text);
  color: #ffffff;
  padding: var(--space-xl) 0;
}

.contact-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-xl) auto;
}

.contact-header h2 {
  color: #ffffff;
}

.contact-header p {
  color: rgba(255, 255, 255, 0.7);
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-l);
}

.contact-card {
  background: rgba(255, 255, 255, 0.03);
  padding: var(--space-l);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.2s, background-color 0.2s;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.card-whatsapp:hover {
  border-color: #22c55e;
}

.card-phone:hover {
  border-color: var(--primary);
}

.contact-card .contact-icon {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: var(--space-m);
}

.card-whatsapp .contact-icon {
  color: #22c55e;
}

.card-phone .contact-icon {
  color: var(--primary);
}

.contact-card h3 {
  color: #ffffff;
  margin-bottom: var(--space-s);
}

.contact-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-bottom: var(--space-l);
  max-width: 40ch;
}

.btn-whatsapp-large, .btn-phone-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-weight: 700;
  border-radius: var(--btn-radius);
  font-size: 15px;
  width: 100%;
  min-height: 48px; /* Touch target */
}

.btn-whatsapp-large {
  background: #22c55e;
  color: #ffffff;
}

.btn-whatsapp-large:hover {
  background: #16a34a;
}

.btn-phone-large {
  background: var(--primary);
  color: #ffffff;
}

.btn-phone-large:hover {
  background: var(--primary-dark);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #0f172a;
  color: #ffffff;
  padding: var(--space-l) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-m);
}

.footer-brand .logo-text {
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 4px;
  display: block;
}

.footer-brand p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-contact p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.footer-contact a {
  color: #ffffff;
  font-weight: 700;
}

.footer-legal p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(234, 88, 12, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(234, 88, 12, 0);
  }
}

/* ============================================
   MOBILE & RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 900px) {
  .hero-grid, .zone-grid {
    grid-template-columns: 1fr;
    gap: var(--space-l);
  }
  .hero-image {
    max-width: 500px;
    margin: 0 auto;
  }
  .realisations-grid {
    grid-template-columns: 1fr;
    gap: var(--space-m);
  }
}

@media (max-width: 768px) {
  /* Layout global */
  .section {
    padding: var(--space-l) 0;
  }

  /* Header & Navigation burger */
  .header-inner {
    height: 60px;
  }

  .menu-toggle {
    display: block;
    z-index: 101;
  }

  #main-nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--background);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
  }

  #main-nav.open {
    max-height: 280px;
  }

  #main-nav ul {
    flex-direction: column;
    padding: var(--space-s) var(--space-m);
    gap: 0;
  }

  #main-nav li {
    width: 100%;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  }

  #main-nav li:last-child {
    border-bottom: none;
  }

  #main-nav a {
    display: block;
    padding: 12px 0;
    font-size: 15px;
  }

  /* Cache les boutons secondaires du header sur mobile très étroit */
  .btn-call span, .btn-whatsapp span {
    display: none;
  }

  .header-actions {
    gap: 0.25rem;
  }

  .btn-call, .btn-whatsapp {
    padding: 0.4rem;
    min-width: 40px;
    height: 40px;
    justify-content: center;
  }

  /* Hero */
  .hero {
    padding: var(--space-l) 0;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: var(--space-s);
  }

  .hero-trust {
    flex-direction: column;
    gap: var(--space-s);
  }

  /* Valeurs */
  .valeurs-grid {
    grid-template-columns: 1fr;
    gap: var(--space-m);
  }

  /* Contact */
  .contact-methods {
    grid-template-columns: 1fr;
    gap: var(--space-m);
  }

  .contact-card {
    padding: var(--space-m);
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
