/* Site de l'agence et espace client (phase 5). Univers TWIIN clair (le même que le studio, ui/styles.css) :
   fond clair, accent rose #B0185A (l'action), menthe #0F7A62 (ce que fait l'IA) ; titres Unbounded, texte Inter.
   Les anciens noms de jetons (--noir, --rouge, --beton, --papier) sont gardés : ils portent désormais ces couleurs. */
:root{--noir:#1C1B1F;--rouge:#B0185A;--rouge-doux:#FCE9F1;--menthe:#0F7A62;--menthe-doux:#E1F4EE;--beton:#ECEAEF;--fond2:#F7F5F9;--papier:#FFFFFF;--gris:#5B5963;--r:12px;--titre:'Unbounded',system-ui,sans-serif;--texte:'Inter',system-ui,-apple-system,'Segoe UI',sans-serif;color-scheme:light}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--papier);color:var(--noir);font:16px/1.6 var(--texte)}
a{color:inherit}
img{max-width:100%}
h1,h2,h3{font-family:var(--titre);font-weight:600;line-height:1.12;letter-spacing:-.01em;margin:0 0 .5em}
h1{font-size:clamp(36px,7vw,72px)}h2{font-size:clamp(26px,4vw,40px)}h3{font-size:20px}
p{margin:0 0 1em}
.wrap{max-width:1120px;margin:0 auto;padding:0 20px}
.muted{color:var(--gris)}.small{font-size:14px}

/* Logo texte : le mot TWIIN en Unbounded (comme dans le studio) */
.logo{font-family:var(--titre);font-weight:600;font-size:24px;letter-spacing:.02em;color:var(--noir);text-decoration:none;display:inline-flex;align-items:baseline;line-height:1}
.logo-carre{font-family:var(--titre);font-weight:600;font-size:36px;letter-spacing:.02em;line-height:1;padding:.06em 0;display:inline-block;overflow:visible;white-space:nowrap}
.mono{font-family:var(--titre);font-weight:600;display:inline-grid;place-items:center;width:40px;height:40px;background:var(--rouge);color:#fff;border-radius:var(--r);font-size:20px}

/* En-tête clair */
header.site{background:var(--papier);color:var(--noir);border-bottom:1px solid var(--beton)}
header.site .barre{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:68px}
header.site nav{display:flex;gap:20px;flex-wrap:wrap}
header.site nav a{text-decoration:none;font-weight:500;font-size:15px;color:var(--gris)}
header.site nav a:hover,header.site nav a[aria-current]{color:var(--noir);box-shadow:inset 0 -2px 0 var(--rouge)}
.menu-btn{display:none;background:none;border:1px solid var(--beton);color:var(--noir);border-radius:var(--r);padding:6px 10px;font:inherit}
.hero{padding-top:72px;padding-bottom:88px}
.hero .signature{color:var(--rouge);font-family:var(--titre);font-weight:600;font-size:clamp(20px,3vw,28px);margin-top:12px}
.hero p.lead{max-width:640px;font-size:18px;color:var(--gris)}

/* Boutons */
.btn{display:inline-block;font:600 16px/1 var(--texte);padding:15px 22px;border-radius:var(--r);border:2px solid var(--noir);background:var(--noir);color:var(--papier);text-decoration:none;cursor:pointer}
.btn.rouge{background:var(--rouge);border-color:var(--rouge);color:#fff}
.btn.contour{background:transparent;color:inherit;border-color:currentColor}
.btn:disabled,.btn[aria-disabled=true]{opacity:.45;cursor:not-allowed}
.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}

section{padding:64px 0;border-top:1px solid var(--beton)}
section.beton{background:var(--fond2);border-top:0}
.kicker{font:700 13px/1 var(--texte);text-transform:uppercase;letter-spacing:.12em;color:var(--rouge);margin-bottom:14px}
.grille{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}
.carte{background:#fff;border:1px solid var(--beton);border-radius:var(--r);padding:22px;display:flex;flex-direction:column;gap:8px}
.carte.noire{background:var(--rouge-doux);color:var(--noir);border-color:var(--rouge)}
.ia{color:var(--menthe)}.badge.ia{background:var(--menthe-doux);color:var(--menthe)}
.prix{font-family:var(--titre);font-weight:600;font-size:30px}
.prix small{font:500 14px var(--texte);opacity:.7}
.carte ul{margin:4px 0 12px;padding-left:18px}
.carte .btn{margin-top:auto;align-self:flex-start}
.etape .num{font-family:var(--titre);font-weight:600;font-size:44px;color:var(--rouge);line-height:1}
.vide{border:2px dashed var(--beton);background:transparent;color:var(--gris);min-height:150px;justify-content:center;align-items:center;text-align:center}

/* Formulaires */
form.form{display:flex;flex-direction:column;gap:14px;max-width:640px}
label{font-weight:600;font-size:15px;display:flex;flex-direction:column;gap:6px}
label.case{flex-direction:row;align-items:flex-start;gap:10px;font-weight:400}
input,textarea,select{font:inherit;padding:12px;border:1px solid #8A8792;border-radius:var(--r);background:#fff;color:var(--noir);width:100%}
label.case input{width:auto;flex:0 0 auto;margin-top:5px}
label.case>span{flex:1 1 auto;min-width:0}
textarea{min-height:120px}
input:focus,textarea:focus,select:focus,.btn:focus-visible,a:focus-visible{outline:3px solid var(--rouge);outline-offset:2px}
.piege{position:absolute;left:-5000px;width:1px;height:1px;overflow:hidden}
.alerte{border-left:4px solid var(--rouge);background:#fff;padding:12px 16px;border-radius:var(--r);margin:12px 0}

footer.site{background:var(--fond2);color:var(--noir);border-top:1px solid var(--beton);padding:48px 0 32px;font-size:14px}
footer.site .cols{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap}
footer.site a{opacity:.8}footer.site nav{display:flex;flex-direction:column;gap:6px}
.texte-legal{max-width:760px}.texte-legal h2{font-size:24px;margin-top:1.4em}

/* Espace client */
/* Haut et bas seulement : les marges latérales restent celles de .wrap (sinon le texte touche le bord du téléphone). */
.espace{padding-top:32px;padding-bottom:64px}
.espace .carte>.badge{align-self:flex-start}
.onglets{display:flex;gap:6px;flex-wrap:wrap;margin:16px 0 22px}
.onglets button{font:600 14px var(--texte);background:#fff;border:1px solid var(--beton);border-radius:var(--r);padding:10px 14px;cursor:pointer;color:var(--noir)}
.onglets button[aria-selected=true]{background:var(--noir);color:var(--papier);border-color:var(--noir)}
.post-media img,.post-media video{width:100%;max-width:520px;max-height:70vh;object-fit:contain;border-radius:var(--r);display:block;background:var(--beton);margin-bottom:8px}
.legende{white-space:pre-line}
.ligne{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 0;border-top:1px solid var(--beton)}
.badge{display:inline-block;font:700 12px/1 var(--texte);text-transform:uppercase;letter-spacing:.06em;padding:6px 8px;border-radius:var(--r);background:var(--beton)}
.badge.rouge{background:var(--rouge);color:#fff}

@media (max-width:720px){
  header.site nav{display:none;width:100%;flex-direction:column;gap:12px;padding:0 0 18px}
  header.site nav.ouvert{display:flex}
  header.site .barre{flex-wrap:wrap}
  .menu-btn{display:inline-block}
  .hero{padding-top:44px;padding-bottom:56px}
  section{padding:44px 0}
  .btn{width:100%;text-align:center}
  .carte .btn{width:100%}
}

/* Serveur — lot 3 : espace client, vue groupée des publications (semaine en grille sur ordinateur, une par une sur
   téléphone), feuilles, collègues. Couleurs : jetons du site (aucune couleur d'agence en dur). */
.espace-acces{max-width:640px}
.espace-tete{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:flex-start}
.espace-tete .btn{width:auto}
.btn.petit{padding:9px 14px;font-size:14px;width:auto}
.btn:disabled{opacity:.45;cursor:not-allowed}
.bonjour h2{margin-bottom:4px}
.sous-onglets{display:flex;gap:4px;border-bottom:1px solid var(--beton);margin:14px 0 18px}
.sous-onglets button{font:600 15px var(--texte);background:none;border:0;border-bottom:3px solid transparent;padding:10px 12px;cursor:pointer;color:var(--gris);display:inline-flex;gap:8px;align-items:center}
.sous-onglets button[aria-selected=true]{color:var(--noir);border-bottom-color:var(--rouge)}
.compte{background:var(--rouge);color:#fff;border-radius:999px;font-size:12px;line-height:1;padding:4px 8px}
.outils-vue{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.segment{display:inline-flex;border:1px solid var(--beton);border-radius:var(--r);overflow:hidden;background:#fff}
.segment button{font:600 14px var(--texte);border:0;background:none;padding:9px 14px;cursor:pointer;color:var(--noir)}
.segment button[aria-pressed=true]{background:var(--noir);color:var(--papier)}
.nav-semaine{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.semaine{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin-bottom:10px}
.jour{border:1px solid var(--beton);background:#fff;border-radius:var(--r);padding:8px;display:flex;flex-direction:column;gap:6px;min-height:170px;min-width:0}
.jour.aujourdhui{border-color:var(--rouge);box-shadow:0 0 0 1px var(--rouge)}
.jour-nom{display:flex;justify-content:space-between;font-size:12px;color:var(--gris)}.jour-nom b{color:var(--noir);font-size:15px}
.mini-post{display:flex;flex-direction:column;gap:4px;border:1px solid var(--beton);border-radius:var(--r);background:var(--papier);padding:0;text-align:left;cursor:pointer;overflow:hidden;font:inherit;color:inherit;width:100%}
.mini-post:hover,.mini-post:focus-visible{border-color:var(--noir)}
.mini-image{position:relative;display:block;aspect-ratio:4/5;background:var(--beton);overflow:hidden}
.mini-image img{width:100%;height:100%;object-fit:cover;display:block}
.mini-image .pastille{position:absolute;left:5px;top:5px;font-size:11px}
.mini-image.petite{width:44px;height:55px;flex:none;aspect-ratio:auto;border-radius:var(--r)}
.mini-image.petite .pastille{display:none}
.mini-titre{font-size:12.5px;font-weight:600;padding:0 7px;line-height:1.3;overflow-wrap:anywhere}
.mini-heure{font-size:12px;color:var(--gris);padding:0 7px 7px}
.libre{font-size:12px;color:var(--gris);border:1px dashed var(--beton);border-radius:var(--r);padding:6px;text-align:center;margin-top:auto}
.vignette-video{display:grid;place-items:center;width:100%;height:100%;font:600 13px var(--texte);color:var(--gris)}
.pastille{display:inline-flex;align-items:center;gap:6px;font:600 12px/1 var(--texte);padding:5px 8px 5px 7px;border-radius:999px;background:#fff;color:var(--noir);box-shadow:0 1px 4px rgba(0,0,0,.15)}
.pastille i{width:8px;height:8px;border-radius:50%;background:currentColor;display:block}
.pastille.etat-attente{color:var(--rouge)}.pastille.etat-ok{color:#1f7a4d}.pastille.etat-modif{color:#8a5a00}
.une{display:flex;flex-direction:column;gap:12px;max-width:520px;margin:0 auto;width:100%}
.une-tete{display:flex;justify-content:space-between;align-items:center}
.points{display:flex;gap:6px}.points i{width:8px;height:8px;border-radius:50%;background:var(--beton);display:block}.points i.on{background:var(--rouge)}
.grand{border-radius:var(--r);overflow:hidden;background:var(--beton);max-height:70vh}
.grand img,.grand video{width:100%;max-height:70vh;object-fit:contain;display:block}
.une-titre{font-size:17px}
.legende-boite{background:#fff;border:1px solid var(--beton);border-radius:var(--r);padding:10px 12px;font-size:15px;white-space:pre-line}
.une-decision{display:flex;flex-direction:column;gap:8px}.une-decision .btn{width:100%;text-align:center}
.une-nav{display:flex;justify-content:space-between;gap:8px}
.vide-espace{display:flex;flex-direction:column;gap:8px;align-items:flex-start;border:2px dashed var(--beton);border-radius:var(--r);padding:24px}
.lignes-historique{display:flex;flex-direction:column}
.ligne-historique{display:flex;gap:12px;align-items:center;padding:10px 0;border-top:1px solid var(--beton)}
.ligne-texte{display:flex;flex-direction:column;flex:1;min-width:0;overflow-wrap:anywhere}
.roles{border:0;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}.roles legend{font-weight:600;margin-bottom:6px}
dialog.feuille-espace{border:0;border-radius:var(--r);padding:0;width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 32px);background:var(--papier);color:var(--noir);box-shadow:0 12px 40px rgba(0,0,0,.3)}
dialog.feuille-espace::backdrop{background:rgba(20,10,25,.32)}
.feuille-espace header{display:flex;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--beton)}
.feuille-espace header h2{font-size:20px;margin:0}.feuille-espace header p{margin:4px 0 0}
.feuille-espace .fermer{font:400 26px/1 var(--texte);background:none;border:0;cursor:pointer;color:var(--noir);min-width:40px;min-height:40px}
.feuille-corps{padding:16px 18px;display:flex;flex-direction:column;gap:10px;overflow:auto;max-height:calc(100vh - 200px)}
.feuille-espace footer{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding:12px 18px;border-top:1px solid var(--beton)}
.feuille-espace footer .btn{width:auto}
.espace-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);background:var(--noir);color:var(--papier);padding:12px 18px;border-radius:var(--r);opacity:0;transition:opacity .2s,transform .2s;pointer-events:none;max-width:calc(100vw - 32px);z-index:50}
.espace-toast.on{opacity:1;transform:translateX(-50%)}
@media (max-width:980px){.semaine{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:720px){.semaine{grid-template-columns:repeat(2,minmax(0,1fr))}.espace-tete .btn,.btn.petit{width:auto}.une-nav .btn{width:auto}}
@media (prefers-reduced-motion:reduce){.espace-toast{transition:none}}
