/* ============================================================
   Atelier — Système de design partagé PrimaIA
   Spa lumineux et chaleureux. Fond crème, cartes blanches,
   accents terracotta + sauge. Police serif Newsreader.
   Pur CSS (aucun build). Réutilisé par toutes les phases.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,300..700;1,300..700&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --at-bg: #F4EFE6;
  --at-bg-deep: #EBE4D6;
  --at-panel: #FFFFFF;
  --at-panel2: #FBF8F1;
  --at-border: rgba(42, 37, 31, .08);
  --at-border-strong: rgba(42, 37, 31, .16);
  --at-text: #2A251F;
  --at-text2: #6B5D52;
  --at-text3: #9B8B7E;
  --at-accent: #C96442;
  --at-accent-soft: #F4D9CC;
  --at-sage: #7A9276;
  --at-sage-soft: #DCE5D5;
  --at-amber: #D4A574;
  --at-danger: #b3503a;
  --at-serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --at-sans: "Hanken Grotesk", "Inter", system-ui, sans-serif;
  --at-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ─── Typographie ──────────────────────────────────────────── */
.at-h1 {
  font-family: var(--at-serif);
  font-size: 48px;
  font-weight: 300;
  letter-spacing: -.025em;
  line-height: 1.05;
  color: var(--at-text);
  margin: 0;
}
.at-h2 {
  font-family: var(--at-serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--at-text);
  margin: 0;
}
.at-eyebrow {
  font-family: var(--at-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--at-text3);
}
.at-emphasis {
  font-style: italic;
  color: var(--at-accent);
}

/* Primitives partagées — consommées à partir de la Phase 2 (non utilisées en Phase 1) */
/* ─── Cartes ───────────────────────────────────────────────── */
.at-card {
  background: var(--at-panel);
  border: 1px solid var(--at-border);
  border-radius: 12px;
}

/* ─── Boutons ──────────────────────────────────────────────── */
.at-btn {
  font-family: var(--at-sans);
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border: none;
}
.at-btn-accent {
  background: var(--at-accent);
  color: #fff;
}
.at-btn-ghost {
  background: transparent;
  color: var(--at-text);
  border: 1px solid var(--at-border-strong);
}

/* ─── Pilule ───────────────────────────────────────────────── */
.at-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--at-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--at-bg-deep);
  color: var(--at-text2);
}

/* ─── Animations ───────────────────────────────────────────── */
@keyframes at-slide {
  from { transform: translateX(-6px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes at-toast-in {
  from { transform: translate(-50%, 30px); opacity: 0; }
  to   { transform: translate(-50%, 0);    opacity: 1; }
}
@keyframes at-progress {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ─── Toast réutilisable ───────────────────────────────────── */
.at-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--at-text);
  color: var(--at-bg);
  padding: 14px 20px;
  border-radius: 14px;
  min-width: 380px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--at-sans);
  font-size: 13.5px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .08);
  animation: at-toast-in .22s ease-out;
  z-index: 2000;
  overflow: hidden;
}
.at-toast__icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--at-accent-soft);
  color: var(--at-accent);
}
.at-toast__icon--present {
  background: var(--at-sage);
  color: #fff;
}
.at-toast__body {
  flex: 1;
  min-width: 0;
}
.at-toast__title {
  font-weight: 600;
}
.at-toast__meta {
  font-size: 11.5px;
  color: rgba(244, 239, 230, .65);
  margin-top: 1px;
  font-family: var(--at-mono);
  letter-spacing: .04em;
}
.at-toast__action {
  background: transparent;
  color: var(--at-accent);
  border: none;
  font-family: var(--at-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 10px;
  flex-shrink: 0;
}
.at-toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(244, 239, 230, .1);
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}
.at-toast__progress::after {
  content: "";
  display: block;
  height: 100%;
  background: var(--at-accent);
  width: 100%;
  animation: at-progress 3.2s linear forwards;
  border-radius: inherit;
}

/* ─── Responsive : toast quasi pleine largeur en bas (≤768px) ─────────
   Composant partagé : raffinement unique ici plutôt que dupliqué dans
   chaque page. Additif — n'affecte pas le rendu desktop (≥769px). */
@keyframes at-toast-in-mobile {
  from { transform: translateY(110%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@media (max-width: 768px) {
  .at-toast {
    left: 12px;
    right: 12px;
    bottom: 16px;
    transform: none;
    min-width: 0;
    max-width: none;
    padding: 13px 16px;
    border-radius: 12px;
    animation: at-toast-in-mobile .24s ease-out;
  }
  .at-toast__progress { border-radius: 0 0 12px 12px; }
}
