/* ==============================================================================
   Feuille de style éco-conçue (GreenIT) - Étude Consommation IA Locale
   - Aucune dépendance externe (0 appel réseau tiers, 0 police externe bloquante)
   - Utilisation de la pile système moderne
   - CSS variables pour le design system
   ============================================================================== */

:root {
  --color-primary: #0f172a;       /* Slate 900 */
  --color-primary-light: #1e293b; /* Slate 800 */
  --color-secondary: #0369a1;     /* Sky 700 */
  --color-accent: #059669;        /* Emerald 600 */
  --color-accent-light: #ecfdf5;  /* Emerald 50 */
  --color-text: #334155;          /* Slate 700 */
  --color-text-dark: #0f172a;     /* Slate 900 */
  --color-text-muted: #64748b;    /* Slate 500 */
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;        /* Slate 50 */
  --color-border: #e2e8f0;        /* Slate 200 */
  --color-card-border: #cbd5e1;   /* Slate 300 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 8px;
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* En-tête du site */
.site-header {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.main-nav ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 20px;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.main-nav a:hover {
  color: var(--color-secondary);
}

.nav-cta {
  background-color: var(--color-secondary);
  color: #ffffff !important;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
}

.nav-cta:hover {
  background-color: #0284c7;
}

/* Hero Section */
.hero-section {
  padding: 60px 0 40px 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 16px;
  border: 1px solid #a7f3d0;
}

.hero-title {
  font-size: 2.3rem;
  line-height: 1.25;
  color: var(--color-primary);
  font-weight: 800;
  max-width: 900px;
  margin: 0 auto 20px auto;
}

.hero-intro {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 780px;
  margin: 0 auto 30px auto;
  color: var(--color-text);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

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

.btn-primary:hover {
  background-color: #0284c7;
}

.btn-secondary {
  background-color: var(--color-bg-alt);
  color: var(--color-text-dark);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-border);
}

/* 4 Chiffres Clés */
.stats-section {
  padding: 40px 0;
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--color-secondary);
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-title {
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: auto;
}

/* Sections communes */
.content-section {
  padding: 60px 0;
}

.bg-alt {
  background-color: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-header {
  margin-bottom: 35px;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.3;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.subsection-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
}

/* Grilles */
.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.grid-3-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.clean-list {
  list-style: none;
  margin-top: 16px;
}

.clean-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.clean-list li::before {
  content: "■";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.8rem;
  top: 1px;
}

.card-highlight {
  background-color: #f1f5f9;
  border-left: 4px solid var(--color-secondary);
  padding: 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.card-subtitle {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.card-highlight p {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.card-highlight p:last-child {
  margin-bottom: 0;
}

/* Tableaux */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.data-table th {
  background-color: var(--color-primary);
  color: #ffffff;
  padding: 12px 14px;
  font-weight: 600;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-dark);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:nth-child(even) td {
  background-color: #fafbfc;
}

.row-highlight td {
  background-color: #f0fdf4 !important;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.tag-top {
  display: inline-block;
  background-color: var(--color-accent);
  color: #ffffff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Encadré méthode */
.method-box {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}

.method-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-bottom: 12px;
}

.tags-list li {
  background-color: #e0f2fe;
  color: #0369a1;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}

.small-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.mt-2 {
  margin-top: 10px;
}

/* Cartes d'enseignements */
.insights-grid {
  margin-top: 30px;
}

.insight-card {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.insight-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 10px;
}

.insight-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.insight-card p:last-child {
  margin-bottom: 0;
}

.card-box {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-box p {
  margin-bottom: 14px;
  font-size: 0.92rem;
}

.card-box p:last-child {
  margin-bottom: 0;
}

/* Cartes comparatives benchmarks */
.comparison-card {
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
}

.card-primary {
  background-color: #f0f9ff;
  border-color: #bae6fd;
}

.comparison-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.icon-list {
  list-style: none;
}

.icon-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.check-cross li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: #dc2626;
  font-weight: 700;
}

.check-ok li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Section Téléchargement / Formulaire */
.download-section {
  padding: 60px 0;
  background-color: var(--color-primary);
  color: #ffffff;
}

.download-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.section-tag-light {
  color: #6ee7b7;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 8px;
}

.download-title {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 16px;
}

.download-info p {
  font-size: 1rem;
  color: #cbd5e1;
  margin-bottom: 20px;
}

.download-bullets {
  list-style: none;
}

.download-bullets li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: #e2e8f0;
  font-size: 0.92rem;
}

.download-bullets li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #38bdf8;
  font-weight: 700;
}

.download-form-box {
  background-color: #ffffff;
  color: var(--color-text-dark);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.form-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.form-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.15);
}

.btn-submit {
  width: 100%;
  background-color: var(--color-accent);
  color: #ffffff;
  padding: 14px;
  font-size: 1rem;
}

.btn-submit:hover {
  background-color: #047857;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-submit.loading .btn-text {
  opacity: 0.8;
}

.btn-submit.loading .btn-spinner {
  display: inline-block;
}

.form-feedback {
  margin-top: 16px;
  font-size: 0.9rem;
  padding: 12px;
  border-radius: 6px;
  display: none;
}

.form-feedback.success {
  display: block;
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.form-feedback.error {
  display: block;
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* FAQ */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
}

.faq-item {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
  position: relative;
  font-size: 1rem;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 20px;
  font-size: 1.3rem;
  color: var(--color-secondary);
  line-height: 1;
}

.faq-item[open] .faq-question::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px 16px 20px;
  font-size: 0.92rem;
  color: var(--color-text);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background-color: #0b1120;
  color: #94a3b8;
  padding: 36px 0;
  border-top: 1px solid #1e293b;
  font-size: 0.88rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left p, .footer-right p {
  margin-bottom: 4px;
}

.footer-left strong {
  color: #e2e8f0;
}

.footer-left a, .footer-right a {
  color: #38bdf8;
  text-decoration: none;
}

.footer-left a:hover, .footer-right a:hover {
  text-decoration: underline;
}

.eco-badge {
  color: #6ee7b7;
  font-weight: 600;
}

/* Media Queries Responsives */
@media (max-width: 900px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2-cols, .download-wrapper {
    grid-template-columns: 1fr;
  }
  .grid-3-cols {
    grid-template-columns: 1fr;
  }
  .main-nav {
    display: none; /* Simplification mobile GreenIT sans JS encombrant */
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 1.5rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}
