@font-face {
    font-family: "Familjen Grotesk";
    src: url("../fonts/familjen-grotesk.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --paper: #e6f5f1;
    --surface: #fff;
    --ink: #123f4c;
    --muted: #4b6b75;
    --line: #c9e2dc;
    --action: #0f4c5c;
    --on-action: #fff;
    --link: var(--action);
    --action-soft: #d5ece6;
    --panel: #0f3542;
    --on-panel: #dbe4ec;
    --amber: #ffb238;
    --sun: #ffc845;
    --whatsapp: #0b7a5b;
    --wa-green: #25d366;
    --form: #6a3fb5;
    --danger: #b3261e;
    --danger-soft: #fbe4e2;
    --ok-soft: #dcefe8;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1.0625rem/1.5 "Familjen Grotesk", system-ui, sans-serif;
}

h1, h2, p { margin: 0; }
h1 { font-size: 2.25rem; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; font-weight: 600; margin-block: 2rem .75rem; }
h1 a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .15em; }

a { color: var(--link); }

:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

.muted { color: var(--muted); font-size: .95rem; }

/* Back-office : le rail porte l'afficheur, seul élément expressif de l'interface. */
.admin { display: grid; grid-template-columns: 13rem minmax(0, 1fr); min-height: 100vh; }

.rail {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.25rem 1rem;
    background: var(--panel);
    color: var(--on-panel);
}

/* Le compteur : jaune tant que des messages attendent, blanc quand tout est traité. */
.display { display: flex; align-items: baseline; gap: .55rem; padding: .85rem 1.1rem; border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: 0 8px 20px -14px rgb(15 53 66 / .5); }
.display--waiting { background: var(--sun); color: #0a3540; }

.display__digits { font-weight: 700; font-size: 3rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

.display__label { font-weight: 600; font-size: 1rem; }

.rail__org { padding-inline: .6rem; font-weight: 600; }
.orgs { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.orgs form { margin: 0; }
.orgs__item { display: flex; justify-content: space-between; align-items: center; gap: .5rem; width: 100%; padding: .45rem .6rem; border: 0; border-radius: 4px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.orgs__item:hover { background: rgb(128 128 128 / .25); }
.orgs__item[aria-current] { background: rgb(128 128 128 / .3); box-shadow: inset 0 0 0 1px currentcolor; cursor: default; }
.orgs__count { min-width: 1.6rem; padding-inline: .3rem; border-radius: 3px; text-align: center; font-variant-numeric: tabular-nums; }
.orgs__count--waiting { background: var(--amber); color: #14222f; font-weight: 700; }
.public__org { margin-bottom: .75rem; color: var(--muted); font-weight: 600; font-size: 1.1rem; }
.rail__nav { display: grid; gap: .25rem; }

.rail a:not(.display) {
    padding: .45rem .6rem;
    border-radius: 4px;
    color: inherit;
    text-decoration: none;
}

.rail__nav a:hover { background: rgb(128 128 128 / .25); }
.rail__nav a[aria-current] { background: rgb(128 128 128 / .3); font-weight: 600; }
.rail__cookies { margin-top: auto; padding: .45rem .6rem; border: 0; background: none; color: inherit; font: inherit; font-size: .9rem; text-align: left; cursor: pointer; }
.rail__cookies[hidden] + .rail__logout { margin-top: auto; }
.rail__logout { font-size: .9rem; }
.rail :focus-visible { outline-color: var(--on-panel); }

.main { padding: 2rem clamp(1rem, 4vw, 3.5rem); max-width: 62rem; }
.main h1 { font-size: 1.5rem; }

/* L'organisation prime sur le titre de la page : c'est elle qu'on ne doit pas confondre. */
.banner { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 4px solid var(--action); }
.banner__logo { max-height: 3.5rem; max-width: 12rem; object-fit: contain; }
.banner__name { font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.1; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.logo-preview { display: block; max-height: 5rem; max-width: 100%; margin-bottom: 1rem; object-fit: contain; }
select { width: 100%; padding: .55rem .7rem; border: 1px solid #8a9aaa; border-radius: 4px; background: #fff; color: inherit; font: inherit; }
input[type="color"] { width: 4rem; height: 2.5rem; padding: .15rem; cursor: pointer; }

.filters { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-block: 1rem 1.5rem; border-bottom: 1px solid var(--line); }
.filters a { padding-bottom: .5rem; color: var(--muted); text-decoration: none; }
.filters a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: 0 2px 0 var(--ink); }

/* Listes : des lignes, pas des cartes. La couleur de la tranche indique le canal. */
.rows { border-top: 1px solid var(--line); }

.row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .15rem 1rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--line);
    border-left: 4px solid transparent;
    color: inherit;
    text-decoration: none;
}

.row:hover { background: var(--surface); }
.row--whatsapp { border-left-color: var(--whatsapp); }
.row--form { border-left-color: var(--form); }
.row__who { font-weight: 600; }
.row__when { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.row__what { color: var(--muted); overflow-wrap: anywhere; }
.row__what strong { color: var(--ink); font-weight: 600; }
.row__actions { display: flex; gap: .5rem; align-items: center; }
.row__actions form { margin: 0; }
.row__tags { display: flex; gap: .4rem; align-items: end; justify-content: end; }

.tag {
    padding: .05rem .5rem;
    border-radius: 3px;
    background: var(--line);
    font-size: .8rem;
    white-space: nowrap;
}

.tag--whatsapp { background: var(--ok-soft); color: #075a43; }
.tag--form { background: #e9e1f7; color: #4d2c88; }

.empty { padding: 1.5rem 1rem; color: var(--muted); }

.head { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }

.thread { display: flex; flex-direction: column; gap: .75rem; margin-block: 1.75rem; }

.bubble {
    max-width: min(36rem, 88%);
    padding: .6rem .9rem;
    border-radius: 10px;
    background: var(--surface);
    overflow-wrap: anywhere;
}

.bubble--in { align-self: start; border-bottom-left-radius: 2px; }
.bubble--out { align-self: end; border-bottom-right-radius: 2px; background: var(--action-soft); }
.bubble--bot { align-self: end; border: 1px dashed var(--muted); background: transparent; }
.bubble__meta, .bubble__status { color: var(--muted); font-size: .85rem; }
.bubble__status { margin-top: .25rem; text-align: right; }
.bubble__status--failed { color: var(--danger); font-weight: 600; }

.notice { margin-block: 1rem; padding: .7rem 1rem; border-left: 4px solid var(--amber); background: #fdf1da; }

.flash { margin-bottom: 1rem; padding: .7rem 1rem; border-radius: 4px; }
.flash--success { background: var(--ok-soft); }
.flash--error { background: var(--danger-soft); color: #7c1a14; }

/* Formulaires */
form > div, form > div > div { margin-bottom: 1rem; }
label { display: block; margin-bottom: .25rem; font-weight: 600; font-size: .95rem; }

input:not([type="checkbox"]), textarea {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid #8a9aaa;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    font: inherit;
}

input[type="checkbox"] { width: 1.1rem; height: 1.1rem; margin-right: .4rem; vertical-align: -.15rem; }
input[type="checkbox"] + label { display: inline; }
.help-text, form .form-help { color: var(--muted); font-size: .9rem; }
form ul { margin: .25rem 0 0; padding: 0; list-style: none; color: var(--danger); font-size: .9rem; }

.trap { position: absolute; left: -9999px; }

.btn {
    display: inline-block;
    padding: .6rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: var(--action);
    color: var(--on-action);
    font: 600 1rem/1.3 "Familjen Grotesk", system-ui, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover { filter: brightness(.9); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn--quiet { background: transparent; border-color: #8a9aaa; color: var(--ink); }
.btn--danger { background: var(--danger); color: #fff; }
.wa-logo { width: 1.5em; height: 1.5em; flex: none; }
.btn--whatsapp { display: inline-flex; align-items: center; gap: .6rem; padding: .85rem 1.5rem; background: var(--wa-green); color: #08261a; font-size: 1.15rem; }
.tag .wa-logo { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
.wa-tile { display: inline-grid; place-items: center; flex: none; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--wa-green); color: #fff; }
.wa-tile .wa-logo { width: 2.9rem; height: 2.9rem; }
.wa-tile--float { position: absolute; top: -1.75rem; left: -1.75rem; z-index: 1; box-shadow: 0 10px 24px -8px rgb(0 0 0 / .6); }
.wa-card { display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: 1rem; padding: 1.5rem; border-radius: 14px; border: 2px solid var(--wa-green); background: var(--surface); }
.public .wa-card h2 { margin: 0 0 .5rem; }
.wa-card .lead { margin-bottom: 1rem; font-size: 1.05rem; }

.defaults { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.defaults h2 { margin-top: 0; }
.defaults h3 { margin: 1.75rem 0 .75rem; font-size: 1.05rem; }
.defaults__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.default-message h4 { margin: 0; font-size: 1rem; }
.default-message__text { margin-top: .5rem; padding: .7rem .9rem; border-radius: 10px; background: var(--surface); overflow-wrap: anywhere; font-size: .95rem; }
.private-link { margin-block: 1rem; padding: .9rem 1rem; border-radius: 10px; background: var(--surface); }
.private-link__row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .4rem; }
.private-link__row input { flex: 1 1 16rem; width: auto; min-width: 0; color: var(--muted); font-size: .9rem; }
.composer { margin-bottom: 1rem; }
.composer__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.closure-choice { margin-block: 1.5rem; padding: 1.25rem 1.5rem; border-radius: 12px; border: 2px solid var(--action); background: var(--surface); }
.public .closure-choice h2 { margin: 0 0 .75rem; }
.closure-choice__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.closure-choice__actions form { margin: 0; }
#messagerie { scroll-margin-top: 1rem; }
[data-pending] + .flash { margin-top: 1rem; }
.search { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-block: 1rem 1.5rem; }
.search label { width: 100%; margin: 0; }
.search input { flex: 1 1 16rem; width: auto; }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 2.5rem; }
.narrow { max-width: 36rem; }
.danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.danger-zone .btn { margin-top: .5rem; }

@media (prefers-reduced-motion: reduce) {
    .device.is-playing li { opacity: 1; transform: none; }
}

/* Pages publiques */
.public { border-top: 8px solid var(--panel); }
.public__logo { display: block; max-height: 5rem; max-width: 16rem; margin-bottom: 1.25rem; object-fit: contain; }
.public__main { max-width: 38rem; margin-inline: auto; padding: clamp(2rem, 7vw, 4.5rem) 1rem; }
.public__main--narrow { max-width: 24rem; }
.public__main--narrow h1 { margin-bottom: 1.5rem; }
.public__title { font-size: clamp(2.25rem, 7vw, 3.25rem); margin-bottom: 1.25rem; }
.lead { font-size: 1.15rem; margin-bottom: 1.25rem; max-width: 34rem; }
.public h2 { margin-top: 3rem; font-size: 1.5rem; }
.public h2 + .lead { margin-top: 0; }

/* Page de présentation : un bandeau sombre comme la façade de l'appareil, et l'afficheur pour seul éclat. */
.home { background: var(--surface); }
.stage { position: relative; background: var(--panel); color: #fff; }
.home__top, .hero, .compare, .steps, .sides, .closing { width: min(100%, 74rem); margin-inline: auto; padding-inline: 1rem; }
.home__top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.25rem; }
.home__brand { white-space: nowrap; display: inline-flex; align-items: center; gap: .6rem; color: inherit; font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; text-decoration: none; }
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 7vw, 6rem); }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.75rem); line-height: 1.02; letter-spacing: -.03em; }
.hero__lead { max-width: 33rem; margin-block: 1.5rem 2rem; color: #c3d0dc; font-size: 1.25rem; line-height: 1.45; }
.btn--amber { padding: .9rem 1.6rem; background: var(--amber); color: #14222f; font-size: 1.15rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn--big { padding: .85rem 1.5rem; font-size: 1.15rem; }
.btn--on-dark { background: transparent; border-color: #5b7185; color: #fff; }
.stage :focus-visible { outline-color: var(--amber); }

.device { position: relative; padding: 1rem; border-radius: 16px; background: #0f1b26; box-shadow: 0 0 0 1px #2c3e4e, 0 30px 60px -20px rgb(0 0 0 / .6); color: #dbe4ec; }
.device__list { margin: .75rem 0 0; padding: 0; list-style: none; }
.device__list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .75rem; padding: .7rem .5rem; border-top: 1px solid #2c3e4e; }
.device__list li:first-child { border-top: 0; }
.device__list p { grid-column: 1 / -1; color: #a9bac9; font-size: .95rem; }
.device.is-playing li { opacity: 0; transform: translateY(10px); }
.device.is-playing li.is-in { opacity: 1; transform: none; transition: opacity .35s ease-out, transform .35s ease-out; }

.home h2 { margin-top: 0; font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -.02em; line-height: 1.15; }
.home main ul { margin: 1rem 0 0; padding: 0; list-style: none; }

.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding-block: clamp(3rem, 6vw, 5rem); }
.compare > div { padding: clamp(1.5rem, 3vw, 2.5rem); }
.compare__before { background: var(--paper); border-radius: 12px 0 0 12px; color: var(--muted); }
.compare__before h2 { color: var(--muted); }
.compare__after { background: var(--panel); border-radius: 0 12px 12px 0; color: #fff; }
.compare li { padding-block: .7rem; border-top: 1px solid rgb(128 128 128 / .3); font-size: 1.1rem; }

.steps { padding-block: clamp(1rem, 3vw, 2rem) clamp(3rem, 6vw, 5rem); }
.steps ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); margin: 2rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 3.5rem; height: 4rem; margin-bottom: 1rem; border-radius: 8px; background: var(--panel); color: var(--amber); font: 700 2rem/1 "Familjen Grotesk", system-ui, sans-serif; }
.steps h3 { margin: 0 0 .4rem; font-size: 1.25rem; letter-spacing: -.01em; }
.steps p { color: var(--muted); }

.sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 5rem); padding-block: clamp(1rem, 3vw, 2rem) clamp(3rem, 6vw, 5rem); }
.sides li { padding-block: .7rem; border-top: 1px solid var(--line); }

.closing { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: clamp(3rem, 6vw, 5rem); padding: clamp(2rem, 5vw, 3.5rem); border-radius: 16px; background: var(--action); color: #fff; width: min(calc(100% - 2rem), 72rem); }
.closing p { margin-top: .4rem; font-size: 1.2rem; }

.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; padding: 1.5rem max(1rem, calc((100% - 72rem) / 2)); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.site-footer a { color: inherit; }

/* Connexion : même façade que l'accueil, le formulaire y est posé comme une carte claire. */
.stage--signin { min-height: calc(100vh - 4.5rem); }
.signin { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; width: min(100%, 74rem); margin-inline: auto; padding: clamp(2rem, 7vw, 5rem) 1rem clamp(3rem, 7vw, 6rem); }
.signin__claim { font-size: clamp(2.6rem, 6.4vw, 4.75rem); font-weight: 700; line-height: 1.02; letter-spacing: -.03em; }
.signin__intro .hero__lead { margin-bottom: 0; }
.signin__card { padding: clamp(1.5rem, 4vw, 2.25rem); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 60px -20px rgb(0 0 0 / .6); }
.signin__card h1 { margin-bottom: 1.25rem; font-size: 1.75rem; letter-spacing: -.02em; }
.signin__card :focus-visible { outline-color: var(--action); }
.signin__submit { width: 100%; padding-block: .8rem; }

/* Pages d'erreur : le code en grand. */
.error-page { width: min(100%, 46rem); margin-inline: auto; padding: clamp(2rem, 6vw, 4rem) 1rem clamp(3rem, 7vw, 6rem); }
.error-page__display { margin-bottom: 1rem; color: var(--action); }
.error-page__display .display__digits { font-size: clamp(5rem, 16vw, 8rem); }
.error-page h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); line-height: 1.05; letter-spacing: -.03em; }
.error-page .hero__lead { margin-bottom: 1.75rem; }

/* Bandeau de consentement : au-dessus du bouton WhatsApp, et les deux choix pèsent autant. */
.consent { position: fixed; right: 1rem; bottom: 1rem; left: 1rem; z-index: 50; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; max-width: 60rem; margin-inline: auto; padding: 1rem 1.25rem; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 18px 40px -12px rgb(20 34 47 / .45); }
.consent[hidden] { display: none; }
.consent p { flex: 1 1 22rem; font-size: .95rem; }
.consent__actions { display: flex; gap: .5rem; }
.consent .btn { min-width: 7rem; }
.site-footer__link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* Pages légales */
.legal { background: var(--surface); }
.legal__top { padding: 1.25rem max(1rem, calc((100% - 42rem) / 2)); }
.legal__text { max-width: 44rem; margin-inline: auto; padding: 1.5rem 1rem clamp(3rem, 6vw, 5rem); line-height: 1.6; }
.legal__text h1 { margin-bottom: .75rem; font-size: clamp(2rem, 5vw, 2.75rem); letter-spacing: -.02em; }
.legal__text p, .legal__text ul { margin-block: .75rem; }
.legal__text li { margin-block: .4rem; }
.legal__text h2 { margin-top: 2.25rem; }

@media (max-width: 760px) {
    .hero, .sides, .compare, .signin { grid-template-columns: minmax(0, 1fr); }
    .wa-tile--float { top: -1.25rem; left: auto; right: -.25rem; width: 3.5rem; height: 3.5rem; }
    .wa-tile--float .wa-logo { width: 2.25rem; height: 2.25rem; }
    .wa-card { flex-direction: column; }
    .compare__before { border-radius: 12px 12px 0 0; }
    .compare__after { border-radius: 0 0 12px 12px; }
    .steps ol { grid-template-columns: minmax(0, 1fr); }
    .admin { grid-template-columns: minmax(0, 1fr); }
    .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 1rem; padding: .75rem 1rem; }
    .display { padding: .4rem .8rem; }
    .display__digits { font-size: 1.8rem; }
    .display__label { font-size: .85rem; }
    .rail__nav { display: flex; flex: 1 1 auto; }
    .rail__logout, .rail__cookies, .rail__cookies[hidden] + .rail__logout { margin-top: 0; }
    .split { grid-template-columns: minmax(0, 1fr); }
    h1 { font-size: 1.85rem; }
    .main h1 { font-size: 1.35rem; }
}

/* Style de l'accueil, repris sur toutes les pages : cartes blanches, formes rondes, fond teinté. */
.btn { border-radius: 999px; }
input:not([type="checkbox"]), textarea, select { border-color: var(--line); border-radius: 12px; }
input:not([type="checkbox"]):focus, textarea:focus { border-color: var(--action); }
.notice { border: 0; border-radius: 14px; background: #fff3d1; }
.flash { border-radius: 14px; }

.rail { box-shadow: 4px 0 24px -14px rgb(15 53 66 / .6); }
.rail__nav a, .orgs__item { border-radius: 12px; }
.main { max-width: 66rem; }
.banner { padding-bottom: .5rem; border-bottom: 0; }
.banner__logo { border-radius: 12px; }

.filters { gap: .4rem; border-bottom: 0; }
.filters a { padding: .35rem .95rem; border-radius: 999px; background: var(--surface); }
.filters a[aria-current] { background: var(--action); color: var(--on-action); box-shadow: none; }

.rows { display: grid; gap: .6rem; border-top: 0; }
.row { padding: .95rem 1.15rem; border: 0; border-radius: 16px; background: var(--surface); box-shadow: 0 8px 20px -16px rgb(15 53 66 / .5); }
.row:hover { background: var(--surface); box-shadow: 0 12px 24px -14px rgb(15 53 66 / .6); }
.row--whatsapp { box-shadow: inset 5px 0 0 var(--wa-green), 0 8px 20px -16px rgb(15 53 66 / .5); }
.row--form { box-shadow: inset 5px 0 0 var(--form), 0 8px 20px -16px rgb(15 53 66 / .5); }
.tag { border-radius: 999px; padding-inline: .6rem; background: var(--action-soft); }
.empty { border-radius: 16px; background: var(--surface); }

.bubble { border-radius: 18px; box-shadow: 0 6px 16px -14px rgb(15 53 66 / .5); }
.private-link, .closure-choice, .wa-card { border-radius: 18px; }
.private-link { box-shadow: 0 8px 20px -16px rgb(15 53 66 / .5); }
.composer, .split > section, .narrow, .defaults { padding: 1.25rem 1.4rem; border-radius: 18px; background: var(--surface); box-shadow: 0 8px 20px -16px rgb(15 53 66 / .5); }
.split > section .rows .row { box-shadow: 0 0 0 1px var(--line); }
.split > section h2:first-child { margin-top: 0; }
.defaults { border-top: 0; }
.default-message__text { background: var(--paper); }

/* Connexion et pages d'erreur : même façade que l'accueil. */
.stage { background: var(--paper); color: var(--ink); }
.stage .home__top { box-shadow: 0 1px 0 rgb(15 53 66 / .1); }
.stage .hero__lead { color: var(--ink); }
.stage .btn--on-dark { border-color: var(--ink); color: var(--ink); }
.stage .btn--amber { background: var(--ink); color: #fff; }
.stage .l-for { color: #0a6a5c; }
.signin__card { box-shadow: 0 24px 48px -28px rgb(15 53 66 / .6); }

/* Formulaire et suivi : l'entreprise en en-tête, le contenu en cartes. */
.public { border-top: 0; background: var(--paper); }
.public .l-top { background: var(--paper); }
.public__logo { max-height: 3rem; max-width: 12rem; margin: 0; border-radius: 10px; }
.public__org { margin: 0; color: var(--ink); font-weight: 700; font-size: 1.2rem; }
.public__head { display: flex; align-items: center; gap: .75rem; }
.public__main { max-width: 74rem; }
.public__main--thread { max-width: 44rem; }
.public__title { max-width: 44rem; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.contact-form { padding: 1.5rem; border-radius: 18px; background: var(--surface); box-shadow: 0 8px 20px -16px rgb(15 53 66 / .5); }
.public .contact-form h2 { margin: 0 0 .5rem; font-size: 1.4rem; }
.contact-form .lead { font-size: 1.05rem; }
.public .thread .bubble--in { background: var(--surface); }
.contact-team { display: flex; margin-top: 1.25rem; }
.contact-team span { width: 4.5rem; height: 4.5rem; margin-right: -.8rem; overflow: hidden; border-radius: 50%; box-shadow: 0 0 0 4px var(--paper); }
.contact-note { margin-top: .75rem; color: var(--muted); }

@media (max-width: 760px) {
    .contact-grid { grid-template-columns: minmax(0, 1fr); }
    .composer, .split > section, .narrow, .defaults { padding: 1rem; }
}

/* Messages types */
.templates { margin-top: 2rem; }
.templates h2 { margin-top: 0; }
.templates h3 { margin: 1.5rem 0 .6rem; font-size: 1.05rem; }
.template { margin-bottom: .9rem; padding: 1.1rem 1.25rem; border-radius: 18px; background: var(--surface); box-shadow: 0 8px 20px -16px rgb(15 53 66 / .5); scroll-margin-top: 1rem; }
.template label { margin-bottom: 0; font-size: 1.05rem; }
.template > .muted { margin-bottom: .5rem; }
.template textarea + .muted { margin-top: .35rem; }

.snippet { margin-top: 2rem; }
.snippet h2 { margin-top: 0; }
.snippet textarea { font: .85rem/1.4 ui-monospace, monospace; color: var(--muted); }
.snippet .composer__actions { margin-top: .5rem; }

/* Statistiques. Les couleurs du graphique sont fixes : voir _statistics_chart.html.twig. */
.stats-period { margin-top: .75rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1.5rem; }
.stats-period .filters { margin: 0; }
.stats-period__form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.stats-period__form label { display: flex; align-items: center; gap: .4rem; margin: 0; font-weight: 400; }
.stats-period__form input { width: auto; margin: 0; }
.stats-group { margin-bottom: 2rem; }
.stats-group h2 { margin-bottom: .75rem; font-size: 1.15rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: .75rem; }
.stat { padding: 1rem 1.1rem; border-radius: 10px; background: var(--surface); }
.stat p { margin: 0; }
.stat__label { color: var(--muted); font-size: .92rem; }
.stat__value { margin-block: .15rem !important; color: var(--ink); font-size: 2rem; font-weight: 700; line-height: 1.15; }
.stat__note { color: var(--muted); font-size: .82rem; }
.chart { --received: #2563c9; --sent: #d9730d; margin: 0; padding: 1rem 1.1rem; border-radius: 10px; background: var(--surface); }
.chart__legend { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0 0 .5rem; padding: 0; list-style: none; font-size: .92rem; }
.chart__key { display: inline-block; width: 14px; height: 2px; margin-right: .4rem; vertical-align: middle; }
.chart__key--received { background: var(--received); }
.chart__key--sent { background: var(--sent); }
.chart__plot { position: relative; }
.chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart__grid { stroke: #e3ebe9; stroke-width: 1; }
.chart__tick { fill: var(--muted); font-size: 12px; }
.chart__line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart__line--received { stroke: var(--received); }
.chart__line--sent { stroke: var(--sent); }
.chart__dot { stroke: var(--surface); stroke-width: 2; }
.chart__dot--received { fill: var(--received); }
.chart__dot--sent { fill: var(--sent); }
.chart__cross { stroke: var(--muted); stroke-width: 1; }
.chart__cross[hidden] { display: none; }
.chart__tip { position: absolute; top: .25rem; padding: .5rem .7rem; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 8px 20px -12px rgb(15 53 66 / .5); font-size: .88rem; pointer-events: none; white-space: nowrap; }
.chart__tip p { margin: 0; }
.chart__tip p:first-child { color: var(--muted); }
.chart__table { margin-top: .5rem; font-size: .92rem; }
.chart__table summary { cursor: pointer; color: var(--muted); }
.stats-table { overflow-x: auto; }
.stats-table table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .92rem; }
.stats-table th, .stats-table td { padding: .55rem .75rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.stats-table th:first-child { text-align: left; }
.stats-table thead th { color: var(--muted); font-weight: 600; }
