/* =========================================================
   LesRibas — conseil & création d'application
   Feuille de style principale
   ========================================================= */

:root {
  /* Couleurs */
  --bg: #0d0f12;
  --bg-elev: #16191e;
  --bg-elev-2: #1b1f27;
  --border: #262b33;
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #f4f5f7;
  --muted: #8e95a5;
  --muted-2: #6b7280;
  --green: #22e584;
  --green-ink: #0d0f12;
  --green-soft: rgba(34, 229, 132, 0.12);
  --indigo: #8b7dff;
  --indigo-soft: rgba(139, 125, 255, 0.14);

  /* Typo */
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rythme */
  --radius: 16px;
  --radius-lg: 22px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--green); color: var(--green-ink); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

section { position: relative; }

.section-pad { padding-block: clamp(56px, 9vw, 120px); }

/* ---------- Éléments partagés ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--green);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
}
.tag .lt { color: var(--muted); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(34, 229, 132, 0.25);
  border-radius: 999px;
  padding: 5px 12px;
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--green);
  color: var(--green-ink);
  box-shadow: 0 8px 30px -12px rgba(34, 229, 132, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -12px rgba(34, 229, 132, 0.8); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-elev); border-color: #333a45; transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 18, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand .logo { width: 38px; height: 38px; }
.brand .wordmark { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.18s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-cta { }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(28px, 5vw, 56px); }
.hero-card {
  position: relative;
  background: linear-gradient(180deg, #14171d 0%, #101318 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 72px);
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 12% -10%, rgba(34, 229, 132, 0.10), transparent 70%),
    radial-gradient(500px 300px at 100% 120%, rgba(139, 125, 255, 0.08), transparent 70%);
  pointer-events: none;
}
.hero-card > * { position: relative; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin-top: 22px;
}
.hero h1 .accent { color: var(--green); }
.hero .lead {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  max-width: 34ch;
  margin-top: 24px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* ---------- Titres de section ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
}
.section-head p { color: var(--muted); max-width: 46ch; margin-top: 10px; }

/* ---------- Cartes services ---------- */
.cards-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: #333a45; background: var(--bg-elev-2); }
.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin: 20px 0 12px;
}
.card p { color: var(--muted); font-size: 15px; }

.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.icon-tile svg { width: 24px; height: 24px; }
.icon-tile.green { background: var(--green-soft); color: var(--green); border: 1px solid rgba(34, 229, 132, 0.22); }
.icon-tile.indigo { background: var(--indigo-soft); color: var(--indigo); border: 1px solid rgba(139, 125, 255, 0.24); }

/* ---------- Réalisation ---------- */
.realisation .real-head { display: flex; align-items: center; gap: 18px; margin: 18px 0 18px; }
.realisation .app-icon {
  width: 60px; height: 60px; border-radius: 15px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.8);
}
.realisation .real-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}
.realisation .real-desc { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.15rem); max-width: 60ch; }
.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 20px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), color 0.2s var(--ease);
}
.link-pill svg { width: 15px; height: 15px; color: var(--green); }
.link-pill:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }

.real-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 44px;
  align-items: start;
}
.phones { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.phone {
  border-radius: 26px;
  overflow: hidden;
  background: #0b0e14;
  border: 1px solid var(--border);
}
.phone img { width: 100%; height: auto; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.feature {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.feature:hover { transform: translateY(-3px); border-color: #333a45; background: var(--bg-elev-2); }
.feature .icon-tile { width: 42px; height: 42px; border-radius: 12px; margin-bottom: 14px; }
.feature .icon-tile svg { width: 20px; height: 20px; }
.feature h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; margin-bottom: 7px; }
.feature p { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(48px, 8vw, 88px) 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px 260px at 50% 0%, rgba(34, 229, 132, 0.10), transparent 70%);
  pointer-events: none;
}
.contact-card > * { position: relative; }
.contact-card h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  letter-spacing: -0.02em;
}
.contact-card .email {
  display: inline-block;
  margin-top: 26px;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  font-weight: 700;
  color: var(--green);
  transition: opacity 0.2s var(--ease);
}
.contact-card .email:hover { opacity: 0.82; }
.contact-card .site {
  display: block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-block: 32px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .mono { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em; }
.footer-links { display: inline-flex; gap: 20px; }
.footer-links a { color: var(--muted); transition: color 0.18s var(--ease); }
.footer-links a:hover { color: var(--text); }

/* ---------- Page légale ---------- */
.legal-hero { padding-top: clamp(40px, 7vw, 88px); }
.legal-hero .back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  margin-bottom: 24px; transition: color 0.18s var(--ease);
}
.legal-hero .back svg { width: 15px; height: 15px; }
.legal-hero .back:hover { color: var(--green); }
.legal-hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 5.5vw, 3rem); letter-spacing: -0.02em;
}
.legal-hero .updated { margin-top: 12px; color: var(--muted); font-size: 14px; }

.legal-body { max-width: 780px; padding-bottom: clamp(60px, 10vw, 120px); }
.legal-body section { padding-top: 44px; }
.legal-body h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  letter-spacing: -0.01em; margin-bottom: 16px;
}
.legal-body h2 .num { color: var(--green); font-family: var(--font-mono); font-size: 0.85rem; margin-right: 10px; }
.legal-body h3 { font-weight: 600; font-size: 1rem; margin: 20px 0 8px; color: var(--text); }
.legal-body p { color: #c4c9d3; margin-bottom: 12px; }
.legal-body ul { color: #c4c9d3; margin: 0 0 12px 20px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a.inline { color: var(--green); }
.legal-body a.inline:hover { text-decoration: underline; }

.legal-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; }
.legal-card dl { display: grid; grid-template-columns: 200px 1fr; gap: 12px 20px; margin: 0; }
.legal-card dt { color: var(--muted); font-size: 14px; }
.legal-card dd { color: var(--text); margin: 0; }

.todo {
  background: rgba(245, 180, 60, 0.14); color: #f2bf6b;
  border: 1px dashed rgba(245, 180, 60, 0.5); border-radius: 6px;
  padding: 1px 8px; font-size: 0.92em;
}
@media (max-width: 560px) {
  .legal-card dl { grid-template-columns: 1fr; gap: 3px 0; }
  .legal-card dt { margin-top: 12px; }
  .legal-card dt:first-child { margin-top: 0; }
}

/* ---------- Révélation au scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .cards-2 { grid-template-columns: 1fr; }
  .real-grid { grid-template-columns: 1fr; }
  .phones { max-width: 440px; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .hero .lead { max-width: none; }
  .nav-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .feature:hover, .link-pill:hover { transform: none; }
}
