/* ==========================================================================
   WAITIS STUDIO - Responsive Styles
   Mobile-First Responsive Design
   ========================================================================== */

/* Base responsive rules */
@media screen and (max-width: 100vw) {
    body,
    html {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    section {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* ==========================================================================
   TABLET & MEDIUM SCREENS (max-width: 1024px)
   ========================================================================== */

@media screen and (max-width: 1024px) {
    .container {
        padding: 0 30px;
        max-width: 100%;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.8rem;
    }

    .hero-stats {
        gap: 3rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .team-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* ==========================================================================
   TABLET PORTRAIT (max-width: 768px)
   ========================================================================== */

@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: 2rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem 2rem;
        text-align: center;
    }

    .nav-link::after {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Hero Section */
    .hero {
        min-height: 90vh;
        padding-top: 120px;
    }

    .hero-badge {
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    .hero-badge {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-stats {
        gap: 2.5rem;
        flex-wrap: wrap;
        margin-top: 3rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
    }

    .hero-features {
        flex-wrap: wrap;
        gap: 2rem;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* Services */
    .services {
        padding: 80px 0;
        min-height: 500px;
        height: fit-content;
        overflow: hidden;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        overflow: hidden;
        padding: 0 10px;
    }

    .service-card {
        padding: 2rem;
        text-align: center;
        height: 350px;
        max-height: 350px;
        overflow: hidden;
    }

    /* Values Section */
    .values-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .value-image {
        height: 200px;
    }

    /* Team Single */
    .team-single-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .team-image {
        max-width: 500px;
        margin: 0 auto;
    }

    .team-skills {
        grid-template-columns: 1fr;
    }

    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .portfolio-image {
        height: 220px;
    }

    /* Team Grid */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Process Timeline */
    .process-timeline::before {
        left: 30px;
    }

    .process-step {
        gap: 1.5rem;
    }

    .step-number {
        min-width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }

    .step-content {
        padding: 1.5rem;
    }

    .step-title {
        font-size: 1.2rem;
    }

    /* Why Us */
    .why-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .why-card {
        padding: 2rem 1rem;
    }

    /* Réalisations */
    .realisations {
        padding: 80px 0;
    }

    .realisations-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .realisation-image {
        height: 220px;
    }

    .realisation-content {
        padding: 1.5rem;
    }

    /* Contact */
    .contact-form {
        padding: 2rem;
    }

    .contact-method {
        padding: 1.2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
    }
}

/* ==========================================================================
   MOBILE LANDSCAPE & SMALL TABLETS (max-width: 640px)
   ========================================================================== */

@media screen and (max-width: 640px) {
    .container {
        padding: 0 20px;
        max-width: 100%;
        overflow-x: hidden;
    }

    * {
        max-width: 100%;
    }

    /* Hero */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-badge {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .hero-badge i {
        font-size: 0.9rem;
    }

    .hero-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-features {
        gap: 1.5rem;
    }

    .feature-item i {
        font-size: 1.5rem;
    }

    .feature-item span {
        font-size: 0.9rem;
    }

    /* Portfolio */
    .portfolio-item {
        margin: 0 auto;
        max-width: 400px;
    }

    .portfolio-image {
        height: 200px;
    }

    .portfolio-title {
        font-size: 1.2rem;
    }

    .portfolio-description {
        font-size: 0.9rem;
    }

    /* Custom Select */
    .custom-select-trigger {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }

    .custom-option {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }

    /* Values */
    .value-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .value-image {
        height: 180px;
    }

    .value-content {
        padding: 1.5rem;
    }

    .value-title {
        font-size: 1.3rem;
    }

    .value-description {
        font-size: 0.95rem;
    }

    /* Team Single */
    .team-image {
        max-width: 100%;
    }

    .team-badge {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .team-info {
        padding: 1.5rem;
    }

    .team-name {
        font-size: 2rem;
    }

    .team-role {
        font-size: 1.1rem;
    }

    .team-description p {
        font-size: 0.95rem;
    }

    .team-skills {
        padding: 1rem;
    }

    /* Team */
    .team-member {
        padding: 2rem;
    }

    .avatar-placeholder {
        width: 120px;
        height: 120px;
    }

    .avatar-placeholder i {
        font-size: 3rem;
    }

    .member-name {
        font-size: 1.5rem;
    }

    .member-role {
        font-size: 1rem;
    }

    /* Process */
    .process-step {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .process-timeline::before {
        display: none;
    }

    .step-number {
        margin: 0 auto;
    }

    .process-step:hover .step-content {
        transform: translateY(-5px);
    }

    /* Why Us */
    .why-grid {
        grid-template-columns: 1fr;
    }

    /* Réalisations mobile */
    .realisations {
        padding: 60px 0;
    }

    .realisation-card {
        min-height: 450px;
    }

    .realisation-image {
        height: 200px;
    }

    .realisation-content {
        padding: 1.2rem;
    }

    .btn-realisation {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    /* Contact */
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }

    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   MOBILE PORTRAIT (max-width: 480px)
   ========================================================================== */

@media screen and (max-width: 480px) {
    body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 15px;
        max-width: 100%;
    }

    .hero {
        padding-top: 140px;
    }

    .hero-badge {
        margin-top: 3rem;
    }

    /* Services mobile */
    .services {
        padding: 60px 0;
        min-height: 450px;
        height: fit-content;
        overflow: hidden;
    }

    .service-card {
        padding: 1.5rem;
        height: 320px;
        max-height: 320px;
        overflow: hidden;
    }

    /* Values mobile */
    .values {
        padding: 60px 0;
        min-height: 550px;
        height: fit-content;
        overflow: hidden;
    }

    .value-card {
        height: 400px;
        max-height: 400px;
        overflow: hidden;
    }

    /* Typography */
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-badge {
        padding: 0.4rem 0.9rem;
        font-size: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
        margin-top: 2rem;
    }

    .stat-item {
        width: 100%;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.95rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Buttons */
    .btn {
        padding: 0.9rem 1.8rem;
        font-size: 0.95rem;
    }

    /* Services */
    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i {
        font-size: 1.8rem;
    }

    .service-title {
        font-size: 1.3rem;
    }

    .service-description {
        font-size: 0.95rem;
    }

    .service-list li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }

    /* Values */
    .value-card {
        padding: 0;
    }

    .value-content {
        padding: 1.2rem;
    }

    .value-icon {
        width: 50px;
        height: 50px;
    }

    .value-icon i {
        font-size: 1.5rem;
    }

    .value-title {
        font-size: 1.2rem;
    }

    .value-description {
        font-size: 0.9rem;
    }

    /* Team Single */
    .team-name {
        font-size: 1.8rem;
    }

    .team-role {
        font-size: 1rem;
    }

    .team-description p {
        font-size: 0.9rem;
    }

    .skill-item {
        font-size: 0.9rem;
    }

    .skill-item i {
        font-size: 1rem;
    }

    /* Portfolio */
    .portfolio-content {
        padding: 1.2rem;
    }

    .portfolio-title {
        font-size: 1.1rem;
    }

    .portfolio-description {
        font-size: 0.85rem;
    }

    .portfolio-tags .tag {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }

    .portfolio-placeholder i {
        font-size: 4rem;
    }

    /* Team */
    .team-member {
        padding: 1.5rem;
    }

    .avatar-placeholder {
        width: 100px;
        height: 100px;
    }

    .avatar-placeholder i {
        font-size: 2.5rem;
    }

    .member-name {
        font-size: 1.3rem;
    }

    .member-description {
        font-size: 0.95rem;
    }

    .skill-tag {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    /* Process */
    .step-number {
        min-width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .step-content {
        padding: 1.2rem;
    }

    .step-title {
        font-size: 1.1rem;
    }

    .step-description {
        font-size: 0.9rem;
    }

    /* Why Us */
    .why-card {
        padding: 1.5rem 1rem;
    }

    .why-icon {
        width: 70px;
        height: 70px;
    }

    .why-icon i {
        font-size: 1.8rem;
    }

    .why-card h3 {
        font-size: 1.2rem;
    }

    .why-card p {
        font-size: 0.9rem;
    }

    /* Contact */
    .contact-info h3 {
        font-size: 1.5rem;
    }

    .contact-info > p {
        font-size: 0.95rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.9rem;
        font-size: 0.95rem;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }

    .contact-method i {
        margin-top: 0;
    }

    /* Footer */
    .footer-title {
        font-size: 1.3rem;
    }

    .footer-description {
        font-size: 0.9rem;
    }

    .footer-section h4 {
        font-size: 1rem;
    }

    .footer-links li a {
        font-size: 0.9rem;
    }

    .footer-bottom {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   EXTRA SMALL MOBILE (max-width: 360px)
   ========================================================================== */

@media screen and (max-width: 360px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding-top: 150px;
    }

    .hero-badge {
        margin-top: 4rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .service-card,
    .team-member,
    .why-card,
    .contact-form {
        padding: 1.2rem;
    }

    .step-content {
        padding: 1rem;
    }

    .nav-container {
        padding: 1rem 15px;
    }

    .logo {
        font-size: 1.3rem;
    }
}

/* ==========================================================================
   LANDSCAPE ORIENTATION FIXES
   ========================================================================== */

@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .hero-buttons {
        margin-bottom: 2rem;
    }

    .scroll-indicator {
        display: none;
    }

    section {
        padding: 50px 0;
    }
}

/* ==========================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .team-member:hover,
    .why-card:hover {
        transform: none;
    }

    /* Increase tap targets for better mobile UX */
    .nav-link {
        padding: 1.2rem 2rem;
    }

    .btn {
        min-height: 48px;
    }

    .social-link {
        min-width: 48px;
        min-height: 48px;
    }

    /* Ensure form inputs are large enough */
    .form-group input,
    .form-group select,
    .form-group textarea,
    .custom-select-trigger {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .custom-option {
        min-height: 48px;
        font-size: 16px;
        display: flex;
        align-items: center;
    }
}

/* ==========================================================================
   HIGH DPI DISPLAYS
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize shadows and glows for retina displays */
    .btn-primary {
        box-shadow: 0 4px 20px rgba(49, 240, 200, 0.25);
    }

    .service-card {
        border-width: 0.5px;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .navbar,
    .hero-buttons,
    .scroll-indicator,
    .contact-form,
    .back-to-top,
    .menu-toggle {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
    }

    section {
        page-break-inside: avoid;
        padding: 20px 0;
    }
}

/* ==========================================================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

/* Focus visible styles for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    :focus-visible {
        outline: 3px solid var(--primary-color);
        outline-offset: 3px;
    }
}

/* Reduced motion for users who prefer it */
@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;
    }

    .scroll-indicator {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(49, 240, 200, 0.3);
    }

    .service-card,
    .team-member,
    .why-card,
    .contact-form {
        border-width: 2px;
    }
}