@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Couleurs officielles Parcoursup */
    --primary: #6A2C91;
    /* Violet Parcoursup (Pantone 2617 C) */
    --primary-dark: #551f73;
    /* Violet foncé */
    --secondary: #00A3E0;
    /* Bleu Parcoursup (Pantone 299 C) */
    --accent: #E4007A;
    /* Rose/Fuchsia Parcoursup (Pantone 212 C) */
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --bg: #F5F5FE;
    /* Fond gris-violet clair Parcoursup */
    --surface: #ffffff;
    --text: #1a1a2e;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(106, 44, 145, 0.1), 0 2px 4px -1px rgba(106, 44, 145, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(106, 44, 145, 0.1), 0 10px 10px -5px rgba(106, 44, 145, 0.04);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #6A2C91 0%, #00A3E0 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    animation: fadeInDown 0.6s ease-out;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero .subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.hero .info {
    font-size: 1rem;
    opacity: 0.85;
}

/* Student Info */
.student-info {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.student-info h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

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

.form-grid input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-grid input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(106, 44, 145, 0.1);
}

/* Autosave Info */
.autosave-info {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.autosave-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

.btn-clear-autosave {
    background: transparent;
    border: 2px solid var(--danger);
    color: var(--danger);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-clear-autosave:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(248, 113, 113, 0.3);
}

/* Sections */
.section {
    background: var(--surface);
    border-radius: 16px;
    margin-bottom: 2rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.section-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header .icon {
    font-size: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-content {
    padding: 2rem;
}

/* Question Groups */
.question-group {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.question-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.question-group h3 {
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Questions */
.question {
    margin-bottom: 1.5rem;
}

.question:last-child {
    margin-bottom: 0;
}

.question-label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.radio-group label:hover,
.checkbox-group label:hover {
    background: #f0f4ff;
    border-color: var(--primary);
    transform: translateX(4px);
}

.radio-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.radio-group input[type="radio"]:checked+*,
.checkbox-group input[type="checkbox"]:checked+* {
    font-weight: 600;
}

.radio-group label:has(input:checked),
.checkbox-group label:has(input:checked) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: var(--primary);
    font-weight: 500;
}

/* Scale Group */
.scale-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.scale-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.scale-group label:hover {
    background: #f0f4ff;
    border-color: var(--primary);
    transform: scale(1.05);
}

.scale-group label:has(input:checked) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
}

.scale-group input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Competence Evaluation */
.competence-eval {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comp-category {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.comp-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 10px;
}

.comp-item label:first-child {
    font-weight: 500;
    color: var(--text);
}

/* Submit Button */
.submit-container {
    text-align: center;
    padding: 2rem;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    font-family: inherit;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }

    .hero {
        padding: 2rem 1.5rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .section-content {
        padding: 1.5rem;
    }

    .student-info {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .radio-group label,
    .checkbox-group label {
        font-size: 0.9rem;
        padding: 0.65rem 0.85rem;
    }

    .submit-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        width: 100%;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        max-width: 100%;
    }

    .section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border);
    }

    .submit-container {
        display: none;
    }
}