/* 1. VARIABLES & BASE */
:root {
    --katalog-blue: #183CB6;
    --katalog-bordeaux: #902135;
    --text-main: #1f2937;
    --text-light: #666666;
    --bg-gray: #f8f9fa;
    --katalog-white: #FFFFFF;
}

.resource-detail-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    font-family: 'Montserrat', sans-serif;
}

/* 2. GRID SYSTEM (RESPONSIVE) */
.main-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile : 1 colonne */
    gap: 30px;
    align-items: start;
}

@media (min-width: 992px) {
    .main-grid {
        grid-template-columns: 320px 1fr;
        /* Desktop : 2 colonnes */
        gap: 60px;
    }

    .sticky-wrapper {
        position: sticky;
        top: 30px;
    }

    .resource-detail-container {
        margin: 40px auto;
    }
}

/* 3. SIDEBAR STYLES */
.book-cover-container {
    display: flex;
    justify-content: center;
    perspective: 1000px;
    margin-bottom: 25px;
}

.main-cover {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 2px 6px 6px 2px;
    box-shadow: 10px 15px 30px rgba(0, 0, 0, 0.15);
    transform: rotateY(-6deg) rotateX(2deg);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.main-cover:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.03);
    box-shadow: 15px 25px 40px rgba(0, 0, 0, 0.2);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-primary,
.btn-secondary {
    padding: 16px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    transition: 0.3s ease;
    font-size: 0.85rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--katalog-bordeaux);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--katalog-bordeaux);
    border: 1px solid var(--katalog-bordeaux);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-wishlist-heart {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1.3rem;
    color: #dc3545;
    align-self: center;
}

.btn-wishlist-heart:hover {
    background: #fef2f2;
    border-color: #dc3545;
    transform: scale(1.1);
}

/* 4. CONTENT AREA STYLES */
.resource-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    /* Fluide selon l'écran */
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
    margin: 10px 0;
    letter-spacing: -1px;
}

.category-tag {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.75rem;
    font-style: italic;
    text-transform: uppercase;
}

.by-text {
    font-style: italic;
    color: var(--text-light);
    margin-right: 5px;
}

.author-link {
    text-decoration: none;
    color: var(--katalog-bordeaux);
    transition: 0.3s;
    border-bottom: 1px solid transparent;
}

.author-link:hover {
    border-bottom: 1px solid var(--katalog-bordeaux);
}

.section-title {
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #9ca3af;
    margin: 40px 0 20px 0;
    display: flex;
    align-items: center;
    text-transform: uppercase;
}

.section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #f3f4f6;
    margin-left: 20px;
}

/* TEXTE CONTINU SANS ESPACE */
.description-text {
    font-size: 1rem;
    line-height: 1.5;
    color: #374151;
    text-align: justify;
    word-spacing: -1px;
    hyphens: auto;
}

.description-text br {
    display: none;
    /* Force les phrases à se suivre */
}

/* 5. SPECS GRID RESPONSIVE */
.info-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 colonnes mobile */
    gap: 15px;
    background: var(--bg-gray);
    padding: 20px;
    border-radius: 6px;
    margin: 40px 0;
}

@media (min-width: 768px) {
    .info-specs {
        grid-template-columns: repeat(4, 1fr);
        /* 4 colonnes desktop */
    }
}

.spec-item .label {
    display: block;
    font-size: 0.65rem;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.spec-item .value {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.9rem;
}

.signature-id {
    font-size: 0.7rem;
    color: #ccc;
    text-align: center;
    margin-top: 20px;
}