/* =====================================================================================
 * site/style.css — la vitrine publique d'assurbase.com.
 *
 * ⚠ CE N'EST PAS LE KIT UI. Le kit (`ui/tokens.css`) est un fichier Tailwind v4 `@theme`
 * destiné à l'application ; ces pages-ci sont du HTML statique autonome, déployable sur
 * n'importe quel hébergeur sans chaîne de build. Les VALEURS sont recopiées du kit pour
 * que la vitrine et le produit se ressemblent : la palette accent lime, les gris chauds,
 * Schibsted Grotesk pour les titres et Manrope pour le reste, les rayons, la courbe
 * `--ease-out-quint`. Rien n'est importé : une vitrine qui dépend du build de l'app ne
 * se déploie plus quand l'app ne compile pas.
 *
 * POURQUOI CES PAGES EXISTENT, au-delà du marketing : Google exige, pour vérifier une
 * application OAuth, une page d'accueil publique qui décrit l'application et une
 * politique de confidentialité hébergée sur le même domaine. Les sections « Messagerie »
 * et l'encadré « Ce que le logiciel ne fait pas » de l'accueil sont écrits pour cette
 * revue autant que pour le visiteur.
 *
 * Registre de la copy (mémoire fondateur, 25/08/2026) : phrases courtes et déclaratives,
 * on nomme la fonctionnalité, pas de superlatif, pas de tiret cadratin (le deux-points
 * porte les appositions), pas de discours défensif sur l'IA.
 * ===================================================================================== */

:root {
  /* Accent : lime chartreuse, teinte 73 (ui/tokens.css §1). */
  --acc: #c8ff00;
  --acc-hover: #b4e600;
  --acc-border: #a4d100;
  --acc-strong: #90b800;
  --acc-text: #485c00;
  --acc-text-2: #454f22;
  --acc-tint: #f4f9e2;
  --acc-tint-2: #fafdf2;
  --acc-tint-border: #e6efc8;
  --acc-contrast: #1a1a1a;

  /* Neutres (ui/tokens.css §2). */
  --canvas: #ffffff;
  --surface-muted: #fbfbfb;
  --surface-hover: #f9f9fa;
  --hairline: #f5f5f6;
  --divider: #f1f2f4;
  --border: #eeeff1;
  --border-strong: #dcdbdd;
  --border-hover: #cfd3d6;
  --fill: #eeeff1;
  --fill-2: #e9eaec;

  --fg-title: #17181a;
  --fg: #303135;
  --fg-strong: #3b3d41;
  --fg-muted: #6a6d70;
  --fg-subtle: #6f7073;
  --fg-faint: #b8b8c0;

  /* Statuts (ui/tokens.css §3) : paires fond / texte / bordure. */
  --info-bg: #e3eeff;   --info-fg: #1e3c7d;   --info-border: #c9dcf7;
  --warn-bg: #faeccf;   --warn-fg: #7c6a3c;   --warn-border: #e9d9a8;
  --violet-bg: #f0eafe; --violet-fg: #6c4bc8; --violet-border: #e0d5fa;
  --cyan-bg: #dffafd;   --cyan-fg: #007b95;

  /* Encart « à compléter » des pages légales. */
  --alerte-fond: #fff8d6;
  --alerte-bord: #e6c200;
  --alerte-texte: #6b5400;

  --police-titres: 'Schibsted Grotesk', ui-sans-serif, system-ui, sans-serif;
  --police-corps: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --police-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --sortie: cubic-bezier(0.22, 1, 0.36, 1); /* --ease-out-quint du kit */

  --largeur: 720px;   /* pages légales */
  --largeur-site: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--fg);
  font-family: var(--police-corps);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Enveloppes ───────────────────────────────────────────────────────────────────── */

.enveloppe {            /* pages légales : colonne de lecture */
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 24px;
}
.contenu {              /* accueil : pleine largeur du site */
  max-width: var(--largeur-site);
  margin: 0 auto;
  padding: 0 24px;
}
.contenu.etroit { max-width: 760px; }
.centre { text-align: center; }

/* ── Typographie ──────────────────────────────────────────────────────────────────── */

h1, h2 {
  font-family: var(--police-titres);
  color: var(--fg-title);
  font-weight: 700;
  margin: 0 0 16px;
}
h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.05; letter-spacing: -1.2px; }
h2 { font-size: clamp(25px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -0.6px; }
h3 { font-size: 16px; font-weight: 700; color: var(--fg-title); margin: 0 0 6px; letter-spacing: -0.1px; }

.sur-titre {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--acc-text-2);
  background: var(--acc-tint);
  border: 1px solid var(--acc-tint-border);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 0 0 20px;
}
.chapeau {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--fg-muted);
  max-width: 620px;
  margin: 0 auto 32px;
}
.paragraphe { font-size: 16px; color: var(--fg-muted); max-width: 640px; margin: 0 0 20px; }

a { color: var(--acc-text); }

/* ── En-tête ──────────────────────────────────────────────────────────────────────── */

header {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
/* Sur l'accueil, l'en-tête flotte et ne gagne son fond qu'au défilement. */
body.accueil header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom-color: transparent;
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
body.accueil header.flotte {
  background: rgb(255 255 255 / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
header .enveloppe,   /* pages légales */
header .barre {      /* accueil */
  max-width: var(--largeur-site);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.marque { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
/* Le carré d'accent tient lieu de signe tant que le logotype n'est pas rapatrié du
 * projet de design : un aplat de la couleur de marque n'est pas une image cassée. */
.marque-signe {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--acc);
  border: 1px solid var(--acc-border);
  flex: none;
}
.marque-mot {
  font-family: var(--police-titres);
  font-size: 17px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--fg-title);
}

nav a, .nav-sections a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-left: 20px;
  background: linear-gradient(var(--fg-title), var(--fg-title)) no-repeat 0 100% / 0 1.5px;
  transition: color 0.25s ease, background-size 0.35s var(--sortie);
  padding-bottom: 2px;
}
nav a:hover, .nav-sections a:hover { color: var(--fg-title); background-size: 100% 1.5px; }

/* ── Boutons ──────────────────────────────────────────────────────────────────────── */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--police-corps);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 16px;
  border: 1px solid transparent;
  transition: transform 0.25s var(--sortie), box-shadow 0.25s var(--sortie),
              background 0.2s ease, border-color 0.2s ease;
}
.bouton-grand { padding: 12px 24px; font-size: 15px; border-radius: 9px; }
.bouton-primaire {
  background: var(--acc);
  border-color: var(--acc-border);
  color: var(--acc-contrast);
}
.bouton-primaire:hover {
  background: var(--acc-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -8px rgb(100 128 0 / 0.5);
}
.bouton-secondaire {
  background: var(--canvas);
  border-color: var(--border-strong);
  color: var(--fg-strong);
}
.bouton-secondaire:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}
.bouton:active { transform: translateY(0); }

/* ── Héros ────────────────────────────────────────────────────────────────────────── */

.heros {
  position: relative;
  text-align: center;
  padding: 88px 0 104px;
  overflow: hidden;
}
/* Atmosphère : une trame de points qui s'efface, deux halos de la teinte de marque. */
.heros::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--fill) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 32%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 60% at 50% 32%, #000 30%, transparent 75%);
  pointer-events: none;
}
.heros::after {
  content: '';
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background:
    radial-gradient(closest-side at 30% 40%, rgb(200 255 0 / 0.13), transparent),
    radial-gradient(closest-side at 72% 30%, rgb(200 255 0 / 0.09), transparent);
  filter: blur(40px);
  pointer-events: none;
}
.heros .contenu, .heros .apercu { position: relative; z-index: 1; }

.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Entrée en scène : chaque bloc du héros monte à son tour. */
.monte {
  opacity: 0;
  animation: montee 0.8s var(--sortie) forwards;
  animation-delay: calc(var(--i, 0) * 110ms);
}
/* Choréo à trois propriétés (translation, flou, opacité) : une seule propriété animée
 * rend le mouvement plat, la combinaison lui donne de la matière (transitions.dev). */
@keyframes montee {
  from { opacity: 0; transform: translateY(18px); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes montee-apercu {
  from { opacity: 0; transform: translateY(30px) scale(0.976); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ── L'aperçu du produit ──────────────────────────────────────────────────────────── */

.apercu { margin-top: 64px; transform-origin: 50% 0; }
.apercu.monte { animation-name: montee-apercu; animation-duration: 1.1s; }
.fenetre {
  max-width: 940px;
  margin: 0 auto;
  text-align: left;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow:
    0 40px 80px -40px rgb(23 24 26 / 0.28),
    0 2px 6px rgb(23 24 26 / 0.05);
  overflow: hidden;
}
.fenetre-barre {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
}
.pastille-fenetre { width: 9px; height: 9px; border-radius: 999px; background: var(--fill-2); }
.fenetre-url {
  margin-left: 10px;
  font-family: var(--police-mono);
  font-size: 11px;
  color: var(--fg-subtle);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 12px;
}
.fenetre-corps { display: grid; grid-template-columns: 188px 1fr; min-height: 320px; }

.rail {
  background: var(--surface-muted);
  border-right: 1px solid var(--border);
  padding: 12px 10px;
  font-size: 12px;
}
.rail-cabinet {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--fg-title);
  padding: 4px 8px 12px;
}
.rail-avatar {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--acc);
  border-radius: 6px;
  font-size: 9px; font-weight: 800; color: var(--acc-contrast);
}
.rail-item {
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--fg-muted);
  margin-bottom: 1px;
}
.rail-item.actif { background: var(--fill-2); color: var(--fg-title); font-weight: 600; }

.table { padding: 14px 18px; }
.table-titre {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--fg-title);
  padding-bottom: 10px;
}
.table-compte {
  font-size: 10.5px; font-weight: 600; color: var(--fg-muted);
  background: var(--fill);
  border-radius: 999px;
  padding: 1px 8px;
}
.ligne {
  display: grid;
  grid-template-columns: 1.5fr 1.1fr 0.8fr 0.9fr;
  gap: 8px;
  align-items: center;
  padding: 8px 6px;
  border-bottom: 1px solid var(--divider);
  font-size: 12px;
  color: var(--fg-muted);
}
.ligne.entete {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--fg-subtle);
  border-bottom-color: var(--border);
}
.ligne:not(.entete) {
  opacity: 0;
  animation: montee 0.5s var(--sortie) forwards;
  animation-delay: calc(0.55s + var(--l, 0) * 80ms);
}
.cellule-nom { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--fg); }
.avatar {
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 8.5px; font-weight: 800;
  flex: none;
}
.av-1 { background: var(--info-bg);   color: var(--info-fg); }
.av-2 { background: var(--violet-bg); color: var(--violet-fg); }
.av-3 { background: var(--warn-bg);   color: var(--warn-fg); }
.av-4 { background: var(--cyan-bg);   color: var(--cyan-fg); }
.av-5 { background: var(--fill);      color: var(--fg-muted); }

.badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  border: 1px solid transparent;
}
.badge-actif   { background: var(--acc-tint);    color: var(--acc-text);  border-color: var(--acc-tint-border); }
.badge-attente { background: var(--warn-bg);     color: var(--warn-fg);   border-color: var(--warn-border); }
.badge-devis   { background: var(--info-bg);     color: var(--info-fg);   border-color: var(--info-border); }
.badge-avenant { background: var(--violet-bg);   color: var(--violet-fg); border-color: var(--violet-border); }

/* ── Sections ─────────────────────────────────────────────────────────────────────── */

.section { padding: 96px 0; }
.section-contraste {
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.final { padding: 120px 0; }

.grille { display: grid; gap: 14px; margin-top: 40px; }
.grille-3 { grid-template-columns: repeat(3, 1fr); }

.carte {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: transform 0.3s var(--sortie), box-shadow 0.3s var(--sortie), border-color 0.2s ease;
}
.carte:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 32px -20px rgb(23 24 26 / 0.18);
}
.carte p { margin: 0; font-size: 14px; color: var(--fg-muted); }
.tuile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--acc-tint);
  border: 1px solid var(--acc-tint-border);
  color: var(--acc-text);
  font-size: 15px;
  margin-bottom: 14px;
}

/* ── Agents ───────────────────────────────────────────────────────────────────────── */

.deux-colonnes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.liste-agents { list-style: none; margin: 24px 0 0; padding: 0; }
.liste-agents li { position: relative; padding-left: 22px; margin-bottom: 14px; font-size: 15px; }
.liste-agents li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--acc);
  border: 1px solid var(--acc-border);
}

.panneau-agent {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 24px 48px -32px rgb(23 24 26 / 0.25);
}
.panneau-titre {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--fg-subtle);
  padding-bottom: 10px;
}
.tache {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--divider);
  font-size: 13.5px;
  color: var(--fg);
}
.tache:last-child { border-bottom: none; }
.tache-encours { color: var(--fg-muted); }
.coche {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--acc);
  border: 1px solid var(--acc-border);
  color: var(--acc-contrast);
  font-size: 10px; font-weight: 800;
  flex: none;
}
.coche-attente { background: transparent; border: 1.5px dashed var(--border-hover); }
.panneau-agent.vu .tache {
  opacity: 0;
  animation: montee 0.5s var(--sortie) forwards;
  animation-delay: calc(0.2s + var(--l, 0) * 110ms);
}

/* ── Listes et encadrés (partagés avec les pages légales) ─────────────────────────── */

.liste-simple { padding-left: 20px; }
.liste-simple li { margin-bottom: 10px; }

.encadre {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 28px 0;
}
.encadre p { margin: 0; }
.encadre-accent { background: var(--acc-tint); border-color: var(--acc-tint-border); }
.encadre-accent a { color: var(--acc-text); font-weight: 600; }

.a-completer {
  background: var(--alerte-fond);
  border: 1px solid var(--alerte-bord);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 28px 0;
  color: var(--alerte-texte);
}
.tableau-defilant { overflow-x: auto; }
.tableau-defilant table { border-collapse: collapse; min-width: 560px; }
.tableau-defilant th, .tableau-defilant td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--divider);
  font-size: 14px;
}
.tableau-defilant th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--fg-subtle); }
.date-maj { color: var(--fg-subtle); font-size: 13px; }

/* ── Révélation au défilement ─────────────────────────────────────────────────────── */

html.js .devoile {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(4px);
  transition: opacity 0.75s var(--sortie), transform 0.75s var(--sortie), filter 0.75s var(--sortie);
  transition-delay: calc(var(--i, 0) * 90ms);
}
html.js .devoile.vu { opacity: 1; transform: none; filter: none; }

/* ── Pied de page ─────────────────────────────────────────────────────────────────── */

footer { border-top: 1px solid var(--border); padding: 36px 0; margin-top: 0; }
footer.enveloppe {                     /* pages légales : ancien gabarit conservé */
  border-top: 1px solid var(--border);
  display: flex; gap: 20px; flex-wrap: wrap;
  padding: 32px 24px;
  margin-top: 56px;
}
footer a { color: var(--fg-muted); text-decoration: none; font-size: 13.5px; }
footer a:hover { color: var(--fg-title); }
.pied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.pied-marque {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--police-titres);
  font-weight: 700; color: var(--fg-title);
}
.pied-marque .marque-signe { width: 20px; height: 20px; border-radius: 6px; }
.pied-liens { display: flex; gap: 20px; flex-wrap: wrap; }
.pied-liens a { margin: 0; background: none; }

/* ── Pages légales : corps de lecture ─────────────────────────────────────────────── */

main.enveloppe { padding-top: 40px; padding-bottom: 24px; }
main.enveloppe h1 { font-size: 30px; letter-spacing: -0.5px; }
main.enveloppe h2 { font-size: 21px; margin-top: 40px; }

/* ── Écrans étroits ───────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .grille-3 { grid-template-columns: 1fr; }
  .deux-colonnes { grid-template-columns: 1fr; gap: 40px; }
  .nav-sections { display: none; }
  .heros { padding: 56px 0 72px; }
  .section { padding: 64px 0; }
  .fenetre-corps { grid-template-columns: 1fr; }
  .rail { display: none; }
  .ligne { grid-template-columns: 1.5fr 1fr 0.9fr; }
  .ligne > :nth-child(3) { display: none; }
  .ligne.entete > :nth-child(3) { display: none; }
}

/* ── Mouvement réduit ─────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .monte, .ligne:not(.entete), .panneau-agent.vu .tache { animation: none; opacity: 1; }
  html.js .devoile { opacity: 1; transform: none; transition: none; }
  .bouton, .carte, nav a, .nav-sections a { transition: none; }
}
