/* Hôtel des Rives — prototype « Groupes & séminaires » (Studio Emy). Interface SaaS claire : marine, champagne, sable. */
@font-face {
  font-family: "Outfit"; font-style: normal; font-weight: 200 600; font-display: swap;
  src: url("/assets/fonts/outfit-latin.woff2") format("woff2");
}

:root {
  --navy: #14233A;
  --navy-2: #0E1828;
  --navy-3: #22344F;
  --champ: #CDB38A;
  --champ-2: #E6D5B5;
  --sand: #F4EFE6;
  --mist: #E9EEF0;
  --sage: #8FA89B;
  --coral: #D98C6F;
  --coral-ink: #A9553A;
  --green: #3E9B6E;
  --amber: #C79A3C;
  --ink: #18222F;
  --muted: #69727F;
  --line: rgba(20, 35, 58, .1);
  --bg: #F6F3EE;
  --card: #FFFFFF;
  --serif: "Didot", "Bodoni 72", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r: 16px;
  --r-l: 20px;
  --shadow: 0 1px 2px rgba(14, 24, 40, .05), 0 8px 24px -12px rgba(14, 24, 40, .16);
  --shadow-l: 0 2px 6px rgba(14, 24, 40, .06), 0 28px 60px -24px rgba(14, 24, 40, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --side: 250px;
  --bar: 36px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 350 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3 { margin: 0; font-weight: 450; letter-spacing: -.01em; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--champ); outline-offset: 2px; }
.noscript { padding: 2rem; text-align: center; }
.seed { display: none; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 42px; padding: .55rem 1.1rem; border: 0; border-radius: 12px; font-weight: 450; font-size: .92rem; text-decoration: none; white-space: nowrap; transition: transform .25s var(--ease), box-shadow .25s, background .2s, color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-gold { background: linear-gradient(150deg, var(--champ-2), var(--champ)); color: var(--navy-2); box-shadow: 0 10px 22px -12px rgba(160, 125, 70, .9), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold:hover { box-shadow: 0 14px 28px -12px rgba(160, 125, 70, 1), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-dark { background: var(--navy); color: var(--sand); }
.btn-dark:hover { background: var(--navy-3); }
.btn-ghost { background: var(--card); color: var(--navy); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--champ); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-ink); }
.btn-small { min-height: 34px; padding: .35rem .8rem; font-size: .84rem; border-radius: 10px; }
.btn-icon { width: 42px; padding: 0; font-size: 1.3rem; }
.link-btn { padding: .2rem 0; border: 0; background: none; color: inherit; font-size: .86rem; text-decoration: underline; text-decoration-color: rgba(205, 179, 138, .6); text-underline-offset: 3px; }
.link-btn:hover { color: var(--champ); }
.link-muted { color: var(--muted); }

/* Bandeau de démonstration */
.demo-bar { position: sticky; top: 0; z-index: 40; display: flex; height: var(--bar); justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem clamp(1rem, 3vw, 1.75rem); background: var(--navy-2); color: rgba(244, 239, 230, .75); font-size: .8rem; }
.demo-bar p { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.demo-bar strong { color: var(--champ-2); font-weight: 450; white-space: nowrap; }
.demo-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-bar a { flex: none; color: var(--sand); font-weight: 450; text-decoration: none; }
.demo-bar a:hover { color: var(--champ-2); }
.demo-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(217, 140, 111, .22); }

/* Coquille : barre latérale + contenu */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--bar)); }
.side { position: sticky; top: var(--bar); display: flex; flex-direction: column; gap: 1.5rem; height: calc(100vh - var(--bar)); overflow-y: auto; padding: 1.4rem 1rem 1.2rem; background: radial-gradient(120% 60% at 0% 0%, #1E3250 0%, var(--navy) 55%, var(--navy-2) 100%); color: var(--sand); }
.side-brand { display: flex; align-items: center; gap: .75rem; padding: 0 .5rem; }
.side-brand b { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 400; letter-spacing: .01em; }
.side-brand small { display: block; color: var(--champ); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; }
.logo { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50% 50% 12px 12px; background: linear-gradient(160deg, var(--champ-2), var(--champ)); color: var(--navy); font-family: var(--serif); font-size: 1.3rem; }
.nav { display: grid; gap: .25rem; }
.nav a { position: relative; display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 12px; color: rgba(244, 239, 230, .72); text-decoration: none; font-size: .95rem; transition: background .2s, color .2s; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: var(--sand); }
.nav a[aria-current="page"] { background: rgba(205, 179, 138, .14); color: var(--champ-2); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -1rem; top: 25%; bottom: 25%; width: 3px; border-radius: 0 3px 3px 0; background: var(--champ); }
.nav svg { flex: none; }
.nav-s { display: none; }
.nav-count { margin-left: auto; min-width: 22px; padding: 0 .4rem; border-radius: 99px; background: var(--champ); color: var(--navy-2); font-size: .72rem; font-style: normal; font-weight: 500; line-height: 20px; text-align: center; }
.nav-count:empty { display: none; }
.side-foot { display: grid; gap: .5rem; margin-top: auto; padding: 1rem .5rem 0; border-top: 1px solid rgba(255, 255, 255, .08); color: rgba(244, 239, 230, .7); justify-items: start; }
.me { display: flex; align-items: center; gap: .65rem; margin-bottom: .4rem; }
.me b { display: block; color: var(--sand); font-weight: 450; font-size: .9rem; }
.me small { display: block; font-size: .76rem; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--sage); color: var(--navy-2); font-size: .78rem; font-weight: 500; letter-spacing: .03em; }
.main { min-width: 0; }
.mobile-foot { display: none; }

.topbar { position: sticky; top: var(--bar); z-index: 20; display: flex; align-items: center; gap: 1rem; padding: 1rem clamp(1rem, 2.6vw, 2rem); background: rgba(246, 243, 238, .97); border-bottom: 1px solid var(--line); }
.topbar-title { margin-right: auto; min-width: 0; }
.today { color: var(--muted); font-size: .78rem; letter-spacing: .04em; }
.today::first-letter { text-transform: uppercase; }
.topbar h1 { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; }
.search { display: flex; align-items: center; gap: .5rem; width: min(340px, 32vw); height: 42px; padding: 0 .9rem; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); transition: box-shadow .2s; }
.search:focus-within { box-shadow: inset 0 0 0 1.5px var(--champ), 0 0 0 4px rgba(205, 179, 138, .18); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--ink); }
.search input::placeholder { color: #9AA1AB; }
.topbar .btn-gold span[aria-hidden] { font-size: 1.2rem; line-height: 1; }

.views { padding: clamp(1rem, 2.6vw, 2rem); }
.view.is-active { animation: view-in .4s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.view h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }

/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; }
.kpi { position: relative; padding: 1rem 1.15rem; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.kpi-label { color: var(--muted); font-size: .8rem; }
.kpi-value { margin: .15rem 0 .1rem; font-family: var(--serif); font-size: 1.75rem; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-sub { color: var(--muted); font-size: .78rem; }
.kpi-todo { background: linear-gradient(150deg, #FFFFFF, #F7F1E7); }
.kpi-todo.is-alert .kpi-value { color: var(--coral-ink); }
.kpi-todo.is-alert::after { content: ""; position: absolute; top: 1rem; right: 1rem; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(217, 140, 111, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(217, 140, 111, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 140, 111, 0); } }
.board-hint { margin-bottom: .8rem; color: var(--muted); font-size: .84rem; }

/* Tableau de suivi */
.board { display: grid; grid-template-columns: repeat(4, minmax(232px, 1fr)) auto; gap: .9rem; align-items: stretch; padding-bottom: 1rem; overflow-x: auto; scrollbar-width: thin; }
.col { display: flex; flex-direction: column; min-height: 360px; padding: .75rem; border-radius: var(--r-l); background: rgba(233, 238, 240, .7); box-shadow: inset 0 0 0 1px rgba(20, 35, 58, .04); transition: background .2s, box-shadow .2s; }
.col.is-over { background: rgba(230, 213, 181, .5); box-shadow: inset 0 0 0 2px var(--champ); }
.col-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .2rem .35rem .75rem; }
.col-head h3, .col-toggle { display: flex; align-items: center; gap: .5rem; font-size: .92rem; font-weight: 500; color: var(--navy); }
.col-head em { min-width: 22px; padding: 0 .4rem; border-radius: 99px; background: rgba(20, 35, 58, .08); font-size: .74rem; font-style: normal; line-height: 20px; text-align: center; }
.col-sum { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.col-offre .dot { background: var(--champ); }
.col-option .dot { background: var(--coral); }
.col-confirme .dot { background: var(--navy); }
.col-perdu .dot { background: #A9AFB8; }
.col-list { display: grid; gap: .65rem; min-height: 60px; flex: 1; align-content: start; }
.col-empty { margin-top: -50px; padding: 1.2rem .5rem; border: 1.5px dashed rgba(20, 35, 58, .14); border-radius: var(--r); color: var(--muted); font-size: .82rem; text-align: center; pointer-events: none; }
.col-toggle { width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.col-perdu { width: 240px; background: rgba(233, 238, 240, .45); }
.col-perdu.is-collapsed { width: 60px; min-height: 360px; padding-inline: .4rem; }
.col-perdu.is-collapsed .col-head { flex-direction: column; align-items: center; padding: .2rem 0; }
.col-perdu.is-collapsed .col-toggle { flex-direction: column; align-items: center; gap: .6rem; }
.col-perdu.is-collapsed .col-name { writing-mode: vertical-rl; transform: rotate(180deg); }
.col-perdu.is-collapsed .col-sum, .col-perdu.is-collapsed .col-list > *, .col-perdu.is-collapsed .col-empty { display: none; }
.col-perdu .card { opacity: .78; }

.card { --accent: var(--sage); position: relative; display: grid; padding: .85rem .85rem .7rem 1rem; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; cursor: grab; transition: box-shadow .25s, opacity .2s; }
.card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.card:hover { box-shadow: var(--shadow-l); }
.card.ty-mariage { --accent: var(--champ); }
.card.ty-seminaire { --accent: var(--navy); }
.card.ty-fete { --accent: var(--coral); }
.card.ty-assemblee { --accent: #5C7A99; }
.card.ty-voyage { --accent: var(--sage); }
.card.ty-retraite { --accent: #6E8C7E; }
.card.is-urgent { box-shadow: var(--shadow), inset 0 0 0 1px rgba(217, 140, 111, .45); }
.card-open { display: grid; gap: .1rem; padding: 0 1.4rem 0 0; border: 0; background: none; text-align: left; cursor: inherit; border-radius: 6px; }
.card-type { color: var(--muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.card-name { margin: .1rem 0 .2rem; font-size: .98rem; font-weight: 500; color: var(--navy); line-height: 1.25; }
.card-meta { color: var(--muted); font-size: .82rem; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; margin-top: .6rem; }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; min-width: 0; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .5rem; border-radius: 99px; background: var(--mist); color: var(--navy-3); font-size: .72rem; font-weight: 450; line-height: 1.35; }
.b-warn { background: rgba(217, 140, 111, .16); color: var(--coral-ink); }
.b-warn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.b-amber { background: rgba(199, 154, 60, .15); color: #8A6620; }
.b-ok { background: rgba(62, 155, 110, .14); color: #2B7351; }
.b-ok::before { content: "✓"; font-size: .7rem; }
.b-new { background: var(--navy); color: var(--champ-2); }
.card-budget { flex: none; color: var(--navy); font-size: .8rem; font-weight: 450; font-variant-numeric: tabular-nums; }
.grip { position: absolute; top: .7rem; right: .55rem; display: grid; grid-template-columns: repeat(2, 3px); gap: 3px; padding: 6px; border-radius: 8px; touch-action: none; cursor: grab; opacity: .35; transition: opacity .2s; }
.grip i, .grip::before, .grip::after { width: 3px; height: 3px; border-radius: 50%; background: var(--navy); }
.grip::before, .grip::after { content: ""; }
.card:hover .grip { opacity: .7; }
.card-move { position: absolute; right: .55rem; bottom: .5rem; display: flex; gap: .25rem; padding-left: .4rem; background: var(--card); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.card:hover .card-move, .card:focus-within .card-move { opacity: 1; transform: none; }
.mv { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: var(--mist); color: var(--navy); font-size: 1.05rem; line-height: 1; }
.mv:hover { background: var(--champ-2); }
.mv:disabled { opacity: .3; cursor: default; background: var(--mist); }
.card.is-placeholder { background: rgba(255, 255, 255, .4); box-shadow: inset 0 0 0 1.5px rgba(205, 179, 138, .9); }
.card.is-placeholder > * { visibility: hidden; }
.card.is-placeholder::before { display: none; }
.card-ghost { position: fixed; left: 0; top: 0; z-index: 300; margin: 0; pointer-events: none; cursor: grabbing; box-shadow: 0 30px 60px -20px rgba(14, 24, 40, .45), 0 0 0 1px rgba(205, 179, 138, .6); list-style: none; }
.card-ghost .card-move { display: none; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.card.is-new { animation: card-in .9s var(--ease) both; }
@keyframes card-in {
  0% { opacity: 0; transform: translateY(-18px) scale(.94); box-shadow: 0 0 0 0 rgba(205, 179, 138, .9); }
  45% { opacity: 1; transform: none; box-shadow: 0 0 0 6px rgba(205, 179, 138, .45); }
  100% { box-shadow: var(--shadow); }
}

/* Planning des salles */
.plan-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.plan-head .muted { margin-top: .2rem; font-size: .88rem; }
.plan-range { font-family: var(--serif); font-size: 1.35rem; color: var(--navy); }
.plan-range::first-letter { text-transform: uppercase; }
.plan-tools { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { min-height: 36px; padding: 0 .8rem; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: .86rem; }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--sand); }
.conflicts { display: grid; gap: .6rem; margin-bottom: 1rem; }
.conflicts:empty { display: none; }
.conflict { display: flex; align-items: center; gap: .85rem; flex-wrap: wrap; padding: .8rem 1rem; border-radius: var(--r); background: #FBEEE8; box-shadow: inset 0 0 0 1px rgba(217, 140, 111, .4); animation: view-in .4s var(--ease) both; }
.conflict p { flex: 1 1 260px; display: grid; font-size: .88rem; }
.conflict b { color: var(--coral-ink); font-weight: 500; }
.conflict-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--coral); color: #fff; font-weight: 600; }
.plan-scroll { overflow-x: auto; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow); scrollbar-width: thin; }
.plan { min-width: 1020px; padding: .4rem 0 .6rem; }
.plan-row { display: grid; grid-template-columns: 11rem minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: 0; }
.plan-label { display: grid; align-content: center; padding: .7rem 1rem; }
.plan-label b { font-weight: 500; color: var(--navy); font-size: .92rem; }
.plan-label small { color: var(--muted); font-size: .74rem; }
.plan-track { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); column-gap: 0; row-gap: 4px; padding: 6px 0; }
.plan-row-head .plan-label { color: var(--muted); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }
.ph { display: grid; justify-items: center; padding: .3rem 0; color: var(--muted); font-size: .72rem; text-transform: capitalize; }
.ph b { color: var(--navy); font-size: 1.05rem; font-weight: 450; line-height: 1.2; }
.ph small { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--champ); }
.ph.is-today b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--champ-2); }
.pc { margin: -6px 0; border-left: 1px solid var(--line); }
.pc.is-we, .ph.is-we { background: rgba(233, 238, 240, .6); }
.pc.is-today { background: rgba(205, 179, 138, .12); box-shadow: inset 2px 0 0 var(--champ); }
.blk { position: relative; z-index: 1; display: grid; align-content: center; min-width: 0; margin: 0 3px; padding: .35rem .45rem; border: 0; border-radius: 10px; text-align: left; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.blk:hover { transform: translateY(-1px); box-shadow: var(--shadow-l); }
.blk b { display: -webkit-box; overflow: hidden; font-size: .76rem; font-weight: 500; line-height: 1.2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.plan.is-week .blk { padding: .45rem .7rem; }
.plan.is-week .blk b { font-size: .86rem; }
.plan.is-week .blk small { font-size: .76rem; }
.blk small { overflow: hidden; font-size: .7rem; opacity: .85; text-overflow: ellipsis; white-space: nowrap; }
.blk-option { background: repeating-linear-gradient(135deg, rgba(205, 179, 138, .55) 0 7px, rgba(230, 213, 181, .3) 7px 14px); box-shadow: inset 0 0 0 1px var(--champ); color: var(--navy-2); }
.blk-confirme { background: linear-gradient(150deg, var(--navy-3), var(--navy)); color: var(--sand); }
.blk-confirme small { color: var(--champ-2); }
.blk.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.blk.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.blk.is-conflict { box-shadow: inset 0 0 0 2px var(--coral); animation: clash 1.8s ease-in-out infinite; }
.blk-flag { position: absolute; top: 4px; right: 5px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--coral); color: #fff; font-size: .66rem; font-style: normal; font-weight: 600; }
@keyframes clash { 50% { box-shadow: inset 0 0 0 2px var(--coral), 0 0 0 4px rgba(217, 140, 111, .25); } }
.plan-row-rooms { background: rgba(244, 239, 230, .5); }
.rc { display: grid; justify-items: center; gap: .25rem; padding: .4rem 0; font-size: .74rem; color: var(--muted); }
.rc b { color: var(--navy); font-size: .9rem; font-weight: 450; }
.rc.is-zero b { color: #B3B9C1; }
.rc .bar { position: relative; width: 60%; height: 5px; border-radius: 99px; background: rgba(20, 35, 58, .08); overflow: hidden; }
.rc .bar i { position: absolute; inset: 0; border-radius: inherit; background: var(--sage); transform: scaleX(var(--fill, 0)); transform-origin: left; transition: transform .5s var(--ease); }
.rc.is-high .bar i { background: var(--amber); }
.rc.is-over b { color: var(--coral-ink); }
.rc.is-over .bar i { background: var(--coral); }
.legend { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1rem; color: var(--muted); font-size: .82rem; }
.legend li { display: flex; align-items: center; gap: .45rem; }
.legend i { width: 22px; height: 12px; border-radius: 4px; }
.lg-option { background: repeating-linear-gradient(135deg, rgba(205, 179, 138, .7) 0 4px, rgba(230, 213, 181, .3) 4px 8px); box-shadow: inset 0 0 0 1px var(--champ); }
.lg-confirme { background: var(--navy); }
.lg-conflict { box-shadow: inset 0 0 0 2px var(--coral); }
.lg-weekend { background: var(--mist); }

/* Générateur d'offre */
.offer-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.card-box { padding: 1.4rem; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow); }
.offer-form { display: grid; gap: .9rem; }
.offer-form .muted { font-size: .86rem; margin-top: -.4rem; }
.field { display: grid; gap: .3rem; min-width: 0; flex: 1; margin: 0; }
.field > span, .field > legend { color: var(--muted); font-size: .78rem; font-weight: 450; letter-spacing: .02em; }
.field input, .field select { width: 100%; height: 42px; padding: 0 .75rem; border: 0; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.field input:focus, .field select:focus { outline: 0; box-shadow: inset 0 0 0 1.5px var(--champ), 0 0 0 4px rgba(205, 179, 138, .18); }
.field-row { display: flex; gap: .7rem; }
.field-s { flex: 0 0 5.2rem; }
.field-m { flex: 0 0 9.5rem; }
.items { padding: 0; border: 0; gap: .4rem; }
.items legend { margin-bottom: .35rem; padding: 0; }
.item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: 12px; background: var(--bg); cursor: pointer; transition: background .2s, box-shadow .2s; }
.item:hover { box-shadow: inset 0 0 0 1px var(--champ-2); }
.item:has(input:checked) { background: rgba(230, 213, 181, .45); box-shadow: inset 0 0 0 1px var(--champ); }
.item input { width: 18px; height: 18px; margin: 0; accent-color: var(--navy); }
.item b { display: block; font-size: .88rem; font-weight: 450; }
.item small { display: block; color: var(--muted); font-size: .74rem; }
.item em { color: var(--navy); font-size: .74rem; font-style: normal; text-align: right; white-space: nowrap; }
.offer-total { display: flex; align-items: baseline; justify-content: space-between; padding: .9rem 1rem; border-radius: 14px; background: var(--navy); color: var(--sand); }
.offer-total span { font-size: .85rem; color: var(--champ-2); }
.offer-total strong { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; font-variant-numeric: tabular-nums; }
.offer-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.offer-actions .btn { flex: 1; }

/* Aperçu A4 */
.paper-wrap { display: flex; justify-content: center; padding: 1.5rem; border-radius: var(--r-l); background: linear-gradient(160deg, #E4E9EC, #D9DFE3); }
.paper { width: 100%; max-width: 720px; min-height: 980px; padding: 3rem 3.2rem 2rem; background: #FFFEFC; color: var(--ink); box-shadow: 0 2px 4px rgba(14, 24, 40, .06), 0 30px 60px -30px rgba(14, 24, 40, .45); font-size: .86rem; display: flex; flex-direction: column; }
.p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--champ); }
.p-logo { display: flex; align-items: center; gap: .75rem; }
.p-logo b { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 400; color: var(--navy); }
.p-logo small { color: var(--champ); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; }
.p-ref { display: grid; text-align: right; color: var(--muted); font-size: .78rem; }
.p-ref b { color: var(--navy); font-weight: 500; font-size: .86rem; }
.p-to { display: grid; margin: 1.6rem 0 1.4rem; color: var(--muted); }
.p-to small { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--champ); }
.p-to b { color: var(--ink); font-weight: 500; font-size: .95rem; }
.p-title { font-family: var(--serif); font-size: 1.9rem; font-weight: 400; color: var(--navy); }
.p-intro { margin: .8rem 0 1.2rem; color: #3B4552; line-height: 1.6; }
.p-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 1.4rem; border-radius: 12px; background: var(--champ-2); overflow: hidden; }
.p-facts li { display: grid; padding: .7rem .8rem; background: #FBF7F0; }
.p-facts small { color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.p-facts b { color: var(--navy); font-weight: 500; }
.p-warn { margin: -.6rem 0 1rem; padding: .5rem .8rem; border-radius: 10px; background: #FBEEE8; color: var(--coral-ink); font-size: .8rem; }
.p-lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.p-lines th { padding: .5rem 0; border-bottom: 1px solid var(--navy); color: var(--muted); font-size: .68rem; font-weight: 450; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.p-lines td { padding: .6rem .6rem .6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.p-lines td:first-child { color: var(--navy); font-weight: 450; }
.p-lines td:nth-child(2) { color: var(--muted); font-size: .8rem; }
.p-lines th:last-child, .p-lines td:last-child { padding-right: 0; text-align: right; white-space: nowrap; }
.p-lines tbody tr { animation: row-in .35s var(--ease) both; }
@keyframes row-in { from { opacity: 0; transform: translateX(-6px); } }
.p-totals { display: grid; justify-content: end; gap: .3rem; margin: 1rem 0 1.4rem; font-variant-numeric: tabular-nums; }
.p-totals div { display: flex; justify-content: space-between; gap: 3rem; }
.p-totals dt { color: var(--muted); }
.p-totals dd { margin: 0; text-align: right; }
.p-grand { margin-top: .3rem; padding: .7rem 1rem; border-radius: 12px; background: var(--navy); color: var(--sand); }
.p-grand dt { color: var(--champ-2); }
.p-grand dd { font-family: var(--serif); font-size: 1.35rem; }
.p-dep { padding: 0 1rem; font-size: .8rem; }
.p-cond { padding: .9rem 1rem; border-radius: 12px; background: var(--sand); color: #4A5360; font-size: .78rem; line-height: 1.55; }
.p-cond b { color: var(--navy); font-weight: 500; }
.p-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: auto; padding-top: 2rem; }
.p-sign small { display: block; color: var(--muted); font-size: .74rem; }
.p-script { display: block; font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--navy); }
.p-line { display: block; height: 2rem; border-bottom: 1px solid var(--navy); }
.p-addr { margin-top: 1.6rem; padding-top: .8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; text-align: center; }

/* Clients */
.view > .muted { margin: 0 0 1.2rem; }
.clients { border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.ct-head, .ct-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr) 8rem 9rem; gap: 1rem; align-items: center; padding: .8rem 1.2rem; }
.ct-head { color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.ct-list li + li { border-top: 1px solid var(--line); }
.ct-row { width: 100%; border: 0; background: none; text-align: left; transition: background .2s; }
.ct-row:hover { background: rgba(244, 239, 230, .7); }
.ct-name { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.ct-name b { display: block; font-weight: 500; color: var(--navy); }
.ct-name small, .ct-file small { display: block; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.ct-name .avatar { background: var(--champ-2); }
.ct-file { display: grid; justify-items: start; gap: .15rem; min-width: 0; }
.ct-value { color: var(--navy); font-variant-numeric: tabular-nums; }
.ct-last { color: var(--muted); font-size: .84rem; }
.pill { padding: .1rem .55rem; border-radius: 99px; background: var(--mist); font-size: .72rem; }
.pill-offre { background: rgba(230, 213, 181, .6); }
.pill-option { background: rgba(217, 140, 111, .18); color: var(--coral-ink); }
.pill-confirme { background: var(--navy); color: var(--champ-2); }
.pill-perdu { color: var(--muted); }

/* Tiroir et fenêtre modale */
dialog { padding: 0; border: 0; color: var(--ink); }
dialog::backdrop { background: rgba(14, 24, 40, 0); transition: background .26s; }
dialog.is-open::backdrop { background: rgba(14, 24, 40, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(500px, 100vw); max-width: 100vw; height: 100%; max-height: 100%; margin: 0 0 0 auto; background: var(--card); box-shadow: -30px 0 60px -30px rgba(14, 24, 40, .4); transform: translateX(100%); transition: transform .3s var(--ease); overflow-y: auto; overscroll-behavior: contain; }
.drawer.is-open { transform: none; }
.drawer-inner { display: grid; gap: 1.2rem; padding: 1.4rem 1.5rem 2rem; }
.d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.d-type { color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.d-head h2 { margin-top: .2rem; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; color: var(--navy); }
.d-head h2:focus { outline: 0; }
.close { display: grid; place-items: center; width: 38px; height: 38px; flex: none; padding: 0; border: 0; border-radius: 50%; background: var(--mist); font-size: 1.4rem; line-height: 1; transition: background .2s, transform .2s; }
.close:hover { background: var(--champ-2); transform: rotate(90deg); }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; }
.stepper button { display: grid; justify-items: center; gap: .3rem; width: 100%; padding: .55rem .2rem; border: 0; border-radius: 12px; background: var(--bg); color: var(--muted); font-size: .74rem; line-height: 1.2; transition: background .2s, color .2s; }
.stepper button:hover { background: var(--mist); color: var(--navy); }
.stepper i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: .72rem; font-style: normal; }
.stepper .is-done { color: var(--navy); }
.stepper .is-done i { background: var(--sage); color: #fff; box-shadow: none; }
.stepper .is-current { background: var(--navy); color: var(--sand); }
.stepper .is-current i { background: var(--champ); color: var(--navy-2); box-shadow: none; }
.d-lost, .d-alert { padding: .7rem .9rem; border-radius: 12px; background: var(--mist); font-size: .86rem; }
.d-alert { background: #FBEEE8; color: var(--coral-ink); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 0; }
.facts div { padding: .7rem .85rem; border-radius: 12px; background: var(--bg); }
.facts .wide { grid-column: 1 / -1; }
.facts dt { color: var(--muted); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.facts dd { margin: .1rem 0 0; color: var(--navy); font-weight: 450; font-size: 1rem; }
.facts dd small { display: block; color: var(--muted); font-size: .76rem; font-weight: 350; }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.chips span { padding: .15rem .55rem; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: .78rem; font-weight: 350; }
.d-block { display: grid; gap: .7rem; padding-top: 1.1rem; border-top: 1px solid var(--line); justify-items: start; }
.d-block > * { justify-self: stretch; }
.d-block > .link-btn { justify-self: start; }
.d-actions { padding-top: 0; border-top: 0; }
.d-block h3 { font-size: .78rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.d-contact p { display: grid; font-size: .9rem; color: var(--muted); }
.d-contact b { color: var(--navy); font-weight: 500; }
.opt-row { display: flex; align-items: flex-end; gap: .6rem; flex-wrap: wrap; padding: .8rem; border-radius: 14px; background: rgba(230, 213, 181, .3); box-shadow: inset 0 0 0 1px rgba(205, 179, 138, .45); }
.opt-row .field { flex: 1 1 170px; }
.opt-row .field input { background: #fff; }
.act-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.act-grid .btn { flex: 1 1 auto; }
.d-note { padding: .7rem .9rem; border-left: 3px solid var(--champ); border-radius: 0 10px 10px 0; background: var(--sand); font-size: .9rem; }
.timeline { position: relative; display: grid; gap: .8rem; padding-left: 1.3rem; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.timeline li { position: relative; display: grid; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: calc(-1.3rem + 0px); top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--sage); }
.timeline li.is-last::before { background: var(--champ); box-shadow: 0 0 0 4px rgba(205, 179, 138, .25); }
.timeline time { color: var(--muted); font-size: .74rem; text-transform: capitalize; }
.timeline li.is-last { animation: view-in .4s var(--ease) both; }

.modal { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow-l); opacity: 0; transform: translateY(14px) scale(.97); transition: opacity .25s, transform .3s var(--ease); }
.modal.is-open { opacity: 1; transform: none; }
.modal-form { display: grid; gap: .9rem; padding: 1.4rem 1.5rem 1.5rem; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; color: var(--navy); }
.modal-form > .muted { margin-top: -.5rem; font-size: .88rem; }
.form-warn { padding: .6rem .85rem; border-radius: 12px; background: #FBEEE8; color: var(--coral-ink); font-size: .84rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .3rem; }

/* Notifications */
.toasts { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 400; display: grid; gap: .5rem; width: min(400px, calc(100vw - 2rem)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: .7rem; padding: .75rem .9rem; border-radius: 14px; background: var(--navy); color: var(--sand); box-shadow: var(--shadow-l); font-size: .88rem; pointer-events: auto; animation: toast-in .35s var(--ease) both; transition: opacity .3s, transform .3s; }
.toast p { flex: 1; min-width: 0; }
.toast.is-out { opacity: 0; transform: translateY(8px); }
.toast-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--green); color: #fff; font-size: .78rem; font-weight: 600; }
.t-warn .toast-icon { background: var(--coral); }
.t-info .toast-icon { background: var(--champ); color: var(--navy-2); }
.toast-action { flex: none; padding: .3rem .65rem; border: 0; border-radius: 8px; background: rgba(205, 179, 138, .2); color: var(--champ-2); font-size: .8rem; font-weight: 450; }
.toast-action:hover { background: rgba(205, 179, 138, .35); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* Visite guidée */
.coach { position: fixed; inset: 0; z-index: 500; }
.coach-spot { position: fixed; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(14, 24, 40, .6), 0 0 0 2px var(--champ); transition: left .45s var(--ease), top .45s var(--ease), width .45s var(--ease), height .45s var(--ease); pointer-events: none; }
.coach-tip { position: fixed; padding: 1.1rem 1.2rem 1rem; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-l); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .35s var(--ease), left .45s var(--ease), top .45s var(--ease); }
.coach-tip.is-in { opacity: 1; transform: none; }
.coach-step { color: var(--champ); font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
#coach-text { margin: .35rem 0 .9rem; color: var(--ink); font-size: .95rem; line-height: 1.5; }
.coach-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.coach-actions .link-btn { color: var(--muted); }

/* Écrans moyens */
@media (max-width: 1180px) {
  :root { --side: 216px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offer-layout { grid-template-columns: 1fr; }
  .paper-wrap { padding: 1rem; }
}

/* Téléphone : barre d'onglets en bas, colonnes à faire défiler */
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .demo-text { display: none; }
  .app { display: block; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .side { position: fixed; inset: auto 0 0 0; z-index: 30; height: auto; padding: 0 0 env(safe-area-inset-bottom); background: var(--navy); box-shadow: 0 -10px 30px -16px rgba(14, 24, 40, .5); }
  .side-brand, .side-foot { display: none; }
  .nav { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .nav a { flex-direction: column; gap: .2rem; padding: .55rem .2rem .5rem; border-radius: 0; font-size: .68rem; text-align: center; line-height: 1.15; }
  .nav a[aria-current="page"] { background: none; }
  .nav a[aria-current="page"]::before { left: 30%; right: 30%; top: 0; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .nav-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-s { display: block; }
  .nav-count { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; padding: 0 .3rem; font-size: .64rem; line-height: 17px; }
  .mobile-foot { display: flex; justify-content: center; gap: 1.4rem; margin-top: 2rem; color: var(--muted); }
  .topbar { position: relative; top: auto; flex-wrap: wrap; gap: .6rem; padding: .7rem 1rem; }
  .topbar h1 { font-size: 1.4rem; }
  .search { order: 3; width: 100%; height: 40px; }
  .topbar .btn-label { display: none; }
  .topbar .btn-gold { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
  .views { padding: 1rem; }
  .kpis { display: flex; gap: .6rem; margin-inline: -1rem; padding: 0 1rem .3rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpi { flex: 0 0 72%; scroll-snap-align: start; padding: .85rem 1rem; }
  .kpi-value { font-size: 1.5rem; }
  .board { grid-template-columns: repeat(4, 84vw) auto; margin-inline: -1rem; padding: 0 1rem 1rem; scroll-snap-type: x proximity; scroll-padding: 1rem; }
  .col { scroll-snap-align: start; min-height: 300px; }
  .col-perdu { width: 84vw; }
  .col-perdu.is-collapsed { width: 56px; }
  .card-move { opacity: 1; transform: none; position: static; justify-content: flex-end; margin-top: .55rem; padding-top: .5rem; border-top: 1px solid var(--line); }
  .mv { width: 40px; height: 32px; }
  .grip { opacity: .55; padding: 10px; top: .45rem; right: .3rem; }
  .plan-head { align-items: stretch; flex-direction: column; }
  .plan-tools { width: 100%; }
  .seg { flex: 1 1 100%; }
  .seg button { flex: 1; }
  .plan-tools [data-plan-shift="0"] { flex: 1; }
  .plan-range { font-size: 1.2rem; }
  .plan-row { grid-template-columns: 8rem minmax(0, 1fr); }
  .plan { min-width: 880px; }
  .plan-label { padding: .6rem .7rem; position: sticky; left: 0; z-index: 2; background: var(--card); }
  .plan-row-rooms .plan-label { background: #FBF9F5; }
  .field-row { flex-wrap: wrap; }
  .field-row .field { flex: 1 1 40%; }
  .field-s, .field-m { flex: 1 1 30%; }
  .paper-wrap { margin-inline: -1rem; padding: .6rem; border-radius: 0; }
  .paper { min-height: 0; padding: 1.6rem 1.25rem 1.2rem; font-size: .8rem; }
  .p-head { flex-direction: column; }
  .p-ref { text-align: left; }
  .p-title { font-size: 1.5rem; }
  .p-facts { grid-template-columns: repeat(2, 1fr); }
  .p-lines td:nth-child(2) { font-size: .72rem; }
  .p-totals { justify-content: stretch; }
  .p-totals div { gap: 1rem; }
  .p-sign { grid-template-columns: 1fr; gap: 1rem; }
  .ct-head { display: none; }
  .ct-row { grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; padding: .9rem 1rem; }
  .ct-file { grid-column: 1; grid-row: 2; padding-left: 2.9rem; }
  .ct-value { grid-column: 2; grid-row: 1; text-align: right; }
  .ct-last { grid-column: 2; grid-row: 2; text-align: right; font-size: .76rem; }
  .drawer { width: 100vw; }
  .drawer-inner { padding: 1.1rem 1rem 2rem; }
  .stepper button { font-size: .66rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .modal { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: var(--r-l) var(--r-l) 0 0; transform: translateY(40px); }
  .modal-form { padding: 1.1rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); }
  .toasts { left: 1rem; right: 1rem; bottom: calc(76px + env(safe-area-inset-bottom)); width: auto; }
}

/* Mouvement réduit : pas d'animation décorative */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Impression : seule l'offre sort de l'imprimante (ou du PDF) */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  .demo-bar, .side, .topbar, .offer-form, .toasts, .coach, dialog, .mobile-foot, .view:not(#view-offre) { display: none !important; }
  .app { display: block; min-height: 0; padding: 0; }
  .views { padding: 0; }
  .view.is-active { animation: none; }
  .offer-layout { display: block; }
  .paper-wrap { display: block; padding: 0; margin: 0; background: none; border-radius: 0; }
  .paper { max-width: none; min-height: 0; padding: 0; box-shadow: none; font-size: 10pt; }
  .p-lines tbody tr { animation: none; }
  .p-grand, .p-facts li, .p-cond, .p-facts { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
