/* ============================================
   RESPONSIVE STYLES - Mobile and Tablet
   ============================================ */

/* Tablet Devices (768px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero {
        padding: 80px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        order: -1;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .container {
        padding: 0 15px;
    }

    /* Header and Navigation */
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        max-height: 0;
        overflow: hidden;
        transition: var(--transition);
        padding: 0;
        list-style: none;
    }

    .navbar-menu.active {
        max-height: 500px;
        padding: 1rem 0;
    }

    .navbar-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link::after {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 101;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(10px, 10px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    /* Hero Section */
    .hero {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Sections */
    .section {
        padding: 40px 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-title::after {
        width: 40px;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-top: 1rem;
    }

    /* Project Cards */
    .project-overview {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Details Container */
    .details-container {
        padding: 1.5rem;
    }

    /* Descriptif */
    .descriptif-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Statistics Grid */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Team Grid */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Contact Form */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px;
    }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .btn-large {
        padding: 12px 30px;
        font-size: 1rem;
    }

    /* Lightbox */
    .lightbox-content {
        border-radius: 5px;
    }

    #lightboxImage {
        max-height: 50vh;
    }

    .lightbox-info {
        padding: 1rem;
    }

    .lightbox-nav {
        gap: 1rem;
        padding: 0.75rem 1rem;
    }

    /* Footer */
    .footer {
        padding: 30px 0 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-section h4 {
        margin-bottom: 0.75rem;
    }

    .footer-bottom {
        padding-top: 1rem;
    }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
    /* Typography */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    /* Hero */
    .hero {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    /* Buttons */
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Forms */
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Statistics Grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    /* Lightbox Navigation */
    .lightbox-nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    #imageCounter {
        order: -1;
    }

    /* Gallery Filters */
    .gallery-filters {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    /* Document Actions */
    .document-actions {
        flex-direction: column;
    }

    .document-actions .btn {
        width: 100%;
    }

    /* Info Items */
    .info-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .info-icon {
        font-size: 1.2rem;
    }
}

/* Extra Small (landscape on phone) */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 30px 0;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .section {
        padding: 40px 0;
    }
}

/* Touch Device Adjustments */
@media (hover: none) and (pointer: coarse) {
    .btn {
        padding: 15px 30px;
    }

    .nav-link {
        padding: 0.75rem;
    }

    .project-card,
    .gallery-item {
        box-shadow: var(--shadow-md);
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    .mobile-menu-toggle,
    .gallery-filters,
    .contact-form,
    .btn {
        display: none;
    }

    .section {
        page-break-inside: avoid;
        padding: 20px 0;
    }

    .gallery-item {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }
}
