/* ============================================
   DISC Styles - Complete Stylesheet
   ============================================ */

:root {
    --disc-d: #E74C3C;
    --disc-i: #F1C40F;
    --disc-s: #2ECC71;
    --disc-c: #3498DB;
    --disc-d-light: #FADBD8;
    --disc-i-light: #FEF9E7;
    --disc-s-light: #D5F5E3;
    --disc-c-light: #D6EAF8;
    --fm-esthetique: #E67E22;
    --fm-economique: #F39C12;
    --fm-individualiste: #E74C3C;
    --fm-politique: #9B59B6;
    --fm-altruiste: #1ABC9C;
    --fm-traditionaliste: #34495E;
    --fm-theorique: #2980B9;
    --bg: #F8F9FA;
    --card-bg: #FFFFFF;
    --text: #2C3E50;
    --text-light: #7F8C8D;
    --border: #E0E0E0;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ============ BUTTONS ============ */
.btn-primary {
    background: linear-gradient(135deg, var(--disc-d), #C0392B);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(231,76,60,0.4); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
    background: white;
    color: var(--text);
    border: 2px solid var(--border);
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-secondary:hover { border-color: var(--disc-c); color: var(--disc-c); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-large { padding: 16px 40px; font-size: 18px; }

/* ============ LANDING PAGE ============ */
.landing-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.landing-header {
    text-align: center;
    margin-bottom: 50px;
}

.disc-wheel-landing {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.landing-header h1 {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--disc-d), var(--disc-i), var(--disc-s), var(--disc-c));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.landing-header h2 {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-light);
    font-size: 15px;
}

.landing-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.info-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}
.info-card:hover { transform: translateY(-4px); }

.info-icon { font-size: 36px; margin-bottom: 12px; }
.info-card h3 { font-size: 16px; margin-bottom: 8px; }
.info-card p { font-size: 13px; color: var(--text-light); }

.landing-form {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
    text-align: center;
}

.landing-form h3 {
    font-size: 20px;
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-light);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    outline: none;
}
.form-group input:focus { border-color: var(--disc-c); }

.duration-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-light);
}

/* ============ QUIZ ============ */
.quiz-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 30px 20px;
}

.quiz-header { margin-bottom: 24px; }

.progress-section { margin-bottom: 8px; }

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--disc-c), var(--disc-s), var(--disc-i), var(--disc-d));
    border-radius: 4px;
    transition: width 0.4s ease;
    width: 0%;
}

.quiz-instructions {
    background: var(--disc-c-light);
    border-left: 4px solid var(--disc-c);
    padding: 14px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 28px;
    font-size: 14px;
}

/* DISC Question Card */
.disc-question-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.disc-question-card h3 {
    font-size: 18px;
    margin-bottom: 24px;
    text-align: center;
    color: var(--text);
}

.disc-options-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.disc-options-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    padding: 8px 12px;
    text-align: center;
    font-weight: 600;
}

.disc-options-table th:first-child { text-align: left; }

.disc-options-table td {
    padding: 14px 12px;
    text-align: center;
    vertical-align: middle;
}

.disc-options-table tr.option-row {
    background: var(--bg);
    border-radius: 8px;
    transition: background 0.2s;
}

.disc-options-table tr.option-row:hover { background: #EDF2F7; }

.disc-options-table tr.option-row td:first-child {
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px 0 0 8px;
}

.disc-options-table tr.option-row td:last-child {
    border-radius: 0 8px 8px 0;
}

.radio-btn {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--disc-d);
}

.radio-btn.most { accent-color: var(--disc-s); }
.radio-btn.least { accent-color: var(--disc-d); }

.option-row.selected-most { background: var(--disc-s-light) !important; }
.option-row.selected-least { background: var(--disc-d-light) !important; }

/* FM Question */
.fm-question-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.fm-question-card .fm-statement {
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 500;
}

.likert-scale {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.likert-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.likert-option input { display: none; }

.likert-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-light);
    transition: all 0.2s;
}

.likert-option:hover .likert-circle {
    border-color: var(--disc-c);
    color: var(--disc-c);
}

.likert-option input:checked + .likert-circle {
    background: var(--disc-c);
    border-color: var(--disc-c);
    color: white;
}

.likert-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-light);
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
}

/* ============ LOADING ============ */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--border);
    border-top-color: var(--disc-d);
    border-right-color: var(--disc-i);
    border-bottom-color: var(--disc-s);
    border-left-color: var(--disc-c);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============ RESULTS ============ */
.results-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.results-header {
    text-align: center;
    margin-bottom: 40px;
}
.results-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}
.results-header p {
    color: var(--text-light);
    font-size: 15px;
}

/* Dominant Banner */
.dominant-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    border-radius: var(--radius);
    margin-bottom: 40px;
    color: white;
}

.dominant-color-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.5);
    flex-shrink: 0;
}

.dominant-info h2 { font-size: 26px; }
.dominant-info p { opacity: 0.9; font-size: 15px; }

.results-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.graphs-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

.graph-card {
    text-align: center;
}
.graph-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-light);
}

/* Color Bars */
.color-bars-container { display: flex; flex-direction: column; gap: 20px; }

.color-bar-row h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-light);
}

.color-bar-items { display: flex; gap: 16px; flex-wrap: wrap; }

.color-bar-item {
    flex: 1;
    min-width: 120px;
}

.color-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.color-bar-track {
    height: 24px;
    background: var(--bg);
    border-radius: 12px;
    overflow: hidden;
}

.color-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 1s ease;
}

/* Description Card */
.description-card {
    font-size: 15px;
    line-height: 1.8;
}
.description-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--disc-d);
}
.description-card ul {
    margin: 12px 0;
    padding-left: 24px;
}
.description-card li { margin-bottom: 6px; }
.description-card p { margin-bottom: 12px; }

/* Word Map Table */
.word-map-table {
    overflow-x: auto;
}

.word-map-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.word-map-table th {
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    color: white;
    font-size: 12px;
}

.word-map-table th.col-d { background: var(--disc-d); }
.word-map-table th.col-i { background: var(--disc-i); color: var(--text); }
.word-map-table th.col-s { background: var(--disc-s); }
.word-map-table th.col-c { background: var(--disc-c); }
.word-map-table th.col-level { background: #95A5A6; }

.word-map-table td {
    padding: 8px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.word-map-table tr.highlighted-row { background: #FFF3CD; font-weight: 600; }

/* Tendencies Table */
.tendencies-table table {
    width: 100%;
    border-collapse: collapse;
}

.tendencies-table th {
    background: var(--text);
    color: white;
    padding: 12px;
    font-size: 13px;
    text-align: left;
}

.tendencies-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.tendencies-table tr:nth-child(even) { background: var(--bg); }

.tendency-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Communication Tips */
.comm-tips-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.comm-card {
    padding: 24px;
    border-radius: 8px;
}

.comm-do {
    background: var(--disc-s-light);
    border-left: 4px solid var(--disc-s);
}

.comm-dont {
    background: var(--disc-d-light);
    border-left: 4px solid var(--disc-d);
}

.comm-card h3 {
    font-size: 15px;
    margin-bottom: 12px;
}

.comm-card ul {
    padding-left: 20px;
    font-size: 14px;
}
.comm-card li { margin-bottom: 6px; }

/* Forces Motrices Details */
.fm-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.fm-detail-card {
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid;
}

.fm-detail-card h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

.fm-detail-card .fm-score {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.fm-detail-card .fm-rank {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.fm-detail-card p {
    font-size: 13px;
    line-height: 1.5;
}

/* Download Section */
.download-section {
    text-align: center;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .landing-info { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .graphs-row { grid-template-columns: 1fr; }
    .comm-tips-grid { grid-template-columns: 1fr; }
    .fm-details-grid { grid-template-columns: 1fr; }
    .landing-header h1 { font-size: 28px; }
    .landing-form { padding: 24px; }
    .disc-question-card { padding: 20px; }
}
