/* ==========================================================================
   My Marketing Friend — atelier éditorial chaleureux
   Papier crème, encre, une typo de caractère (Fraunces) pour ce qui compte :
   les titres et les accroches. Instrument Sans pour le reste.
   ========================================================================== */
:root {
    --papier: #f5efe6;
    --papier-2: #ede4d6;
    --surface: #fffdf9;
    --encre: #221c15;
    --encre-2: #4a4137;
    --muted: #8a7f72;
    --trait: #e3d8c8;
    --accent: #e8552f;       /* tomate : l'action principale */
    --accent-2: #fbe4da;
    --bleu: #2747d6;         /* « intéressant » */
    --bleu-2: #e4e9fc;
    --vert: #2f7a4b;
    --rouge: #b8322a;
    --rayon: 16px;
    --ombre: 0 1px 2px rgba(34, 28, 21, .04), 0 8px 24px rgba(34, 28, 21, .06);
    --ombre-forte: 0 2px 4px rgba(34, 28, 21, .05), 0 22px 50px rgba(34, 28, 21, .12);
    --serif: "Fraunces", Georgia, serif;
    --sans: "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
    margin: 0; color: var(--encre); font: 15px/1.55 var(--sans);
    background:
        radial-gradient(1200px 600px at 100% -10%, #fbe9dc 0%, transparent 60%),
        radial-gradient(900px 500px at -10% 110%, #efe6f6 0%, transparent 55%),
        var(--papier);
    background-attachment: fixed;
}
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

h1 { font: 600 28px/1.15 var(--serif); letter-spacing: -.01em; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
h2 { font: 600 19px/1.25 var(--serif); margin: 30px 0 12px; }
h3 { font-family: var(--serif); }
.display { font: 600 clamp(34px, 4vw, 46px)/1.05 var(--serif); letter-spacing: -.02em; margin: 0; }
.surtitre { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.intro { font-size: 17px; color: var(--encre-2); margin: 10px 0 26px; max-width: 620px; }
.muted { color: var(--muted); margin: 0 0 16px; }
.small { font-size: 13px; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Structure ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 236px; flex-shrink: 0; padding: 26px 16px; display: flex; flex-direction: column; gap: 26px;
    position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 15px/1.1 var(--serif); padding: 0 8px; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 11px; background: var(--encre); color: var(--papier);
    display: grid; place-items: center; font: 700 20px/1 var(--serif); font-style: italic;
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
    display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 11px; text-decoration: none;
    color: var(--encre-2); font-weight: 500; transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255, 253, 249, .7); color: var(--encre); }
.nav-link.is-active { background: var(--surface); color: var(--encre); box-shadow: var(--ombre); }
.nav-link.is-active .ico { color: var(--accent); }
.nav-count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 1px 7px; }
.nav-label { display: none; }
.logout { margin-top: auto; padding: 0 12px; }
.main { flex: 1; padding: 44px 52px 120px; max-width: 1080px; animation: entree .35s ease-out both; }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Éléments de base ---------- */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-lg { width: 13px; height: 13px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-head h2 { margin-bottom: 12px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--encre); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); }
.card-link { text-decoration: none; transition: transform .15s, box-shadow .15s; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--ombre-forte); }
.card-title { font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.card .muted { margin: 0; font-size: 14px; }
.is-archived { opacity: .5; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; background: var(--papier-2); border-radius: 20px; padding: 2px 9px; }
.empty { color: var(--muted); text-align: center; padding: 40px; }
.flash { background: var(--surface); border: 1px solid var(--trait); border-left: 4px solid var(--vert); padding: 12px 16px; border-radius: 12px; margin-bottom: 24px; box-shadow: var(--ombre); }
.error { color: var(--rouge); }
.tag, .chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; background: var(--surface); border: 1px solid var(--trait); border-radius: 20px; padding: 3px 11px; color: var(--encre-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Boutons & formulaires ---------- */
.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14.5px/1 var(--sans);
    background: var(--encre); color: var(--papier); border: 1px solid var(--encre); border-radius: 12px;
    padding: 12px 18px; cursor: pointer; text-decoration: none; transition: transform .1s, background .15s, box-shadow .15s;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(34, 28, 21, .18); }
.button:active { transform: none; }
.button:disabled { opacity: .55; cursor: wait; transform: none; box-shadow: none; }
.button-ghost { background: transparent; color: var(--encre); border-color: var(--trait); }
.button-ghost:hover { background: var(--surface); box-shadow: none; }
.button-grand { padding: 16px 24px; font-size: 16px; border-radius: 14px; background: var(--accent); border-color: var(--accent); }
.button-petit { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.button.is-loading { position: relative; color: transparent; }
.button.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: tourne .8s linear infinite; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.link-button:hover { color: var(--encre); }
.link-button .ico { width: 15px; height: 15px; }

.form { display: flex; flex-direction: column; gap: 16px; max-width: 580px; }
.form-wide { max-width: 860px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; color: var(--encre-2); }
label.checkbox { flex-direction: row; align-items: center; font-weight: 500; }
input[type=text], input[type=password], input[type=number], input[type=date], textarea, select {
    font: 400 15px/1.4 var(--sans); color: var(--encre); padding: 11px 13px; border: 1px solid var(--trait); border-radius: 11px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--encre-2); box-shadow: 0 0 0 3px rgba(34, 28, 21, .08); }
input[type=color] { height: 42px; width: 70px; border: 1px solid var(--trait); border-radius: 11px; padding: 3px; background: #fff; }
.row { display: flex; gap: 16px; }
.row > label { flex: 1; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 13.5px; color: var(--encre-2); margin-bottom: 8px; padding: 0; }

/* Choix en pastilles (radios / cases) */
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix-item { flex-direction: row; align-items: center; gap: 0; font-weight: 500; cursor: pointer; color: var(--encre); }
.choix-item input { position: absolute; opacity: 0; pointer-events: none; }
.choix-item > span { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--trait); border-radius: 24px; padding: 9px 16px; background: #fff; transition: all .15s; }
.choix-item:hover > span { border-color: var(--encre-2); }
.choix-item input:checked + span { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.choix-item input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Chargement */
.chargement { display: flex; align-items: center; gap: 12px; color: var(--encre-2); font-size: 14.5px; padding: 14px 0 0; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--trait); border-top-color: var(--accent); border-radius: 50%; animation: tourne .8s linear infinite; flex-shrink: 0; }
@keyframes tourne { to { transform: rotate(360deg); } }
[hidden] { display: none !important; }

/* ---------- Connexion ---------- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: 360px; display: flex; flex-direction: column; gap: 18px; }
.login-card h1 { font-size: 26px; }

/* ---------- Accueil ---------- */
.accueil-head { margin-bottom: 8px; }
.hero-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; text-decoration: none;
    background: var(--encre); color: var(--papier); border-radius: 22px; padding: 28px 32px; margin: 0 0 30px;
    box-shadow: var(--ombre-forte); position: relative; overflow: hidden; transition: transform .2s;
}
.hero-cta::before { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: var(--accent); opacity: .9; transition: transform .4s; }
.hero-cta:hover { transform: translateY(-2px); }
.hero-cta:hover::before { transform: scale(1.08); }
.hero-cta-texte { position: relative; display: flex; flex-direction: column; gap: 6px; }
.hero-cta-titre { font: 600 26px/1.1 var(--serif); }
.hero-cta-sous { color: #d8cfc3; }
.hero-cta-fleche { position: relative; width: 54px; height: 54px; border-radius: 50%; background: var(--papier); color: var(--encre); display: grid; place-items: center; flex-shrink: 0; }
.hero-cta-fleche .ico { width: 24px; height: 24px; }
.accueil-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.panneau { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 20px 22px; box-shadow: var(--ombre); }
.panneau-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.panneau-head h2 { margin: 0; font-size: 18px; }
.panneau-head a { font-size: 13px; color: var(--muted); text-decoration: none; }
.panneau-head a:hover { color: var(--accent); }
.panneau .muted { margin: 0; font-size: 14px; }
.ligne { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--trait); text-decoration: none; }
.ligne:first-of-type { border-top: 0; }
.ligne:hover .ligne-titre { color: var(--accent); }
.ligne-date { font-size: 12.5px; color: var(--muted); width: 74px; }
.ligne-titre { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14.5px; grid-column: auto; transition: color .15s; }
.ligne:not(:has(.ligne-date)) { grid-template-columns: 1fr auto; }
.ligne-meta { font-size: 12.5px; color: var(--muted); }

/* ---------- Brief ---------- */
.brief { gap: 22px; padding: 28px; }

/* ---------- Session d'idées ---------- */
.session-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.session-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag-canal { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; color: #fff; background: var(--canal); border-radius: 20px; padding: 3px 11px; }
.session-titre { font: 600 30px/1.15 var(--serif); margin: 0; }
.session-tour { font: 600 13px var(--sans); color: var(--muted); background: var(--surface); border: 1px solid var(--trait); border-radius: 20px; padding: 6px 13px; white-space: nowrap; }

.conseil { display: flex; gap: 12px; align-items: flex-start; max-width: 640px; margin-bottom: 22px; animation: entree .4s ease-out both; }
.conseil-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 700 15px var(--serif); flex-shrink: 0; }
.conseil-texte { background: var(--surface); border: 1px solid var(--trait); border-radius: 4px 16px 16px 16px; padding: 12px 16px; font-size: 15px; color: var(--encre-2); }
.conseil-texte p { margin: 0 0 8px; } .conseil-texte p:last-child { margin: 0; }

.progression { display: flex; align-items: center; gap: 14px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; max-width: 620px; }
.points { display: flex; gap: 6px; }
.point { width: 26px; height: 6px; border-radius: 4px; background: var(--trait); }
.point-interessante { background: var(--bleu); }
.point-refusee { background: #d9b3ad; }
.point.is-current { background: var(--encre); }

.solo { max-width: 620px; }
.annuler-avis { margin-top: 16px; }

/* ---------- Cartes ---------- */
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; max-width: 980px; }
.carte {
    background: var(--surface); border: 1px solid var(--trait); border-radius: 20px; overflow: hidden;
    display: flex; flex-direction: column; gap: 16px; padding-bottom: 18px; box-shadow: var(--ombre);
}
.carte-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; font-size: 13px; font-weight: 600; background: var(--canal, #999); color: #fff; }
.carte-head .dot { display: none; }
.carte-num { opacity: .75; font-weight: 500; }
.carte-bloc { padding: 0 20px; }
.carte-bloc p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--encre-2); }
.carte-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.carte .carte-accroche { font: 600 21px/1.3 var(--serif); color: var(--encre); letter-spacing: -.005em; }
.carte-actions { display: flex; align-items: center; gap: 10px; padding: 14px 20px 0; border-top: 1px solid var(--trait); flex-wrap: wrap; }
.carte-boutons { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; width: 100%; }
.carte-boutons form { margin: 0; }
.bouton-choisir { background: var(--accent); border-color: var(--accent); }
.bouton-interessant { background: var(--bleu-2); color: var(--bleu); border-color: transparent; }
.bouton-interessant:hover { box-shadow: none; background: #d5ddfb; }
.bouton-interessant.is-on { background: var(--bleu); color: #fff; }
.carte-refus { flex: 1; min-width: 80px; }
.carte-refus summary { list-style: none; display: inline-flex; }
.carte-refus summary::-webkit-details-marker { display: none; }
.carte-refus[open] summary { display: none; }
.carte-refus-form { display: flex; gap: 6px; animation: entree .2s ease-out both; }
.carte-refus-form input { flex: 1; min-width: 0; padding: 10px 12px; }
.carte-ok { color: var(--accent); font-weight: 700; }
.carte-non { color: var(--rouge); font-size: 14px; flex: 1; }
.carte-actions a { font-size: 14px; color: var(--muted); }
.carte-interessante { box-shadow: 0 0 0 2px var(--bleu), var(--ombre); }
.carte-choisie, .carte-validee { box-shadow: 0 0 0 2px var(--accent), var(--ombre); }
.carte-refusee { opacity: .55; }
.carte-refusee .carte-bloc:not(:nth-of-type(1)) { display: none; }

.carte-solo { border-radius: 24px; box-shadow: var(--ombre-forte); animation: carte-arrive .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes carte-arrive { from { opacity: 0; transform: translateY(18px) rotate(-.6deg) scale(.98); } to { opacity: 1; transform: none; } }
.carte-solo .carte-head { padding: 14px 26px; font-size: 14px; }
.carte-solo .carte-bloc { padding: 0 26px; }
.carte-solo .carte-accroche { font-size: clamp(24px, 3vw, 30px); line-height: 1.22; }
.carte-solo .carte-bloc p { font-size: 16px; }
.carte-solo .carte-actions { padding: 18px 26px 4px; }
.carte-solo .carte-boutons .button { padding: 13px 20px; font-size: 15px; }

/* Récap de fin de tour */
.recap { max-width: 680px; }
.recap-titre { margin-top: 0; }
.recap-liste { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.recap-item { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--trait); border-radius: 14px; padding: 12px 14px; }
.recap-verdict { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; border-radius: 20px; padding: 3px 9px; flex-shrink: 0; }
.recap-interessante .recap-verdict { background: var(--bleu-2); color: var(--bleu); }
.recap-refusee .recap-verdict { background: #f6dfdb; color: var(--rouge); }
.recap-texte { flex: 1; font: 500 15px/1.4 var(--serif); }
.recap-texte em { display: block; font: italic 13px var(--sans); color: var(--muted); margin-top: 3px; }
.affiner { display: flex; gap: 10px; flex-wrap: wrap; }
.affiner input[type=text] { flex: 1; min-width: 240px; }

/* Idée retenue */
.final { background: var(--encre); color: var(--papier); border-radius: 24px; padding: 34px; max-width: 700px; box-shadow: var(--ombre-forte); animation: carte-arrive .5s ease-out both; }
.final-label { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.final-accroche { font: 600 30px/1.2 var(--serif); margin: 0 0 12px; }
.final-idee { color: #d8cfc3; margin: 0 0 24px; }
.final .button { background: var(--accent); border-color: var(--accent); }
.final .button-ghost { background: transparent; color: var(--papier); border-color: #4d4339; }

.historique { margin-top: 44px; border-top: 1px solid var(--trait); padding-top: 16px; }
.historique > summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 500; }
.historique > summary:hover { color: var(--encre); }

/* ---------- Discussion (chat) ---------- */
.composer { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px; box-shadow: var(--ombre); }
.composer textarea { width: 100%; resize: vertical; border: 0; padding: 4px; box-shadow: none; }
.composer textarea:focus { box-shadow: none; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.msg { padding: 12px 16px; border-radius: 16px; max-width: 860px; }
.msg-moi { background: var(--encre); color: var(--papier); align-self: flex-end; max-width: 640px; border-bottom-right-radius: 4px; }
.msg-agent { background: var(--surface); border: 1px solid var(--trait); border-bottom-left-radius: 4px; }
.msg-agent p { margin: 0 0 10px; } .msg-agent p:last-child { margin-bottom: 0; }
.msg-agent h2, .msg-agent h3, .msg-agent h4 { margin: 16px 0 6px; font-size: 16px; }
.msg-agent ul, .msg-agent ol { margin: 4px 0 10px; padding-left: 22px; }
.msg-agent li.sub { margin-left: 18px; list-style: circle; }
.msg-agent hr { border: 0; border-top: 1px solid var(--trait); margin: 14px 0; }
.msg-agent code, .version-body code { background: var(--papier); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.msg-attente { color: var(--muted); font-style: italic; }
.msg-action { font-size: 13px; color: var(--muted); padding-left: 4px; }
.msg-action::before { content: "↳ "; }
.msg-action a { color: var(--muted); }
.msg-erreur { background: #fbe9e6; color: var(--rouge); border: 1px solid #f1c9c2; }
.msg-auto { background: transparent; color: var(--muted); border: 1px dashed var(--trait); font-size: 13px; padding: 7px 13px; }
.msg-auto summary { cursor: pointer; }
.h-conv { font-size: 22px; }
.table-wrap { overflow-x: auto; margin: 8px 0 12px; }
.table-wrap table { border-collapse: collapse; font-size: 14px; width: 100%; }
.table-wrap th, .table-wrap td { border: 1px solid var(--trait); padding: 7px 10px; text-align: left; vertical-align: top; }
.table-wrap th { background: var(--papier); }

/* ---------- Listes ---------- */
.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
.list-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; text-decoration: none; border-bottom: 1px solid var(--trait); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: #fff8f1; }
.memoire-item { display: block; margin-bottom: 10px; }
.danger-zone { margin-top: 20px; }
.version summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.version[open] summary { margin-bottom: 10px; }
.version { display: block; }
.version-body { font-size: 14px; }
.version form { margin-top: 10px; }

/* ---------- Calendrier ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 20px; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 12px; }
.month-nav strong { font: 600 20px var(--serif); min-width: 150px; text-align: center; }
.month-nav .button { padding: 8px 13px; }
.semaine { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 20px; margin-bottom: 12px; box-shadow: var(--ombre); }
.semaine-courante { box-shadow: 0 0 0 2px var(--encre), var(--ombre); }
.semaine-head { font-weight: 600; font-size: 14px; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.vide { padding: 2px 0; }
.jour { display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--trait); }
.jour:first-of-type { border-top: 0; }
.jour-label { width: 90px; flex-shrink: 0; font-size: 13px; color: var(--muted); padding-top: 9px; }
.jour-label.is-today { color: var(--accent); font-weight: 700; }
.jour-items { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.contenu { display: flex; flex-direction: column; gap: 3px; padding: 10px 13px; border: 1px solid var(--trait); border-radius: 12px; text-decoration: none; min-width: 220px; max-width: 340px; background: #fff; transition: border-color .15s, transform .15s; }
.contenu:hover { border-color: var(--encre-2); transform: translateY(-1px); }
.contenu-canal { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.contenu-titre { font-weight: 600; font-size: 14px; }
.contenu-meta { font-size: 12px; color: var(--muted); }
.statut-publie { background: #f1f7f2; }
.statut-abandonne { opacity: .5; text-decoration: line-through; }
.statut-idee { border-style: dashed; }
.a-placer { box-shadow: 0 0 0 2px var(--accent), var(--ombre); }
.a-placer .semaine-head { color: var(--accent); }
.a-placer .badge { background: var(--accent); color: #fff; }
.a-placer-liste { display: flex; flex-wrap: wrap; gap: 14px; }
.a-placer-item { display: flex; flex-direction: column; gap: 6px; }
.placer-form { display: flex; gap: 6px; }
.placer-form input { padding: 8px 10px; font-size: 14px; }
.placer-form .button { padding: 8px 14px; }

/* ---------- Bulle du manager ---------- */
.bulle-bouton {
    position: fixed; right: 22px; bottom: 22px; z-index: 50; display: inline-flex; align-items: center; gap: 8px;
    background: var(--encre); color: var(--papier); border: 0; border-radius: 30px; padding: 13px 20px;
    font: 600 14.5px var(--sans); cursor: pointer; box-shadow: var(--ombre-forte); transition: transform .15s;
}
.bulle-bouton:hover { transform: translateY(-2px); }
.bulle-bouton .ico { color: var(--accent); }
.bulle { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: 410px; max-width: calc(100vw - 24px); height: min(620px, calc(100vh - 44px)); background: var(--surface); border: 1px solid var(--trait); border-radius: 22px; box-shadow: var(--ombre-forte); display: flex; flex-direction: column; overflow: hidden; animation: carte-arrive .3s ease-out both; }
.bulle-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--trait); gap: 10px; background: var(--papier); }
.bulle-head strong { font: 600 17px var(--serif); }
.bulle-head-actions { display: flex; gap: 14px; align-items: center; }
.bulle-head-actions a, .bulle-head-actions button { font-size: 13px; }
.bulle-corps { flex: 1; overflow-y: auto; padding: 14px 16px; margin-top: 0; gap: 10px; }
.bulle-corps .msg { padding: 10px 13px; font-size: 14px; max-width: 100%; }
.bulle-corps .msg-moi { max-width: 85%; }
.bulle-intro { padding: 6px 2px; }
.bulle-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--trait); align-items: flex-end; }
.bulle-form textarea { flex: 1; resize: none; font-size: 14px; }
.bulle-form .button { padding: 11px 14px; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
    .shell { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 14px 14px 0; gap: 12px; }
    .brand span:last-child { display: none; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .nav-link { padding: 8px 10px; font-size: 14px; }
    .logout { display: none; }
    .main { padding: 22px 16px 120px; }
    .row { flex-direction: column; gap: 14px; }
    .jour { flex-direction: column; gap: 6px; }
    .contenu { max-width: none; width: 100%; }
    .hero-cta { padding: 22px; }
    .hero-cta-titre { font-size: 21px; }
    .session-titre { font-size: 24px; }
    .bulle { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100vh; border-radius: 0; }
}
.carte-solo .carte-bloc .carte-accroche { font-size: clamp(24px, 3vw, 30px); line-height: 1.22; }
.choix-item .dot { width: 10px; height: 10px; }
.facultatif { font-weight: 400; color: var(--muted); }

/* ---------- Personnages (v9) ---------- */
.avatar {
    --s: 40px; position: relative; width: var(--s); height: var(--s); flex-shrink: 0; border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--av) 55%, #fff) 0%, var(--av) 55%, color-mix(in srgb, var(--av) 75%, #000) 100%);
    display: inline-grid; place-items: center; color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--av) 35%, transparent);
}
.avatar-lettre { font: italic 600 calc(var(--s) * .48)/1 var(--serif); transform: translateY(-1px); }
.avatar-presence { position: absolute; right: 0; bottom: 0; width: calc(var(--s) * .28); height: calc(var(--s) * .28); border-radius: 50%; background: #3fb26b; border: 2px solid var(--papier); }
.avatar-s { --s: 30px; }
.avatar-s .avatar-presence { display: none; }
.avatar-m { --s: 40px; }
.avatar-xl { --s: 92px; }
.avatar-xl .avatar-presence { border-width: 3px; }

.nav-section { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 18px 12px 6px; }
.nav-section:empty { padding: 8px 0 0; }
.nav-perso { padding: 7px 10px; }
.nav-perso-txt { display: flex; flex-direction: column; line-height: 1.2; }
.nav-perso-txt small { font-size: 11.5px; color: var(--muted); font-weight: 500; }

.profil { display: flex; align-items: center; gap: 24px; margin-bottom: 28px; position: relative; }
.profil-txt { flex: 1; }
.profil-bulle { margin-top: 12px; background: var(--surface); border: 1px solid var(--trait); border-radius: 4px 18px 18px 18px; padding: 12px 16px; max-width: 560px; color: var(--encre-2); box-shadow: var(--ombre); }
.profil-lien { position: absolute; right: 0; top: 0; }
.form-titre { margin: 4px 0 0; font-size: 18px; }
.label-couleur { flex: 0 0 auto !important; }

.conseil .avatar { margin-top: 2px; }
.conseil-nom { display: block; font-weight: 700; font-size: 13px; color: var(--encre); margin-bottom: 2px; }
.chargement .avatar { animation: respire 1.6s ease-in-out infinite; }
@keyframes respire { 50% { transform: scale(1.08); } }
.chargement-texte { transition: opacity .2s; }
.recap .conseil { margin-bottom: 18px; }
.final-label { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 15px; color: #f1e9de; font-weight: 600; }

.msg-ligne { display: flex; gap: 10px; align-items: flex-end; max-width: 900px; }
.msg-ligne .msg { flex: 1; }

.hero-cta-qui { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #d8cfc3; margin-bottom: 4px; }
.hero-cta-qui .avatar { --s: 28px; }
.hero-cta-qui .avatar-presence { display: block; border-color: var(--encre); width: 9px; height: 9px; }

.membre { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--trait); text-decoration: none; }
.membre:first-of-type { border-top: 0; }
.membre-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.membre-txt span { font-size: 13px; color: var(--muted); }
.membre:hover strong { color: var(--accent); }
.membre-dispo { font-size: 12px; color: #2f8a55; display: inline-flex; align-items: center; gap: 5px; }
.membre-dispo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3fb26b; }

.bulle-qui { display: flex; align-items: center; gap: 10px; }
.bulle-qui > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.bulle-qui small { font-size: 12px; color: var(--muted); }
.bulle-intro { font-size: 14px; }

/* ---------- Échanges entre collègues (v10) ---------- */
.echange { align-self: stretch; max-width: 760px; margin-left: 40px; background: color-mix(in srgb, var(--bleu-2) 55%, var(--surface)); border: 1px dashed #b9c6f3; border-radius: 14px; padding: 10px 14px; }
.echange-tete { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--encre-2); margin-bottom: 6px; }
.echange-tete .avatar { --s: 22px; }
.echange-tete .avatar-lettre { font-size: 11px; }
.echange-tete > span:last-child { margin-left: 4px; }
.echange-fleche { color: var(--muted); }
.echange-texte { font-size: 14px; color: var(--encre-2); }
.echange-reponse { margin-left: 40px; }
.echange-reponse .msg { border-color: #b9c6f3; }
.msg-collegue { background: var(--bleu-2); border: 1px solid #c9d4f7; border-bottom-left-radius: 4px; }
.dernier-echange { margin: 0 0 26px; max-width: 800px; }
.echange-action { margin-left: 80px; }
.dire-a { display: flex; align-items: center; gap: 10px; max-width: 620px; margin-top: 22px; background: var(--surface); border: 1px solid var(--trait); border-radius: 30px; padding: 6px 6px 6px 8px; box-shadow: var(--ombre); }
.dire-a input { flex: 1; border: 0; background: transparent; padding: 8px 4px; box-shadow: none !important; }
.dire-a .button { border-radius: 24px; }
