
:root {
  font-family: system-ui, sans-serif;
  color: #322143;
  background: #efe3bb;
  font-size: 14px;
  --ink: #322143;
  --plum: #4b315c;
  --plum-dark: #34213f;
  --gold: #d4a949;
  --paper: #fff8df;
  --line: #cbb88d;
  --muted: #756476;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 90% 2%, #f9e5a6 0, transparent 32%),
    radial-gradient(ellipse at 0% 36%, #e8d39b 0, transparent 33%),
    #f2e8c8;
}
header {
  height: 76px;
  padding: 0 max(5vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fae8b0;
  background: var(--plum-dark);
  border-bottom: 4px solid #c99e4a;
  box-shadow: 0 3px 0 #f7edcd;
}
.brand { font-size: 11px; font-weight: 700; letter-spacing: .2em; }
.mark { color: #eacb76; font-size: 25px; vertical-align: middle; margin-right: 9px; }
.brand-sub { color: #c6a8bd; font-weight: 500; margin-left: 8px; }
header .ghost { color: #f6e7bd; }
header .ghost:hover { background: #5c4169; }
main { max-width: 1360px; margin: auto; padding: 58px 5vw 80px; }
.eyebrow { color: #80537b; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 26px; margin-bottom: 42px; }
h1, h2 { font-family: system-ui, sans-serif; font-weight: 500; }
h1 { font-size: clamp(38px, 4vw, 58px); line-height: 1.12; letter-spacing: -.035em; margin: 15px 0; }
h1 em { color: #7b4a78; font-weight: 500; }
h2 { font-size: 25px; margin: 8px 0; }
p { color: #6f5e6a; line-height: 1.6; }
.hero p { margin-bottom: 0; }
.owner-dashboard .hero { margin-bottom: 24px; padding-bottom: 18px; }
.dot { color: #a67a37; margin-left: 12px; }
.debt {
  position: relative;
  overflow: hidden;
  min-width: 250px;
  display: grid;
  gap: 8px;
  padding: 23px 28px;
  color: #f8e6b4;
  background: #54375f;
  border: 1px solid #392341;
  outline: 1px solid #ad8551;
  outline-offset: -6px;
  border-radius: 3px;
  box-shadow: 5px 5px 0 #d5bd7c;
}
.debt::after { content: '✧'; position: absolute; right: 15px; top: 10px; color: #cfad69; font-size: 25px; }
.debt span, .debt small { color: #ead399; font-size: 10px; letter-spacing: .12em; }
.debt strong { color: #fff2c7; font: 500 32px system-ui, sans-serif; }
.debt small { letter-spacing: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr); gap: 25px; align-items: start; }
.left { display: grid; gap: 25px; }
.panel, .login-card {
  background: var(--paper);
  border: 1px solid #aa966f;
  outline: 1px solid #eadbb1;
  outline-offset: -7px;
  border-radius: 3px;
  padding: 29px;
  box-shadow: 5px 5px 0 #ddceaa;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.muted { color: var(--muted); font-size: 12px; }
.count { font: 600 11px system-ui, sans-serif; color: #5e3a60; background: #efdfa9; padding: 5px 8px; border-radius: 20px; vertical-align: middle; }
.live { font: 700 9px system-ui, sans-serif; letter-spacing: .1em; color: #5c5432; background: #eee2aa; border: 1px solid #d6c481; border-radius: 20px; padding: 6px 9px; vertical-align: middle; white-space: nowrap; }
.chat { position: sticky; top: 20px; }
.chat-icon { color: #754c72; border: 1px solid #cbb68d; border-radius: 50%; padding: 9px; }
.messages { height: 380px; overflow: auto; border-top: 1px solid #d9c79b; border-bottom: 1px solid #d9c79b; margin-top: 24px; padding: 15px 0; scrollbar-color: #a986a1 #f3e6bd; }
.message { max-width: 90%; margin: 12px 0; padding: 12px 14px; background: #f0e4c8; border: 1px solid #e2d2ac; border-radius: 2px 10px 10px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.owner { background: #e8d9e4; border-color: #d3bdd0; margin-left: auto; }
.message strong { color: #6d4269; font-size: 11px; }
.message time { float: right; color: #82727c; font-size: 10px; margin-left: 10px; }
.message p { color: #3b3037; margin: 8px 0 0; white-space: pre-wrap; }
.composer { display: flex; gap: 8px; margin-top: 18px; }
.composer textarea { min-height: 58px; resize: vertical; }
.composer button { width: 48px; font-size: 20px; }
.empty { text-align: center; color: #887982; padding: 35px 10px; font-size: 13px; }
.item { border-top: 1px solid #e5d7b3; padding: 16px 0; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.item strong { display: block; font-weight: 600; }
.item small { display: block; color: #7e7078; margin-top: 6px; }
.actions { display: flex; gap: 8px; align-items: center; }
button { border: 1px solid #4e3158; background: #58365f; color: #fff4d7; padding: 13px 17px; border-radius: 3px; font: 600 12px system-ui, sans-serif; cursor: pointer; }
button:hover { background: #714d74; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #bb8735; outline-offset: 2px; }
button.small { padding: 10px 13px; font-size: 11px; }
.ghost { background: transparent; border-color: transparent; color: #654365; }
.ghost:hover { background: #eee1c3; }
.secondary { background: #e7d49e; border-color: #c2a66c; color: #48344b; }
.secondary:hover { background: #dbc185; }
.check { display: block; padding: 10px 0; color: #514052; }
.check input { width: auto; accent-color: #65416a; margin-right: 8px; }
input, textarea { width: 100%; border: 1px solid #cbb992; background: #fffbed; border-radius: 3px; padding: 12px; font: inherit; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #897b7c; }
label { display: block; font-size: 12px; font-weight: 600; color: #665367; margin: 12px 0; }
label input, label textarea { margin-top: 6px; }
textarea { resize: vertical; }
.inline-form { background: #f3e8c9; border: 1px solid #e4d2a6; padding: 15px; border-radius: 3px; margin: 15px 0; }
.notice, .secret { padding: 15px; background: #eddfb4; border: 1px solid #ceb777; border-radius: 3px; margin-bottom: 20px; overflow-wrap: anywhere; }
.secret { background: #eadce7; border-color: #ccb2ca; line-height: 1.8; }
.hidden { display: none !important; }
.welcome { max-width: 850px; margin: 40px auto; text-align: center; }
.welcome::before { content: '✧  ☾  ✧'; display: block; color: #9a6a78; font-size: 23px; letter-spacing: .3em; margin-bottom: 24px; }
.welcome > p { font-size: 16px; }
.login-card { text-align: left; max-width: 440px; margin: 40px auto; }
.login-card > button, .login-card form button { width: 100%; }
.login-card > button span { float: right; }
.divider { text-align: center; color: #8a7780; font-size: 10px; letter-spacing: .1em; margin: 24px 0; }
.linkbox { overflow-wrap: anywhere; background: #f0e5c8; border: 1px solid #dfcca2; padding: 12px; color: #563d5c; font-size: 12px; border-radius: 3px; }
footer { border-top: 1px solid #cdbb91; padding: 25px 5vw; color: #74566a; font-size: 10px; letter-spacing: .15em; }
footer span { float: right; letter-spacing: 0; color: #8c7c80; }
@media (max-width: 800px) {
  main { padding-top: 35px; }
  .layout { grid-template-columns: 1fr; }
  .hero { align-items: start; flex-direction: column; }
  .debt { width: 100%; }
  .chat { position: static; }
  .messages { height: 280px; }
  .brand-sub { display: none; }
}
@media (max-width: 460px) {
  .panel, .login-card { padding: 22px; }
  .panel-head, .item { flex-wrap: wrap; }
  .actions { flex-wrap: wrap; }
}

.workflow { max-width: 860px; margin: 0 auto; }
.workflow form { display: grid; gap: 24px; margin-top: 28px; }
.workflow .panel { margin: 0; }
.config-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}
.config-section > summary::-webkit-details-marker { display: none; }
.config-section > summary::after { content: '+'; font-size: 24px; color: #f3b4cf; }
.config-section[open] > summary::after { content: '−'; }
.config-section > summary:focus-visible { outline: 3px solid #ff91bc; outline-offset: 5px; }
.wardrobe-category { border-top: 1px solid #553346; padding: 16px 0; }
.wardrobe-category > summary { cursor: pointer; color: #fff4fa; font-weight: 600; }
.wardrobe-category > summary:focus-visible { outline: 3px solid #ff91bc; outline-offset: 5px; }
.wardrobe-group { margin: 16px 0; }
.wardrobe-group .plug-list { margin-top: 12px; }
.item-photo { display: grid; gap: 8px; margin-top: 12px; }
.item-photo img { display: block; max-width: 100%; max-height: 180px; object-fit: contain; border-radius: 4px; }
.item-photo button { justify-self: start; }
.file-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; position: relative; margin: 0; min-width: 0; cursor: pointer; }
.file-picker input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.file-picker-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 13px; color: #fbe4ee; background: #2c1a2b; border: 1px solid #74415f; border-radius: 4px; font: 600 13px system-ui, sans-serif; transition: background .16s ease, border-color .16s ease; }
.file-picker:hover .file-picker-button { background: #48223b; border-color: #ff8cb5; }
.file-picker input:focus-visible + .file-picker-button { outline: 3px solid #ff91bc; outline-offset: 3px; }
.file-picker.has-file .file-picker-button { border-color: var(--signal-soft); }
.file-picker-name { min-width: 0; max-width: 100%; color: var(--muted); font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .file-picker-button { transition: none; } }
.mode-card { display: block; width: 100%; text-align: left; margin: 28px 0 16px; padding: 28px; background: #3d2b39; color: #f3e1b8; border: 1px solid #94764f; box-shadow: 5px 5px 0 #171119; }
.mode-card strong { display: block; font: 500 26px system-ui, sans-serif; margin-bottom: 10px; }
.mode-card span { line-height: 1.6; font-weight: 400; }
.config-row { padding: 14px 0; border-top: 1px solid #715b48; }
.config-row p { margin: 4px 0 8px; font-size: 12px; }
.config-options { display: flex; flex-wrap: wrap; gap: 0 25px; }
.config-options label { margin: 4px 0; }
.config-row input[type=checkbox] { width: auto; accent-color: #d5aa61; margin-right: 8px; }
.config-row input[type=text], .config-row textarea { max-width: 500px; }
button:disabled { opacity: .6; cursor: wait; }
#preferences-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.preference-card { min-width: 0; padding: 16px; background: #281e2a; border: 1px solid #755c48; border-radius: 3px; }
.preference-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preference-card p { margin: 9px 0 0; font-size: 12px; }
.preference-switch { position: relative; flex: none; width: 48px; height: 27px; padding: 0; border: 1px solid #ad9281; border-radius: 20px; background: #65545a; box-shadow: none; }
.preference-switch:hover { background: #77646a; }
.preference-switch[aria-checked="true"] { background: #d5aa61; border-color: #e1bf7f; }
.preference-switch[aria-checked="true"]:hover { background: #e0b96f; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff0d6; transition: transform .15s ease; }
.preference-switch[aria-checked="true"] .switch-thumb { transform: translateX(21px); background: #34213f; }
@media (prefers-reduced-motion: reduce) { .switch-thumb { transition: none; } }
.preference-card .check { padding: 3px 0; margin: 3px 0; }
.preference-options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; }
.preference-options-grid .check { min-width: 0; overflow-wrap: anywhere; }

/* Identité visuelle : graphite, vin profond et signal magenta. */
:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #f6edf4;
  background: #09070c;
  --ink: #f6edf4;
  --paper: #17101d;
  --line: #4c3048;
  --muted: #b8a9b8;
  --gold: #ff97bb;
  --signal: #ff4d91;
  --signal-soft: #ff97bb;
}
body {
  color: var(--ink);
  background:
    radial-gradient(ellipse at 85% 0%, #4a103480, transparent 37%),
    radial-gradient(ellipse at 0% 38%, #27123d70, transparent 37%), #09070c;
}
header {
  height: 76px;
  background: #0d0911eb;
  border-bottom: 1px solid #71314f;
  box-shadow: 0 1px 20px #ef286b1c;
}
.brand { color: #fff0f7; letter-spacing: .19em; }
.brand-sub { color: #aa8b9d; }
.mark { color: var(--signal); text-shadow: 0 0 15px #ff428baa; }
header .ghost { color: #f4c3d8; }
header .ghost:hover { background: #4a1738; }
main { max-width: 1360px; }
.eyebrow, .divider, footer, .live, .count {
  font-family: ui-monospace, monospace;
  text-transform: none;
}
.eyebrow { color: #ff82ad; letter-spacing: .04em; }
h1, h2 { font-family: system-ui, sans-serif; color: #fff4fa; font-weight: 600; }
h1 { font-size: clamp(38px, 4.8vw, 64px); letter-spacing: -.045em; }
h1 em { font-style: normal; color: inherit; text-shadow: none; }
h2 { font-size: 23px; letter-spacing: -.025em; }
p { color: #c4b4c2; }
.hero { position: relative; padding-bottom: 27px; border-bottom: 1px solid #61314c; }
.dot { color: #ff528c; }
.panel, .login-card {
  position: relative;
  background: linear-gradient(145deg, #211323f5, #120e18f5);
  border: 1px solid #533148;
  border-radius: 7px;
  outline: none;
  box-shadow: 0 15px 45px #0005, inset 0 1px #ffffff0b;
}

.muted, .item small, .empty { color: #b8a9b8; }
.count, .live {
  color: #ffb1ca; background: #421429; border: 1px solid #78314f;
  font-size: 10px; letter-spacing: .07em;
}
.live { box-shadow: 0 0 12px #ff3e8021; }
.chat-icon { color: #ff9bbe; border-color: #713754; }
.debt {
  background: linear-gradient(135deg, #3b142c, #1b1020);
  border: 1px solid #8b3a5d; outline: none; border-radius: 6px;
  box-shadow: 0 0 28px #e92b7620;
}
.debt::after { color: #ff75a6; }
.debt span, .debt small { color: #d5a9bc; }
.debt strong { color: #fff0f6; font-family: system-ui, sans-serif; }
button {
  font-family: system-ui, sans-serif;
  color: #fff8fb; background: #ad2056; border: 1px solid #e44c80;
  border-radius: 4px; box-shadow: 0 0 18px #ed32632b, inset 0 1px #ffffff26;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
button:hover { background: #ce2f69; border-color: #ff8cb5; box-shadow: 0 0 22px #ed326354; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #ff91bc; outline-offset: 3px; }
.ghost { color: #ffc0d4; background: transparent; border-color: transparent; box-shadow: none; }
.ghost:hover { color: #fff; background: #4a1935; box-shadow: none; }
.secondary { color: #fbe4ee; background: #2c1a2b; border-color: #74415f; box-shadow: none; }
.secondary:hover { background: #48223b; }
label, .check { color: #e4d4df; }
input, textarea { color: #fff1f8; background: #0e0a12; border: 1px solid #604056; border-radius: 4px; }
input::placeholder, textarea::placeholder { color: #9f8c9b; }
.check input, .config-row input[type=checkbox] { accent-color: #ed4a87; }
.inline-form, .linkbox { color: #f9e4ed; background: #110b15; border-color: #60334c; }
.notice { color: #ffeaf2; background: #441827; border-color: #a34962; }
.secret { color: #ffeaf5; background: #32182f; border-color: #8e416a; }
.welcome::before { content: '◈  /  ◈'; color: #ff5c99; text-shadow: 0 0 22px #ff4487a3; font-family: ui-monospace, monospace; }
.divider { color: #ac8fa3; }
footer { color: #e490b0; border-color: #4a2a40; }
footer span { color: #aa94a5; text-transform: none; }
.mode-card {
  color: #f9eaf2; background: linear-gradient(120deg, #35172e, #19101e);
  border: 1px solid #8d385c; box-shadow: inset 3px 0 #f45a91, 0 12px 35px #0005;
}
.mode-card:hover { background: linear-gradient(120deg, #4b1c3a, #211124); border-color: #ff78a7; }
.mode-card strong { font-family: system-ui, sans-serif; font-weight: 600; }
.mode-card span { color: #e0c8d5; }
.config-row, .item { border-color: #553346; }
.preference-card {
  background: linear-gradient(145deg, #241527, #160e1a);
  border: 1px solid #57334c; border-radius: 5px;
  box-shadow: inset 0 1px #ffffff09;
}
.preference-card:has(.preference-switch[aria-checked="true"]) { border-color: #a63c6c; box-shadow: inset 0 0 25px #d0266910, 0 0 14px #e5347312; }
.preference-card p { color: #c2adbc; }
.preference-switch { background: #574250; border-color: #8b7180; box-shadow: none; }
.preference-switch:hover { background: #6c5060; }
.preference-switch[aria-checked="true"] { background: #ce286a; border-color: #ff8bb3; box-shadow: 0 0 13px #ff3a7d60; }
.preference-switch[aria-checked="true"]:hover { background: #e63b7d; }
.switch-thumb, .preference-switch[aria-checked="true"] .switch-thumb { background: #fff3f8; }
.messages { border-color: #503143; scrollbar-color: #9f496f #150d18; }
.message { color: #f9eaf2; background: #281928; border-color: #513448; }
.message.owner { background: #491b38; border-color: #884065; }
.message strong { color: #ff9dc1; }
.message time { color: #bda6b4; }
.message p { color: #f9eaf2; }
@media (max-width: 800px) { .hero { align-items: start; } }
@media (max-width: 460px) { header { padding-inline: 18px; } main { padding-inline: 18px; } }
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
.plug-section { border-top: 1px solid #553346; margin-top: 18px; padding-top: 24px; }
.plug-section h3 { color: #fff4fa; font-size: 18px; margin: 8px 0; }
.plug-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.plug-card { min-width: 0; padding: 16px; border: 1px solid #57334c; border-radius: 5px; background: linear-gradient(145deg, #241527, #160e1a); }
.plug-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plug-card-head .ghost { padding: 8px; }
.wardrobe-name { flex: 1 1 auto; min-width: 0; font-weight: 600; margin: 0; }
.plug-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, .8fr); gap: 12px; }
.plug-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 12px; }
.plug-options .check { margin: 0; padding: 5px 0; overflow-wrap: anywhere; }
@media (max-width: 390px) { .plug-fields, .plug-options { grid-template-columns: 1fr; } }
.header-start, .header-actions { display: flex; align-items: center; gap: 12px; }
.menu-button { font-size: 22px; line-height: 1; padding: 8px 10px; }
.menu-overlay { position: fixed; inset: 0; z-index: 19; background: #050207b8; }
.side-menu { position: fixed; z-index: 20; inset: 0 auto 0 0; width: min(320px, 85vw); padding: 22px; background: #160d19; border-right: 1px solid #8d385c; box-shadow: 8px 0 40px #0009; animation: menu-enter .2s ease-out; }
.side-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.side-menu-item { display: flex; justify-content: space-between; width: 100%; text-align: left; color: #fff2f8; background: #32162a; border: 1px solid #713650; box-shadow: none; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; padding-top: 20px; border-top: 1px solid #553346; }
.profile-photo-panel { margin-bottom: 20px !important; }
.profile-photo-preview { display: block; width: min(160px, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); margin: 16px 0; }
.profile-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.file-picker:has(input:disabled) { opacity: .6; cursor: wait; }
.sessions-group { margin-top: 20px; }
@keyframes menu-enter { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .side-menu { animation: none; } }
@media (max-width: 460px) { .header-start, .header-actions { gap: 4px; } .brand { font-size: 9px; } header .ghost { padding-inline: 7px; } }
select { width: 100%; margin-top: 6px; border: 1px solid #604056; border-radius: 4px; padding: 12px; font: inherit; color: #fff1f8; background: #0e0a12; color-scheme: dark; }
select:focus-visible { outline: 3px solid #ff91bc; outline-offset: 3px; }
.sessions-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 8px; }
.sessions-heading h1 { min-width: 0; }
.sessions-heading button { flex-shrink: 0; }
@media (max-width: 480px) { .sessions-heading { flex-wrap: wrap; } .sessions-heading h1 { margin-bottom: 0; } }

/* Calendrier mensuel partagé. */
.calendar-toolbar { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 15px 0; text-transform: capitalize; }
.calendar-toolbar button { font-size: 20px; padding: 5px 12px; }
.calendar-grid { --calendar-grid-max-height: clamp(200px, 38vh, 320px); display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); max-height: var(--calendar-grid-max-height); overflow-y: auto; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.calendar-grid:focus-visible { outline: 3px solid var(--signal-soft); outline-offset: 3px; }
.calendar-weekday, .calendar-day, .calendar-blank { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calendar-weekday { text-align: center; padding: 8px 0; color: var(--muted); font-size: 11px; }
.calendar-day, .calendar-blank { min-width: 0; min-height: 58px; padding: 4px; }
.calendar-date { display: inline-flex; justify-content: center; align-items: center; width: 24px; height: 24px; font-size: 11px; }
.calendar-date.today { border-radius: 50%; background: var(--gold); color: #251927; font-weight: bold; }
.calendar-event { display: block; width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: left; font-size: 12px; padding: 6px; margin-top: 3px; min-height: 44px; }
@media (max-width: 600px) {
  .calendar-day, .calendar-blank { min-height: 58px; padding: 2px; }
  .calendar-event { font-size: 12px; padding: 6px 3px; }
}
.task-panel { max-width: 850px; margin: 0 auto; }
.task-panel fieldset { border: 1px solid var(--line); margin: 20px 0; padding: 14px; }
.task-panel legend { color: var(--gold); font-weight: 600; }
.task-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.task-action-group { border-top: 1px solid var(--line); padding: 12px 0; }
.task-clothing-choice { display: flex; align-items: center; gap: 12px; min-width: 0; }
.task-clothing-choice .check { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.task-clothing-photo { flex: none; width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
.task-clothing-photo { padding: 0; overflow: hidden; box-shadow: none; }
.task-clothing-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.task-photo-dialog img { display: block; max-width: 100%; max-height: 70vh; max-height: 70dvh; width: auto; height: auto; margin: auto; object-fit: contain; }
@media (max-width: 600px) { .task-dates { grid-template-columns: 1fr; gap: 0; } }
.task-item-details { display: block; margin: 4px 0 0 24px; color: var(--muted); font-weight: normal; }

.subject-profile-panel { max-width: 850px; margin: 0 auto; }
.subject-profile-section { border-top: 1px solid var(--line); padding: 18px 0; }
.subject-profile-section summary { color: var(--gold); cursor: pointer; font: 500 22px system-ui, sans-serif; }
.subject-profile-section h3 { margin: 22px 0 8px; }
.subject-profile-item { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.subject-profile-item p { margin: 5px 0; }
.subject-profile-status, .subject-profile-detail { font-size: 12px; color: var(--muted); }
.subject-profile-limits { white-space: pre-wrap; }
.subject-profile-photo { width: 110px; height: 110px; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; }
@media (max-width: 460px) { .subject-profile-photo { width: 75px; height: 75px; } }

.task-dialog { width: min(680px, calc(100% - 32px)); max-height: min(90vh, 900px); padding: 0; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 20px 65px #100912b3; }
.task-dialog::backdrop { background: #120c17c9; }
.task-confirm-dialog { width: min(480px, calc(100% - 32px)); }
.task-dialog-shell { padding: clamp(20px, 5vw, 32px); }
.task-dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.task-dialog-head h2 { margin: 10px 0 20px; overflow-wrap: anywhere; }
.task-dialog-close { font-size: 24px; padding: 2px 10px; }
.task-dialog-description, .task-dialog-reason { white-space: pre-wrap; overflow-wrap: anywhere; }
.task-dialog-info { margin: 20px 0; border-top: 1px solid var(--line); }
.task-dialog-row { display: grid; grid-template-columns: minmax(120px, .65fr) minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-dialog-row dt { color: var(--muted); font-size: 12px; }
.task-dialog-row dd { margin: 0; overflow-wrap: anywhere; }
.task-dialog-section { margin-top: 22px; }
.task-dialog-section h3 { color: var(--gold); margin: 0 0 10px; }
.task-dialog-items { margin: 0; padding-left: 20px; }
.task-dialog-items li { margin: 8px 0; }
.task-dialog-items small { display: block; color: var(--muted); margin-top: 4px; }
.task-dialog-status { display: inline-block; padding: 6px 10px; border: 1px solid #d9a5a1; color: #ffd7d1; background: #63383e; border-radius: 3px; }
.task-dialog-actions { margin-top: 24px; }
.calendar-event-revoked { background: #673d45; color: #ffe1d9; border-color: #b87f83; box-shadow: none; text-decoration: line-through; }
@media (max-width: 460px) { .task-dialog-row { grid-template-columns: 1fr; gap: 4px; } }

/* Accès aux paramètres dans l’en-tête du dashboard. */
.hero > div:first-child { flex: 1; min-width: 0; }
.hero-title-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero-title-row h1 { min-width: 0; overflow-wrap: anywhere; }
.hero-title-row button { flex-shrink: 0; }
@media (max-width: 600px) {
  .hero > div:first-child { width: 100%; }
  .hero-title-row { flex-wrap: wrap; gap: 4px 16px; }
  .hero-title-row h1 { margin-bottom: 8px; }
}

/* Dashboard et discussion flottante, sans masquer le contenu sur ordinateur. */
.layout { display: block; }
.left { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.dashboard-top { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 20px; align-items: start; }
.calendar-launcher { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 88px; padding: 18px; text-align: left; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; }
.calendar-launcher svg { width: 28px; height: 28px; flex: none; color: var(--signal-soft); }
.calendar-launcher strong, .calendar-launcher small { display: block; }
.calendar-launcher small { color: var(--muted); margin-top: 5px; }
.calendar-launcher-arrow { margin-left: auto; color: var(--signal-soft); }
.calendar-dialog { width: 90vw; max-width: none; height: 90vh; height: 90dvh; max-height: none; padding: 0; margin: auto; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 7px; overflow-y: auto; }
.calendar-dialog::backdrop { background: #120c17c9; }
.calendar-dialog .calendar-panel { min-height: 100%; border: 0; box-shadow: none; }
.calendar-dialog .calendar-grid { max-height: none; overflow: visible; }
.calendar-close { min-width: 44px; min-height: 44px; font-size: 26px; }
body:has(#calendar-dialog[open]) { overflow: hidden; }
.today-tasks { display: grid; gap: 8px; margin-top: 14px; }
.today-panel h2 { overflow-wrap: anywhere; }
.today-tasks p { margin: 0; }
.today-task { width: 100%; min-height: 44px; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.dashboard-updates { margin-bottom: 20px; border-left: 3px solid #c9bce9; }
.dashboard-updates h2 { margin-top: 0; }
.update-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 8px 0; }
.update-row p { margin: 0; }
.new-tasks-list { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
.new-tasks-list ul { list-style: none; margin: 0 0 16px; padding: 0; }
.new-tasks-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 6px 0; }
.new-task-link { text-align: left; overflow-wrap: anywhere; min-height: 44px; }
.new-task-badge { color: #e6dafa; border: 1px solid #82709d; border-radius: 4px; padding: 3px 7px; font-size: 12px; }
.chat-launcher { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 30; display: grid; place-items: center; width: 60px; height: 60px; padding: 16px; border-radius: 50%; box-shadow: 0 8px 28px #09040cc9; }
.chat-launcher svg { width: 100%; height: 100%; }
.chat-badge { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 23px; height: 23px; padding: 0 5px; border: 2px solid #160c18; border-radius: 999px; background: #ff558d; color: #1a0d18; font-size: 11px; line-height: 1; }
.chat-panel { position: fixed; z-index: 29; top: 20px; right: max(24px, env(safe-area-inset-right)); bottom: 96px; width: min(430px, calc(100vw - 48px)); min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 8px; box-shadow: 0 16px 48px #08040bb3; }
.chat-panel .panel-head, .chat-panel > p, .chat-panel .composer, .chat-panel > small { flex: 0 0 auto; }
.chat-panel .messages { flex: 1 1 auto; min-height: 0; height: auto; overscroll-behavior: contain; }
.chat-panel .composer textarea { max-height: 25vh; }
.chat-close { flex-shrink: 0; }
@media (max-width: 800px) { .left { grid-template-columns: 1fr; } .dashboard-top { grid-column: auto; } }
@media (max-width: 600px) { .dashboard-top { grid-template-columns: minmax(0, 1fr); gap: 12px; } .calendar-launcher { min-height: 64px; } .calendar-dialog { width: 96vw; height: 96vh; height: 96dvh; } }
@media (max-width: 600px) {
  .chat-launcher { right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); }
  .chat-panel { z-index: 50; inset: 0; width: 100%; height: 100vh; height: 100dvh; padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); border: 0; border-radius: 0; }
}

/* Lecture et sélection du calendrier sur petit écran. */
.calendar-date { padding: 0; border: 0; background: transparent; color: var(--ink); box-shadow: none; }
.calendar-date:hover { background: #4a1935; }
.calendar-date.selected { outline: 2px solid var(--signal-soft); outline-offset: 1px; }
.calendar-agenda { display: none; }
@media (max-width: 600px) {
  .calendar-agenda { display: grid; gap: 8px; margin-top: 18px; }
  .calendar-agenda-event { text-align: left; min-height: 44px; }
}
.task-month-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 6px; }
.task-month-day { min-height: 44px; padding: 6px; background: transparent; box-shadow: none; }
.task-month-day[aria-pressed="true"] { background: var(--signal); color: #160b15; }
.task-custom-date { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.config-summary { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.config-undo { position: fixed; z-index: 35; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); box-shadow: 0 8px 30px #0009; }

/* Hiérarchie et zones tactiles confortables. */
.hero h1 { font-size: clamp(30px, 3vw, 44px); }
/* Une même signature, deux silhouettes pour distinguer les rôles. */
#app .hero { --role-accent: #efb5c9; --role-line: #a45c7d; margin-bottom: 24px; padding-bottom: 18px; border-bottom-color: var(--role-line); }
#app.owner-dashboard .hero { --role-accent: #c9bce9; --role-line: #82709d; }
.role-signature { display: inline-flex; align-items: center; gap: 9px; color: var(--role-accent); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.role-signature #role::first-letter { text-transform: uppercase; }
.role-mark { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--role-line); transform: rotate(45deg); }
.role-mark span { width: 10px; height: 10px; border: 1px solid var(--role-accent); }
.owner-dashboard .role-mark { border-radius: 50%; transform: none; }
.owner-dashboard .role-mark span { border-radius: 50%; }
#app .hero h1 { margin-top: 10px; }
button.small { min-height: 44px; font-size: 13px; }
label, .muted { font-size: 14px; }
.calendar-weekday, .calendar-date { font-size: 12px; }
.field-error { color: #ffb6c4; margin: 8px 0; }
@media (max-width: 600px) { input, textarea, select { font-size: 16px; } }

@media (max-width: 600px) { body.chat-open { overflow: hidden; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.calendar-toolbar button { min-height: 44px; }
@media (max-width: 600px) { .calendar-date { width: 100%; height: 44px; } }

/* Connexion : colonne centrée et espacements adaptés aux petits écrans. */
.welcome { width: 100%; max-width: 700px; margin: clamp(12px, 3vw, 32px) auto; }
.welcome::before { content: none; }
.welcome h1 { font-size: clamp(30px, 5vw, 56px); margin: 0; overflow-wrap: anywhere; }
.welcome > p { max-width: 480px; margin: 18px auto 0; }
.welcome .login-card { width: 100%; margin: 28px auto 0; }

/* Mise en page fluide : bureau, tablette puis mobile. */
body { min-width: 0; }
main, .workflow, .task-panel, .subject-profile-panel, .panel, .login-card,
.layout, .left, .dashboard-top, .panel-head > *, .item > *, .actions > *,
.task-dialog-shell, .calendar-toolbar > *, .subject-profile-item > * { min-width: 0; }
input, textarea, select, fieldset { min-width: 0; max-width: 100%; }
fieldset { min-inline-size: 0; }
.item, .panel-head, .task-custom-date { overflow-wrap: anywhere; }
.item > .actions, .panel-head > .actions { flex-wrap: wrap; }
.subject-profile-photo { flex: none; max-width: 100%; }
.calendar-toolbar { flex-wrap: wrap; gap: 8px 18px; }
.config-undo { max-width: calc(100vw - 32px); width: max-content; flex-wrap: wrap; }

@media (max-width: 800px) {
  main { padding-bottom: 60px; }
  .left { gap: 16px; }
}

@media (max-width: 600px) {
  header { height: auto; min-height: 76px; gap: 8px; padding-block: 10px; flex-wrap: wrap; }
  .header-start, .header-actions { min-width: 0; flex-wrap: wrap; }
  main { padding: 28px 16px 64px; }
  h1 { font-size: clamp(30px, 8vw, 42px); overflow-wrap: anywhere; }
  h2, h3, .brand { overflow-wrap: anywhere; }
  .panel, .login-card { padding: 18px; }
  .panel-head, .item, .task-custom-date { flex-wrap: wrap; }
  .actions { flex-wrap: wrap; }
  button:not(.preference-switch) { min-height: 44px; }
  .preference-switch::before { content: ''; position: absolute; inset: -9px 0; }
  .wardrobe-category > summary, .subject-profile-section summary { min-height: 44px; display: flex; align-items: center; }
  .calendar-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .calendar-dialog .calendar-panel { padding: 12px 8px; }
  .calendar-day, .calendar-blank { padding: 0; }
  .calendar-date { width: 100%; min-width: 0; height: 44px; }
  .calendar-weekday { overflow: hidden; }
  .chat-panel .composer textarea { min-width: 0; }
  .chat-panel .composer button { flex: 0 0 48px; }
  footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
  footer span { float: none; }
}

/* Notification de mise à jour, sans masquer les brouillons. */
.version-notice { position: fixed; z-index: 60; right: max(16px, env(safe-area-inset-right)); bottom: max(96px, env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); box-shadow: 0 8px 30px #0009; }

/* Streaming : boutons et vidéo restent contenus sur les petits écrans. */
.video-launcher { position: relative; min-width: 44px; min-height: 44px; font-size: 22px; }
.video-badge { position: absolute; right: 4px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--signal); }
.video-dialog { width: min(760px, calc(100% - 24px)); }
.video-dialog video { display: block; width: 100%; max-height: 55vh; max-height: 55dvh; background: #09070c; object-fit: contain; border-radius: 6px; }
.video-dialog .actions { flex-wrap: wrap; margin-top: 12px; }

/* Navigation et espace vidéo : graphite et rose doux, inspirés de la référence. */
:root { --ink:#f0eaf0; --paper:#17161c; --line:#37343e; --muted:#b1acb6; --gold:#e89bbd; --signal:#ce5a8c; --signal-soft:#e89bbd; }
body { background:#100f14; }
header { background:#141218; border-bottom:1px solid #302c34; box-shadow:none; }
.brand { color:#ef9ac1; font-size:22px; letter-spacing:-.035em; white-space:nowrap; }
.mark { color:#dd75a5; text-shadow:none; }
.primary-nav { display:flex; align-items:stretch; gap:5px; align-self:stretch; margin:auto; }
.primary-nav button { position:relative; min-height:44px; border:0; border-radius:8px 8px 0 0; background:transparent; color:#bdb8c1; padding:0 18px; font-weight:500; }
.primary-nav button:hover, .primary-nav button[aria-current="page"] { background:#29232c; color:#ee9dc3; }
.primary-nav button[aria-current="page"]::after { content:""; position:absolute; bottom:0; left:7px; right:7px; height:3px; background:#d9659a; border-radius:3px; }
.primary-nav button:disabled { opacity:.45; cursor:not-allowed; }
.primary-nav button:focus-visible { outline:2px solid #eda4c7; outline-offset:-3px; }
.active-session { max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:12px; }
header .menu-button, header .video-launcher, header #profile-open { display:none; }
.panel, .login-card { background:#19181f; border-color:#37343e; }
body.streaming-layout main { max-width:1680px; padding-top:32px; }
body.streaming-layout #app:not(.hidden) { display:grid; grid-template-columns:minmax(0, 2fr) minmax(320px, 1fr); align-items:stretch; gap:18px; }
body.streaming-layout #app > :not(#video-dialog):not(#chat-panel) { display:none !important; }
body.streaming-layout .video-dialog[open] { position:relative; inset:auto; margin:0; width:100%; max-width:none; max-height:none; height:auto; padding:0; display:block; border:1px solid #37343e; border-radius:16px; background:#19181f; color:var(--ink); overflow:visible; }
body.streaming-layout .video-dialog .task-dialog-shell { padding:22px; }
body.streaming-layout .video-dialog .task-dialog-head { display:flex; align-items:center; gap:12px; }
body.streaming-layout .video-dialog h2 { font-size:22px; margin:0; }
body.streaming-layout .video-dialog video { width:100%; aspect-ratio:16 / 9; max-height:none; background:#0b0a0e; object-fit:contain; border-radius:9px; }
body.streaming-layout #video-status { display:inline-block; margin:8px 0 16px; color:#eaa8c7; }
body.streaming-layout .stream-description { float:right; margin:8px 0 0; color:#aaa5ae; font-size:13px; }
body.streaming-layout #video-owner-controls label { display:inline-flex; flex-direction:column; gap:5px; margin:14px 12px 0 0; width:min(240px, 100%); font-size:13px; }
body.streaming-layout .video-dialog .actions { display:flex; justify-content:center; gap:10px; }
body.streaming-layout .video-dialog .actions button { min-height:44px; }
body.streaming-layout #chat-panel:not(.hidden) { position:relative; inset:auto; width:auto; height:auto; min-height:550px; max-height:calc(100dvh - 140px); padding:22px; border:1px solid #37343e; border-radius:16px; background:#19181f; box-shadow:none; }
body.streaming-layout #chat-panel .panel-head { border-bottom:1px solid #35323a; padding-bottom:16px; }
body.streaming-layout #chat-panel .eyebrow, body.streaming-layout #chat-panel > p, body.streaming-layout #chat-panel > small, body.streaming-layout #chat-close { display:none; }
body.streaming-layout #chat-panel h2 { font-size:19px; margin:0; }
body.streaming-layout #chat-panel .live { display:block; margin-top:6px; font-size:10px; color:#b8a9b8; }
body.streaming-layout #chat-panel .messages { padding-top:15px; }
body.streaming-layout #chat-panel .composer { border-top:1px solid #35323a; padding-top:14px; }
body.streaming-layout #chat-panel .composer textarea { background:#24232b; border-color:#45414b; }
body.streaming-layout #chat-panel .composer button { background:#c65b8d; color:white; }
body.streaming-layout .message p { border-radius:12px; }
body.streaming-layout .message.owner p { background:#a94473; color:#fff; }
@media (max-width:900px) { .primary-nav button { padding-inline:10px; } body.streaming-layout #app:not(.hidden) { grid-template-columns:minmax(0, 3fr) minmax(270px, 2fr); } }
@media (max-width:700px) {
  header { gap:0; padding:10px 16px 0; }
  .brand { font-size:20px; }
  .active-session { max-width:140px; }
  .primary-nav { order:3; width:100%; overflow-x:auto; justify-content:flex-start; scrollbar-width:thin; }
  .primary-nav button { flex:1 0 auto; padding:0 12px; font-size:13px; }
  body.streaming-layout main { padding:18px 12px; }
  body.streaming-layout #app:not(.hidden) { display:flex; flex-direction:column; }
  body.streaming-layout .video-dialog .task-dialog-shell { padding:15px; }
  body.streaming-layout .stream-description { float:none; margin:5px 0 0; }
  body.streaming-layout #chat-panel:not(.hidden) { min-height:340px; height:55dvh; max-height:none; padding:15px; }
  body.streaming-layout.chat-open { overflow:auto; }
  body.streaming-layout #chat-panel .composer textarea { max-height:22dvh; }
}
