/*
 * Fichier : responsive.css
 * Description : Styles responsives pour le site Khama7 Energy
 * Media Queries pour toutes les résolutions d'écran
 */

/* ============================================
   TAILLES D'ÉCRAN DE RÉFÉRENCE :
   - Mobile : < 576px
   - Tablet : 576px - 992px
   - Desktop : > 992px
   ============================================ */

/* ===== RÈGLES GÉNÉRALES RESPONSIVES ===== */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
}

/* ===== TABLETTES (768px - 992px) ===== */
@media (max-width: 992px) {
    /* Header et Navigation */
    .header-content {
        padding: 15px 0;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .logo-text {
        font-size: 1.3rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 80px 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    /* Sections générales */
    .section-title {
        font-size: 2.2rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .service-card {
        padding: 25px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
    
    /* Carrousel des Services */
    .service-slide-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .service-slide-image {
        height: 350px;
    }
    
    .service-slide-info {
        padding: 30px;
    }
    
    .service-slide-info h3 {
        font-size: 1.6rem;
    }
    
    /* Avantages */
    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .advantage-card {
        padding: 30px 20px;
    }
    
    /* Timeline About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .about-image {
        order: -1;
    }
    
    .experience-badge {
        width: 100px;
        height: 100px;
        right: 20px;
        bottom: 20px;
    }
    
    .experience-badge .years {
        font-size: 2rem;
    }
    
    /* Équipe */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Statistiques */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Formulaires */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form-container {
        order: 1;
    }
    
    /* Galerie */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== TABLETTES PETITES (576px - 768px) ===== */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 20px;
    }
    
    /* Header */
    .logo img {
        height: 40px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    /* Hero */
    .hero {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 0;
    }
    
    /* Sections */
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    /* Services Carrousel */
    .services-carousel-section {
        padding: 70px 0;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .service-slide-image {
        height: 300px;
    }
    
    .service-slide-info {
        padding: 25px 20px;
    }
    
    .carousel-controls {
        flex-direction: column;
        gap: 20px;
        margin-top: 30px;
    }
    
    .carousel-stats {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
        padding-top: 30px;
    }
    
    /* Avantages */
    .advantages-section {
        padding: 70px 0;
    }
    
    /* Témoignages */
    .testimonials-section {
        padding: 70px 0;
    }
    
    .testimonial {
        padding: 30px 25px;
        margin: 0 15px;
    }
    
    .testimonial-content p {
        font-size: 1rem;
    }
    
    /* CTA */
    .cta-section {
        padding: 70px 0;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
        margin: 0;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    /* Timeline About */
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-year {
        position: relative;
        left: 0;
        display: inline-block;
        margin-bottom: 15px;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    /* Valeurs */
    .values-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* Équipe */
    .team-section {
        padding: 70px 0;
    }
    
    .member-image {
        height: 250px;
    }
    
    /* Certifications */
    .certifications-slider .slick-slide {
        padding: 0 10px;
    }
    
    /* Formulaires */
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Galerie */
    .gallery-filters {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* ===== MOBILES (≤ 576px) ===== */
@media (max-width: 576px) {
    /* Container */
    .container {
        padding: 0 15px;
    }
    
    /* Header */
    .logo img {
        height: 35px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .mobile-menu {
        width: 100%;
    }
    
    /* Hero */
    .hero {
        padding: 50px 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .section-title::after {
        bottom: -10px;
        width: 60px;
    }
    
    /* Services */
    .services-carousel-section {
        padding: 50px 0;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .service-slide-image {
        height: 250px;
    }
    
    .service-slide-info h3 {
        font-size: 1.4rem;
    }
    
    .service-number {
        font-size: 2rem;
        top: 20px;
        left: 20px;
    }
    
    .service-icon {
        font-size: 2rem;
    }
    
    .service-features li {
        font-size: 0.9rem;
    }
    
    .btn-service {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    /* Avantages */
    .advantages-section {
        padding: 50px 0;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .advantage-card {
        padding: 25px 20px;
    }
    
    .advantage-icon {
        font-size: 2rem;
    }
    
    /* Projets */
    .project-item {
        margin-bottom: 30px;
    }
    
    .project-info {
        padding: 20px;
    }
    
    .project-info h3 {
        font-size: 1.2rem;
    }
    
    .btn-project {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
    
    /* Témoignages */
    .testimonials-section {
        padding: 50px 0;
    }
    
    .testimonial {
        padding: 25px 20px;
        margin: 0 10px;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }
    
    .testimonial-author img {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    /* CTA */
    .cta-section {
        padding: 50px 0;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    /* Footer */
    .main-footer {
        padding: 50px 0 20px;
        margin-top: 50px;
    }
    
    .footer-logo img {
        height: 40px;
    }
    
    .social-links a {
        margin-right: 10px;
        font-size: 1rem;
    }
    
    /* About Page */
    .page-banner {
        padding: 60px 0;
    }
    
    .banner-content h1 {
        font-size: 2rem;
    }
    
    .banner-content p {
        font-size: 1rem;
    }
    
    /* Timeline */
    .about-section {
        padding: 50px 0;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-item {
        padding-left: 10px;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
    }
    
    /* Valeurs */
    .values-section {
        padding: 50px 0;
    }
    
    .value-card {
        padding: 25px 20px;
    }
    
    .value-icon {
        font-size: 2.5rem;
    }
    
    /* Statistiques */
    .stats-section {
        padding: 50px 0;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Équipe */
    .team-section {
        padding: 50px 0;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .member-image {
        height: 300px;
    }
    
    /* Certifications */
    .certifications-section {
        padding: 50px 0;
    }
    
    .certification-item img {
        height: 80px;
        margin-bottom: 15px;
    }
    
    /* Formulaires */
    .page-header {
        padding: 40px 0;
    }
    
    .contact-form-container {
        padding: 25px 20px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    /* Galerie */
    .gallery-section {
        padding: 50px 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    /* Carrière */
    .job-listings {
        padding: 50px 0;
    }
    
    .job-card {
        padding: 20px;
    }
    
    .job-meta span {
        font-size: 0.8rem;
    }
}

/* ===== TRÈS PETITS MOBILES (≤ 400px) ===== */
@media (max-width: 400px) {
    /* Ajustements spécifiques pour très petits écrans */
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .service-slide-info h3 {
        font-size: 1.2rem;
    }
    
    .btn, .btn-service, .btn-project {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .testimonial-content p {
        font-size: 0.9rem;
    }
    
    /* Timeline */
    .timeline-year {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    /* Formulaires */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
    }
    
    /* Footer */
    .footer-links a,
    .footer-contact li {
        font-size: 0.9rem;
    }
}

/* ===== ORIENTATION PAYSAGE MOBILE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
        min-height: auto;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .hero-content p {
        margin-bottom: 20px;
    }
    
    .mobile-menu {
        height: 100vh;
        overflow-y: auto;
    }
}

/* ===== IMPRESSION ===== */
@media print {
    /* Masquer les éléments non nécessaires à l'impression */
    .main-header,
    .mobile-menu-btn,
    .mobile-menu,
    .social-links,
    .btn,
    .carousel-controls,
    .testimonials-section,
    .cta-section,
    .main-footer {
        display: none !important;
    }
    
    /* Styles d'impression */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000 !important;
        background: #fff !important;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    
    /* Améliorer la lisibilité */
    .hero-content h1,
    .section-title,
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        margin-top: 20px !important;
        margin-bottom: 10px !important;
    }
    
    /* Ajouter des URL après les liens */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
    }
    
    /* Éviter les coupures de pages dans les éléments importants */
    .service-slide-content,
    .advantage-card,
    .team-member,
    .project-item {
        page-break-inside: avoid;
    }
    
    /* Marges d'impression */
    @page {
        margin: 2cm;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    /* Ces règles s'appliquent si l'utilisateur préfère le mode sombre */
    body {
        background-color: #121212;
        color: #e0e0e0;
    }
    
    .service-card,
    .advantage-card,
    .testimonial,
    .project-item {
        background-color: #1e1e1e;
        border-color: #333;
    }
    
    .service-slide-content {
        background-color: #1e1e1e;
    }
    
    .timeline-content {
        background-color: #1e1e1e;
    }
    
    .contact-form-container {
        background-color: #1e1e1e;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background-color: #2d2d2d;
        color: #e0e0e0;
        border-color: #444;
    }
}

/* ===== ANIMATIONS RESPONSIVES ===== */
@media (prefers-reduced-motion: reduce) {
    /* Désactiver les animations pour les utilisateurs qui préfèrent les réduire */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== HAUTE DENSITÉ DE PIXELS (Retina) ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img,
    .service-slide-image img,
    .project-image img,
    .member-image img,
    .testimonial-author img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== SUPPORT DES ÉCRANS TRÈS LARGES ===== */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .service-slide-content {
        gap: 70px;
    }
    
    .service-slide-image {
        height: 600px;
    }
    
    .service-slide-info {
        padding: 50px;
    }
    
    .service-slide-info h3 {
        font-size: 2.2rem;
    }
    
    .service-slide-info p {
        font-size: 1.2rem;
    }
}

/* ===== CORRECTIONS SPÉCIFIQUES POUR iOS ===== */
@supports (-webkit-touch-callout: none) {
    /* Correction pour Safari iOS */
    .hero {
        background-attachment: scroll;
    }
    
    /* Amélioration du tap sur mobile iOS */
    .btn,
    .btn-service,
    .btn-project,
    .carousel-prev,
    .carousel-next,
    .filter-btn {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Correction du viewport iOS */
    @media (max-width: 576px) {
        input,
        select,
        textarea {
            font-size: 16px !important; /* Empêche le zoom automatique sur iOS */
        }
    }
}

/* ===== SUPPORT DES ÉCRANS PLIABLES ===== */
@media (max-width: 600px) and (max-height: 500px) {
    /* Ajustements pour les écrans pliables et formats inhabituels */
    .hero {
        min-height: 60vh;
    }
    
    .mobile-menu {
        height: 80vh;
    }
}