/**
 * Styles pour le module profil - Thème Bibliotheatre
 */

/* === Variables === */
:root {
    --primary-color: #ff324c;     /* Rouge */
    --secondary-color: #ff638e;   /* Rose fuchsia */
    --text-color: #000000;        /* Noir */
    --light-gray: #f9f9f9;
    --border-color: #e0e0e0;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --danger-color: #f5222d;
    --info-color: #1890ff;
}

/* === Conteneur principal === */
.bibliotheatre-profile {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--text-color);
}

/* === En-tête de profil === */
.profile-header {
    display: flex;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.profile-header-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.profile-photo {
    position: relative;
    width: 150px;
    height: 150px;
    margin-right: 30px;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-color);
}

.edit-profile-photo {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 36px;
    height: 36px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.edit-profile-photo:hover {
    background-color: var(--primary-color);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2.2rem;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 600;
}

.profile-bio {
    max-width: 700px;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.6;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.profile-meta-item {
    margin-right: 25px;
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: #555;
}

.profile-actions .edit-profile-button {
    display: inline-block;
    padding: 10px 18px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
    border: none;
}

.profile-actions .edit-profile-button:hover {
    background-color: var(--primary-color);
}

/* === Section de contenu === */
.content-section {
    margin-bottom: 50px;
    background-color: white;
    padding: 25px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
    position: relative;
}

.section-actions {
    display: flex;
    gap: 12px;
}

.view-all-btn, .add-content-btn {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.view-all-btn:hover, .add-content-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.add-content-btn {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.add-content-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* === Carrousel === */
.carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 0;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    padding: 0 0 20px;
}

.carousel::-webkit-scrollbar {
    height: 6px;
}

.carousel::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
}

.carousel::-webkit-scrollbar-track {
    background-color: #f0f0f0;
}

/* === Cartes de contenu === */
.card {
    min-width: 280px;
    width: 280px;
    background: white;
    overflow: hidden;
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Format différent selon le type de contenu */
.card-img-container {
    position: relative;
    max-height: 300px;
    overflow: hidden;
}

/* Événements en format portrait */
.event .card-img-container {
    height: 240px;  /* Format portrait */
}

/* Pas de thumbnail pour lectures et textes */
.textes .card-img-container,
.lectures .card-img-container {
    display: none;
}

.card-img {
    width: 100%;
    transition: transform 0.3s;
}

.card:hover .card-img {
    transform: scale(1.05);
}

.progress-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.2);
}

.progress-bar {
    height: 100%;
    background-color: var(--secondary-color);
}

.card-content {
    padding: 18px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.4;
}

.card-info {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 10px;
}

.card-excerpt {
    font-size: 0.9rem;
    color: #555;
    margin-top: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.reading-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8rem;
    background-color: #f0f0f0;
    font-weight: 500;
}

.status-a_lire {
    background-color: #e8f4fd;
    color: #2273c8;
}

.status-en_cours {
    background-color: #fff8e6;
    color: #e09c00;
}

.status-termine {
    background-color: #edf9ed;
    color: #2a9d2a;
}

.status-abandonne {
    background-color: #feeef0;
    color: #e42a3f;
}

.status-archive {
    background-color: #f5f5f5;
    color: #5c6b7a;
}

.rating-stars {
    display: flex;
    align-items: center;
}

/* Conflict with Ninja-forms
.star {
    width: 18px;
    height: 18px;
    display: inline-block;
    background-size: contain;
    margin-right: 3px;
}

.star-full {
    background-image: url('../img/star-full.svg');
}

.star-half {
    background-image: url('../img/star-half.svg');
}

.star-empty {
    background-image: url('../img/star-empty.svg');
}*/

/* === Grille complète === */
.full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* === Profil vide === */
.empty-profile-placeholder {
    background-color: white;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.empty-profile-content h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.empty-profile-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.empty-profile-actions .add-content-button {
    padding: 12px 22px;
    font-size: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.empty-profile-actions .add-content-button:hover {
    background-color: var(--secondary-color);
}

.empty-profile-tips {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
    background-color: var(--light-gray);
    padding: 25px;
    border: 1px solid var(--border-color);
}

.empty-profile-tips h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: 600;
}

.empty-profile-tips ul {
    padding-left: 20px;
}

.empty-profile-tips li {
    margin-bottom: 12px;
    line-height: 1.5;
}

/* === Section vide === */
.empty-section-placeholder {
    padding: 35px;
    background-color: var(--light-gray);
    text-align: center;
    border: 1px dashed var(--border-color);
}

.add-first-item {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 18px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.add-first-item:hover {
    background-color: var(--secondary-color);
}

.browse-content-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.browse-content-btn:hover {
    background-color: var(--secondary-color);
}

/* === Chargement === */
.loading {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 99, 142, 0.3);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Focus view === */
.focused-view {
    position: relative;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: var(--secondary-color);
}

.back-button svg {
    width: 16px;
    height: 16px;
}

/* === Bouton Load More === */
.fixed-load-more-container {
    position: absolute;
    bottom: -20px;
}

.fixed-load-more-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.3s;
}

.fixed-load-more-btn:hover {
    background-color: var(--secondary-color);
}

.fixed-load-more-container.hidden {
    display: none;
}

/* === Classes utilitaires === */
.hidden {
    display: none !important;
}

.transition-fade {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 768px) {
    .profile-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-photo {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .profile-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .section-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .section-actions {
        width: 100%;
        justify-content: center;
    }
    
    .full-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .empty-profile-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .full-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        min-width: auto;
    }
}