/* ==========================================================================
   DESIGN SYSTEM & VARIABLES — LUDENS-KITH
   ========================================================================== */
:root {
  --bg-dark: #0a0c10;
  --bg-card-recto: #0e1117;
  --bg-card-verso: #12161f;
  --gold-soft: #e2c074;
  --gold-glow: rgba(226, 192, 116, 0.15);
  --ether-blue: #00d2ff;
  --ether-glow: rgba(0, 210, 255, 0.25);
  --text-primary: #f5f6f9;
  --text-muted: #8b949e;
  --text-dark: #0d0f12;
  --metal-gray: #21262d;
  --border-color: rgba(255, 255, 255, 0.08);
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
}

/* ==========================================================================
   RESET & LAYOUT BASE
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Texture globale style cockpit */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(rgba(255, 255, 255, 0.007) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

/* ==========================================================================
   HEADER & TYPOGRAPHY
   ========================================================================== */
#app-header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 12, 16, 0.8);
  backdrop-filter: blur(10px);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#app-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ether-blue), transparent);
}

.main-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--ether-blue) 0%, var(--gold-soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-weight: 400;
}

/* ==========================================================================
   SIMULATION AREA (3D CARD FLIP)
   ========================================================================== */
.simulation-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4rem;
}

/* Conteneur 3D */
.card-container-3d {
  width: 480px;
  height: 310px;
  perspective: 1500px;
  margin: 3rem 0;
  cursor: pointer;
}

/* La carte interactive 3D */
.card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Classe de flip appliquée en JS */
.card-3d.flipped {
  transform: rotateY(180deg);
}

/* Face de la carte (générique) */
.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backface-visibility: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

/* Effet de lueur dynamique / reflet métallique */
.glow-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06) 0%, transparent 60%);
  z-index: 5;
}

/* Grille interne de cockpit */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 15px 15px;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  z-index: 1;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   STYLE RECTO — LUDENS-KITH (Bleu-Éther & Or Doux)
   -------------------------------------------------------------------------- */
.card-recto {
  background-color: var(--bg-card-recto);
  border-color: rgba(0, 210, 255, 0.15);
  box-shadow: 0 15px 35px rgba(0, 210, 255, 0.08);
}

/* Watermark de fond pour le Recto */
.watermark-logo-recto {
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 250px;
  height: 250px;
  background-image: url('../assets/logo_LK_2026_officiel.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.035;
  z-index: 2;
  filter: drop-shadow(0 0 10px var(--ether-blue));
}

.card-recto .card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
}

.card-logo {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 5px rgba(0, 210, 255, 0.3));
}

.brand-name {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.card-recto .card-body {
  z-index: 3;
  margin: auto 0;
  padding-right: 1.5rem;
}

.mantra {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 300;
  color: var(--gold-soft);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  line-height: 1.5;
  letter-spacing: 0.5px;
}

.card-recto .card-footer {
  z-index: 3;
}

.meta-line {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-initials {
  color: var(--gold-soft);
  font-weight: 600;
}

.divider {
  color: rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   STYLE VERSO — LK STUDIO (Métallique, Argent & Tech)
   -------------------------------------------------------------------------- */
.card-verso {
  background-color: var(--bg-card-verso);
  transform: rotateY(180deg); /* Face cachée */
  border-color: rgba(255, 255, 255, 0.08);
  /* Texture brossée fibre de carbone */
  background-image: 
    radial-gradient(var(--border-color) 1px, transparent 0),
    radial-gradient(var(--border-color) 1px, transparent 0);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}

/* Watermark de fond pour le Verso */
.watermark-logo-verso {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 220px;
  height: 220px;
  background-image: url('../assets/lk_studio_logo_2026.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.025;
  z-index: 2;
}

.card-verso .card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
}

.card-logo-studio {
  height: 38px;
  width: auto;
}

.brand-name-studio {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.card-verso .card-body {
  z-index: 3;
  margin: auto 0;
}

.tech-indicator {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 4px;
  color: var(--text-muted);
  border-left: 2px solid var(--ether-blue);
  padding-left: 10px;
  text-transform: uppercase;
}

.card-verso .card-footer {
  z-index: 3;
}

.meta-line-studio {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.email-line {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ether-blue);
  text-shadow: 0 0 8px rgba(0, 210, 255, 0.15);
}

/* ==========================================================================
   CONTROLS & BUTTONS
   ========================================================================== */
.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 480px;
}

.action-buttons-group {
  display: flex;
  gap: 1rem;
}

.btn {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9rem 1.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  outline: none;
}

.flex-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1;
}

.btn-primary {
  background-color: var(--metal-gray);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background-color: var(--text-primary);
  color: var(--text-dark);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--ether-blue) 0%, rgba(0, 210, 255, 0.1) 100%);
  color: var(--text-primary);
  border-color: var(--ether-blue);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.15);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--ether-blue) 0%, var(--ether-blue) 100%);
  box-shadow: 0 5px 20px var(--ether-glow);
  transform: translateY(-2px);
}

/* ==========================================================================
   PRINTING GUIDE SECTION
   ========================================================================== */
.guide-section {
  border-top: 1px solid var(--border-color);
  padding-top: 4rem;
  margin-top: 2rem;
}

.section-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  letter-spacing: 1px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.guide-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.8rem;
  transition: all 0.3s ease;
}

.guide-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.guide-card h3 {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  color: var(--gold-soft);
}

.guide-card ul {
  list-style: none;
}

.guide-card ul li {
  margin-bottom: 0.8rem;
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.95rem;
}

.guide-card ul li::before {
  content: "■";
  color: var(--ether-blue);
  position: absolute;
  left: 0;
  font-size: 0.7rem;
  top: 2px;
}

.guide-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.imprimeurs-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.2rem 0;
}

.link-btn {
  display: block;
  text-align: center;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.7rem;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.link-btn:hover {
  background-color: var(--ether-blue);
  color: var(--text-dark);
  border-color: var(--ether-blue);
  box-shadow: 0 4px 12px var(--ether-glow);
}

.instructions-text {
  font-size: 0.85rem !important;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  border-top: 1px solid var(--border-color);
  background-color: rgba(5, 7, 10, 0.9);
  padding: 2rem 1.5rem;
  text-align: center;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.console-log {
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.25) !important;
  font-size: 0.8rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
  .card-container-3d, .controls-panel {
    width: 100%;
    max-width: 400px;
  }
  
  .card-container-3d {
    height: 260px;
  }
  
  .card-face {
    padding: 1.5rem;
  }
  
  .action-buttons-group {
    flex-direction: column;
  }
  
  .main-title {
    font-size: 1.8rem;
  }
}
