/* ==========================================================================
   ALOLI Corporate Website — style.css
   Pure CSS, responsive, dark-mode ready
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: 'Explora';
  src: url('../fonts/explora.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- Custom properties ---------------------------------------------------- */
:root {
  --primary: #223C90;
  --accent-magenta: #E72486;
  --accent-green: #78B82A;
  --accent-cyan: #00BFFF;

  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #555;
  --text-heading: #111;
  --border: #e0e4ea;
  --shadow: rgba(0, 0, 0, 0.06);
  --shadow-hover: rgba(0, 0, 0, 0.12);

  --hero-from: #0f0f23;
  --hero-via: #162050;
  --hero-to: #223C90;

  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Explora', cursive;

  --max-w: 1140px;
  --radius: 12px;
  --transition: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f23;
    --bg-alt: #161633;
    --bg-card: #1a1a3e;
    --text: #e0e0e0;
    --text-muted: #a0a0b8;
    --text-heading: #f0f0f0;
    --border: #2a2a50;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
  }
}

/* --- Reset & base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-magenta); }

img, svg { max-width: 100%; height: auto; }

/* --- Utility -------------------------------------------------------------- */
.container { width: 90%; max-width: var(--max-w); margin: 0 auto; }

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-heading);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Header / Nav --------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 15, 35, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover { color: #fff; }

.lang-switch {
  display: inline-flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 3px;
}

.lang-switch a {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
}

.lang-switch a.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: var(--transition);
}

/* --- Hero ----------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, var(--hero-from) 0%, var(--hero-via) 40%, var(--hero-to) 100%);
  color: #fff;
  padding: 6rem 1rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(231, 36, 134, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 60%, rgba(0, 191, 255, 0.06) 0%, transparent 60%);
  animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(2%, -2%) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-logo {
  height: 120px;
  width: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.3));
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2.5rem;
  letter-spacing: 0.5px;
}

.hero-sub span {
  margin: 0 0.5rem;
  color: rgba(255, 255, 255, 0.35);
}

.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--accent-magenta);
  color: #fff;
  box-shadow: 0 4px 20px rgba(231, 36, 134, 0.35);
}

.btn--primary:hover {
  background: #c91e72;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(231, 36, 134, 0.45);
}

/* --- Chiffres clés -------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem 1rem;
}

.stat-number {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-number--magenta { color: var(--accent-magenta); }
.stat-number--green   { color: var(--accent-green); }
.stat-number--cyan    { color: var(--accent-cyan); }
.stat-number--primary { color: var(--primary); }

@media (prefers-color-scheme: dark) {
  .stat-number--primary { color: #5b7de8; }
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* --- About ---------------------------------------------------------------- */
.about-content {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.85;
}

.about-content strong {
  color: var(--text-heading);
}

/* --- Expertises ----------------------------------------------------------- */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.expertise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  transition: all var(--transition);
  box-shadow: 0 2px 8px var(--shadow);
  position: relative;
  overflow: hidden;
}

.expertise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: height var(--transition);
}

.expertise-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--shadow-hover);
}

.expertise-card--security::before  { background: var(--accent-magenta); }
.expertise-card--web::before       { background: var(--accent-cyan); }
.expertise-card--hosting::before   { background: var(--accent-green); }
.expertise-card--management::before { background: var(--primary); }

@media (prefers-color-scheme: dark) {
  .expertise-card--management::before { background: #5b7de8; }
}

.expertise-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  display: block;
}

.expertise-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
}

.expertise-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.expertise-tags span {
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* --- Technologies --------------------------------------------------------- */
.tech-intro {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.tech-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-heading);
  box-shadow: 0 2px 8px var(--shadow);
  transition: all var(--transition);
}

.tech-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-hover);
}

.tech-badge-icon {
  font-size: 1.4rem;
}

/* --- Open Source ---------------------------------------------------------- */
.opensource-content {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
}

.opensource-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.opensource-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 2rem 0;
}

.opensource-stat {
  text-align: center;
}

.opensource-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-green);
}

.opensource-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn--outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 2px solid var(--accent-cyan);
}

.btn--outline:hover {
  background: var(--accent-cyan);
  color: #fff;
  transform: translateY(-2px);
}

/* --- Contact -------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.4rem;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.contact-item-icon {
  font-size: 1.3rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: 10px;
  flex-shrink: 0;
}

.contact-item a {
  color: var(--text);
  font-weight: 500;
}

.contact-item a:hover {
  color: var(--accent-cyan);
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 2px 12px var(--shadow);
}

.contact-form h3 {
  font-size: 1.2rem;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn--submit {
  width: 100%;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  padding: 0.85rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

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

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--hero-from);
  color: rgba(255, 255, 255, 0.6);
  padding: 3rem 0 2rem;
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
  height: 48px;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.footer-links a:hover { color: #fff; }

.footer-copy {
  color: rgba(255, 255, 255, 0.35);
  margin-top: 1rem;
}

/* --- Scroll animations ---------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 900px) {
  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.97);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-toggle {
    display: block;
  }

  .hero-tagline {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  .hero-logo {
    height: 80px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .opensource-stats {
    gap: 1.5rem;
  }

  .contact-form {
    padding: 1.5rem;
  }
}

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
