/* ================================================== */
/* 1. VARIABLES & RESET                               */
/* ================================================== */
:root {
    --ink: #12161c;              /* Graphite profond - bannières, footer, hero */
    --ink-soft: #2a3240;         /* Graphite secondaire */
    --primary-color: #1d6fe0;    /* Bleu UMO affiné */
    --primary-dark: #0f4c9a;     /* Bleu foncé pour dégradés/survol */
    --accent: #ff6a1a;           /* Orange "atelier" - toutes les actions */
    --accent-dark: #e0590f;
    --text-color: #1f2430;       /* Texte principal */
    --text-muted: #5a6472;       /* Texte secondaire */
    --bg-light: #f4f6f9;
    --bg-page: #eef1f5;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(18, 22, 28, 0.14);
    --shadow-sm: 0 4px 16px rgba(18, 22, 28, 0.08);
    --radius: 14px;
    --radius-sm: 8px;
    --max-width: 1200px;
    --font-heading: 'Space Grotesk', 'Arial Narrow', sans-serif;
    --font-body: 'Inter', Arial, sans-serif;

    /* Trame technique subtile, façon plan côté, pour les fonds sombres */
    --blueprint-grid:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.045) 0px, rgba(255,255,255,0.045) 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0px, rgba(255,255,255,0.045) 1px, transparent 1px, transparent 40px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-color);
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: var(--font-heading);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.25s;
}

/* ================================================== */
/* 2. HEADER & NAVIGATION                             */
/* ================================================== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 20px;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    height: 90px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand img {
    height: 80px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-text .brand-title {
    font-size: 1.9rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--ink);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.brand-text p {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 0;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation Desktop */
nav.main-nav {
    display: flex;
    gap: 28px;
    margin-left: auto;
}

nav.main-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
}

nav.main-nav a:hover, nav.main-nav a.active {
    color: var(--accent);
}

nav.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s;
}

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

.header-cta {
    background: var(--accent);
    color: var(--white);
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(255, 106, 26, 0.3);
}

.header-cta:hover {
    background: var(--accent-dark);
}

/* Le bouton garde son style de bouton même nesté dans nav.main-nav (menu mobile) */
nav.main-nav .header-cta,
nav.main-nav .header-cta:hover {
    padding: 10px 22px;
    color: var(--white);
}
nav.main-nav .header-cta::after {
    display: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--ink);
}

/* ================================================== */
/* 3. CONTENU PRINCIPAL (MAIN)                        */
/* ================================================== */
main {
    flex: 1;
    width: 100%;
}

.container {
    max-width: var(--max-width);
    margin: 50px auto;
    padding: 0 20px;
}

/* Style des boîtes blanches standard (Présentation, Contact) */
.content-box, .contact-info-box, .contact-form-container {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: var(--radius);
}

/* Bannière de titre (toutes les pages intérieures) */
.titre-page {
    text-align: center;
    background-color: var(--ink-soft);
    background-image: var(--blueprint-grid);
    color: var(--white);
    padding: 56px 20px;
    border-radius: var(--radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.titre-page h1, .titre-page h2 {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0;
}

.titre-page::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* Texte général */
.content-text {
    max-width: 800px;
    margin: 0 auto 30px;
    text-align: left;
}
.content-text p {
    margin-bottom: 15px;
}

.sector-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.sector-tag {
    background: var(--bg-light);
    border: 1px solid #e3e7ee;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 30px;
}

/* ================================================== */
/* 4. PAGE ACCUEIL - HERO PLEIN ECRAN                  */
/* ================================================== */
.hero-section {
    position: relative;
    min-height: 580px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin: 0 0 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        var(--blueprint-grid),
        linear-gradient(110deg, rgba(18,22,28,0.94) 0%, rgba(18,22,28,0.82) 42%, rgba(29,111,224,0.55) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 20px;
    width: 100%;
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(255,255,255,0.08);
    padding: 7px 16px;
    border-radius: 30px;
    margin-bottom: 22px;
    border: 1px solid rgba(255,255,255,0.18);
}

.hero-content h1 {
    font-size: clamp(2rem, 4.5vw, 3.1rem);
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--white);
    max-width: 680px;
}

.hero-content h3 {
    font-weight: 500;
    font-size: 1.2rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 18px;
}

.hero-content .index-text {
    color: rgba(255,255,255,0.82);
    font-size: 1.05rem;
    max-width: 600px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-cta {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    transition: all 0.25s;
}

.btn-cta-accent {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 10px 24px rgba(255, 106, 26, 0.35);
}
.btn-cta-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.btn-cta-outline {
    border: 2px solid rgba(255,255,255,0.55);
    color: var(--white);
}
.btn-cta-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--white);
}

/* Bandeau statistiques */
.stats-bar {
    background: var(--ink-soft);
    color: var(--white);
    padding: 32px 20px;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================================================== */
/* 5. PAGE MACHINES (Cartes)                           */
/* ================================================== */
.tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-button {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
}

.tab-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-button.active {
    background-image: var(--blueprint-grid), linear-gradient(120deg, var(--ink) 0%, var(--primary-dark) 150%);
    color: var(--white);
    border-color: var(--ink);
    box-shadow: 0 4px 10px rgba(18, 22, 28, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* GRILLE */
.grid-machines {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 28px;
}

/* CARTES MACHINES - blanches, accent haut, photo mise en avant */
.machine-card {
    width: 350px;
    max-width: 450px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;

    background: var(--white);
    border-top: 4px solid var(--ink);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.machine-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.machine-img {
    height: 220px;
    width: 100%;
    object-fit: contain;
    object-position: center;
    background: #fff;
    flex-shrink: 0;
}

.machine-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
}

.machine-info h3 {
    color: var(--ink);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.machine-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ================================================== */
/* 6. PAGE CONTACT                                    */
/* ================================================== */
.contact-top {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.contact-info-box {
    flex: 1;
    min-width: 300px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 4px solid var(--accent);
}

.contact-item {
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.5;
}

.contact-map-box {
    flex: 1;
    min-width: 300px;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn-submit {
    background-color: var(--accent);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    width: 100%;
}

.btn-submit:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ================================================== */
/* 6bis. FAQ (ACCORDEON)                               */
/* ================================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--white);
    border: 1px solid #e3e7ee;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 22px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--ink);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.25s;
    flex-shrink: 0;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 22px 20px;
    color: var(--text-muted);
}

/* ================================================== */
/* 7. GALERIE REALISATIONS                            */
/* ================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background: var(--white);
    border: 1px solid #eee;
    border-radius: var(--radius-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow);
    z-index: 10;
}

/* ================================================== */
/* 8. FOOTER                                           */
/* ================================================== */
footer {
    background-color: var(--ink);
    color: #9aa3b0;
    padding: 18px 20px;
    margin-top: auto;
    font-size: 0.85rem;
    border-top: 3px solid var(--accent);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-container p { margin: 0; }

.footer-container a {
    color: var(--white);
    font-weight: 500;
}
.footer-container a:hover {
    color: var(--accent);
    text-decoration: none;
}

.footer-info, .footer-contact, .footer-legal {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sep {
    color: #555;
    margin: 0 5px;
}

#btnHaut {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    z-index: 99;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#btnHaut:hover { background-color: var(--accent-dark); }

/* ================================================== */
/* 9. RESPONSIVE MOBILE                               */
/* ================================================== */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    nav.main-nav {
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        display: none;
    }

    nav.main-nav.active { display: flex; }

    .header-container { height: 70px; }
    .brand img { height: 40px; }
    .brand-text .brand-title { font-size: 1.5rem; }
    .brand-text p { font-size: 0.7rem; }

    .hero-section { min-height: 480px; }
    .hero-content { padding: 40px 20px; }
    .titre-page { padding: 36px 16px; }

    .stats-bar { gap: 30px; }

    .contact-wrapper { padding: 20px; }

    .contact-top { gap: 20px; }
    .contact-map-box { height: 300px; }
    .contact-form-container { padding: 20px; }
}

@media (max-width: 900px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .footer-info, .footer-contact, .footer-legal {
        flex-direction: column;
        gap: 5px;
    }
    .sep { display: none; }
}
