/* =====================================================
   CSS pour la page Livres à la vente - Division Zeitung
   Version corrigée avec fix menu dropdown et responsive optimisé
   ===================================================== */

/* =====================================================
   FIX MENU DROPDOWN (Intégré)
   ===================================================== */

nav {
    position: relative !important;
    z-index: 1000 !important;
}

.nav-dropdown {
    position: relative !important;
    z-index: 1001 !important;
}

.nav-dropdown-content {
    position: absolute !important;
    z-index: 10000 !important;
}

.nav-dropdown-content.open {
    z-index: 10000 !important;
}

.page,
.page.active,
main,
.container {
    position: relative;
    z-index: 1;
}

/* =====================================================
   EN-TÊTE DE PAGE
   ===================================================== */

.page-header {
    background: linear-gradient(135deg, #fbfdf9, #f5f3ef);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    border: 2px solid var(--sand);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.page-header h2 {
    margin: 0 0 16px 0;
    color: var(--warm);
    font-size: 2rem;
}

.page-header p {
    margin: 8px 0;
    color: var(--muted);
    line-height: 1.6;
}

/* =====================================================
   CONTAINER POUR CHAQUE LIVRE
   ===================================================== */

.livre-item {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin: 32px 0;
    border: 2px solid var(--sand);
    display: flex;
    gap: 32px;
    align-items: flex-start;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Barre accent à gauche */
.livre-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--accent), var(--accent-light));
}

/* Effet hover */
.livre-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(184, 134, 11, 0.2);
    border-color: var(--accent);
}

/* =====================================================
   IMAGE DE COUVERTURE DU LIVRE
   ===================================================== */

.livre-image {
    width: 220px;
    height: 300px;
    background: #f0f0f0;
    border-radius: 12px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--sand);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Badge "Nouveau" sur la couverture */
.livre-image::after {
    content: 'Disponible';
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Effet hover sur l'image */
.livre-item:hover .livre-image {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

/* Livre bientôt disponible */
.livre-item.coming-soon {
    opacity: 0.8;
}

.livre-item.coming-soon .livre-image::after {
    content: 'Bientôt';
    background: #ff9800;
}

.livre-item.coming-soon .cta {
    background: #ff9800;
    cursor: not-allowed;
    pointer-events: none;
}

/* =====================================================
   CONTENU TEXTUEL DU LIVRE
   ===================================================== */

.livre-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.livre-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    color: var(--warm);
    line-height: 1.3;
}

/* =====================================================
   BLOC DE DESCRIPTION
   ===================================================== */

.livre-description {
    background: linear-gradient(135deg, #fbfdf9, #f9f9f9);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--accent);
    margin: 12px 0;
}

.livre-description strong {
    color: var(--warm);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 12px;
}

.livre-description p {
    color: var(--muted);
    line-height: 1.7;
    margin: 8px 0;
}

/* =====================================================
   LISTE DES SPÉCIFICATIONS
   ===================================================== */

.livre-specs {
    margin: 12px 0 0 0;
    padding-left: 24px;
    list-style: none;
}

.livre-specs li {
    color: var(--muted);
    margin: 8px 0;
    padding-left: 28px;
    position: relative;
    line-height: 1.6;
}

/* Icône check personnalisée */
.livre-specs li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
    font-size: 1.2rem;
}

/* =====================================================
   SECTION D'ACHAT
   ===================================================== */

.livre-achat {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

/* Prix du livre */
.livre-prix {
    font-weight: 800;
    color: var(--accent);
    font-size: 2rem;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.livre-prix::after {
    content: 'TTC';
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
}

/* Bouton d'achat */
.livre-achat .cta {
    flex: 1;
    text-align: center;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
}

/* =====================================================
   CARD D'INFORMATIONS DE LIVRAISON
   ===================================================== */

.livraison-info {
    margin-top: 50px;
    background: linear-gradient(135deg, #fff9e6, #fffbf0);
    border: 3px solid var(--accent);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.livraison-info h3 {
    color: var(--warm);
    font-size: 1.6rem;
    margin: 0 0 20px 0;
}

.livraison-info p.small {
    font-size: 1rem;
    line-height: 2;
    margin: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.livraison-info a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.livraison-info a:hover {
    color: var(--accent-light);
}

/* =====================================================
   ÉTATS SPÉCIAUX
   ===================================================== */

/* Livre en rupture de stock */
.livre-item.out-of-stock {
    opacity: 0.7;
}

.livre-item.out-of-stock .livre-image::after {
    content: 'Épuisé';
    background: #999;
}

.livre-item.out-of-stock .cta {
    background: #999;
    cursor: not-allowed;
    pointer-events: none;
}

/* Livre en précommande */
.livre-item.preorder .livre-image::after {
    content: 'Précommande';
    background: #2c5f2d;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

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

.livre-item {
    animation: fadeInUp 0.6s ease-out;
}

.livre-item:nth-child(1) { animation-delay: 0.1s; }
.livre-item:nth-child(2) { animation-delay: 0.2s; }
.livre-item:nth-child(3) { animation-delay: 0.3s; }
.livre-item:nth-child(4) { animation-delay: 0.4s; }

/* =====================================================
   RESPONSIVE DESIGN - OPTIMISÉ
   ===================================================== */

/* Tablettes larges (iPad Pro landscape) */
@media (max-width: 1024px) {
    .livre-item {
        padding: 28px;
        gap: 24px;
    }

    .livre-image {
        width: 180px;
        height: 245px;
    }

    .livre-content h3 {
        font-size: 1.5rem;
    }

    .livre-prix {
        font-size: 1.8rem;
    }
}

/* Tablettes (iPad portrait) */
@media (max-width: 768px) {
    .page-header {
        padding: 30px 24px;
    }

    .page-header h2 {
        font-size: 1.6rem;
    }

    .livre-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }

    .livre-image {
        width: 200px;
        height: 272px;
        margin: 0 auto;
    }

    .livre-content h3 {
        font-size: 1.4rem;
    }

    .livre-description {
        padding: 18px;
    }

    .livre-achat {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }

    .livre-achat .cta {
        width: 100%;
    }

    .livre-prix {
        font-size: 2rem;
    }

    .livraison-info {
        padding: 28px 20px;
    }

    .livraison-info h3 {
        font-size: 1.4rem;
    }

    .livraison-info p.small {
        font-size: 0.95rem;
        flex-direction: column;
        gap: 8px;
    }
}

/* Smartphones */
@media (max-width: 600px) {
    .page-header {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .page-header h2 {
        font-size: 1.4rem;
    }

    .livre-item {
        padding: 20px;
        margin: 20px 0;
        border-radius: 12px;
    }

    .livre-item::before {
        width: 4px;
    }

    .livre-image {
        width: 160px;
        height: 218px;
    }

    .livre-image::after {
        font-size: 11px;
        padding: 5px 10px;
    }

    .livre-content h3 {
        font-size: 1.2rem;
    }

    .livre-description {
        padding: 16px;
        border-radius: 8px;
    }

    .livre-description strong {
        font-size: 1rem;
    }

    .livre-description p {
        font-size: 0.9rem;
    }

    .livre-specs {
        padding-left: 20px;
    }

    .livre-specs li {
        font-size: 0.9rem;
        padding-left: 24px;
    }

    .livre-specs li::before {
        font-size: 1rem;
    }

    .livre-prix {
        font-size: 1.6rem;
    }

    .livre-achat .cta {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .livraison-info {
        padding: 24px 16px;
        border-radius: 12px;
    }

    .livraison-info h3 {
        font-size: 1.2rem;
    }

    .livraison-info p.small {
        font-size: 0.85rem;
        line-height: 1.8;
    }
}

/* Très petits smartphones */
@media (max-width: 480px) {
    .page-header {
        padding: 20px 16px;
    }

    .page-header h2 {
        font-size: 1.2rem;
    }

    .livre-item {
        padding: 16px;
    }

    .livre-image {
        width: 140px;
        height: 191px;
    }

    .livre-content h3 {
        font-size: 1.1rem;
    }

    .livre-description {
        padding: 14px;
    }

    .livre-description strong {
        font-size: 0.95rem;
    }

    .livre-description p {
        font-size: 0.85rem;
    }

    .livre-specs li {
        font-size: 0.85rem;
    }

    .livre-prix {
        font-size: 1.4rem;
    }

    .livre-achat .cta {
        font-size: 0.95rem;
        padding: 12px 16px;
    }

    .livraison-info {
        padding: 20px 12px;
    }

    .livraison-info h3 {
        font-size: 1.1rem;
    }

    .livraison-info p.small {
        font-size: 0.8rem;
    }
}

/* Très très petits écrans (iPhone SE, anciens Android) */
@media (max-width: 360px) {
    .livre-item {
        padding: 12px;
    }

    .livre-image {
        width: 120px;
        height: 164px;
    }

    .livre-content h3 {
        font-size: 1rem;
    }

    .livre-description {
        padding: 12px;
    }

    .livre-prix {
        font-size: 1.3rem;
    }

    .livre-achat {
        gap: 12px;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .livre-item {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .livre-item::before {
        display: none;
    }

    .livre-achat .cta {
        display: none;
    }

    .livraison-info {
        border: 1px solid #ccc;
        background: white;
    }
}

/* =====================================================
   ACCESSIBILITÉ
   ===================================================== */

/* Focus visible pour navigation clavier */
.livre-achat .cta:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Amélioration contraste pour malvoyants */
@media (prefers-contrast: high) {
    .livre-item {
        border-width: 3px;
    }

    .livre-description {
        border-left-width: 6px;
    }
}

/* Réduction animations pour motion sensitivity */
@media (prefers-reduced-motion: reduce) {
    .livre-item,
    .livre-image,
    .cta {
        animation: none;
        transition: none;
    }

    .livre-item:hover {
        transform: none;
    }
}

/* =====================================================
   FIN DU FICHIER
   ===================================================== */
