/* ═══════════════════════════════════════
   DOUBLE. — Style partagé
   Utilisé par : login.html, projets.html, Visitevirtuel.html
═══════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Jost:wght@300;400;500&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --ink:       #0a0a0a;
  --ink2:      #141414;
  --ink3:      #1e1e1e;
  --cream:     #f4f0ea;
  --cream2:    #ede8e1;
  --white:     #faf8f5;
  --gold:      #c4965a;
  --gold2:     #a87c42;
  --smoke:     #8a8480;
  --smoke2:    #c5bfb8;
  --green:     #4a7059;
  --green-bg:  rgba(74,112,89,0.12);
  --amber:     #9a7030;
  --amber-bg:  rgba(154,112,48,0.12);
  --red:       #8c4040;
  --red-bg:    rgba(140,64,64,0.10);
  --bl:        rgba(10,10,10,0.07);
  --serif:     'Cormorant Garamond', Georgia, serif;
  --sans:      'Jost', sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--sans);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

/* ── Grain overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.03;
  mix-blend-mode: overlay;
}

/* ═══════════════════════════════════════
   MODALS (partagées)
═══════════════════════════════════════ */
.mbg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}
.mbg.on { display: flex; }

.mbox {
  background: var(--white);
  border-radius: 14px;
  padding: 36px;
  width: 460px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.m-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 22px;
}

.mx {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--cream);
  border: none;
  font-size: 15px;
  color: var(--smoke);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-mc {
  width: 100%;
  padding: 11px;
  border-radius: 7px;
  border: 1px solid var(--bl);
  background: var(--cream);
  color: var(--ink);
  font-size: 12px;
  font-family: var(--sans);
  cursor: pointer;
  margin-top: 16px;
  transition: background .15s;
}
.btn-mc:hover { background: var(--cream2); }

/* Fidélité */
.lvitem {
  display: flex;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--bl);
}
.lvitem:last-child { border-bottom: none; }
.lnum {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--cream2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--smoke);
  flex-shrink: 0;
}
.lnum.cur { background: var(--gold); color: var(--white); }
.ln { font-size: 13px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.lt { font-size: 11px; color: var(--smoke); margin-bottom: 3px; }
.lp { font-size: 11px; color: var(--ink); line-height: 1.5; }

/* Discount modal */
.disc-box {
  background: var(--amber-bg);
  border: 1px solid rgba(154,112,48,.2);
  border-radius: 9px;
  padding: 16px;
  margin-bottom: 14px;
}
.disc-t { font-size: 13px; font-weight: 500; color: var(--amber); margin-bottom: 7px; }
.disc-b { font-size: 12px; color: #7a5a1c; line-height: 1.7; }

/* Chill modal */
.cf { margin-bottom: 14px; }
.cf label {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--smoke);
  margin-bottom: 6px;
}
.cf input, .cf select {
  width: 100%;
  padding: 9px 13px;
  background: var(--cream);
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 13px;
  font-family: var(--sans);
  color: var(--ink);
  outline: none;
  transition: all .15s;
}
.cf input:focus, .cf select:focus {
  border-color: var(--ink);
  background: var(--white);
}
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.btn-cs {
  width: 100%;
  padding: 12px;
  border-radius: 7px;
  border: none;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-family: var(--sans);
  cursor: pointer;
  letter-spacing: .06em;
}
.btn-cc {
  width: 100%;
  padding: 10px;
  border-radius: 7px;
  border: 1px solid var(--bl);
  background: transparent;
  color: var(--smoke);
  font-size: 12px;
  font-family: var(--sans);
  cursor: pointer;
  margin-top: 7px;
}

/* ── Sidebar partagée ── */
.sb {
  width: 72px;
  background: var(--ink2);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0;
  gap: 6px;
  position: relative;
  z-index: 10;
}
.sb-logo {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--white);
  letter-spacing: .1em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  cursor: pointer;
  margin-bottom: 28px;
  position: relative;
  text-decoration: none;
}
.sb-logo::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.sb-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
}
.sb-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  text-decoration: none;
}
.sb-btn svg {
  width: 17px;
  height: 17px;
  stroke: rgba(255,255,255,0.28);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .15s;
}
.sb-btn:hover svg { stroke: rgba(255,255,255,0.65); }
.sb-btn.on { background: rgba(255,255,255,0.07); }
.sb-btn.on svg { stroke: var(--gold); }
.sb-tip {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  border: 1px solid rgba(255,255,255,0.08);
  font-family: var(--sans);
}
.sb-btn:hover .sb-tip { opacity: 1; }
.sb-sep {
  width: 22px;
  height: 1px;
  background: rgba(255,255,255,0.05);
  margin: 6px 0;
}
.sb-logout {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.sb-logout:hover { background: rgba(255,255,255,0.08); }
.sb-logout svg {
  width: 14px;
  height: 14px;
  stroke: rgba(255,255,255,0.22);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Fade animation ── */
@keyframes fi {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}
.fi { animation: fi .32s ease forwards; }

/* ── Asterisk badge ── */
.ast {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 10px;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid rgba(154,112,48,.22);
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--smoke2); border-radius: 2px; }
/* ═══════════════════════════════════════
   DEMO MODE — Bannière + restrictions
═══════════════════════════════════════ */
.demo-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: var(--ink2);
  border-bottom: 1px solid rgba(196,150,90,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 9px 24px;
  font-size: 11px;
  font-family: var(--sans);
  color: rgba(255,255,255,0.55);
  letter-spacing: .06em;
}
.demo-banner strong {
  color: var(--gold);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 10px;
}
.demo-banner a {
  color: rgba(255,255,255,0.38);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 1px;
  transition: color .15s;
  font-size: 10px;
  letter-spacing: .1em;
}
.demo-banner a:hover { color: var(--white); }
.demo-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  animation: blink 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

/* Quand bannière démo active, décaler le layout */
body.is-demo .dash { padding-top: 38px; }
body.is-demo .login-wrap { padding-top: 38px; }

/* Modale "indispo démo" */
.demo-modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.demo-modal-bg.on { display: flex; }
.demo-modal {
  background: var(--white);
  border-radius: 14px;
  padding: 36px;
  width: 380px;
  max-width: 90vw;
  text-align: center;
}
.demo-modal-ico { font-size: 32px; margin-bottom: 16px; }
.demo-modal-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
}
.demo-modal-txt {
  font-size: 12px;
  color: var(--smoke);
  line-height: 1.65;
  margin-bottom: 24px;
}
.demo-modal-cta {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 7px;
  font-size: 11px;
  font-family: var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.demo-modal-cta:hover { background: var(--ink3); }
.demo-modal-skip {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: var(--smoke);
  cursor: pointer;
  letter-spacing: .04em;
}
.demo-modal-skip:hover { color: var(--ink); }
