/*
Theme Name: HEECO Agency
Theme URI: https://heeco.fr
Description: Thème custom pour HEECO — Agence digitale spécialisée santé
Version: 1.0
Author: HEECO
*/

/* ── Variables & Reset ───────────────────────────────────────── */
:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --surface2: #f1f0ec;
  --border: rgba(0,0,0,0.08);
  --border-md: rgba(0,0,0,0.14);
  --text: #1a1917;
  --text2: #6b6a66;
  --text3: #9b9a96;
  --accent: #5b5bd6;
  --accent-bg: #eeecfb;
  --success: #0f6e56;
  --success-bg: #e1f5ee;
  --info: #185fa5;
  --info-bg: #e6f1fb;
  --warn: #854f0b;
  --warn-bg: #faeeda;
  --danger: #a32d2d;
  --danger-bg: #fcebeb;
  --radius: 10px;
  --radius-sm: 6px;
  --brand-grad: linear-gradient(135deg, #7c7ce8 0%, #c89bc2 50%, #e8a48a 100%);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Typography ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.375rem); }

p { color: var(--text2); line-height: 1.7; }

.mono { font-family: 'DM Mono', monospace; }

.gradient-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ──────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 5rem 0; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Space Grotesk', sans-serif;
  background: var(--brand-grad);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 0.5px solid var(--border-md);
}
.btn--outline:hover { background: var(--surface2); opacity: 1; transform: none; }

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 0.5px solid var(--accent);
}
.btn--ghost:hover { background: var(--accent-bg); opacity: 1; }

/* ── Navigation ──────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-logo-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  color: var(--text);
  background: var(--surface2);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-app-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  padding: 6px 14px;
  border: 0.5px solid var(--border-md);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  font-family: 'DM Mono', monospace;
}
.nav-app-link:hover { background: var(--surface2); color: var(--text); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.25s;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,124,232,0.08) 0%, transparent 70%);
  pointer-events: none;
}


.hero h1 {
  max-width: 700px;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.125rem;
  max-width: 540px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 0.5px solid var(--border);
  flex-wrap: wrap;
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text3);
  margin-top: 2px;
}

/* ── Services ────────────────────────────────────────────────── */
.services { background: var(--surface); }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: 'DM Mono', monospace;
  color: var(--accent);
  background: var(--accent-bg);
  border: 0.5px solid rgba(91,91,214,0.25);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.section-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* hero-badge devient un alias — même style */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: 'DM Mono', monospace;
  color: var(--accent);
  background: var(--accent-bg);
  border: 0.5px solid rgba(91,91,214,0.25);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 1.5rem;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.section-header h2 { margin-bottom: 1rem; }
.section-header p { max-width: 520px; margin: 0 auto; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.service-card:hover {
  border-color: var(--border-md);
  transform: translateY(-2px);
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 18px;
}

.service-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 13px;
  line-height: 1.65;
}

/* ── HEECO Tool Highlight ────────────────────────────────────── */
.tool-highlight {
  background: var(--bg);
}

.tool-inner {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 3.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.tool-label {
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.tool-inner h2 { margin-bottom: 1rem; }
.tool-inner p { margin-bottom: 1.5rem; font-size: 14px; }

.tool-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 2rem;
}

.tool-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text2);
}

.tool-feature::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--success-bg);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5l2.5 2.5L8 3' stroke='%230f6e56' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}

.tool-preview {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
}

.tool-preview-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 0.5px solid var(--border);
}

.tool-preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-md);
}

.tool-preview-dot.active { background: var(--success); }

.tool-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 11px;
}

.tool-preview-row:last-child { border: none; }

.tool-preview-name { color: var(--text2); }
.tool-preview-count { color: var(--accent); font-weight: 600; }
.tool-preview-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 10px;
  overflow: hidden;
}
.tool-preview-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--brand-grad);
}

/* ── Blog ────────────────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.post-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.post-card:hover {
  border-color: var(--border-md);
  transform: translateY(-2px);
}

.post-card-thumb {
  aspect-ratio: 16/9;
  background: var(--surface2);
  overflow: hidden;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-body { padding: 1.25rem; }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.post-card-cat {
  font-size: 10px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-card-date {
  font-size: 11px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
}

.post-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Single post */
.post-header { padding: 4rem 0 2rem; }
.post-title { margin-bottom: 1.5rem; }
.post-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text3);
  font-family: 'DM Mono', monospace;
  flex-wrap: wrap;
}

.post-content {
  padding: 2rem 0 4rem;
}

.post-content p { margin-bottom: 1.25rem; font-size: 1rem; }
.post-content h2 { margin: 2rem 0 0.75rem; }
.post-content h3 { margin: 1.5rem 0 0.5rem; }
.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--text2);
  font-size: 15px;
}
.post-content li { margin-bottom: 0.5rem; line-height: 1.65; }
.post-content a { color: var(--accent); text-decoration: underline; }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--accent-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text2);
  font-size: 15px;
}
.post-content code {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}
.post-content pre {
  background: var(--text);
  color: #f8f7f4;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 1.25rem;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
}

/* ── Contact / CTA ───────────────────────────────────────────── */
.cta-section {
  background: var(--surface);
  text-align: center;
}

.cta-inner {
  background: var(--text);
  border-radius: calc(var(--radius) * 1.5);
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.cta-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124,124,232,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-inner p {
  color: rgba(255,255,255,0.6);
  margin-bottom: 2rem;
  font-size: 1rem;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-field label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-field input,
.form-field textarea,
.form-field select {
  padding: 10px 14px;
  font-size: 13px;
  font-family: 'Space Grotesk', sans-serif;
  background: rgba(255,255,255,0.07);
  border: 0.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  outline: none;
  transition: border-color 0.15s;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(255,255,255,0.25);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: rgba(124,124,232,0.6);
}

.form-field textarea { resize: vertical; min-height: 100px; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.5);
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  margin-bottom: 1.5rem;
}

.footer-brand .nav-logo-text {
  display: block;
  font-size: 18px;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  line-height: 1.65;
  max-width: 260px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  transition: color 0.15s;
}
.footer-col a:hover { color: rgba(255,255,255,0.8); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

/* ── Page basique ────────────────────────────────────────────── */
.page-hero {
  padding: 5rem 0 3rem;
  border-bottom: 0.5px solid var(--border);
}
.page-hero h1 { margin-bottom: 0.75rem; }
.page-content { padding: 3rem 0 5rem; }

/* ── Widgets / Sidebar ───────────────────────────────────────── */
.widget { margin-bottom: 2rem; }
.widget-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid var(--border);
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 3rem 0 0;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  border: 0.5px solid var(--border-md);
  background: var(--surface);
  transition: all 0.15s;
}

.page-numbers:hover { background: var(--surface2); color: var(--text); }
.page-numbers.current { background: var(--brand-grad); color: #fff; border-color: transparent; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  section { padding: 3rem 0; }
  .hero { padding: 3rem 0 2rem; }
  .services-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }

  /* Header mobile — cacher le bouton "Nous contacter", garder juste le toggle */
  .nav-cta { display: none; }
  .nav-menu, .nav-app-link { display: none; }
  .nav-toggle { display: flex; }

  /* Ajouter "Nous contacter" dans le menu mobile */
  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(248, 247, 244, 0.98);
    backdrop-filter: blur(12px);
    padding: 1rem;
    border-bottom: 0.5px solid var(--border);
    gap: 2px;
    z-index: 200;
  }

  .nav-menu.open .nav-mobile-cta {
    display: flex;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 0.5px solid var(--border);
  }

  /* Empêcher les débordements horizontaux */
  .container, .container--narrow {
    padding: 0 1rem;
    overflow-x: hidden;
  }

  /* Grilles 2 colonnes en inline → 1 colonne */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr auto"] {
    grid-template-columns: 1fr !important;
  }

  /* Tool inner */
  .tool-inner {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
  }

  /* CTA inner */
  .cta-inner { padding: 2.5rem 1.5rem; }

  /* Page hero */
  .page-hero { padding: 3rem 0 2rem; }

  /* Hero actions en colonne */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    text-align: center;
    justify-content: center;
  }
}

