﻿/* Font Face - Kabel */
@font-face {
    font-family: 'Kabel';
    src: url('fonts/itc-kabel_demi-bold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #FAF8EC;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(23, 196, 225, 0.2);
}

.logo-image {
    height: 50px;
    width: auto;
    display: block;
}

.language-switcher {
    display: flex;
    align-items: center;
}

.language-select-wrapper {
    position: relative;
    display: inline-block;
}

.language-select-hidden {
    display: none;
}

/* Dropdown personnalisé */
.language-select-custom {
    position: relative;
    min-width: 150px;
}

.language-select-selected {
    background-color: white;
    border: 2px solid rgba(23, 196, 225, 0.3);
    border-radius: 6px;
    padding: 8px 35px 8px 12px;
    font-size: 14px;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-select-selected:hover {
    border-color: #17C4E1;
    box-shadow: 0 2px 4px rgba(23, 196, 225, 0.2);
}

.language-select-custom.active .language-select-selected {
    border-color: #17C4E1;
    box-shadow: 0 0 0 3px rgba(23, 196, 225, 0.1);
}

.language-flag-selected {
    width: 20px;
    height: 15px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.language-text-selected {
    flex: 1;
}

.language-arrow {
    font-size: 10px;
    color: #17C4E1;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.language-select-custom.active .language-arrow {
    transform: rotate(180deg);
}

.language-select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background-color: white;
    border: 2px solid rgba(23, 196, 225, 0.3);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.language-select-custom.active .language-select-dropdown {
    max-height: 300px;
    opacity: 1;
}

.language-option {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
}

.language-option:hover {
    background-color: rgba(23, 196, 225, 0.1);
}

.language-option-flag {
    width: 20px;
    height: 15px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.language-option-text {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
}

/* Main Content */
.main-content {
    flex: 1;
}

.view {
    animation: fadeIn 0.3s ease;
}

.view.hidden {
    display: none;
}

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

.page-title {
    font-size: 32px;
    margin-bottom: 16px;
    color: #2c3e50;
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumb-link {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #17C4E1;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumb-current {
    color: #666;
}

/* Categories Container */
.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.category-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(23, 196, 225, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(23, 196, 225, 0.2);
}

.category-title {
    font-family: 'Kabel', sans-serif;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 15%;
    height: 2px;
    background-color: rgba(23, 196, 225, 0.3);
}

.category-questions {
    list-style: none;
    margin-bottom: 16px;
}

.category-question-item {
    border-bottom: 1px solid rgba(23, 196, 225, 0.15);
}

.category-question-item:last-child {
    border-bottom: none;
}

.category-question-link {
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.category-question-link:hover {
    color: #17C4E1;
}

.view-all-button {
    display: inline-block;
    align-self: flex-start;
    padding: 10px 20px;
    background-color: #17C4E1;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    margin-top: auto;
}

.view-all-button:hover {
    background-color: #14B0C9;
}

/* Category Layout */
.category-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

.category-main {
    min-width: 0;
}

/* Questions List */
.questions-list {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(23, 196, 225, 0.1);
}

.question-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(23, 196, 225, 0.15);
}

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

.question-link {
    color: #2c3e50;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    margin-bottom: 8px;
}

.question-link:hover {
    color: #17C4E1;
}

.question-preview {
    color: #888;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 8px;
    max-height: calc(1.6em * 3);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Question Layout */
.question-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

.question-main {
    min-width: 0; /* Permet au contenu de se rétrécir si nécessaire */
}

/* Question Content */
.question-content {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(23, 196, 225, 0.1);
    line-height: 1.8;
    font-size: 16px;
    color: #444;
}

.question-content p {
    margin-bottom: 15px;
}

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

.question-content ul,
.question-content ol {
    margin: 0 0 15px 24px;
}

.question-content li {
    margin-bottom: 8px;
}

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

.question-content .answer-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.question-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.back-to-category {
    text-align: left;
}

.back-to-category-link {
    display: inline-block;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.25s ease;
}

.back-to-category-link::before {
    content: "<";
    margin-right: 8px;
    font-weight: 700;
}

.back-to-category-top {
    display: none;
    margin-bottom: 16px;
}

.back-to-category-top .back-to-category-link {
    padding: 6px 12px;
    background-color: transparent;
    border: 1px solid rgba(23, 196, 225, 0.25);
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
}

.back-to-category-top .back-to-category-link:hover {
    background-color: rgba(23, 196, 225, 0.08);
    border-color: rgba(23, 196, 225, 0.45);
    color: #17C4E1;
}

.back-to-category-bottom {
    display: block;
    margin-top: 30px;
    text-align: center;
}

.back-to-category-bottom .back-to-category-link {
    padding: 10px 18px;
    background-color: #17C4E1;
    border: 2px solid #17C4E1;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.back-to-category-bottom .back-to-category-link:hover {
    background-color: #14B0C9;
    border-color: #14B0C9;
    color: white;
}

/* Categories Sidebar */
.categories-sidebar {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(23, 196, 225, 0.1);
    position: sticky;
    top: 20px;
}

.sidebar-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: #2c3e50;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(23, 196, 225, 0.2);
}

.sidebar-categories {
    list-style: none;
}

.sidebar-category-item {
    margin-bottom: 12px;
}

.sidebar-category-link {
    color: #2c3e50;
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 8px 0;
    transition: color 0.3s ease;
    border-left: 3px solid transparent;
    padding-left: 10px;
}

.sidebar-category-link:hover {
    color: #17C4E1;
    border-left-color: #17C4E1;
}

.sidebar-category-link.active {
    color: #17C4E1;
    font-weight: 500;
    border-left-color: #17C4E1;
}

/* Skeleton Loading */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: #eaf2f7;
    border-radius: 6px;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120px;
    width: 120px;
    height: 100%;
    background: linear-gradient(90deg, rgba(234, 242, 247, 0), rgba(255, 255, 255, 0.85), rgba(234, 242, 247, 0));
    animation: skeletonShimmer 1.2s infinite;
}

@keyframes skeletonShimmer {
    to {
        left: 100%;
    }
}

.skeleton-card {
    pointer-events: none;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 20px;
}

.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.skeleton-line {
    height: 12px;
    width: 100%;
}

.skeleton-line-lg {
    width: 75%;
    height: 18px;
    margin-bottom: 12px;
}

.skeleton-line-md {
    width: 88%;
}

.skeleton-line-sm {
    width: 80%;
}

.skeleton-line-full {
    width: 100%;
}

.skeleton-button {
    width: 120px;
    height: 40px;
    margin-top: auto;
}

.skeleton-page-title {
    display: block;
    width: min(420px, 85%);
    height: 38px;
}

.skeleton-breadcrumb-link {
    display: inline-block;
    width: 120px;
    height: 14px;
    vertical-align: middle;
}

.skeleton-breadcrumb-current {
    display: inline-block;
    width: 180px;
    height: 14px;
    vertical-align: middle;
}

.question-item-skeleton {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(23, 196, 225, 0.15);
}

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

.question-answer-skeleton {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Footer */
.footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid rgba(23, 196, 225, 0.2);
    text-align: center;
    color: #666;
    font-size: 12px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .question-layout,
    .category-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .categories-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .language-switcher {
        margin-left: auto;
        width: auto;
        justify-content: flex-end;
    }

    .page-title {
        font-size: 24px;
    }

    .categories-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .category-card {
        padding: 20px;
    }

    .question-content {
        padding: 25px;
    }

    .categories-sidebar {
        padding: 20px;
    }

    .breadcrumb {
        font-size: 12px;
    }

    .back-to-category-top {
        display: block;
    }

    .back-to-category-bottom {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 35px;
    }

    .language-select {
        font-size: 12px;
        padding: 6px 30px 6px 10px;
        min-width: 120px;
    }

    .page-title {
        font-size: 20px;
    }

    .category-title {
        font-size: 18px;
    }

    .question-content {
        padding: 20px;
        font-size: 14px;
    }
}



