/* General styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Prevents vertical centering issues */
    min-height: 100vh;
    background: linear-gradient(to right, #f4f4f4, #e8e8e8);
}
#tabs {
  overflow: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

#tabs li {
  float: left;
  margin: 0 0.5em 0 0;
}

#tabs a {
  position: relative;
  background: #ddd;
  background-image: linear-gradient(to bottom, #fff, #ddd);
  padding: 0.7em 3.5em;
  float: left;
  text-decoration: none;
  color: #444;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 5px 0 0 0;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
}

#tabs a:hover,
#tabs a:hover::after,
#tabs a:focus,
#tabs a:focus::after {
  background: #fff;
}

#tabs a:focus {
  outline: 0;
}

#tabs a::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  right: -0.5em;
  bottom: 0;
  width: 1em;
  background: #ddd;
  background-image: linear-gradient(to bottom, #fff, #ddd);
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4);
  transform: skew(10deg);
  border-radius: 0 5px 0 0;
}

#tabs li.active a,
#tabs li.active a::after {
  background: #fff;
  background-image: linear-gradient(220deg, transparent 10px, #fff 10px);
  text-shadow: none;
  color: #333;
  z-index: 3;
}
#content {
  background: #fff;
  padding: 2em;

  position: relative;
  z-index: 2;
  border-radius: 0 5px 5px 5px;
  box-shadow: 0 -2px 3px -2px rgba(0, 0, 0, 0.5);

  /* Ensure scrolling works */
  max-height: 500px; /* Adjust based on your layout */
  overflow-y: auto;
}


.action-card {
  display: flex;
  align-items: center;
  gap: 10px; /* optional spacing */
  margin-bottom: 10px;
}

.action-card p {
  margin: 0;
  flex: 1;
}

.action-card label {
  margin: 0;
}

.action-status {
    float: right;
}

.action-list {
    max-height: 600px;
    overflow-y: auto;
    margin: 20px 0;
}
/* Top Frame (Logo, Navigation, Burger Menu) */
.top-frame {
  display: flex;
  align-items: center;
  justify-: space-between; /* Space items out: left, center, right */
  background-color: #201f40; /* Adjust color to match your logo */
  padding: 10px 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
}

/* Logo on the Left */
.logo-placeholder {
  flex: 0 0 auto; /* Do not grow */
  display: flex;
  align-items: center;
  justify-: center;
}

/* Navigation Menu in the Middle */
.top-menu {
  flex: 1;             /* Take up available space */
  text-align: center;  /* Center the content */
}
.top-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-block; /* Inline-block for horizontal centering */
}
.top-menu ul li {
  display: inline;
  margin: 0 15px;
}
.top-menu ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}
.top-menu ul li a:hover {
  text-decoration: underline;
}

/* Burger Menu on the Right */
.burger-menu {
  flex: 0 0 auto; /* Do not grow */
  position: relative;
}
.burger-icon {
  font-size: 20px;
  cursor: pointer;
  color: #fff;
  background-color: transparent;
  border: none;
}
.menu-items {
  display: none; /* Hidden by default */
  position: absolute;
  right: 0;
  top: 30px; /* Adjust based on burger icon height */
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  z-index: 1000;
  border-radius: 6px;
}
.menu-items button {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 5px 0;
  text-align: left;
  background-color: #201f40;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s ease;
}
.menu-items button:hover {
  background-color: #ddd;
}


/* Main container with book-style design */
.container {
    margin-top: 50px;
    display: flex;
    width: 90%;
    max-width: 1200px;
    background: #ffff00;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}
#card-element {
    border: 1px solid #ccc;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    width: 300px; /* Adjust width as needed */
}
/* Left Panel (Tabs) - Styled like a book cover */
.left-panel {
    position: relative; /* Ensures child elements stay inside */
    width:auto; /*width: 300px; /* Fixed width */
    height: calc(100vh - 100px); /* Full height minus the top bar */
    background-color: #f0f0f0;
    border-right: 1px solid #ccc;
    overflow-y: auto; /* Allow scrolling if content overflows */
    padding-bottom: 60px; /* Ensures enough space at bottom for buttons */
    display: flex;
    flex-direction: column; /* Stack items vertically */
    justify-content: space-between; /* Push buttons to the bottom */
}

/* Buttons stay at the bottom of the left panel */
.left-panel-buttons {
    width: 95%;
    padding: 7px;
    background-color: #201f40;
    border-top: 1px solid #ccc;
    text-align: center;
    position: relative; /* Inside the left panel, NOT fixed */
}

/* Ensure buttons look good */
.left-panel-buttons button {
    margin: 5px;
    padding: 10px 16px;
    font-size: 14px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.left-panel-buttons button:hover {
    background-color: #218838;
}

/* ===============================
   FIX FREE/PRO TAB BUTTONS HEIGHT
   =============================== */

#tab-buttons {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;

    display: flex !important;
    flex-direction: column !important; /* 1 bouton par ligne (exact prod behavior) */
    gap: 4px !important;
}




#step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.step {
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 5px;
    text-align: center;
    font-weight: bold;
    color: white;
}

.step.active {
    background: #007bff;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

button:hover {
    background: #0056b3;
}


/* Tab buttons - Styled like part of a book */
#tab-buttons {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 0px;
}

#tab-buttons button {
    background: #201f40;
    color: #fff;
    border: none;
    border-left: 5px solid transparent; /* Default - no border */
    padding: 6px 10px;
    font-size: 10px;
    font-weight: bold;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px 0 0 4px; /* Rounded left to look like pages */
}

/* Tab hover and active states */
#tab-buttons button:hover,
#tab-buttons button.active {
    background: #0056b3; /* Active tab color */
    color: white;
    border-left: 5px solid #ff6600; /* Highlights selected tab */
}

/* Middle Panel Styling */
.middle-panel {
    flex: 2;
    padding: 10px;
    display: flex;
    flex-direction: column;
    background: #fffff;
    box-shadow: inset 3px 0px 5px rgba(0, 0, 0, 0.1); /* Adds depth */
    /*height: 100vh;*/ /* Full viewport height */
    overflow-y: auto; /* Add scroll if content overflows */
}

/* Middle Panel Header */
.middle-panel-header {
    display: flex;
    justify-content: flex-end; /* Align button to the right */
    margin-bottom: 5px; /* Add spacing below the header */
     font-size: 4px;
    
}
#tab-content p {
    font-size: 12px; /* Reduce the question font size */
    line-height: 1.4; /* Improve readability */
    color: #333; /* Optional: Adjust text color */
}
/* Right Panel Content (Dynamically Displayed) */
#right-panel-content {
    margin-top: 10px; /* Add spacing above the right panel content */
     font-size: 14px;
}

#right-panel-content {
  display: none; /* Controlled via JS */
}
#right-panel-content.active .gauge-item {
  visibility: visible;
}
/* Radar Chart Styling */
#radar-chart {
    max-width: 500px;  /* Reduce the width */
    max-height: 500px; /* Reduce the height */
    margin: auto;       /* Center it */
    display: block;     /* Ensure proper rendering */
}

/* Button Styling */
#generate-pdf {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#generate-pdf:hover {
    background-color: #218838;
}
/* Right Panel - Matches the Middle Panel */
.right-panel {
    flex: 1;
    padding: 20px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100vh; /* Full viewport height */
    overflow-y: auto; /* Add scroll if content overflows */
}

/* Welcome message styling */
#welcome-message {
    margin-bottom: 20px;
}

/* Score button - More professional style */
#calculate-score {
    padding: 6px 10px;
    background: #fffe;
    color: black;
    font-size: 10px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#calculate-score:hover {
    background: #218838;
}
#upgrade-button {
    padding: 6px 10px;
    background: #fffe;
    color: black;
    font-size: 10px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#upgrade-button:hover {
    background: #218838;
}

#action-plan {
    padding: 6px 10px;
    background: #fffe;
    color: black;
    font-size: 10px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#action-plan:hover {
    background: #218838;
}

/* Save-Button - More professional style */
#save-answers {
    padding: 6px 10px;
    background: #fffe;
    color: black;
    font-size: 10px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#save-answers:hover {
    background: #218838;
}

.upgrade-btn {
 padding: 6px 10px;
    background: #fffe;
    color: black;
    font-size: 10px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.upgrade-btn:hover {
   background: #218838;
}
/* Generate-pdf - More professional style */
#generate-pdf {
   padding: 6px 10px;
    background: #fffe;
    color: black;
    font-size: 10px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#generate-pdf:hover {
    background: #218838;
}
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
}

#welcome-message {
    display: none; /* Start hidden by default */
    transition: opacity 0.3s ease;
}
/* Radar chart styling */
#radar-chart {
    max-width: 90%;
    height: auto;
    margin-top: 20px;
    align-items: center;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); /* Black with opacity */
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

#report-section {
    display: none;
}

.button {
    margin-bottom: 10px; /* Adjust the space between buttons */
}

/* Error styles */
input.error {
    border-color: red;
}

.error-message {
    color: red;
    font-size: 0.875rem;
}
/* FIXED: was left-panel (invalid element selector) */
.left-panel.initial-hide {
    display: none;
}
/* Enterprise-specific override to allow JS to show buttons */
body.enterprise .left-panel-buttons {
    display: flex !important;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .container {
        width: 100%;
        padding: 10px;
    }

    .menu {
        display: block; /* Show menu button on small screens */
    }
}
/* ============================================================
   FREE + PRO UI FIX — ISOLATED FROM ENTERPRISE
   ============================================================ */

/* Left panel fixes ONLY for FREE/PRO */
body.free .left-panel,
body.pro .left-panel {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: 340px !important;
    position: relative !important;
}

/* Assessment container fixes only for FREE/PRO */
body.free #assessment-container,
body.pro #assessment-container {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Middle panel layout fix only for FREE/PRO */
body.free .middle-panel,
body.pro .middle-panel {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* ============================================================
   ENTERPRISE MODE — FIX LAYOUT WITHOUT BREAKING FREE/PRO
   ============================================================ */

/* Compense la top-bar fixée */
body.enterprise {
    padding-top: 70px !important;
}

/* Main container stays flex (left + middle panels) */
body.enterprise #assessment-container {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    box-sizing: border-box;
}

/* Left panel: visible + good width */
body.enterprise .left-panel {
    display: block !important;
    flex: 0 0 260px !important;
    max-width: 260px !important;
}

/* Domain buttons */
body.enterprise #tab-buttons {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

/* Left panel bottom buttons always visible */
body.enterprise .left-panel-buttons {
    display: flex !important;
}

/* Middle panel aligned properly */
body.enterprise .middle-panel {
    display: block !important;
    flex: 1 !important;
    padding-left: 20px;
    margin-left: 20px;
    box-sizing: border-box;
}

/* Questions visible */
body.enterprise #tab-content {
    display: block !important;
    padding-top: 10px;
}






@media screen and (max-width: 480px) {
    .button {
        font-size: 14px;
        padding: 8px;
    }
}

.payment-container {
    padding-top: 100px;
    padding-bottom: 200px;
    background-color: #fff;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
    height: calc(100vh - 100px);
}

.dashboard-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 1rem 0;
}

.chart-section {
  flex: 1;
  min-width: 300px;
  position: relative;
}
canvas {
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
}
.gauges-container {
  flex: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
}

gauge-item {
  width: 200px !important;
  height: 200px !important;
  visibility: hidden; /* Hide without affecting layout */
}


.gauge-item canvas {
  margin: 0 auto;
}

.gauge-value {
  font-size: 0.7rem;
  font-weight: bold;
  color: #2c3e50;
  margin-top: 0.5rem;
text-align: center;
}
#actionChart {
  /* Remove fixed width/height */
  width: 100% !important; 
  height: 100% !important;
overflow: visible !important
  /* Keep other styles */
  max-width: 1000px;
  margin: 20px auto;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.zoom-button {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 8px;
  font-size: 0.9rem;
}

.score-summary {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}
.setup-container {
  max-width: 400px;
  margin: 80px auto;
  background: #fff;
  padding: 35px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.setup-container input {
  width: 100%;
  padding: 10px;
  margin: 8px 0 18px 0;
}
bbutton {
  width: 100%;
  padding: 12px;
  background: #1E88E5;
  color: #fff;
  border: none;
  cursor: pointer;
}
.message {
  margin-top: 15px;
  font-size: 14px;
}


