/* Homepage styles for SCORM course navigation - Rise Theme */

:root {
    /* Rise theme colors */
    --ade-primary: var(--color-theme, #ff631e);
    --ade-primary-dark: #e55a1a;
    --ade-primary-light: #ff7a3d;
    --ade-success: #28a745;
    --ade-white: #ffffff;
    --ade-gray-lightest: #fafafa;
    --ade-gray-light: #f5f5f5;
    --ade-gray-medium: #e0e0e0;
    --ade-gray-dark: #666;
    --ade-text: #000;

    /* Spacing */
    --ade-space-xs: 0.5rem;
    --ade-space-sm: 1rem;
    --ade-space-md: 1.5rem;
    --ade-space-lg: 2rem;
    --ade-space-xl: 3rem;

    /* Shadows */
    --ade-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --ade-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --ade-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-body, Merriweather), serif;
    line-height: 1.6;
    color: var(--ade-text);
    overflow: auto;
}

/* Homepage container - clean white background */
.homepage-container {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: var(--ade-space-lg) 0;
    background: var(--ade-gray-lightest);
}

/* Background - subtle instead of heavy gradient */
.homepage-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.05; /* Very subtle */
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(255, 99, 30, 0.02) 0%,
        rgba(255, 99, 30, 0.05) 100%
    );
}

/* Main content card */
.homepage-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 800px;
    padding: var(--ade-space-md);
    margin: var(--ade-space-xl) auto;
}

.content-card {
    background: var(--ade-white);
    border-radius: 0;
    padding: var(--ade-space-xl);
    box-shadow: var(--ade-shadow-md);
    border: 1px solid var(--ade-gray-medium);
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Course title */
.course-title {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-family-head, Lato);
    color: var(--ade-text);
    text-align: center;
    margin-bottom: var(--ade-space-lg);
    line-height: 1.2;
}

/* Start button - orange theme */
.btn-start {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto var(--ade-space-lg);
    padding: 1rem 2rem;
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-family-head, Lato);
    color: var(--ade-white);
    background: var(--ade-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--ade-shadow-md);
}

.btn-start:hover {
    background: var(--ade-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 99, 30, 0.3);
}

.btn-start:active {
    transform: translateY(0);
    box-shadow: var(--ade-shadow-sm);
}

/* Course description */
.course-description {
    margin-bottom: var(--ade-space-lg);
    padding: var(--ade-space-md);
    background: var(--ade-gray-light);
    border-radius: 8px;
    border-left: 4px solid var(--ade-primary);
    display: block;
    min-height: 50px;
}

.course-description p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ade-gray-dark);
    margin: 0;
}

.course-description:empty::before {
    content: "Chargement de la description...";
    color: var(--ade-gray-medium);
    font-style: italic;
}

/* Lesson list */
.lesson-list {
    margin-top: var(--ade-space-xl);
}

.lesson-list-title {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-family-head, Lato);
    color: var(--ade-text);
    margin-bottom: var(--ade-space-md);
    padding-bottom: var(--ade-space-sm);
    border-bottom: 1px solid var(--ade-gray-medium);
}

.lessons {
    list-style: none;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: var(--ade-space-md);
    padding: var(--ade-space-md);
    margin-bottom: var(--ade-space-sm);
    background: var(--ade-white);
    border: 1px solid var(--ade-gray-medium);
    border-radius: 0;
    transition: all 0.2s ease;
}

.lesson-item:hover {
    border-color: var(--ade-primary);
    background: rgba(255, 99, 30, 0.02);
    transform: translateX(4px);
    box-shadow: var(--ade-shadow-sm);
}

/* Circular progress checkbox (matching sidebar) */
.lesson-checkbox {
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.lesson-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    display: block;
    width: 24px;
    height: 24px;
    border: 2px solid var(--ade-gray-medium);
    border-radius: 50%;
    background: var(--ade-white);
    transition: all 0.2s ease;
    position: relative;
}

.lesson-item:hover .checkbox-custom {
    border-color: var(--ade-primary);
}

.lesson-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--ade-primary);
    border-color: var(--ade-primary);
}

.lesson-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid var(--ade-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Lesson link */
.lesson-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--ade-space-sm);
    text-decoration: none;
    color: var(--ade-text);
    cursor: pointer;
}

.lesson-link:hover .lesson-title {
    color: var(--ade-primary);
}

.lesson-number {
    flex-shrink: 0;
    font-weight: 600;
    font-family: var(--font-family-head, Lato);
    color: var(--ade-gray-dark);
    min-width: 70px;
    font-size: 14px;
}

.lesson-title {
    font-weight: 500;
    font-family: var(--font-family-body, Merriweather);
    color: var(--ade-text);
    transition: color 0.2s ease;
    font-size: 18px;
    line-height: 1.5;
}

/* Responsive design */
@media (max-width: 768px) {
    .homepage-content {
        padding: var(--ade-space-sm);
        margin: var(--ade-space-md) auto;
    }

    .content-card {
        padding: var(--ade-space-lg);
    }

    .course-title {
        font-size: 2rem;
    }

    .btn-start {
        font-size: 1.1rem;
        padding: 0.875rem 1.5rem;
    }

    .course-description p {
        font-size: 1rem;
    }

    .lesson-list-title {
        font-size: 1.25rem;
    }

    .lesson-item {
        padding: var(--ade-space-sm);
    }

    .lesson-number {
        min-width: 60px;
        font-size: 0.9rem;
    }

    .lesson-title {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .course-title {
        font-size: 1.75rem;
    }

    .btn-start {
        max-width: 100%;
    }

    .lesson-item {
        flex-direction: row;
        gap: var(--ade-space-xs);
    }

    .lesson-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .lesson-number {
        min-width: auto;
        font-size: 0.85rem;
    }

    .lesson-title {
        font-size: 0.9rem;
    }
}

/* Print styles */
@media print {
    .homepage-background {
        display: none;
    }

    .content-card {
        box-shadow: none;
        border: 1px solid var(--ade-gray-medium);
    }

    .btn-start {
        display: none;
    }
}
