/* ============================================
   IPTV Hot - Custom Styles
   Optimisé pour performance et SEO
   ============================================ */

/* Variables CSS pour faciliter les modifications */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --transition-speed: 0.3s;
}

/* Reset et optimisations de base */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 76px; /* Compensation pour navbar fixed */
}

/* ============================================
   NAVIGATION
   ============================================ */
#mainNav {
    transition: all var(--transition-speed) ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#mainNav .navbar-brand {
    font-size: 1.5rem;
}

#mainNav .nav-link {
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    position: relative;
}

#mainNav .nav-link:hover {
    color: var(--primary-color) !important;
}

#mainNav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all var(--transition-speed) ease;
    transform: translateX(-50%);
}

#mainNav .nav-link:hover::after {
    width: 80%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.25rem;
}

.trust-badges {
    margin-top: 2rem;
}

.trust-item {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 500;
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: 4rem 0;
}

section h2 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    border-radius: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.pricing-card {
    transition: all var(--transition-speed) ease;
}

.pricing-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.popular-plan {
    border: 2px solid var(--primary-color) !important;
}

.popular-plan .badge {
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
}

.price {
    color: var(--primary-color);
}

/* ============================================
   COMPATIBILITY SECTION
   ============================================ */
.compatibility-item {
    transition: transform var(--transition-speed) ease;
    border-radius: 8px;
}

.compatibility-item:hover {
    transform: scale(1.1);
    background-color: var(--light-color);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    padding: 0.75rem 1.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, var(--primary-color) 100%);
}

/* ============================================
   FORM
   ============================================ */
.form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: all var(--transition-speed) ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

/* ============================================
   ACCORDION (FAQ)
   ============================================ */
.accordion-button {
    font-weight: 600;
    border-radius: 8px !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.avatar-placeholder {
    font-size: 1.25rem;
}

/* ============================================
   CTA STICKY MOBILE
   ============================================ */
.cta-sticky-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(33, 37, 41, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cta-sticky-mobile .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background-color: var(--dark-color) !important;
}

footer a {
    transition: color var(--transition-speed) ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* ============================================
   IMAGES - Optimisation SEO
   ============================================ */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
/* Focus states améliorés */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link (accessibilité) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.1);
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.4);
    color: #fff;
    text-decoration: none;
}

.whatsapp-float i {
    margin-top: 16px;
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-weight: 500;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #333;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
}

/* Responsive pour WhatsApp button */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
        font-size: 28px;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
}

/* ============================================
   RESPONSIVE - Mobile First
   ============================================ */

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 3rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Réduction des animations pour les utilisateurs préférant moins de mouvement */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   CORE WEB VITALS OPTIMIZATIONS
   ============================================ */

/* Prévenir CLS (Cumulative Layout Shift) */
img {
    aspect-ratio: attr(width) / attr(height);
}

/* Optimisation pour LCP (Largest Contentful Paint) */
.hero-section img {
    content-visibility: auto;
}

/* Prévenir les reflows */
.card, .btn, .navbar {
    contain: layout style paint;
}

/* Optimisation pour l'impression */
@media print {
    .navbar,
    .cta-sticky-mobile,
    footer {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* ============================================
   UTILITIES
   ============================================ */

/* Smooth scroll avec offset pour navbar fixed */
html {
    scroll-padding-top: 100px;
}

/* Amélioration du contraste pour accessibilité */
.text-muted {
    color: #6c757d !important;
}

/* Espacement cohérent */
.mb-section {
    margin-bottom: 4rem;
}

/* ============================================
   LOADING STATES (pour images lazy)
   ============================================ */
.lazy-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   COMMENTAIRES POUR MODIFICATIONS
   ============================================ */

/* 
   POUR MODIFIER LES COULEURS:
   - Changez les variables CSS dans :root en haut du fichier
   
   POUR MODIFIER LES ESPACEMENTS:
   - Les sections utilisent padding: 4rem 0 (modifiable section par section)
   - Les marges sont gérées par Bootstrap (mb-*, mt-*, etc.)
   
   POUR MODIFIER LES TRANSITIONS:
   - Changez --transition-speed dans :root
   
   POUR MODIFIER LES BORDER-RADIUS:
   - Cards: border-radius: 10px
   - Buttons: border-radius: 8px
   - Form controls: border-radius: 8px
*/

