/* ==========================================================================
   Agentova · Hub Acquisition — SHELL COMMUN
   --------------------------------------------------------------------------
   Usage :  <link rel="stylesheet" href="/assets/shell.css">
   Contenu : tokens, barre d'icônes (rail), sidebar, layout, + primitives
   partagées (avatar Arthur, logos de marque, boutons, hero, carte chat,
   pastille « ← Itérations »). Tout est préfixé « ag- » pour ne pas entrer
   en collision avec le CSS propre à chaque itération.

   Squelette HTML minimal (copier-coller ; référence complète : /v/00/index.html)

   <body class="ag">
     <div class="ag-app">
       <nav class="ag-rail"> … .ag-rail__btn (.is-active) / .ag-rail__sep / .ag-rail__me … </nav>
       <div class="ag-panel">
         <aside class="ag-side">
           <a class="ag-side__back" href="#">‹ Retourner sur Arthur</a>
           <button class="ag-side__agent"><span class="ag-avatar ag-avatar--sophie"></span>Agent Sophie</button>
           <div class="ag-side__label">Hub acquisition</div>
           <ul class="ag-nav">
             <li><a class="is-active" href="#"><svg…/>Accueil</a></li> …
           </ul>
         </aside>
         <main class="ag-main"><div class="ag-main__inner"> … page … </div></main>
       </div>
     </div>
     <a class="ag-iter-pill" href="/">← Itérations · <b>NN</b></a>
   </body>

   Logos : <span class="ag-brand ag-brand--facebook"></span>
           (facebook, messenger, instagram, whatsapp, gmail, typeform,
            comment, hubspot, pipedrive, calendly, gcal) ; taille via --s (défaut 40px),
            variante .ag-brand--tile (pastille blanche arrondie autour).
   Avatar : <span class="ag-avatar"></span> (Arthur, rond, cadré visage),
            taille via --s (défaut 32px).
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --ag-chrome: #0b0f10;          /* fond derrière le panneau + rail */
  --ag-chrome-2: #121a1b;
  --ag-panel: #ffffff;           /* panneau principal (sidebar) */
  --ag-bg: #fafafa;              /* zone principale */
  --ag-bg-2: #f2f2f2;            /* hero, champs pleins */
  --ag-surface: #ffffff;         /* cartes */

  /* Encre */
  --ag-ink: #111111;
  --ag-ink-2: #2a2a2a;
  --ag-muted: #6b6b6b;
  --ag-faint: #9a9a9a;

  /* Traits */
  --ag-line: #ececec;
  --ag-line-2: #e3e3e3;

  /* Accent (vert « Accueil ») */
  --ag-green: #1fae6a;
  --ag-green-ink: #0f7a48;
  --ag-green-soft: #e3f7ec;
  --ag-green-softer: #f1fbf5;

  /* Rayons */
  --ag-r-xs: 8px;
  --ag-r-sm: 12px;
  --ag-r-md: 16px;
  --ag-r-lg: 24px;
  --ag-r-xl: 32px;
  --ag-r-pill: 999px;

  /* Ombres */
  --ag-shadow-sm: 0 1px 2px rgba(16, 24, 20, .04);
  --ag-shadow-md: 0 1px 2px rgba(16, 24, 20, .04), 0 8px 24px -12px rgba(16, 24, 20, .12);
  --ag-shadow-lg: 0 2px 4px rgba(16, 24, 20, .04), 0 24px 48px -20px rgba(16, 24, 20, .22);

  /* Typo */
  --ag-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --ag-rail-w: 78px;
  --ag-side-w: 308px;
  --ag-gap: 8px;                 /* marge entre le panneau et le bord */
  --ag-content-w: 876px;         /* largeur de contenu de la zone principale */
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.ag {
  font-family: var(--ag-font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ag-ink);
  background: var(--ag-chrome);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  min-width: 1200px;
}
/* :where() = spécificité nulle → n'importe quelle classe peut surcharger ces resets */
:where(.ag) a { color: inherit; text-decoration: none; }
:where(.ag) button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
:where(.ag) input { font: inherit; color: inherit; }
:where(.ag) img { display: block; max-width: 100%; }
:where(.ag) :is(h1, h2, h3, h4, p) { margin: 0; }
:where(.ag) ul { margin: 0; padding: 0; list-style: none; }

/* --------------------------------------------------------------------------
   3. Layout : rail | panneau (sidebar | main)
   -------------------------------------------------------------------------- */
.ag-app {
  display: grid;
  grid-template-columns: var(--ag-rail-w) 1fr;
  height: 100vh;
  background:
    radial-gradient(120% 60% at 0% 100%, rgba(31, 174, 106, .16), transparent 60%),
    linear-gradient(180deg, #0b0f10 0%, #0d1414 100%);
}

/* Rail d'icônes sombre */
.ag-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 0 64px; /* bas : laisse la place à .ag-iter-pill */
}
.ag-rail__btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: rgba(255, 255, 255, .55);
  transition: background .15s, color .15s;
}
.ag-rail__btn svg { width: 18px; height: 18px; }
.ag-rail__btn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.ag-rail__btn.is-active {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10);
}
.ag-rail__sep { height: 34px; flex: none; }
.ag-rail__spacer { flex: 1; }
.ag-rail__me {
  width: 28px; height: 28px; border-radius: 50%;
  overflow: hidden; margin-top: 6px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .08);
}

/* Panneau blanc arrondi */
.ag-panel {
  margin: 6px var(--ag-gap) 6px 10px;
  height: calc(100vh - 12px);
  border-radius: 18px;
  background: var(--ag-panel);
  display: grid;
  grid-template-columns: var(--ag-side-w) 1fr;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. Sidebar
   -------------------------------------------------------------------------- */
.ag-side {
  border-right: 1px solid var(--ag-line);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.ag-side__back {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 500;
  padding: 2px 10px; margin-bottom: 36px;
}
.ag-side__back svg { width: 14px; height: 14px; }
.ag-side__agent {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 12px 8px 10px;
  border: 1px solid var(--ag-line-2);
  border-radius: 12px;
  background: #fff;
  font-size: 14px; font-weight: 500; text-align: left;
  box-shadow: var(--ag-shadow-sm);
}
.ag-side__agent .ag-chev { margin-left: auto; width: 16px; height: 16px; color: var(--ag-muted); }
.ag-side__label {
  margin: 28px 0 8px; padding: 0 10px;
  font-size: 14px; color: var(--ag-muted);
}
.ag-nav { display: flex; flex-direction: column; gap: 6px; }
.ag-nav a {
  display: flex; align-items: center; gap: 12px;
  height: 38px; padding: 0 12px;
  border-radius: 10px;
  font-size: 14px; color: #5f5f5f;
  transition: background .15s, color .15s;
}
.ag-nav a svg { width: 18px; height: 18px; flex: none; color: #a3a3a3; }
.ag-nav a:hover { background: #f6f6f6; color: var(--ag-ink); }
.ag-nav a.is-active { background: var(--ag-green-soft); color: var(--ag-ink); font-weight: 500; }
.ag-nav a.is-active svg { color: var(--ag-green); }

/* --------------------------------------------------------------------------
   5. Zone principale
   -------------------------------------------------------------------------- */
.ag-main {
  background: var(--ag-bg);
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.ag-main__inner {
  width: 100%;
  max-width: calc(var(--ag-content-w) + 80px);
  margin: 0 auto;
  padding: 92px 40px 120px;
}

/* --------------------------------------------------------------------------
   6. Primitives partagées
   -------------------------------------------------------------------------- */

/* Avatar d'Arthur (rond, cadré sur le visage) */
.ag-avatar {
  --s: 32px;
  width: var(--s); height: var(--s);
  flex: none;
  border-radius: 50%;
  background: #cdeedd url("/assets/arthur.png") no-repeat 52% 8% / 210% auto;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
  display: inline-block;
}
.ag-avatar--ring { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ag-green); }
.ag-avatar--sophie {
  background: linear-gradient(135deg, #b5523b, #6e2a1f);
  color: #fff; font-size: 11px; font-weight: 600;
  display: inline-grid; place-items: center;
}

/* Pastille d'agent « en ligne » à poser dans un conteneur position:relative */
.ag-online {
  position: absolute; right: -1px; bottom: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ag-green); box-shadow: 0 0 0 2px #fff;
}

/* Logos de marque */
.ag-brand {
  --s: 40px;
  width: var(--s); height: var(--s);
  flex: none;
  display: inline-grid; place-items: center;
  position: relative;
  background: center / contain no-repeat;
}
.ag-brand::before {
  content: "";
  width: 100%; height: 100%;
  background: var(--c, #111);
  -webkit-mask: var(--i) center / contain no-repeat;
          mask: var(--i) center / contain no-repeat;
}
.ag-brand--hubspot, .ag-brand--pipedrive, .ag-brand--calendly, .ag-brand--gcal { }
.ag-brand--hubspot::before, .ag-brand--pipedrive::before,
.ag-brand--calendly::before, .ag-brand--gcal::before { content: none; }
.ag-brand--hubspot   { background-image: url("/assets/hubspot.png"); }
.ag-brand--pipedrive { background-image: url("/assets/pipedrive.png"); }
.ag-brand--calendly  { background-image: url("/assets/calendly.png"); }
.ag-brand--gcal      { background-image: url("/assets/google-calendar.png"); }
.ag-brand--facebook  { --c: #0866ff; --i: url("https://cdn.jsdelivr.net/npm/simple-icons@v13/icons/facebook.svg"); }
.ag-brand--messenger { --c: #0a7cff; --i: url("https://cdn.jsdelivr.net/npm/simple-icons@v13/icons/messenger.svg"); }
.ag-brand--instagram { --c: #e1306c; --i: url("https://cdn.jsdelivr.net/npm/simple-icons@v13/icons/instagram.svg"); }
.ag-brand--whatsapp  { --c: #25d366; --i: url("https://cdn.jsdelivr.net/npm/simple-icons@v13/icons/whatsapp.svg"); }
.ag-brand--gmail     { --c: #ea4335; --i: url("https://cdn.jsdelivr.net/npm/simple-icons@v13/icons/gmail.svg"); }
.ag-brand--typeform  { --c: #262627; --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M6 2h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4zm1 5.5v2.6h3.7V18h2.6V10.1H17V7.5z'/%3E%3C/svg%3E"); } /* l'icône Simple Icons est un wordmark → glyphe « T » maison */
.ag-brand--comment   { --c: #8b8f94; --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H9l-5 4v-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
.ag-brand--instagram::before { background: linear-gradient(45deg, #f9b233 0%, #e1306c 45%, #833ab4 100%); }
/* Variante « tuile » : pastille blanche autour du logo */
.ag-brand--tile {
  --s: 40px;
  background-color: #fff;
  background-size: 62%;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 2px 6px -2px rgba(0, 0, 0, .10);
}
.ag-brand--tile::before { width: 58%; height: 58%; }

/* Boutons */
.ag-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s, transform .15s, box-shadow .15s;
}
.ag-btn svg { width: 16px; height: 16px; }
.ag-btn--dark { background: #111; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.08); }
.ag-btn--dark:hover { background: #222; }
.ag-btn--green { background: var(--ag-green); color: #fff; }
.ag-btn--green:hover { background: var(--ag-green-ink); }
.ag-btn--ghost { background: #fff; border: 1px solid var(--ag-line-2); }
.ag-btn--ghost:hover { background: #f6f6f6; }
.ag-btn--muted { background: #f0f0f0; color: var(--ag-faint); }

/* Champ de recherche */
.ag-search {
  display: flex; align-items: center; gap: 8px;
  height: 32px; width: 276px; padding: 0 12px;
  border: 1px solid var(--ag-line-2); border-radius: 10px;
  background: #fff; color: var(--ag-faint); font-size: 12px;
}
.ag-search svg { width: 14px; height: 14px; color: #8a8a8a; }
.ag-search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 12px; }

/* Hero (bandeau gris du haut) */
.ag-hero {
  position: relative;
  display: grid;
  min-height: 160px;
  padding: 24px 24px 24px 24px;
  border-radius: 40px;
  background: #f0f0f0;
  overflow: hidden;
}
.ag-hero__title { font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.ag-hero__text { margin-top: 22px; max-width: 390px; font-size: 14px; line-height: 22px; color: var(--ag-ink-2); }

/* Hero : illustration d'Arthur + pastilles (markup : voir /v/00/) */
.ag-hero { grid-template-columns: minmax(0, 1fr) 420px; }
.ag-hero--no-art { grid-template-columns: 1fr auto; }
.ag-hero__art { position: relative; min-height: 112px; }
.ag-hero__arthur {
  position: absolute; left: 52px; top: -16px;
  height: 160px; width: auto;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.08));
}
.ag-hero__voice {
  position: absolute; left: 8px; top: 14px;
  display: inline-flex; align-items: center; gap: 2px;
  height: 24px; padding: 0 10px 0 6px;
  border-radius: 999px; background: rgba(255,255,255,.75);
  color: #8a8a8a;
}
.ag-hero__voice svg { width: 14px; height: 14px; margin-right: 4px; }
.ag-hero__voice i { width: 2px; border-radius: 2px; background: #b9b9b9; height: 6px; }
.ag-hero__voice i:nth-child(3n) { height: 11px; }
.ag-hero__voice i:nth-child(4n) { height: 8px; }
.ag-hero__leads {
  position: absolute; left: 150px; top: 80px;
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px 0 10px;
  border-radius: 999px; background: rgba(255,255,255,.8);
  font-size: 14px; color: #555;
  backdrop-filter: blur(6px);
}
.ag-hero__leads svg { width: 16px; height: 16px; color: #333; }
.ag-hero__cta { position: absolute; right: 0; top: 0; height: 32px; padding: 0 12px; }
@media (max-width: 1340px) {           /* ≈ fenêtre 1280 : l'illustration se resserre */
  .ag-hero { grid-template-columns: minmax(0, 1fr) 350px; }
  .ag-hero__voice { left: 0; }
  .ag-hero__arthur { left: 36px; }
  .ag-hero__leads { left: 118px; }
}


/* Carte chat avec Arthur */
.ag-chat {
  margin-top: 32px;
  padding: 18px 18px 20px;
  border: 1px solid var(--ag-line); border-radius: 28px;
  background: #fff;
}
.ag-chat__hello { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; padding: 0 2px; }
.ag-chat__field {
  margin-top: 16px;
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 12px 0 14px;
  border: 1px solid var(--ag-line); border-radius: 16px;
  box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .06);
}
.ag-chat__field input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; }
.ag-chat__field input::placeholder { color: var(--ag-muted); }

/* Titre de section */
.ag-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin: 32px 0 30px;
}
.ag-section-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }

/* Pastille de navigation entre itérations (fixe, bas gauche) */
.ag-iter-pill {
  position: fixed; left: 14px; bottom: 14px; z-index: 100;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: var(--ag-r-pill);
  background: rgba(17, 17, 17, .88);
  color: #fff;
  font-size: 12px; font-weight: 500;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 20px -6px rgba(0, 0, 0, .5);
}
.ag-iter-pill b { font-weight: 700; }
.ag-iter-pill:hover { background: #000; }

/* Utilitaires */
.ag-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
