/**
 * Styles pour Volopress Librairie
 * 
 * @package Volopress_Librairie
 */

/* ============================================
   PAGE LIBRAIRIE (ARCHIVE)
   ============================================ */

.librairie-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.librairie-header {
    text-align: center;
    margin-bottom: 50px;
}

.librairie-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.librairie-description {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.librairie-filters {
    margin-top: 30px;
    text-align: center;
    margin-bottom: 30px;
}

.librairie-filters label {
    margin-right: 10px;
    font-weight: 600;
}

.langue-filter {
    padding: 8px 15px;
    border: 2px solid #3498db;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.langue-filter:hover {
    border-color: #2980b9;
    background-color: #ecf0f1;
}

/* Grille des toponeiges */
.toponeiges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 60px;
    row-gap: 60px;
    column-gap: 60px;
    margin-top: 40px;
}

/* ============================================
   CARD TOPONEIGE
   ============================================ */

.toponeige-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.toponeige-card:hover {
    transform: translateY(-5px);
}

.toponeige-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.toponeige-card__image {
    width: 100%;
    /* height: 350px; */
    overflow: hidden;
    background-color: #f8f9fa;
    /* display: flex; */
    /* align-items: center; */
    justify-content: center;
}

.toponeige-card__image img {
    max-width: 100%;
    /* height: 100%; */
    /* object-fit: cover;*/
}

.toponeige-card__content {
    padding: 1px;
    text-align: center;
}

.toponeige-card__title {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #2c3e50;
}

.toponeige-card__title span {
    font-weight: 600;
    color: #3498db;
}

.toponeige-card__auteur {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 12px;
    font-style: italic;
}

.toponeige-card__badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge-code {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-langue {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
}

.toponeige-card__description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.toponeige-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.toponeige-card__edition,
.toponeige-card__langue {
    display: inline-block;
}

.toponeige-card__langue i {
    margin-right: 5px;
}

/* ============================================
   FICHE TOPONEIGE (SINGLE)
   ============================================ */

.toponeige-single__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.toponeige-single__header {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .toponeige-single__header {
        grid-template-columns: 1fr;
    }
}

.toponeige-single__cover {
    position: relative;
    /* top: 20px;
    height: fit-content; */
    text-align: center;
}

.toponeige-single__cover img {
    width: 100%;
    max-width: 340px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 25px;
}

.toponeige-single__main-info {
    padding: 10px 0;
}

.toponeige-single__title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    float: left;
    color: #2c3e50;
}

.toponeige-single__code {
    margin-bottom: 15px;
    padding: 3px;
    margin-left: 10px;
    position: relative;
    left: 15px;
}

.badge-code-large {
    display: inline-block;
    background: #3498db;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.toponeige-single__intro {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 12px;
    padding: 7px 20px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 5px;
}

.toponeige-single__specs {
    /* background: #fff; */
    padding: 0 28px 13px;
    border-radius: 10px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

.spec-item {
    padding: 0px 0;
    border-bottom: 0px solid #ecf0f1;
    font-size: 1rem;
    line-height: 1.75;
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-item i {
    color: #3498db;
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.toponeige-single__autre-langue {
    margin-bottom: 20px;
    padding: 3px 20px;
    background: #e8f5e9;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    width: fit-content;
}

.toponeige-single__autre-langue i {
    margin-right: 8px;
    color: #4caf50;
}

.toponeige-single__autre-langue a {
    color: #2e7d32;
    font-weight: 600;
    text-decoration: none;
}

.toponeige-single__autre-langue a:hover {
    text-decoration: underline;
}

/* Sections */
.toponeige-single__section {
    margin-bottom: 15px;
}

.toponeige-single__section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

.toponeige-single__section h2 i {
    margin-right: 10px;
    color: #3498db;
}

.toponeige-single__zone,
.toponeige-single__courses {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

/* Galerie photos */
.toponeige-single__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px auto;
    justify-content: center;
    align-items: center;
    align-content: center;
    justify-items: center;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Liste PDF */
.toponeige-single__pdf-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toponeige-single__pdf-list li {
    margin-bottom: 8px;
}

.pdf-link {
    color: #2c3e50;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.pdf-link:hover {
    color: #e74c3c;
    text-decoration: underline;
}

/* Descriptif SEO */
.toponeige-single__section.toponeige-single__seo {
    padding-top: 35px;
}

.toponeige-single__seo-content {
    font-size: 1.05rem;
    line-height: 1.8;
    padding-top: 20px;
    color: #555;
    text-align: left;
    margin: 30px auto;
    border-top: 1px solid #EEE;
}

.toponeige-single__seo-content h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2c3e50;
}

.toponeige-single__seo-content ul,
.toponeige-single__seo-content ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.toponeige-single__seo-content ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

/* Message si aucun toponeige */
.no-toponeiges {
    text-align: center;
    font-size: 1.2rem;
}

/* Boutons CTA et Actions */
.toponeige-single__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

.toponeige-single__cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.toponeige-single__back {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-cta,
.btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    min-width: 220px;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-cta {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-cta:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.btn-cta--particulier {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 6px rgba(5, 150, 105, 0.2);
}

.btn-cta--particulier:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 6px 12px rgba(5, 150, 105, 0.3);
}

.btn-cta--librairie {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.2);
}

.btn-cta--librairie:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.3);
}

.btn-back {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 4px 6px rgba(107, 114, 128, 0.2);
}

.btn-back:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(107, 114, 128, 0.3);
}

/* Modals */
.toponeige-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.toponeige-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.toponeige-modal__content {
    position: relative;
    max-width: 700px;
    max-height: 90vh;
    margin: 2rem auto;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toponeige-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
    color: #374151;
}

.toponeige-modal__close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.toponeige-modal__title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    padding: 2rem 2rem 1rem;
    font-size: 1.75rem;
    color: #111827;
    border-bottom: 2px solid #e5e7eb;
}

.toponeige-modal__title i {
    color: #2563eb;
}

.toponeige-modal__body {
    padding: 2rem;
    line-height: 1.7;
}

.toponeige-modal__body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: #1f2937;
}

.toponeige-modal__body h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #374151;
}

.toponeige-modal__body p {
    margin-bottom: 1rem;
    color: #4b5563;
}

.toponeige-modal__body ul {
    margin: 0.5rem 0 1rem 1.5rem;
    list-style: disc;
}

.toponeige-modal__body li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.toponeige-modal__body a {
    font-weight: 600;
}

.toponeige-modal__body a:hover {
    text-decoration: underline;
}

/* ============================================
   PAGE COTATION TOPONEIGE
   ============================================ */

.cotation-toponeige__container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.cotation-toponeige__header {
    text-align: center;
    margin-bottom: 50px;
}

.cotation-toponeige__header h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #2c3e50;
}

.cotation-toponeige__chapo {
    background: #f8f9fa;
    padding: 25px;
    border-left: 4px solid #3498db;
    border-radius: 5px;
    margin-bottom: 40px;
    line-height: 1.8;
    color: #555;
}

.cotation-toponeige__chapo p {
    margin-bottom: 15px;
}

.cotation-toponeige__chapo p:last-child {
    margin-bottom: 0;
}

.cotation-toponeige__content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

.cotation-toponeige__content > p {
    margin-bottom: 30px;
}

.cotation-section {
    margin-bottom: 50px;
}

.cotation-section h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
}

.cotation-section > p {
    margin-bottom: 20px;
}

.cotation-section ul {
    margin: 20px 0 20px 30px;
    list-style: disc;
}

.cotation-section ul li {
    margin-bottom: 10px;
}

.cotation-item {
    background: #fff;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
}

.cotation-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 700;
}

.cotation-item p {
    margin: 0;
    line-height: 1.7;
}

.cotation-remarque {
    background: #fff3cd;
    padding: 15px 20px;
    border-left: 4px solid #ffc107;
    border-radius: 5px;
    margin: 20px 0;
    font-style: italic;
}

.cotation-link-box {
    background: #e3f2fd;
    padding: 20px;
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
}

.cotation-link-box p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: #555;
}

.cotation-link-box a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(33, 150, 243, 0.2);
}

.cotation-link-box a:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(33, 150, 243, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    
    .toponeiges-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(90px, 2fr));
        gap: 30px;
        row-gap: 20px;
    }

    .librairie-title {
        font-size: 2rem;
    }
    
    .toponeige-single__title {
        font-size: 2rem;
    }
    
    .toponeige-single__gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .toponeige-single__back {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toponeige-single__cta-buttons {
        flex-direction: column;
    }
    
    .btn-cta {
        width: fit-content;
        justify-content: center;
        margin: auto;
    }
    
    .toponeige-modal__content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .toponeige-modal__title {
        font-size: 1.5rem;
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .toponeige-modal__body {
        padding: 1.5rem;
    }
    
    .cotation-toponeige__header h1 {
        font-size: 2rem;
    }
    
    .cotation-item {
        padding: 15px;
    }
}