/* ==========================================================================
   Terranota Store — Charte officielle (calquée sur terranota.fr)
   Couleurs extraites du site : aubergine #1E1A34, vert vif #44D62C,
   accent magenta #CC3366, filet corail #E8876F.
   ========================================================================== */

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

:root {
  /* Palette marque */
  --aubergine:       #1E1A34;
  --aubergine-2:     #2B2142;
  --aubergine-soft:  #3A2F55;
  --vert:            #44D62C;
  --vert-fonce:      #2BA320;
  --vert-soft:       #E7FAE2;
  --magenta:         #CC3366;
  --corail:          #E8876F;

  /* Neutres */
  --fond:            #FFFFFF;
  --fond-alt:        #F5F6F7;
  --bordure:         #E5E7EB;
  --bordure-soft:    #F0F1F3;
  --texte:           #333333;
  --texte-doux:      #6B7280;
  --texte-leger:     #9CA3AF;

  /* Statuts */
  --ok-bg:  #E7FAE2; --ok-fg:  #1F7A13;
  --warn-bg:#FFF4D6; --warn-fg:#8A5A00;
  --err-bg: #FDE2E7; --err-fg: #9C1236;

  /* Rayons & ombres */
  --r-sm: 3px; --r-md: 6px; --r-lg: 10px;
  --ombre-carte: 0 1px 2px rgba(30,26,52,.04), 0 4px 16px rgba(30,26,52,.05);
  --ombre-hover: 0 2px 4px rgba(30,26,52,.06), 0 12px 32px rgba(30,26,52,.08);
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: Helvetica, "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--texte);
  background: var(--fond);
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--aubergine); }
a:hover { color: var(--magenta); }

/* ==========================================================================
   Filet corail décoratif (reprise du cadre autour du hero terranota.fr)
   ========================================================================== */
.corail-bar {
  height: 4px;
  background: var(--corail);
}

/* ==========================================================================
   Header — blanc, nav uppercase espacée, souligné vert sur actif
   ========================================================================== */
.store-header {
  background: var(--fond);
  border-bottom: 1px solid var(--bordure);
}
.store-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.brand-logo { height: 44px; width: auto; display: block; }
.brand-sep {
  height: 32px;
  width: 1px;
  background: var(--bordure);
}
.brand-title {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--texte-doux);
  font-weight: 500;
}
.brand-title strong { color: var(--aubergine); font-weight: 700; }

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
}
.main-nav a {
  color: var(--aubergine);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .12s, color .12s;
}
.main-nav a:hover { color: var(--vert-fonce); border-bottom-color: var(--vert); }
.main-nav a.active { color: var(--vert-fonce); border-bottom-color: var(--vert); }

/* ==========================================================================
   Hero — titre + gros CTA d'installation (la star)
   ========================================================================== */
.hero {
  background: var(--fond-alt);
  padding: 48px 32px 40px;
  border-bottom: 1px solid var(--bordure);
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; gap: 28px; } }

.hero-kicker {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--vert-fonce);
  font-weight: 700;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: 34px;
  color: var(--aubergine);
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.15;
  margin-bottom: 10px;
}
.hero-sub {
  font-size: 15px;
  color: var(--texte-doux);
  max-width: 560px;
  line-height: 1.6;
}

/* ---- CTA d'installation ---- */
.cta-card {
  background: var(--aubergine);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: 0 4px 20px rgba(30,26,52,0.18);
  position: relative;
  overflow: hidden;
}
.cta-card::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 160px; height: 160px;
  border: 20px solid var(--vert);
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
}
.cta-label {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--vert);
  margin-bottom: 10px;
}
.cta-card h2 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}
.cta-card .cta-sub {
  font-size: 13px;
  opacity: 0.75;
  margin-bottom: 18px;
  line-height: 1.55;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--vert);
  color: var(--aubergine);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: background .12s, transform .08s;
}
.btn-cta:hover { background: #7AFA5E; color: var(--aubergine); }
.btn-cta:active { transform: translateY(1px); }
.btn-cta svg { width: 18px; height: 18px; }

.cta-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  font-size: 11px;
  opacity: 0.7;
}
.cta-foot a { color: var(--vert); text-decoration: none; }
.cta-foot a:hover { text-decoration: underline; }

/* ---- Commande PowerShell (copier-coller) ---- */
.cmd-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.cmd-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  margin-bottom: 8px;
}
.cmd-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}
.cmd-code {
  flex: 1;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 11.5px;
  padding: 10px 12px;
  color: #E7FAE2;
  overflow-x: auto;
  white-space: nowrap;
  line-height: 1.4;
}
.cmd-copy {
  flex-shrink: 0;
  background: var(--vert);
  color: var(--aubergine);
  border: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0 16px;
  cursor: pointer;
  transition: background .12s;
}
.cmd-copy:hover { background: #7AFA5E; }
.cmd-copy.copied { background: #FFF; color: var(--vert-fonce); }

/* ---- "Comment ça marche" - 3 étapes ---- */
.steps-section {
  background: #fff;
  border-bottom: 1px solid var(--bordure);
  padding: 32px;
}
.steps-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 760px) { .steps-inner { grid-template-columns: 1fr; } }

.step {
  display: flex;
  gap: 16px;
  padding: 6px 0;
}
.step-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--vert-soft);
  color: var(--vert-fonce);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--vert);
}
.step-body { flex: 1; }
.step h4 {
  font-size: 14px;
  color: var(--aubergine);
  font-weight: 700;
  margin-bottom: 3px;
}
.step p {
  font-size: 12px;
  color: var(--texte-doux);
  line-height: 1.55;
}

/* ==========================================================================
   Toolbar — recherche + filtres
   ========================================================================== */
.toolbar {
  background: var(--fond);
  border-bottom: 1px solid var(--bordure);
  padding: 16px 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.toolbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 260px;
  font: inherit;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--bordure);
  border-radius: var(--r-md);
  background: var(--fond)
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>")
    no-repeat 12px center / 16px;
  color: var(--texte);
  transition: border-color .12s, box-shadow .12s;
}
.search-input:focus {
  outline: none;
  border-color: var(--vert);
  box-shadow: 0 0 0 3px rgba(68, 214, 44, 0.18);
}

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font: inherit;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 7px 14px;
  border: 1px solid var(--bordure);
  border-radius: 999px;
  background: var(--fond);
  color: var(--texte-doux);
  cursor: pointer;
  transition: all .12s;
}
.chip:hover { border-color: var(--aubergine); color: var(--aubergine); }
.chip.active {
  background: var(--aubergine);
  color: #fff;
  border-color: var(--aubergine);
}

/* ==========================================================================
   Grille d'extensions
   ========================================================================== */
main { max-width: 1280px; margin: 0 auto; padding: 28px 32px 60px; }
.count-line {
  font-size: 12px;
  color: var(--texte-doux);
  margin-bottom: 16px;
  letter-spacing: .3px;
}
.ext-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.ext-card {
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: var(--r-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  position: relative;
  overflow: hidden;
}
.ext-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 3px;
  background: var(--vert);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .18s;
}
.ext-card:hover {
  border-color: var(--aubergine);
  box-shadow: var(--ombre-hover);
}
.ext-card:hover::before { transform: scaleY(1); }

.ext-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ext-card-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  flex-shrink: 0;
  background: var(--fond-alt);
  object-fit: contain;
  padding: 6px;
}
.ext-card-title { flex: 1; min-width: 0; }
.ext-card-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--aubergine);
  line-height: 1.25;
}
.ext-card-title .meta {
  font-size: 11px;
  color: var(--texte-doux);
  margin-top: 3px;
  letter-spacing: .3px;
}
.ext-card-short {
  font-size: 13px;
  color: var(--texte);
  line-height: 1.55;
  flex: 1;
}
.ext-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--bordure-soft);
  padding-top: 12px;
}
.ext-card-version {
  font-size: 11px;
  color: var(--texte-leger);
  font-variant-numeric: tabular-nums;
  letter-spacing: .4px;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 3px;
  font-size: 10px;
  letter-spacing: .8px;
  text-transform: uppercase;
  font-weight: 700;
}
.tag.prod    { background: var(--ok-bg);   color: var(--ok-fg); }
.tag.beta    { background: var(--warn-bg); color: var(--warn-fg); }
.tag.archive { background: var(--bordure); color: var(--texte-doux); }
.tag.mv3     { background: var(--fond-alt); color: var(--aubergine); border: 1px solid var(--bordure); }
.tag.modele  { background: #fff; color: var(--vert-fonce); border: 1px dashed var(--vert); }
.tag.webapp  { background: var(--aubergine); color: var(--vert); }

/* ==========================================================================
   Fiche détaillée
   ========================================================================== */
.detail-head {
  background: var(--aubergine);
  color: #fff;
  padding: 40px 32px 44px;
  position: relative;
}
.detail-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--vert);
}
.detail-head-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.detail-icon {
  width: 80px; height: 80px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
  padding: 10px;
  object-fit: contain;
}
.detail-title h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.15;
}
.detail-title .sub {
  font-size: 13px;
  opacity: 0.75;
  margin-top: 6px;
  letter-spacing: .4px;
}
.back-link {
  color: var(--vert);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
  display: inline-block;
}
.back-link:hover { color: #fff; }

.detail-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 32px 64px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
}
@media (max-width: 900px) {
  .detail-main { grid-template-columns: 1fr; }
}

.sec-title {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--vert-fonce);
  padding-bottom: 8px;
  margin: 28px 0 14px;
  border-bottom: 1px solid var(--bordure);
  position: relative;
}
.sec-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 48px; height: 3px;
  background: var(--vert);
}
.sec-title:first-child { margin-top: 0; }

.prose { font-size: 14px; line-height: 1.7; color: var(--texte); }
.prose p + p { margin-top: 12px; }

.info-row {
  display: flex;
  padding: 9px 0;
  border-bottom: 1px solid var(--bordure-soft);
  font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-row .k {
  width: 160px;
  color: var(--texte-doux);
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
  padding-top: 2px;
}
.info-row .v { flex: 1; }

/* Install box — sticky sidebar */
.install-box {
  background: var(--fond);
  border: 1px solid var(--bordure);
  border-radius: var(--r-md);
  padding: 22px;
  position: sticky;
  top: 76px;
  box-shadow: var(--ombre-carte);
}
.install-box h4 {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--vert-fonce);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bordure);
  position: relative;
}
.install-box h4::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 40px; height: 3px;
  background: var(--vert);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--aubergine);
  color: #fff;
  text-decoration: none;
  text-align: center;
  padding: 11px 16px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border: 1px solid var(--aubergine);
  cursor: pointer;
  margin-bottom: 8px;
  transition: background .12s, color .12s, border-color .12s;
}
.btn:hover { background: var(--vert-fonce); border-color: var(--vert-fonce); color: #fff; }
.btn.secondary {
  background: #fff;
  color: var(--aubergine);
}
.btn.secondary:hover {
  background: var(--aubergine);
  color: #fff;
  border-color: var(--aubergine);
}

/* Changelog */
.changelog {
  border-left: 2px solid var(--bordure);
  padding-left: 18px;
  margin-top: 4px;
}
.changelog-item {
  margin-bottom: 18px;
  position: relative;
}
.changelog-item::before {
  content: "";
  position: absolute;
  left: -22px; top: 6px;
  width: 8px; height: 8px;
  background: var(--vert);
  border-radius: 50%;
  border: 2px solid var(--fond);
  box-shadow: 0 0 0 1px var(--vert);
}
.changelog-item:last-child { margin-bottom: 0; }
.changelog-ver {
  font-weight: 700;
  color: var(--aubergine);
  font-size: 13px;
}
.changelog-date {
  font-size: 11px;
  color: var(--texte-leger);
  margin-left: 10px;
  letter-spacing: .4px;
}
.changelog-notes {
  font-size: 13px;
  line-height: 1.6;
  color: var(--texte);
  margin-top: 4px;
}

/* Code / pre */
pre, code {
  font-family: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}
pre {
  background: var(--aubergine);
  color: #D9D4F0;
  border-radius: var(--r-md);
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.55;
}
pre::selection, pre *::selection { background: var(--vert); color: var(--aubergine); }
code {
  background: var(--fond-alt);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--aubergine);
  font-size: 12px;
}
pre code { background: none; padding: 0; color: inherit; }

/* Callout */
.callout {
  background: #FFF8E8;
  border: 1px solid #F0D981;
  border-left: 4px solid #D99E17;
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 13px;
  color: #6B4D00;
  margin: 14px 0;
  line-height: 1.55;
}

/* Footer */
.store-footer {
  background: var(--aubergine);
  color: rgba(255,255,255,0.7);
  padding: 24px 32px;
  font-size: 12px;
  margin-top: 40px;
}
.store-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.store-footer a { color: var(--vert); text-decoration: none; }
.store-footer a:hover { color: #fff; }

/* Empty state */
.empty {
  background: var(--fond);
  border: 1px dashed var(--bordure);
  border-radius: var(--r-md);
  padding: 48px;
  text-align: center;
  color: var(--texte-doux);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 640px) {
  .store-header-inner { padding: 14px 18px; flex-wrap: wrap; gap: 18px; }
  .main-nav { gap: 16px; font-size: 11px; width: 100%; margin-left: 0; }
  .hero { padding: 32px 18px 24px; }
  .hero h1 { font-size: 24px; }
  .toolbar { padding: 12px 18px; }
  main { padding: 20px 18px 40px; }
  .detail-head, .detail-main { padding-left: 18px; padding-right: 18px; }
}
