/**
 * Styles pour les Livres Blancs - Design pixel-perfect avec Popup
 * Couleurs : Crème (#FAF7F4), Orange (#FE5E1F), Noir (#1A1A1A)
 */

/* Reset et styles globaux avec préfixe lb- pour éviter les conflits */
.lb-hero-section *,
.lb-resources-section *,
.lb-popup-overlay * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Police système moderne */
.lb-hero-section,
.lb-resources-section,
.lb-popup-overlay {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.lb-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   SECTION HERO - Design exact de la maquette
   ======================================== */

.lb-hero-section {
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #FAF7F4 0%, #FFF9F5 100%);
    position: relative;
    overflow: hidden;
}

.lb-hero-content {
    display: flex;
    flex-direction: column;
    gap: 80px;
    align-items: center;
}

/* Texte Hero - Partie gauche */
.lb-hero-text {
    display: flex;
    width: auto;
    gap: 20px;
}

.lb-hero-title {
    font-size: 2.5rem !important;
    font-weight: 600;
    line-height: 1.1;
    color: #1A1A1A;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.lb-hero-title .lb-highlight {
    color: #FE5E1F;
    font-weight: 600;
}

.lb-hero-description {
    font-size: 16px;
    line-height: 1.7;
    color: #666666;
    max-width: 450px;
    align-content: flex-end;
}

/* Partie droite avec les cartes */
.lb-hero-right {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 60px;
}

/* Carte principale avec guide */
.lb-hero-main-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 40px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lb-hero-main-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

/* Visual du guide 2025 */
.lb-guide-visual {
    position: relative;
    width: 140px;
    height: 180px;
    flex-shrink: 0;
}

.lb-guide-cover {
    position: absolute;
    width: 120px;
    height: 160px;
    background: white;
    border: 3px solid #FE5E1F;
    border-radius: 8px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.lb-guide-header {
    font-size: 14px;
    font-weight: 700;
    color: #FE5E1F;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.lb-guide-year {
    font-size: 32px;
    font-weight: 700;
    color: #FE5E1F;
    margin-bottom: 8px;
}

.lb-guide-subtitle {
    font-size: 10px;
    color: #999;
    text-align: center;
    line-height: 1.3;
}

/* Pages en arrière-plan */
.lb-guide-pages {
    position: absolute;
    width: 100%;
    height: 100%;
}

.lb-page-back {
    position: absolute;
    width: 110px;
    height: 150px;
    background: #f5f5f5;
    border-radius: 6px;
    top: 20px;
    left: 15px;
    z-index: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.lb-page-middle {
    position: absolute;
    width: 115px;
    height: 155px;
    background: #fafafa;
    border-radius: 7px;
    top: 10px;
    left: 10px;
    z-index: 2;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.07);
}

/* Contenu de la carte principale */
.lb-hero-card-content {
    flex: 1;
}

.lb-hero-card-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 12px;
    line-height: 1.3;
}

.lb-hero-card-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Carte secondaire noire */
.lb-hero-secondary-card {
    background: linear-gradient(135deg, #1A1A1A 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 30px 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lb-hero-secondary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.lb-hero-secondary-card h3 {
    font-size: 22px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    line-height: 1.3;
}

.lb-hero-secondary-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Boutons */
.lb-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.lb-btn-primary {
    background: #FE5E1F;
    color: white;
}

.lb-btn-primary:hover {
    background: #e54d0f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 94, 31, 0.3);
}

.lb-btn-secondary {
    background: #FE5E1F;
    color: white;
}

.lb-btn-secondary:hover {
    background: #e54d0f;
    transform: translateY(-2px);
}

/* ========================================
   SECTION RESSOURCES - Design exact
   ======================================== */

.lb-resources-section {
    padding: 100px 0;
    background: white;
}

.lb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.lb-section-title-wrapper {
    max-width: 600px;
}

.lb-section-title {
    font-size: 48px;
    font-weight: 300;
    line-height: 1.1;
    color: #1A1A1A;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.lb-section-title .lb-highlight {
    color: #FE5E1F;
    font-weight: 400;
}

.lb-section-description {
    font-size: 16px;
    line-height: 1.7;
    color: #666;
}

/* Navigation du carrousel */
.lb-carousel-nav {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.lb-nav-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #999;
}

.lb-nav-arrow:hover:not(.lb-disabled) {
    background: #FE5E1F;
    border-color: #FE5E1F;
    color: white;
    transform: scale(1.05);
}

.lb-nav-arrow.lb-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Carrousel des livres blancs */
.lb-carousel-wrapper {
    overflow: hidden;
    margin: 0 -10px;
    padding: 0 10px;
}

.lb-carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Cartes des livres blancs */
.lb-card {
    flex: 0 0 350px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.lb-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Image de la carte */
.lb-card-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #FE5E1F 0%, #ff7a3d 100%);
}

.lb-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lb-card:hover .lb-card-image img {
    transform: scale(1.08);
}

/* Placeholder quand pas d'image */
.lb-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FE5E1F 0%, #ff7a3d 100%);
}

.lb-placeholder-doc {
    width: 100px;
    height: 130px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.lb-doc-year {
    font-size: 24px;
    font-weight: 700;
    color: #FE5E1F;
    margin-bottom: 15px;
}

.lb-doc-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.lb-doc-lines span {
    height: 2px;
    background: #e5e5e5;
    border-radius: 1px;
}

.lb-doc-lines span:first-child { width: 100%; }
.lb-doc-lines span:nth-child(2) { width: 80%; }
.lb-doc-lines span:nth-child(3) { width: 60%; }

/* Badge sur l'image */
.lb-card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    color: #FE5E1F;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Contenu de la carte */
.lb-card-content {
    padding: 25px;
}

.lb-card-subtitle {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.lb-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 12px;
    line-height: 1.4;
}

.lb-card-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 44px;
}

/* Bouton de téléchargement */
.lb-card-btn {
    display: inline-block;
    background: #FE5E1F;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.lb-card-btn:hover {
    background: #e54d0f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 94, 31, 0.3);
    color: white;
    text-decoration: none;
}

.lb-card-btn.lb-disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   POPUP STYLES
   ======================================== */

.lb-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lb-popup {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    animation: popupIn 0.3s ease forwards;
}

@keyframes popupIn {
    to {
        transform: scale(1);
    }
}

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

.lb-popup-title {
    font-size: 24px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.lb-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.lb-popup-close:hover {
    background: #f5f5f5;
    color: #666;
}

.lb-popup-content {
    padding: 0 30px 30px;
}

.lb-popup-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Formulaire */
.lb-form-group {
    margin-bottom: 20px;
}

.lb-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.lb-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.lb-form-group input:focus {
    outline: none;
    border-color: #FE5E1F;
    box-shadow: 0 0 0 3px rgba(254, 94, 31, 0.1);
}

.lb-form-group input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

.lb-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    margin-top: 10px;
    position: relative;
}

.lb-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.lb-btn-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Messages */
.lb-popup-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.lb-popup-message.lb-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.lb-popup-message.lb-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========================================
   EFFETS ET ANIMATIONS
   ======================================== */

/* Overlay sur l'image au survol */
.lb-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0) 0%, rgba(26, 26, 26, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.lb-card:hover .lb-card-image::before {
    opacity: 1;
}

/* Icône de téléchargement au survol */
.lb-card-image::after {
    content: '↓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #FE5E1F;
    font-weight: bold;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.lb-card:hover .lb-card-image::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Animations d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Application des animations */
.lb-hero-text {
    animation: slideInLeft 0.8s ease forwards;
}

.lb-hero-main-card {
    animation: slideInRight 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.lb-hero-secondary-card {
    animation: slideInRight 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.lb-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.lb-card:nth-child(1) { animation-delay: 0.1s; }
.lb-card:nth-child(2) { animation-delay: 0.2s; }
.lb-card:nth-child(3) { animation-delay: 0.3s; }
.lb-card:nth-child(4) { animation-delay: 0.4s; }
.lb-card:nth-child(5) { animation-delay: 0.5s; }
.lb-card:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .lb-container {
        max-width: 960px;
    }
    
    .lb-hero-content {
        gap: 60px;
    }
    
    .lb-hero-title {
        font-size: 48px;
    }
    
    .lb-section-title {
        font-size: 42px;
    }
}

@media (max-width: 992px) {
    .lb-hero-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .lb-hero-right {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .lb-hero-secondary-card {
        margin-left: 0;
        max-width: 100%;
    }
    
    .lb-section-header {
        flex-direction: column;
        gap: 30px;
    }
    
    .lb-carousel-nav {
        align-self: flex-start;
    }
    
    .lb-card {
        flex: 0 0 300px;
    }
}

@media (max-width: 768px) {
    .lb-hero-section {
        padding: 60px 0 50px;
    }
    
    .lb-resources-section {
        padding: 60px 0;
    }
    
    .lb-hero-title {
        font-size: 36px;
    }
    
    .lb-hero-description {
        font-size: 15px;
    }
    
    .lb-section-title {
        font-size: 32px;
    }
    
    .lb-hero-main-card {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }
    
    .lb-guide-visual {
        margin: 0 auto;
    }
    
    .lb-hero-card-content {
        text-align: left;
    }
    
    .lb-card {
        flex: 0 0 280px;
    }
    
    /* Popup responsive */
    .lb-popup {
        width: 95%;
        margin: 20px;
    }
    
    .lb-popup-header {
        padding: 20px 20px 0;
    }
    
    .lb-popup-content {
        padding: 0 20px 20px;
    }
    
    .lb-popup-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .lb-container {
        padding: 0 15px;
    }
    
    .lb-hero-title {
        font-size: 28px;
    }
    
    .lb-section-title {
        font-size: 26px;
    }
    
    .lb-hero-main-card,
    .lb-hero-secondary-card {
        padding: 20px;
    }
    
    .lb-card {
        flex: 0 0 100%;
    }
    
    .lb-carousel-track {
        gap: 20px;
    }
    
    .lb-popup {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .lb-popup-header {
        padding: 15px 15px 0;
    }
    
    .lb-popup-content {
        padding: 0 15px 15px;
    }
}

/* ========================================
   DÉTAILS DE FINITION
   ======================================== */

/* Focus states pour l'accessibilité */
.lb-btn:focus,
.lb-card-btn:focus,
.lb-nav-arrow:focus,
.lb-popup-close:focus {
    outline: 2px solid #FE5E1F;
    outline-offset: 2px;
}

/* Amélioration de la sélection de texte */
::selection {
    background: rgba(254, 94, 31, 0.2);
    color: #1A1A1A;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Optimisation des performances */
.lb-card-image img,
.lb-guide-visual,
.lb-hero-main-card,
.lb-hero-secondary-card,
.lb-popup {
    will-change: transform;
}

/* Correction pour les navigateurs WebKit */
.lb-carousel-track {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Amélioration de la lisibilité */
.lb-hero-section,
.lb-resources-section,
.lb-popup-overlay {
    text-rendering: optimizeLegibility;
}

/* Style pour l'état désactivé des boutons */
.lb-nav-arrow:disabled {
    pointer-events: none;
}

/* Ajustements typographiques fins */
.lb-hero-title,
.lb-section-title,
.lb-popup-title {
    font-feature-settings: 'kern' 1, 'liga' 1;
}

/* Ombres douces pour une meilleure profondeur */
.lb-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(ellipse at top right, rgba(254, 94, 31, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Pattern subtil en arrière-plan (optionnel) */
.lb-hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(254, 94, 31, 0.1) 35px, rgba(254, 94, 31, 0.1) 70px);
    pointer-events: none;
}

/* Amélioration de l'interaction tactile sur mobile */
@media (hover: none) and (pointer: coarse) {
    .lb-card:active {
        transform: scale(0.98);
    }
    
    .lb-btn:active,
    .lb-card-btn:active {
        transform: scale(0.95);
    }
}