/* 
 * ROLEC AMBASSADOR - Premium Design System (Iteration V7)
 * Shared stylesheet for Landing Page, Client Portal, Back-Office, Gate and Cockpit.
 */

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

:root {
  --or: #A37E2C;
  --or-hover: #c59f3e;
  --vert: #006039;
  --vert-deep: #002119;
  --vert-secondary: #023125;
  --noir: #0A0A0A;
  --blanc: #FFFFFF;
  --creme: #F5F0E8;
  --creme-sombre: #eae4d8;
  --champagne: #C9C08F;
  --succes: #1C5E3C;
  --erreur: #8B2020;
  --info: #3B6E8F;
  --alerte: #96722B;
  
  --font-titre: 'Cormorant Garamond', serif;
  --font-corps: 'Inter', sans-serif;
  
  --shadow-lux: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-heavy: 0 15px 45px rgba(0,0,0,0.15);
  --border-lux: 1px solid rgba(163, 126, 44, 0.15);
}

/* -------------------------------------------------------------
   STICKY FOOTER LAYOUT
------------------------------------------------------------- */
html, body {
  height: 100%;
  min-width: 480px;
}

.main-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

/* -------------------------------------------------------------
   DISCLAIMER FOOTER
------------------------------------------------------------- */
.disclaimer-footer {
  background: var(--noir);
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  text-align: center;
  padding: 16px 20px;
  letter-spacing: 0.06em;
  font-family: var(--font-corps);
  width: 100%;
  margin-top: auto;
}
.disclaimer-footer strong {
  color: var(--or);
  font-weight: 600;
}

/* Base resets & utilities */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-corps);
  color: var(--noir);
  background: var(--blanc);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-width: 480px; /* Limite minimale pour la responsiveness extreme */
  overflow-x: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--creme);
}
::-webkit-scrollbar-thumb {
  background: var(--or);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--or-hover);
}

h1, h2, h3, h4 {
  font-family: var(--font-titre);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.gold-line {
  width: 50px;
  height: 1px;
  background: var(--or);
  margin: 20px 0;
}

/* Luxury buttons */
.btn-lux {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-corps);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  height: 44px;
  padding: 0 28px;
  border: none;
  cursor: pointer;
  transition: all 300ms ease;
  border-radius: 0;
  text-decoration: none;
}

.btn-lux-primary {
  background: var(--or);
  color: var(--noir);
}
.btn-lux-primary:hover {
  background: var(--or-hover);
  color: var(--blanc);
}

.btn-lux-secondary {
  background: transparent;
  color: var(--or);
  border: 1px solid var(--or);
}
.btn-lux-secondary:hover {
  background: rgba(163, 126, 44, 0.1);
  color: var(--or-hover);
}

.btn-lux-ghost {
  background: transparent;
  color: var(--blanc);
  border: 0.5px solid rgba(255,255,255,0.3);
}
.btn-lux-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--blanc);
}

/* -------------------------------------------------------------
   ACCESS GATE / LOCK SCREEN
------------------------------------------------------------- */
.gate-body {
  background: var(--noir);
  color: var(--blanc);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.gate-card {
  max-width: 440px;
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(163, 126, 44, 0.25);
  border-radius: 4px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: var(--shadow-heavy);
}

.gate-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
}
.gate-logo svg {
  width: 64px;
  height: 56px;
}
.gate-logo-title {
  font-family: var(--font-titre);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--or);
}

.gate-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin-bottom: 24px;
}

.gate-form-group {
  margin-bottom: 20px;
  text-align: left;
}

.gate-input {
  width: 100%;
  height: 48px;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--champagne);
  color: var(--blanc);
  font-family: var(--font-corps);
  font-size: 18px;
  letter-spacing: 4px;
  text-align: center;
  outline: none;
  transition: border-color 300ms;
}
.gate-input:focus {
  border-bottom-color: var(--or);
}

.gate-input::placeholder {
  font-size: 12px;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.25);
}

.gate-btn {
  width: 100%;
  height: 48px;
  background: var(--or);
  color: var(--noir);
  font-family: var(--font-corps);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: all 300ms;
  margin-top: 10px;
}
.gate-btn:hover {
  background: var(--or-hover);
  color: var(--blanc);
}

.gate-error {
  color: var(--erreur);
  font-size: 11px;
  margin-top: 10px;
  display: none;
}

/* -------------------------------------------------------------
   DEMO ON-DEMAND BUTTONS, MASKS & SPOTLIGHT FRAMES (V7)
------------------------------------------------------------- */
.demo-trigger-btn {
  display: inline-flex;
  align-items: center;
  background: var(--or);
  color: var(--noir);
  font-family: var(--font-corps);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border: 1px solid var(--or);
  cursor: pointer;
  transition: all 300ms;
  border-radius: 4px;
  text-decoration: none;
}
.demo-trigger-btn:hover {
  background: var(--or-hover);
  color: var(--blanc);
  border-color: var(--or-hover);
}

/* Darkened backdrop overlay mask for demo focusing */
.demo-overlay-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
  pointer-events: none;
}
.demo-overlay-mask.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* On-Demand local tooltips styling - Fixed in Viewport */
.tour-tooltip-card {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 320px;
  background: #121212;
  border: 1.5px solid var(--or);
  color: var(--blanc);
  padding: 16px;
  box-shadow: var(--shadow-heavy);
  font-family: var(--font-corps);
  z-index: 100000;
  border-radius: 4px;
}

.tour-tooltip-header {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--or);
  letter-spacing: 0.08em;
  border-bottom: 0.5px dashed rgba(163, 126, 44, 0.3);
  padding-bottom: 4px;
  margin-bottom: 10px;
}

.tour-tooltip-body {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}

.tour-tooltip-body strong {
  color: var(--or);
}

.tour-tooltip-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tour-tooltip-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  color: var(--blanc);
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 250ms;
}
.tour-tooltip-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}
.tour-tooltip-btn.primary {
  background: var(--or);
  color: var(--noir);
  border-color: var(--or);
  font-weight: 600;
}
.tour-tooltip-btn.primary:hover {
  background: var(--or-hover);
  color: var(--blanc);
}

/* Glowing Highlight Frame Overlay */
.tour-highlight-frame {
  position: absolute;
  display: none;
  z-index: 10000;
  border: 2.5px solid var(--or);
  pointer-events: none;
  box-shadow: 0 0 80px 9999px rgba(0, 0, 0, 0.65), 0 0 30px 10px rgba(163, 126, 44, 0.6) !important;
  opacity: 0;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
}
.tour-highlight-frame.active {
  opacity: 1;
}

/* Shared Header User / Employee Profile Badges */
.portal-user-badge, .bo-user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--vert);
  border: 1px solid var(--or);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-titre);
  font-weight: 500;
  color: var(--or);
  font-size: 14px;
}
.user-info {
  text-align: right;
  font-family: var(--font-corps);
}
.user-name {
  font-size: 13px;
  font-weight: 600;
}
.user-tier {
  font-size: 10px;
  color: var(--or);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* -------------------------------------------------------------
   FLOATING CHATBOT WIDGET (V7 Widened to 400px)
------------------------------------------------------------- */
.chatbot-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  z-index: 1000;
}

.chatbot-trigger {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 56px;
  height: 56px;
  background: var(--vert);
  border: 2px solid var(--or);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,96,57,0.3);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
}
.chatbot-trigger:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(0,96,57,0.4);
}
.chatbot-trigger svg {
  width: 22px;
  height: 22px;
  fill: var(--or);
  transition: transform 250ms ease;
}

.chatbot-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: var(--erreur);
  border: 2px solid var(--blanc);
  border-radius: 50%;
  animation: pulse-badge 2s infinite;
  z-index: 1002;
}

@keyframes pulse-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.chatbot-window {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 410px; /* Widened to keep header elements on a single line */
  height: 480px;
  background: var(--blanc);
  border: 1px solid var(--champagne);
  box-shadow: var(--shadow-heavy);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.6);
  transform-origin: bottom right;
  transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  z-index: 999;
}
.chatbot-window.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.chatbot-header {
  background: var(--vert-deep);
  color: var(--blanc);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--or);
  height: 54px;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.chatbot-header-logo svg {
  width: 16px;
  height: 14px;
  fill: var(--or);
  flex-shrink: 0;
}
.chatbot-header-title {
  font-family: var(--font-titre);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--or);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chatbot-header-status {
  font-size: 9px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chatbot-header-action-btn {
  background: transparent;
  border: 1px solid rgba(163, 126, 44, 0.4);
  color: var(--or);
  font-size: 8px;
  font-weight: 600;
  font-family: var(--font-corps);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 6px;
  cursor: pointer;
  transition: all 250ms;
  border-radius: 2px;
  white-space: nowrap;
}
.chatbot-header-action-btn:hover {
  background: rgba(163, 126, 44, 0.15);
  border-color: var(--or);
  color: var(--blanc);
}

.chatbot-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  cursor: pointer;
  transition: color 250ms;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.chatbot-close:hover {
  color: var(--or);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: var(--creme);
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100% - 112px);
}

.chatbot-msg-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chatbot-msg-sender {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0,0,0,0.4);
  margin-left: 4px;
}
.chatbot-msg-group.user .chatbot-msg-sender {
  text-align: right;
  margin-right: 4px;
  margin-left: 0;
}

.chatbot-msg-bubble {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
  border-radius: 4px;
  position: relative;
  font-family: var(--font-corps);
}
.chatbot-msg-group.bot .chatbot-msg-bubble {
  background: var(--blanc);
  color: var(--noir);
  border: 0.5px solid rgba(163,126,44,0.15);
  align-self: flex-start;
}
.chatbot-msg-group.user .chatbot-msg-bubble {
  background: var(--vert-secondary);
  color: var(--blanc);
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  align-self: flex-start;
  width: 100%;
}
.chatbot-chip {
  background: transparent;
  color: var(--or);
  border: 1px solid var(--or);
  padding: 5px 10px;
  font-size: 10px;
  font-family: var(--font-corps);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 250ms ease;
  border-radius: 2px;
}
.chatbot-chip:hover {
  background: rgba(163, 126, 44, 0.1);
  color: var(--or-hover);
  border-color: var(--or-hover);
}

.chatbot-input-area {
  background: var(--blanc);
  border-top: 1px solid rgba(163,126,44,0.15);
  padding: 12px 76px 12px 16px;
  display: flex;
  align-items: center;
  height: 60px;
  position: relative;
}

.chatbot-input {
  flex: 1;
  height: 36px;
  border: none;
  border-bottom: 1px solid var(--champagne);
  font-family: var(--font-corps);
  font-size: 13px;
  color: var(--noir);
  outline: none;
  background: transparent;
  transition: border-color 300ms;
}
.chatbot-input:focus {
  border-bottom-color: var(--or);
}

/* -------------------------------------------------------------
   RESPONSIVE HEADERS - AIRY & HORIZONTAL FLOW ON MOBILE (V8)
------------------------------------------------------------- */
.portal-header .container, .bo-header .container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

@media(max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }
}

/* Subdomain switcher bar V7 */
.subdomain-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-width: 480px;
  height: 36px;
  background: #0A0A0A;
  border-bottom: 1px solid rgba(163,126,44,0.3);
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-corps);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 1000;
}
.subdomain-nav-bar a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 200ms;
}
.subdomain-nav-bar a:hover {
  color: var(--or);
}
.subdomain-nav-bar a.active {
  color: var(--or);
  font-weight: 600;
}

@media (max-width: 480px) {
  .chatbot-window {
    width: calc(100vw - 32px);
    height: 400px;
  }
}
