/* ============================================================
   Portail Chambre — thème "veillée sous fibre"
   Palette : nuit teintée (deep teal) + or chaud (accueil, hospitalité)
   Pensé pour être lu depuis un canapé, à la télécommande.
   ============================================================ */

:root{
  --bg: #0F1E1B;
  --bg-grad: #142A25;
  --panel: #17302B;
  --panel-hi: #1F3D36;
  --panel-line: #274943;
  --gold: #E3A63E;
  --gold-soft: #F0C878;
  --text: #F3ECDF;
  --text-dim: #B7C8C1;
  --text-faint: #7E938C;
  --accent-warm: #D9724F;

  --display: 'Fraunces', Georgia, serif;
  --ui: 'Manrope', -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  --rail-w: 336px;
  --safe: 3.4vw;
  --radius: 18px;
  --focus-ring: 0 0 0 3px var(--bg), 0 0 0 6px var(--gold);
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:
    radial-gradient(120% 140% at 8% 0%, var(--bg-grad) 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--ui);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* subtle signature motif — abstract woven line pattern, corner only */
.weave{
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(227,166,62,0.05) 0 2px, transparent 2px 34px),
    repeating-linear-gradient(25deg, rgba(227,166,62,0.035) 0 2px, transparent 2px 34px);
  -webkit-mask-image: radial-gradient(60% 55% at 100% 0%, #000 0%, transparent 70%);
          mask-image: radial-gradient(60% 55% at 100% 0%, #000 0%, transparent 70%);
}

.app{
  position: relative;
  z-index: 1;
  display: flex;
  height: 100vh;
  padding: var(--safe);
  gap: var(--safe);
}

/* ---------- Rail (menu) ---------- */
.rail{
  width: var(--rail-w);
  flex: 0 0 auto;
  background: linear-gradient(180deg, var(--panel) 0%, #132621 100%);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.brand{
  display:flex; align-items:center; gap:12px;
  padding: 4px 10px 22px 10px;
  border-bottom: 1px solid var(--panel-line);
  margin-bottom: 14px;
}
.brand-mark{
  width:38px; height:38px; border-radius:10px;
  background: linear-gradient(135deg, var(--gold), var(--accent-warm));
  color:#1B120A; font-family: var(--display); font-weight:600; font-size:20px;
  display:flex; align-items:center; justify-content:center;
  flex: 0 0 auto;
}
.brand-name{
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.2px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu{
  display:flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1 1 auto;
  padding-right: 2px;
}
.menu::-webkit-scrollbar{ width: 4px; }
.menu::-webkit-scrollbar-thumb{ background: var(--panel-line); border-radius: 4px; }

.item{
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--ui);
  font-weight: 600;
  font-size: 16.5px;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.item .ic{
  width: 22px; height: 22px; flex: 0 0 auto;
  color: var(--text-faint);
  transition: color .15s ease;
}
.item:hover{ background: var(--panel-hi); color: var(--text); }

.item.is-active{
  background: var(--panel-hi);
  color: var(--text);
  border-left-color: var(--gold);
}
.item.is-active .ic{ color: var(--gold); }

.item:focus-visible,
.item.is-focused{
  outline: none;
  box-shadow: var(--focus-ring);
  background: var(--panel-hi);
  color: var(--text);
  transform: translateX(2px);
}
.item:focus-visible .ic,
.item.is-focused .ic{ color: var(--gold-soft); }

.divider{
  height: 1px;
  background: var(--panel-line);
  margin: 10px 6px;
  flex: 0 0 auto;
}

.rail-foot{
  display:flex; justify-content: space-between; align-items:center;
  padding: 16px 10px 4px 10px;
  border-top: 1px solid var(--panel-line);
  margin-top: 10px;
  flex: 0 0 auto;
}
.room-tag{
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--gold-soft);
  letter-spacing: 0.4px;
}
.clock{
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ---------- Stage (content) ---------- */
.stage{
  flex: 1 1 auto;
  min-width: 0;
  background: linear-gradient(180deg, var(--panel) 0%, #112420 100%);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 48px 56px;
  overflow-y: auto;
  outline: none;
}

.eyebrow{
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px 0;
}
.h1{
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  margin: 0 0 14px 0;
  color: var(--text);
}
.lead{
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0 0 30px 0;
}

/* generic tile grid, used by Regarder / Films / Séries */
.grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 6px;
}
.tile{
  background: var(--panel-hi);
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  padding: 22px 20px;
  display:flex; flex-direction:column; gap:10px;
  cursor:pointer;
  color: var(--text);
  text-align:left;
  font-family: var(--ui);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tile .ic{ width:26px; height:26px; color: var(--gold); }
.tile-title{ font-weight: 700; font-size: 16.5px; }
.tile-sub{ font-size: 13px; color: var(--text-faint); line-height:1.4; }
.tile:hover{ border-color: var(--gold); transform: translateY(-2px); }
.tile:focus-visible,
.tile.is-focused{
  outline:none;
  box-shadow: var(--focus-ring);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.tile.is-ghost{
  border-style: dashed;
  color: var(--text-faint);
  cursor: default;
}
.tile.is-ghost:hover{ transform:none; border-color: var(--panel-line); }

.note-box{
  border: 1px dashed var(--panel-line);
  background: rgba(227,166,62,0.05);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 8px 0 28px 0;
  max-width: 62ch;
}

/* buttons */
.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 15.5px;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn-primary{
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1B120A;
}
.btn-primary:hover{ filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost{
  background: var(--panel-hi);
  border-color: var(--panel-line);
  color: var(--text);
}
.btn-ghost:hover{ border-color: var(--gold); }
.btn:focus-visible{ outline:none; box-shadow: var(--focus-ring); }
.btn-row{ display:flex; gap:14px; flex-wrap:wrap; margin-top: 6px; }

/* forms */
.form{ max-width: 560px; margin-top: 8px; }
.field{ margin-bottom: 18px; }
.field label{
  display:block; font-size: 12.5px; font-family: var(--mono);
  letter-spacing: 0.4px; color: var(--text-faint); margin-bottom: 8px;
  text-transform: uppercase;
}
.field input,
.field select,
.field textarea{
  width:100%;
  background: var(--panel-hi);
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--ui);
  font-size: 15.5px;
  padding: 13px 14px;
}
.field textarea{ resize: vertical; min-height: 84px; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible{
  outline:none; box-shadow: var(--focus-ring); border-color: var(--gold);
}

/* menu cards (Restaurant) */
.dish-list{ display:flex; flex-direction:column; gap:2px; margin-top: 10px; max-width: 620px; }
.dish{
  display:flex; justify-content:space-between; align-items:baseline;
  padding: 15px 4px; border-bottom: 1px solid var(--panel-line);
}
.dish-name{ font-weight:700; font-size:16px; }
.dish-desc{ font-size: 13px; color: var(--text-faint); margin-top:3px; }
.dish-price{ font-family: var(--mono); color: var(--gold-soft); font-size: 15px; white-space:nowrap; padding-left: 18px; }

/* info cards (Tourisme) */
.info-cards{ display:flex; flex-direction:column; gap: 14px; margin-top: 8px; max-width: 680px; }
.info-card{
  background: var(--panel-hi);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  padding: 18px 20px;
}
.info-card h3{ margin: 0 0 6px 0; font-family: var(--display); font-weight:600; font-size: 19px; }
.info-card p{ margin:0; color: var(--text-dim); font-size: 14.5px; line-height:1.55; }

.quick-row{ display:flex; gap:14px; flex-wrap:wrap; margin: 26px 0 4px 0; }
.quick-card{
  flex: 1 1 220px;
  background: var(--panel-hi);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  padding: 16px 18px;
}
.quick-card .k{ font-family: var(--mono); font-size:11.5px; letter-spacing:.5px; color: var(--text-faint); text-transform:uppercase; }
.quick-card .v{ font-size: 15.5px; font-weight:700; margin-top:6px; color: var(--text); }

.embed-frame{
  width:100%; height: 62vh; border:1px solid var(--panel-line); border-radius: 14px;
  margin-top: 10px; background:#0b1815;
}

/* Films Local — vignettes façon Netflix/Prime */
.poster-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  margin-top: 6px;
}
.poster-tile{
  background: var(--panel-hi);
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  font-family: var(--ui);
  padding: 0;
  transition: border-color .15s ease, transform .15s ease;
  display:flex; flex-direction:column;
}
.poster-tile:hover{ border-color: var(--gold); transform: translateY(-2px); }
.poster-tile:focus-visible,
.poster-tile.is-focused{
  outline:none; box-shadow: var(--focus-ring); border-color: var(--gold); transform: translateY(-2px);
}
.poster-thumb{
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, #16302a, #0d1b18);
  display:flex; align-items:center; justify-content:center;
  background-size: cover;
  background-position: center;
}
.poster-thumb .ic{ width:34px; height:34px; color: var(--gold); opacity:.85; }
.poster-thumb .play-badge{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  background: rgba(10,20,17,0.0);
  opacity:0; transition: opacity .15s ease, background .15s ease;
}
.poster-tile:hover .play-badge,
.poster-tile:focus-visible .play-badge{
  opacity:1; background: rgba(10,20,17,0.35);
}
.poster-thumb .play-badge svg{ width:40px; height:40px; color: var(--gold); }
.poster-meta{ padding: 12px 14px 14px 14px; }
.poster-title{ font-weight:700; font-size:14.5px; line-height:1.3; }
.poster-sub{ font-size:12px; color: var(--text-faint); margin-top:4px; }
.poster-tile.is-unsupported .poster-thumb{ opacity:.55; }

/* Lecteur plein cadre pour Films Local (ne quitte pas la page) */
.player-overlay{
  position: fixed; inset:0; z-index: 60;
  background: rgba(6,12,10,0.92);
  display:flex; align-items:center; justify-content:center;
  padding: 4vh 4vw;
}
.player-box{
  width:100%; max-width: 1100px;
  display:flex; flex-direction:column; gap:14px;
}
.player-box video{
  width:100%; max-height: 78vh; border-radius: 12px; background:#000;
  border: 1px solid var(--panel-line);
}
.player-head{ display:flex; align-items:center; justify-content:space-between; gap:16px; }
.player-title{ font-family: var(--display); font-weight:600; font-size:20px; color: var(--text); }
.player-close{
  background: var(--panel-hi); border:1px solid var(--panel-line); color: var(--text);
  border-radius: 10px; padding: 9px 16px; font-family: var(--ui); font-weight:700; cursor:pointer;
}
.player-close:hover{ border-color: var(--gold); }

/* toast */
.toast{
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: var(--gold-soft); color:#1B120A; font-weight:700; font-size:15px;
  padding: 14px 22px; border-radius: 12px;
  opacity:0; pointer-events:none; transition: opacity .2s ease, transform .2s ease;
  z-index: 10;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }

/* responsive: phones / small screens used for testing */
@media (max-width: 860px){
  .app{ flex-direction: column; height: auto; min-height: 100vh; overflow: visible; }
  body{ overflow-y: auto; }
  .rail{ width: auto; }
  .stage{ padding: 30px 24px; }
}
