/* ===================================
   SCMC-CONTROL - Responsive Styles
   Mobile-First Approach
   =================================== */

/* ========== TABLET (768px and below) ========== */
@media (max-width: 768px) {

    /* Typography adjustments */
    :root {
        --header-height: 70px;
        --spacing-3xl: 3rem;
        --spacing-2xl: 2.5rem;
    }

    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }

    .container {
        padding: 0 var(--spacing-md);
    }

    section {
        padding: var(--spacing-2xl) 0;
    }

    /* Navigation */
    .nav {
        position: relative;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

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

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

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

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--mondrian-white);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        transition: all var(--transition-base);
        pointer-events: none;
        border-bottom: 3px solid var(--mondrian-black);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-link {
        padding: var(--spacing-sm) 0;
        border-bottom: none;
        border-left: 3px solid transparent;
        padding-left: var(--spacing-sm);
    }

    .nav-link:hover {
        border-left-color: var(--primary-blue);
        border-bottom-color: transparent;
    }

    .nav-link-cta {
        margin-top: var(--spacing-sm);
        text-align: center;
    }

    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

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

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

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

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

    .mondrian-composition {
        height: 400px;
        max-width: 400px;
    }

    .mondrian-line.vertical {
        width: 6px;
    }

    .mondrian-line.horizontal {
        height: 6px;
    }

    /* Section Headers */
    .section-title {
        font-size: 2rem;
    }

    .section-intro {
        font-size: 1.1rem;
    }

    /* Expertise Section */
    .expertise-grid {
        grid-template-columns: 1fr;
    }

    /* Methodology Section */
    .step {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: var(--spacing-lg);
    }

    .step-number {
        font-size: 2.5rem;
    }

    .step:hover {
        transform: translateX(0);
        transform: translateY(-4px);
    }

    .technology-note {
        flex-direction: column;
        text-align: center;
    }

    .tech-icon {
        margin: 0 auto;
    }

    /* Tarification Section */
    .tarif-content {
        grid-template-columns: 1fr;
    }

    .bareme-table {
        overflow-x: auto;
    }

    .bareme-table table {
        font-size: 0.8rem;
        min-width: 600px;
    }

    .calculator-card {
        position: static;
    }

    /* Cumul progressif table responsive */
    .cumul-progressif-section {
        padding: var(--spacing-lg);
    }

    .cumul-table {
        font-size: 0.85rem;
    }

    .cumul-table th,
    .cumul-table td {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .cumul-value-cell {
        font-size: 1rem;
    }

    .plafond-cell {
        font-size: 1.3rem;
    }

    /* Cumul responsive */
    .cumul-value-final {
        font-size: 1.3rem;
    }

    .cumul-plafond {
        padding: var(--spacing-sm);
    }

    /* Mission Section */
    .mission-values {
        grid-template-columns: 1fr;
    }

    /* Contact Section */
    .contact-info {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* ========== MOBILE (480px and below) ========== */
@media (max-width: 480px) {

    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }

    :root {
        --header-height: 65px;
        --spacing-3xl: 2.5rem;
        --spacing-2xl: 2rem;
        --spacing-xl: 1.5rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    section {
        padding: var(--spacing-xl) 0;
    }

    /* Logo */
    .logo h1 {
        font-size: 1.25rem;
    }

    .logo-box {
        font-size: 1.25rem;
    }

    .logo-scmc {
        padding: 3px 3px 3px 5px;
    }

    .logo-control {
        padding: 3px 5px 3px 3px;
    }

    .logo-separator {
        padding: 3px 0;
    }

    .logo-tagline {
        font-size: 0.65rem;
    }

    .footer-brand .logo-box {
        font-size: 1.1rem;
    }

    /* Hero Section */
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + var(--spacing-lg));
    }

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

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

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

    .mondrian-composition {
        height: 300px;
        max-width: 300px;
    }

    .mondrian-line.vertical {
        width: 5px;
    }

    .mondrian-line.horizontal {
        height: 5px;
    }

    /* Buttons */
    .btn {
        width: 100%;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    /* Cards */
    .expertise-card,
    .info-card,
    .mission-text,
    .contact-card {
        padding: var(--spacing-lg);
    }

    .card-icon,
    .value-icon,
    .contact-icon,
    .tech-icon {
        width: 48px;
        height: 48px;
    }

    .card-icon svg,
    .value-icon svg,
    .contact-icon svg,
    .tech-icon svg {
        width: 24px;
        height: 24px;
    }

    /* Steps */
    .step {
        padding: var(--spacing-md);
    }

    .step-number {
        font-size: 2rem;
        min-width: 60px;
    }

    .step-title {
        font-size: 1.25rem;
    }

    /* Table */
    .bareme-table th,
    .bareme-table td {
        padding: var(--spacing-xs);
        font-size: 0.75rem;
    }

    /* Cumul table mobile */
    .cumul-progressif-section {
        padding: var(--spacing-md);
    }

    .cumul-table {
        font-size: 0.75rem;
    }

    .cumul-table th,
    .cumul-table td {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .cumul-value-cell {
        font-size: 0.9rem;
    }

    .plafond-cell {
        font-size: 1.1rem;
    }

    .cumul-note {
        font-size: 0.85rem;
    }

    /* Calculator */
    .calculator-card {
        padding: var(--spacing-lg);
    }

    .form-group input {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .result-row {
        font-size: 0.9rem;
    }

    .result-total {
        font-size: 1.1rem;
    }

    .result-value-total {
        font-size: 1.5rem;
    }

    .result-value-total-theorique {
        font-size: 1.1rem;
    }

    /* Cumul mobile */
    .tranche-cumul {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }

    .cumul-label {
        font-size: 0.85rem;
    }

    .cumul-value {
        font-size: 1.1rem;
    }

    .cumul-value-final {
        font-size: 1.2rem;
    }

    .cumul-value-barre {
        font-size: 1rem;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }

    .footer-content {
        gap: var(--spacing-xl);
    }
}

/* ========== LARGE DESKTOP (1440px and above) ========== */
@media (min-width: 1440px) {

    :root {
        --container-max-width: 1400px;
    }

    h1 { font-size: 3.5rem; }
    h2 { font-size: 3rem; }

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

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

    .mondrian-composition {
        height: 600px;
        max-width: 600px;
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-height: 600px) and (orientation: landscape) {

    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + var(--spacing-md));
        padding-bottom: var(--spacing-xl);
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
    }

    .mondrian-composition {
        height: 250px;
        max-width: 250px;
    }

    section {
        padding: var(--spacing-xl) 0;
    }
}

/* ========== PRINT STYLES ========== */
@media print {

    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .header,
    .nav-toggle,
    .hero-cta,
    .footer,
    .calculator-card {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
    }

    p, h2, h3 {
        orphans: 3;
        widows: 3;
    }

    a {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    .card-icon,
    .value-icon,
    .contact-icon {
        border: 1px solid black !important;
    }
}

/* ========== ACCESSIBILITY & REDUCED MOTION ========== */
@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;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {

    :root {
        --primary-blue: #0052A3;
        --gray-700: #2D3748;
    }

    .btn,
    .card,
    .contact-card,
    .expertise-card {
        border-width: 3px;
    }

    .nav-link:hover,
    .nav-link:focus {
        outline: 2px solid var(--primary-blue);
        outline-offset: 2px;
    }
}

/* ========== DARK MODE (Optional - for future enhancement) ========== */
@media (prefers-color-scheme: dark) {
    /*
     * Dark mode styles can be added here if needed
     * Currently, the site maintains its professional light theme
     * Uncomment and customize if dark mode is desired
     */

    /*
    :root {
        --mondrian-white: #1a1a1a;
        --mondrian-black: #e0e0e0;
        --gray-50: #2d2d2d;
        --gray-100: #3a3a3a;
        --gray-800: #e0e0e0;
        --gray-900: #f0f0f0;
    }

    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    */
}
