/* ============================================================================
   ContentWatch · Prompts — Feuille de style
   Charte partagée : Bricolage Grotesque + Inter, teal / lime / mint / pink.
   ========================================================================== */

:root {
  --teal:          #0F3B40;
  --teal-deep:     #0B2E32;
  --cream:         #F5F1E8;
  --cream-bright:  #FFFDF7;
  --white:         #FFFFFF;

  --lime:          #D9F26A;
  --mint:          #3DE0B4;
  --pink:          #F5B6CC;
  --pink-strong:   #F58FB0;

  --ink:           #0B2E32;
  --ink-soft:      #4A6468;
  --on-dark:       #F5F1E8;
  --on-dark-soft:  #AFC6C4;

  --line:          #E4DED0;

  --max-width:     920px;
  --gutter:        clamp(18px, 4vw, 36px);

  --radius-sm:  12px;
  --radius:     16px;
  --radius-lg:  24px;
  --radius-pill: 999px;

  --shadow-card: 0 20px 60px rgba(15, 59, 64, 0.10), 0 0 0 1px rgba(15, 59, 64, 0.06);
  --shadow-soft: 0 16px 40px rgba(15, 59, 64, 0.08);
  --shadow-mint: 0 12px 32px rgba(61, 224, 180, 0.30);

  /* Easing signature (cf. design system) */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(61, 224, 180, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(245, 143, 176, 0.08), transparent 55%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

a { color: inherit; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 241, 232, 0.82);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal-deep); }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; color: var(--teal-deep); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-word { font-family: var(--font-head); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand-dot { color: var(--mint); }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }
.nav-cta {
  background: var(--teal-deep);
  color: var(--on-dark) !important;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
}
.nav-cta:hover { background: var(--teal); }
.nav-cta .arrow { transition: transform .2s; display: inline-block; }
.nav-cta:hover .arrow { transform: translateX(3px); }

/* ---------------- Hero ---------------- */
.hero { padding: clamp(28px, 5vw, 52px) 0 28px; }

/* Kicker signature : capitales espacées précédées d'un trait mint (cf. DS) */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}
.kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--mint);
}

/* Scribble : trait rose main-levée sous un mot (motif de marque) */
.scribble { position: relative; display: inline-block; color: var(--teal-deep); }
.scribble-svg {
  position: absolute;
  left: -4%; right: -4%; bottom: -14%;
  width: 108%; height: auto;
  pointer-events: none;
  overflow: visible;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(61, 224, 180, 0.16);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.hero-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 18px 0 12px;
  color: var(--teal-deep);
}
.hero-sub { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-soft); max-width: 620px; margin: 0 0 18px; }
.hero-meta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.curator { font-weight: 700; color: var(--ink); }
.dot-sep { opacity: .5; }

/* ---------------- Filtres ---------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0 20px;
}
.chip {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all .18s ease;
}
.chip:hover { border-color: var(--mint); color: var(--ink); }
.chip[aria-selected="true"] {
  background: var(--teal-deep);
  color: var(--on-dark);
  border-color: var(--teal-deep);
}

/* ---------------- Feed / cartes ---------------- */
.feed {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 80px;
}
.feed-loading { color: var(--ink-soft); text-align: center; padding: 40px 0; font-weight: 500; }
.card {
  position: relative;
  overflow: hidden;
  scroll-margin-top: 84px;
  background: var(--cream-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-card);
  transition: transform .4s cubic-bezier(0.16,1,0.3,1), box-shadow .4s cubic-bezier(0.16,1,0.3,1);
}
/* Fine barre teal qui se déploie en haut au survol (motif DS) */
.card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--teal-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(0.16,1,0.3,1);
}
/* Pas de lift au survol — seule la barre du haut se déploie. */
.card:hover::after { transform: scaleX(1); }
/* Carte ciblée par un lien de partage (#id) */
.card.is-target { box-shadow: 0 0 0 2px var(--mint), 0 20px 60px rgba(15,59,64,.14); }
.card.is-target::after { transform: scaleX(1); }

.card-head { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head);
  font-weight: 700; font-size: 15px;
  color: var(--teal-deep);
  background: linear-gradient(135deg, var(--mint), var(--lime));
}
.card-head-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.card-author { font-weight: 700; font-size: 15px; color: var(--ink); }
.card-sub { font-size: 13px; color: var(--ink-soft); }

.tool-badge {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 6px 12px 6px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.tool-badge::before {
  content: "Outil recommandé";
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 700;
}
.tool-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); }

.card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(19px, 2.6vw, 23px);
  letter-spacing: -0.01em;
  color: var(--teal-deep);
  margin: 18px 0 8px;
}
.card-excerpt { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 16px; }

/* Bloc prompt */
.prompt-wrap { position: relative; }
.prompt-text {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--on-dark);
  background: var(--teal-deep);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}
.card.is-locked .prompt-text { filter: blur(6px); user-select: none; max-height: 180px; overflow: hidden; }
.lock-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(11,46,50,.35), rgba(11,46,50,.72));
  border-radius: var(--radius);
  text-align: center;
  padding: 20px;
}
.lock-ic { width: 34px; height: 34px; color: var(--lime); }
.lock-ic svg { width: 100%; height: 100%; }
.lock-txt { color: var(--on-dark); font-weight: 600; margin: 0; }

/* Tags */
.card-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tag { font-size: 12.5px; font-weight: 600; color: var(--teal); background: rgba(61,224,180,.14); padding: 4px 10px; border-radius: var(--radius-pill); }

/* Actions */
.card-actions {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.act {
  display: inline-flex; align-items: center; gap: 5px;
  font: inherit; font-size: 12px; font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all .16s ease;
}
.act svg { width: 14px; height: 14px; flex: 0 0 14px; }
.act .act-ic { display: inline-flex; }
.act .act-ic svg { width: 14px; height: 14px; }
.act:hover { border-color: var(--teal-deep); background: var(--teal-deep); color: var(--on-dark); }
.act.is-done { border-color: var(--mint); background: var(--mint); color: var(--teal-deep); }
.act-result { color: var(--pink-strong); border-color: var(--pink); }
.act-result:hover { background: var(--pink-strong); border-color: var(--pink-strong); color: var(--white); }

/* ---------------- Buttons ---------------- */
.btn { font: inherit; font-weight: 600; border: none; border-radius: var(--radius-pill); padding: 14px 28px; cursor: pointer; transition: transform .25s var(--ease-out, cubic-bezier(0.16,1,0.3,1)), background .25s ease, box-shadow .25s ease; }
.btn:hover { transform: translateY(-2px); }
/* CTA principal : mint qui vire au lime au survol + ombre verte (DS) */
.btn-mint { background: var(--mint); color: var(--teal-deep); }
.btn-mint:hover { background: var(--lime); box-shadow: 0 12px 32px rgba(61,224,180,.30); }
.btn-lime { background: var(--lime); color: var(--teal-deep); }
.btn-lime:hover { filter: brightness(1.04); }

/* ---------------- Modale ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: rgba(11, 46, 50, 0.55);
  backdrop-filter: blur(4px);
  padding: 20px;
  animation: fade .2s ease;
}
.modal {
  position: relative;
  width: 100%; max-width: 440px;
  background: var(--cream-bright);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 38px);
  box-shadow: 0 30px 70px -20px rgba(11,46,50,.6);
  animation: pop .22s ease;
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: transparent;
  font-size: 24px; line-height: 1; color: var(--ink-soft);
  cursor: pointer;
}
.modal-close:hover { background: rgba(11,46,50,.06); color: var(--ink); }
.modal-title { font-family: var(--font-head); font-weight: 800; font-size: 26px; color: var(--teal-deep); margin: 14px 0 8px; letter-spacing: -0.01em; }
.modal-sub { color: var(--ink-soft); font-size: 15px; margin: 0 0 20px; }
.signup-form { display: flex; flex-direction: column; gap: 10px; }
.signup-form input {
  font: inherit; font-size: 15px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--white);
}
.signup-form input:focus { outline: 2px solid var(--mint); border-color: var(--mint); }
.modal-fine { font-size: 12.5px; color: var(--ink-soft); text-align: center; margin: 14px 0 0; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(10px);
  z-index: 100;
  background: var(--teal-deep); color: var(--on-dark);
  font-weight: 600; font-size: 14px;
  padding: 12px 20px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.site-footer p { color: var(--ink-soft); font-size: 14px; text-align: center; margin: 0; }
.site-footer a { color: var(--teal); font-weight: 600; }

/* ---------------- Utilitaires ---------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .tool-badge::before { display: none; }
  .card-actions .act span { font-size: 13px; }
  .nav a:not(.nav-cta) { display: none; }
}
