/* ========================================
   VARIABLES & RESET
======================================== */
:root {
    --primary-red: #C73E3A;
    --dark-grey: #2C2C2C;
    --light-grey: #F5F5F5;
    --white: #FFFFFF;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 6px 12px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--dark-grey);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ========================================
   HEADER
======================================== */
.header {
    background: linear-gradient(135deg, var(--dark-grey) 0%, #3d3d3d 100%);
    color: var(--white);
    text-align: center;
    padding: 40px 30px;
    position: relative;
}

.logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: logoFadeIn 0.8s ease;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white);
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
    color: var(--white);
}

/* ========================================
   BARRE DE PROGRESSION
======================================== */
.progress-bar-container {
    background: #e0e0e0;
    height: 8px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-red) 0%, #e05450 100%);
    height: 100%;
    width: 0;
    transition: width 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.progress-text {
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ========================================
   QUIZ SECTION
======================================== */
.quiz-section {
    padding: 40px 30px;
}

.instruction-box {
    background: var(--light-grey);
    border-left: 4px solid var(--primary-red);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.instruction-box p {
    font-size: 1.1rem;
    color: var(--dark-grey);
    margin-bottom: 5px;
}

.instruction-sub {
    font-size: 0.95rem !important;
    opacity: 0.8;
}

/* Catégories */
.category-section {
    margin-bottom: 35px;
}

.category-title {
    font-size: 1.3rem;
    color: var(--primary-red);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-grey);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    font-size: 1.4rem;
}

.question-item {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.question-item:hover {
    border-color: var(--primary-red);
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.time-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-red);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 45px;
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 28px;
    width: 28px;
    background-color: var(--white);
    border: 2px solid #ccc;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary-red);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    animation: checkboxPop 0.3s ease;
}

@keyframes checkboxPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.question-text {
    font-weight: 500;
    color: var(--dark-grey);
    line-height: 1.5;
    padding-right: 80px;
}

/* ========================================
   BUTTONS
======================================== */
.button-container {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-bonus {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, #a83432 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(199, 62, 58, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(199, 62, 58, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark-grey);
    border: 2px solid var(--dark-grey);
}

.btn-secondary:hover {
    background: var(--dark-grey);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-bonus {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

.btn-bonus:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* ========================================
   RESULT SECTION
======================================== */
.result-section {
    padding: 40px 30px;
}

/* Carte Profil */
.profile-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid var(--primary-red);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    animation: slideInUp 0.6s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-badge {
    margin-bottom: 20px;
}

.profile-icon {
    display: inline-block;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    font-size: 3rem;
    line-height: 100px;
    color: var(--white);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    animation: bounceIn 0.8s ease;
}

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

.profile-card h2 {
    font-size: 1.8rem;
    color: var(--dark-grey);
    margin-bottom: 15px;
}

.profile-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--dark-grey);
}

/* Temps perdu */
.time-lost-card {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a1 100%);
    border: 3px solid var(--warning);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.time-lost-card h2 {
    font-size: 1.6rem;
    color: var(--dark-grey);
    margin-bottom: 25px;
}

.time-display {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

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

.time-value {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-red);
    line-height: 1;
}

.time-label {
    display: block;
    font-size: 0.9rem;
    color: var(--dark-grey);
    margin-top: 5px;
}

.shock-message {
    padding: 20px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 20px;
}

.shock-message.danger {
    background: #f8d7da;
    color: var(--danger);
    border: 2px solid var(--danger);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.shock-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 2px solid var(--warning);
}

.shock-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 2px solid #17a2b8;
}

/* Graphique */
.chart-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.chart-card h2 {
    font-size: 1.6rem;
    color: var(--dark-grey);
    margin-bottom: 20px;
    text-align: center;
}

/* Score global */
.result-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.result-card h2 {
    font-size: 1.8rem;
    color: var(--dark-grey);
    margin-bottom: 20px;
}

.score-display {
    margin: 30px 0;
}

.score-number {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary-red);
}

.score-total {
    font-size: 2.5rem;
    color: var(--dark-grey);
    opacity: 0.6;
}

.score-message {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 20px 0;
    padding: 15px;
    border-radius: 10px;
}

.score-message.excellent {
    background: #d4edda;
    color: var(--success);
    border: 2px solid var(--success);
}

.score-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 2px solid var(--warning);
}

.score-message.danger {
    background: #f8d7da;
    color: var(--danger);
    border: 2px solid var(--danger);
}

.diagnostic-box {
    background: var(--light-grey);
    border-left: 4px solid var(--primary-red);
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    text-align: left;
}

.diagnostic-box p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark-grey);
}

/* 3 ACTIONS PRIORITAIRES */
.priority-actions-card {
    background: linear-gradient(135deg, var(--primary-red) 0%, #a83432 100%);
    color: var(--white);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(199, 62, 58, 0.3);
}

.priority-actions-card h2 {
    font-size: 1.6rem;
    margin-bottom: 25px;
    text-align: center;
}

.priority-action-item {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s ease;
}

.priority-action-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(5px);
}

.priority-number {
    background: var(--white);
    color: var(--primary-red);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.priority-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Capsule pédagogique */
.pedagogy-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196F3;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
}

.pedagogy-card h3 {
    color: #1976D2;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.pedagogy-card p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark-grey);
}

/* Routine idéale */
.routine-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.routine-card h2 {
    font-size: 1.6rem;
    color: var(--dark-grey);
    margin-bottom: 20px;
    text-align: center;
}

.routine-timeline {
    background: var(--light-grey);
    border-radius: 10px;
    padding: 20px;
}

.routine-slot {
    padding: 15px;
    margin-bottom: 10px;
    background: var(--white);
    border-left: 4px solid var(--primary-red);
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.routine-slot:last-child {
    margin-bottom: 0;
}

.routine-note {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid var(--warning);
    border-radius: 6px;
    font-size: 1rem;
}

/* Plan d'action */
.action-plan {
    background: var(--white);
    border: 3px solid var(--primary-red);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.action-plan h2 {
    font-size: 1.8rem;
    color: var(--dark-grey);
    margin-bottom: 20px;
    text-align: center;
}

.action-category {
    margin-bottom: 25px;
}

.action-category h3 {
    color: var(--primary-red);
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-list {
    background: var(--light-grey);
    border-radius: 10px;
    padding: 20px;
}

.action-list ul {
    list-style: none;
    padding-left: 0;
}

.action-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px solid #ddd;
}

.action-list li:last-child {
    border-bottom: none;
}

.action-list li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--primary-red);
    font-weight: bold;
}

.priority-box {
    background: linear-gradient(135deg, var(--primary-red) 0%, #a83432 100%);
    color: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Bonus */
.bonus-card {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 3px solid var(--success);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.bonus-card h2 {
    font-size: 1.6rem;
    color: var(--dark-grey);
    margin-bottom: 15px;
    text-align: center;
}

.bonus-card p {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1rem;
}

.bonus-tagline {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-red);
    font-style: italic;
    margin-top: 15px;
    margin-bottom: 10px;
}

.bonus-list {
    margin-bottom: 10px;
}

.bonus-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 10px;
}

.bonus-item i {
    color: var(--success);
    font-size: 1.5rem;
}

/* Tracker */
.tracker-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.tracker-card h2 {
    font-size: 1.6rem;
    color: var(--dark-grey);
    margin-bottom: 20px;
    text-align: center;
}

.progress-positive,
.progress-negative,
.progress-stable {
    padding: 20px;
    border-radius: 10px;
}

.progress-positive {
    background: #d4edda;
    border: 2px solid var(--success);
}

.progress-negative {
    background: #f8d7da;
    border: 2px solid var(--danger);
}

.progress-stable {
    background: #d1ecf1;
    border: 2px solid #17a2b8;
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--success);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--dark-grey);
}

/* ========================================
   FOOTER
======================================== */
.footer {
    background: var(--dark-grey);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
}

.footer p {
    margin: 8px 0;
    font-size: 0.95rem;
}

.footer a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #e05450;
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .quiz-section,
    .result-section {
        padding: 20px 15px;
    }

    .question-item {
        padding: 15px;
    }

    .question-text {
        padding-right: 70px;
        font-size: 0.95rem;
    }

    .time-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .score-number {
        font-size: 3.5rem;
    }

    .score-total {
        font-size: 2rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 30px;
        font-size: 1rem;
        width: 100%;
    }

    .button-container {
        flex-direction: column;
    }

    .time-display {
        flex-direction: column;
    }

    .profile-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
        line-height: 80px;
    }

    .priority-action-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .chart-card canvas {
        height: 250px !important;
    }
}

@media print {
    body {
        background: white;
    }

    .btn-primary,
    .btn-secondary,
    .btn-bonus {
        display: none;
    }

    .container {
        box-shadow: none;
    }

    .progress-bar-container {
        display: none;
    }
}