/* --- CHARTE GRAPHIQUE & STYLES DE BASE --- */
:root {
    /* Thème Clair (Défaut) */
    --bg-dark: #F8F8F8;
    --text-light: #101019;
    --text-muted: #666666; /* Amélioré pour le contraste */
    --text-p-light: #333333; /* Amélioré pour le contraste */
    --accent-blue: #005A9C;
    --accent-gold: #B8860B;
    --border-color: rgba(16, 16, 25, 0.1);
    --card-bg: #FFFFFF;
    --focus-color: #005A9C; /* Couleur pour le focus */
}

body[data-theme="dark"] {
    /* Thème Sombre */
    --bg-dark: #101019;
    --text-light: #FFFFFC;
    --text-muted: #B0B0B0; /* Amélioré pour le contraste */
    --text-p-light: #E0E0E0; /* Amélioré pour le contraste */
    --accent-blue: #669BBC;
    --accent-gold: #DDA15E;
    --border-color: rgba(102, 155, 188, 0.2);
    --card-bg: rgba(255, 255, 252, 0.03);
    --focus-color: #669BBC;
}

/* --- SETUP & TYPOGRAPHIE --- */
@font-face {
    font-family: 'Disket Mono';
    src: url('https://www.argus-dynamics.com/assets/fonts/disket-mono-bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap; /* Amélioration performance */
}
@font-face {
    font-family: 'Disket Mono';
    src: url('https://www.argus-dynamics.com/assets/fonts/disket-mono-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Réinitialisation et accessibilité */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Skip link pour l'accessibilité */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

body {
    margin: 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Nunito Sans', sans-serif;
    font-size: clamp(16px, 1.1vw, 18px);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Focus visible pour l'accessibilité */
*:focus-visible {
    outline: 2px solid var(--focus-color);
    outline-offset: 2px;
}

.container {
    max-width: 1280px;
    margin: auto;
    padding: 80px 20px 100px 20px;
}

h1, h2, h3, h4 {
    font-family: 'Disket Mono', monospace;
    font-weight: normal;
    line-height: 1.2;
    color: var(--text-light);
    letter-spacing: 1px;
}

p {
    color: var(--text-p-light);
}

.tagline {
    font-family: 'Disket Mono', monospace;
    color: var(--accent-gold);
    font-size: 0.9em;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover, a:focus {
    color: var(--text-light);
    text-decoration: underline;
}

body[data-theme="light"] a:hover,
body[data-theme="light"] a:focus {
    color: var(--text-light);
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

nav.scrolled {
    background-color: rgba(248, 248, 248, 0.95);
    backdrop-filter: blur(10px);
}

body[data-theme="dark"] nav.scrolled {
    background-color: rgba(16, 16, 25, 0.95);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 110px;
    padding: 0 20px;
}

.nav-logo {
    font-family: 'Disket Mono', monospace;
    font-size: 1.6em;
    color: var(--text-light);
    font-weight: bold;
    text-decoration: none;
}

.nav-logo:hover,
.nav-logo:focus {
    color: var(--accent-blue);
    text-decoration: none;
}

/* Menu burger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: space-around;
    width: 45px;
    height: 45px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.hamburger-line {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-light);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active .hamburger-line {
    opacity: 0;
}

.menu-toggle.active::before,
.menu-toggle.active::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--text-light);
    top: 50%;
    left: 50%;
    border-radius: 1px;
    box-shadow: 0 0 4px rgba(102, 155, 188, 0.3);
}

.menu-toggle.active::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.menu-toggle.active::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.menu-toggle,
.nav-links a {
    touch-action: manipulation;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, 
.nav-links a:focus::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a:focus {
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-switcher {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.lang-switcher button {
    background: none;
    border: none;
    color: var(--text-light);
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.lang-switcher button:hover,
.lang-switcher button:focus {
    background-color: var(--accent-blue);
    color: var(--bg-dark);
}

.lang-switcher button.active {
    background-color: var(--accent-blue);
    color: var(--bg-dark);
}

/* --- HERO SECTION --- */
.hero {
    padding-top: 70px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 6rem);
    margin-bottom: 20px;
}

body[data-theme="light"] .hero-title {
    color: #FFFFFC;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin: 0 0 40px;
    color: var(--accent-blue);
    font-weight: 600;
}

.cta-button, .cta-button-end {
    background-color: var(--accent-blue);
    color: var(--bg-dark);
    padding: 18px 40px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    font-size: 1.1em;
    transition: all 0.3s;
    display: inline-block;
    border: 2px solid var(--accent-blue);
    cursor: pointer;
    min-height: 44px; /* Minimum touch target */
}

.cta-button:hover, 
.cta-button:focus,
.cta-button-end:hover, 
.cta-button-end:focus {
    background-color: transparent;
    color: var(--accent-blue);
    text-decoration: none;
}

body[data-theme="dark"] .cta-button:hover, 
body[data-theme="dark"] .cta-button:focus,
body[data-theme="dark"] .cta-button-end:hover,
body[data-theme="dark"] .cta-button-end:focus { 
    color: var(--text-light); 
    border-color: var(--text-light); 
}

/* --- SECTIONS GÉNÉRIQUES --- */
.section-title {
    font-size: clamp(2rem, 4vw, 4rem);
    margin-bottom: 80px;
}

.section-title.centered {
    text-align: center;
}

.section-title.centered::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background-color: var(--accent-gold);
    margin: 20px auto 0;
}

/* --- LAYOUTS & CARTES --- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.flex-2 {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    width: 100%;
}

.text-content h3 {
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 30px;
}

.image-placeholder {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.feature-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 10px;
    height: 100%;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    color: var(--accent-blue);
    margin-top: 0;
    font-size: 1.5em;
}

/* --- FORMULAIRES --- */
.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-light);
}

.contact-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 18px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-size: 1em;
    font-family: 'Nunito Sans', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--accent-blue);
    outline: none;
}

.contact-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23669BBC' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.form-grid div {
    margin-bottom: 30px;
}

body[data-theme="light"] .contact-form input,
body[data-theme="light"] .contact-form select,
body[data-theme="light"] .contact-form textarea {
    background-color: var(--card-bg);
    color: var(--text-light);
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.contact-form .privacy-notice {
    font-size: 0.8em;
    text-align: center;
    margin-top: 15px;
    opacity: 0.7;
}

.legal-container {
    padding-top: 150px;
}

.form-unit {
    margin-bottom: 30px;
}

.capability-block {
    margin-bottom: 100px;
}

/* --- STYLES ADDITIONNELS POUR LA PAGE PRODUITS --- */
.product-status {
    display: inline-block;
    background-color: var(--accent-gold);
    color: var(--bg-dark);
    padding: 8px 15px;
    border-radius: 50px;
    font-family: 'Disket Mono', monospace;
    font-size: 0.9em;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.capability-block-product ul {
    list-style: none;
    padding-left: 0;
}

.capability-block-product li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.capability-block-product li::before {
    content: '»';
    color: var(--accent-gold);
    position: absolute;
    left: 0;
    font-size: 1.5em;
    line-height: 1;
}

/* --- FOOTER --- */
footer {
    background-color: #0c0c14;
    color: var(--text-light);
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

body[data-theme="light"] footer {
    background-color: #EAEAEA;
    color: var(--text-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column h4 {
    font-family: 'Disket Mono', monospace;
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--accent-gold);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover,
.footer-column a:focus {
    color: var(--text-light);
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.9em;
    color: var(--text-p-light);
}

/* --- ANIMATIONS --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- RESPONSIVE DESIGN --- */
/* Large screens */
@media (min-width: 1440px) {
    .container {
        padding: 100px 40px 120px 40px;
    }
    
    .hero {
        background-attachment: fixed;
    }
    
    .section-title {
        margin-bottom: 100px;
    }
}

/* Desktop large */
@media (max-width: 1199px) {
    .grid-2 {
        gap: 60px;
    }
    
    nav .container {
        padding: 0 30px;
    }
}

/* Desktop medium */
@media (max-width: 991px) {
    .container {
        padding: 60px 30px 80px 30px;
    }

    nav .container {
        flex-direction: column;
        height: 140px;
        margin: 20px;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .hero-content p {
        text-align: center;
        width: 100%;
    }

    .hero-content .cta-button {
        width: 60%;
        margin: auto;
    }
    
    .grid-2 {
        gap: 40px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }
    
    .hero {
        background-attachment: scroll;
    }
    
    .footer-grid {
        gap: 30px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    nav .container {
        flex-direction: column;
        height: 100px;
        margin: 10px;
    }

    .nav-brand {
        width: 100%;
        text-align: center;
    }

    .nav-logo {
        font-size: 1.4em;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-controls {
        display: flex;
        align-items: center;
        justify-content: space-evenly;
        width: 100%;
    }

    .menu-toggle {
        display: flex;
        position: relative;
        width: 45px;
        height: 45px;
        padding: 8px;
        flex-shrink: 0;
    }
    
    .nav-links {
        position: fixed;
        top: 115px;
        left: 0;
        gap: 0;
        width: 100%;
        background-color: var(--bg-dark);
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        align-items: center;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links a {
        padding: 10px 20px;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .nav-right {
        gap: 10px;
        flex-shrink: 0;
    }

    .nav-right .cta-button {
        padding: 8px 16px;
        font-size: 0.8em;
        min-width: auto;
    }

    .menu-icon {
        width: 20px;
        height: 15px;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 0.9em;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .image-placeholder {
        order: -1;
        height: 300px;
    }
    
    .hero {
        text-align: center;
        padding-top: 100px;
    }
    
    .hero-content {
        margin: auto;
    }
    
    .section-title {
        font-size: clamp(1.8rem, 5vw, 3rem);
        margin-bottom: 60px;
    }
    
    .container {
        padding: 40px 20px 60px 20px;
    }
    
    .contact-form .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Mobile large */
@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.1em;
    }
    
    .nav-right .cta-button {
        padding: 6px 12px;
        font-size: 0.75em;
    }
    
    .hero h1 {
        font-size: xx-large
    }
    
    .cta-button, .cta-button-end {
        padding: 16px 30px;
        font-size: 1em;
        width: 100%;
        max-width: 300px;
        text-align: center;
        display: block;
        margin: 20px auto;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .feature-card {
        padding: 30px 25px;
    }
    
    .image-placeholder {
        height: 250px;
    }
    
    .section-title {
        font-size: clamp(1.6rem, 6vw, 2.5rem);
        margin-bottom: 50px;
    }
    
    .container {
        padding: 30px 15px 50px 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
    
    .lang-switcher button {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Mobile small */
@media (max-width: 360px) {
    .nav-logo {
        font-size: 1.1em;
    }
    
    .hero {
        padding-top: 90px;
    }
    
    .hero h1 {
        font-size: clamp(1.8rem, 9vw, 2.5rem);
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
        margin-bottom: 30px;
    }
    
    .container {
        padding: 20px 10px 40px 10px;
    }
    
    .section-title {
        font-size: clamp(1.4rem, 7vw, 2rem);
        margin-bottom: 40px;
    }
    
    .feature-card {
        padding: 25px 20px;
    }
    
    .nav-right .cta-button {
        padding: 0px 12px;
        font-size: 0.9em;
        min-height: 30px;
    }
}

/* Print styles */
@media print {
    .nav-links,
    .menu-toggle,
    .lang-switcher,
    .cta-button,
    .cta-button-end,
    #cookie-banner {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        color: black !important;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero {
        background-attachment: scroll;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-muted: #000000;
        --border-color: #000000;
    }
    
    body[data-theme="dark"] {
        --text-muted: #FFFFFF;
        --border-color: #FFFFFF;
    }
}