/* Guides Page Styles */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(26, 35, 126, 0.05) 100%);
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
    min-height: auto;
    max-height: 80vh;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="guides-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><rect x="2" y="2" width="16" height="16" fill="none" stroke="rgba(26,35,126,0.1)" stroke-width="1"/><circle cx="10" cy="10" r="2" fill="rgba(26,35,126,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23guides-pattern)"/></svg>');
    opacity: 0.3;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.breadcrumb a {
    color: var(--link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    margin: 0 8px;
    color: var(--text-secondary);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--text-primary), #1A237E);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.5;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1A237E;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Category Filters */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid #1A237E;
    color: #1A237E;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
    background: #1A237E;
    color: white;
    transform: translateY(-2px);
}

/* Guides Grid - Format amélioré avec responsive */
.guides-grid {
    display: grid;
    /* Colonnes avec taille min/max optimisée pour éviter les cartes trop minces */
    grid-template-columns: repeat(auto-fit, minmax(350px, 400px));
    gap: 30px;
    margin-top: 60px;
    /* Centrage des cartes sur la dernière ligne */
    justify-content: center;
    place-items: center;
}

/* RESPONSIVE: Mobile et tablette */
@media (max-width: 768px) {
    .guides-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
        gap: 20px;
        padding: 0 10px;
        margin-top: 40px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .guides-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}

.guide-card {
    background: linear-gradient(145deg, white, var(--surface));
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 1px 8px rgba(0, 0, 0, 0.06);
    transition: all var(--transition-medium);
    opacity: 1;
    transform: translateY(0);
    /* UNIFORMISATION: hauteur fixe pour desktop */
    height: 650px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* RESPONSIVE: Hauteurs adaptées */
@media (max-width: 768px) {
    .guide-card {
        height: auto; /* Hauteur flexible sur mobile */
        min-height: 450px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .guide-card {
        height: 580px; /* Réduite sur tablette */
    }
}

.guide-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.1);
}


.guide-cover {
    height: 180px; /* Réduit pour de meilleures proportions */
    background: linear-gradient(135deg, #1A237E, #3949AB);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0; /* Empêche la compression */
}

.guide-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cover-pattern" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23cover-pattern)"/></svg>');
}

.guide-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.guide-placeholder {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.guide-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0.9;
}

.guide-placeholder span {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
}

.guide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.guide-content {
    padding: 20px;
    flex: 1; /* Prend l'espace disponible */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden; /* Empêche le débordement */
}

.guide-title {
    font-size: 1.3rem; /* Réduit légèrement */
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.3;
    /* Limitation à 2 lignes max */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guide-description {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 13px; /* Ajusté */
    /* Limitation à 3 lignes max */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guide-topics {
    list-style: none;
    margin-bottom: 18px;
    flex-shrink: 0; /* Ne se comprime pas */
}

.guide-topics li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    color: var(--text-secondary);
    font-size: 12px; /* Réduit pour optimiser l'espace */
}

.guide-topics li i {
    color: #1A237E;
    font-size: 10px;
}

.guide-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.guide-pages, .guide-format, .guide-level {
    background: rgba(26, 35, 126, 0.1);
    color: #1A237E;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.guide-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, #1A237E, #3949AB);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-medium);
    width: 100%;
    justify-content: center;
}

.guide-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

/* Featured Guide Section */
.featured-guide {
    background: linear-gradient(135deg, #1A237E 0%, #3949AB 100%);
    color: white;
}

.featured-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.featured-label {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.featured-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.featured-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 1.1rem;
}

.featured-highlights {
    list-style: none;
    margin-bottom: 35px;
    padding-left: 0;
}

.featured-highlights li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

.featured-highlights li i {
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 4px;
    width: 14px;
    text-align: center;
}

.featured-highlights li::after {
    content: none;
}

.featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, var(--primary), #ffb366);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    transition: all var(--transition-medium);
    box-shadow: 0 6px 20px rgba(254, 163, 71, 0.4);
}

.featured-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(254, 163, 71, 0.5);
}

/* Guide 3D Visual */
.guide-3d {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.guide-cover-3d {
    width: 200px;
    height: 280px;
    background: linear-gradient(145deg, var(--primary), #ffb366);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.guide-cover-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="premium-pattern" width="15" height="15" patternUnits="userSpaceOnUse"><circle cx="7.5" cy="7.5" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23premium-pattern)"/></svg>');
}

.guide-cover-3d i {
    font-size: 4rem;
    margin-bottom: 20px;
    z-index: 2;
    position: relative;
}

.guide-cover-3d span {
    font-size: 1.2rem;
    font-weight: 700;
    z-index: 2;
    position: relative;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(26, 35, 126, 0.05) 100%);
    text-align: center;
    padding-bottom: 40px;
}

.newsletter-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.newsletter-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.email-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(26, 35, 126, 0.2);
    border-radius: 25px;
    font-size: 16px;
    transition: all var(--transition-fast);
}

.email-input:focus {
    outline: none;
    border-color: #1A237E;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.subscribe-btn {
    background: linear-gradient(45deg, #1A237E, #3949AB);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    gap: 8px;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

.newsletter-disclaimer {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.newsletter-disclaimer i {
    color: #4CAF50;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(26, 35, 126, 0.05) 100%);
    text-align: center;
    padding-top: 40px;
}

.cta-content h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.cta-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all var(--transition-medium);
}

.cta-button.primary {
    background: linear-gradient(45deg, #1A237E, #3949AB);
    color: white;
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.4);
}

.cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 35, 126, 0.5);
}

.cta-button.secondary {
    background: transparent;
    color: #1A237E;
    border: 2px solid #1A237E;
}

.cta-button.secondary:hover {
    background: #1A237E;
    color: white;
    transform: translateY(-3px);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .category-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .guides-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .featured-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .featured-title {
        font-size: 2rem;
    }
    
    .newsletter-title {
        font-size: 2rem;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 80px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .guides-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .guide-content {
        padding: 20px;
    }
    
    .featured-content {
        gap: 30px;
    }
    
    .guide-3d {
        height: 250px;
    }
    
    .guide-cover-3d {
        width: 150px;
        height: 200px;
    }
    
    .guide-cover-3d i {
        font-size: 3rem;
    }
}