/* ==========================================================================
   ELECTRO TUNISIE — Base
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--et-font-body);
  font-size: var(--et-size-base);
  line-height: 1.6;
  color: var(--et-navy);
  background: var(--et-white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--et-font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0 0 var(--et-space-2);
  color: var(--et-navy);
  text-transform: uppercase;
}

h1 { font-size: var(--et-size-4xl); letter-spacing: -0.02em; }
h2 { font-size: var(--et-size-3xl); letter-spacing: -0.015em; }
h3 { font-size: var(--et-size-xl); }
h4 { font-size: var(--et-size-lg); text-transform: none; }

p { margin: 0 0 var(--et-space-2); color: var(--et-gray-700); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--et-font-mono);
  font-size: var(--et-size-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--et-blue);
  margin-bottom: var(--et-space-1);
}

.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--et-status-on);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18);
}

/* Container & grilles */
.container {
  max-width: var(--et-container);
  margin: 0 auto;
  padding: 0 var(--et-space-3);
}

.container--narrow { max-width: var(--et-container-narrow); }

.section { padding: var(--et-space-6) 0; }
.section--tight { padding: var(--et-space-5) 0; }
.section--mist { background: var(--et-mist-2); }
.section--navy { background: var(--et-navy); color: var(--et-white); }
.section--navy h2, .section--navy h3 { color: var(--et-white); }
.section--navy p { color: rgba(255,255,255,0.72); }

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

@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: var(--et-size-3xl); }
  h2 { font-size: var(--et-size-2xl); }
  .section { padding: var(--et-space-5) 0; }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  h1 { font-size: 2.4rem; }
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--et-font-display);
  font-weight: 700;
  font-size: var(--et-size-sm);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding: 0.95em 1.7em;
  border-radius: var(--et-radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--et-speed-fast) var(--et-ease), box-shadow var(--et-speed-fast) var(--et-ease), background var(--et-speed-fast) var(--et-ease);
}
.btn:focus-visible {
  outline: 3px solid var(--et-blue);
  outline-offset: 2px;
}
.btn--primary {
  background: var(--et-yellow);
  color: var(--et-navy);
  box-shadow: var(--et-shadow-yellow);
}
.btn--primary:hover { transform: translateY(-2px); background: var(--et-yellow-dark); }

.btn--secondary {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: var(--et-white);
}
.btn--secondary:hover { border-color: var(--et-white); transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  border-color: var(--et-line);
  color: var(--et-navy);
}
.btn--ghost:hover { border-color: var(--et-blue); color: var(--et-blue); }

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

/* Cartes */
.card {
  background: var(--et-white);
  border: 1px solid var(--et-line);
  border-radius: var(--et-radius-md);
  padding: var(--et-space-3);
  transition: box-shadow var(--et-speed-base) var(--et-ease), transform var(--et-speed-base) var(--et-ease);
}
.card:hover { box-shadow: var(--et-shadow-md); transform: translateY(-3px); }

/* Tag de statut */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--et-font-mono);
  font-size: var(--et-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: #0E7A55;
}
.status-pill::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--et-status-on);
  animation: et-pulse 1.8s ease-in-out infinite;
}
@keyframes et-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
  50% { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
}

/* Accessibilité : focus visible global */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--et-blue);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--et-navy);
  color: var(--et-white);
  padding: 0.8em 1.2em;
  z-index: 999;
}
.skip-link:focus { left: 0; }
