/*
Theme Name: Site Rigid
Theme URI: http://rigid.fr
Author: Guillaume BISSO
Description: Thème sur mesure pour Rigid - Version Complète (Accueil + Configurateur + Gamme)
Version: 2.1
*/

/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    /* Couleurs */
    --primary-blue: #4CC9F0; /* Cyan Rigid */
    --dark-bg: #0a0a0a;
    --card-bg: #151515;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    
    /* Polices */
    --font-main: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

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

body {
    /* --- CORRECTION FOND GLOBAL --- */
    /* On met un fond noir par défaut pour tout le site */
    background-color: #0a0a0a;
    background-image: none; /* PAS d'image ici pour ne pas polluer la page Gamme */
    
    min-height: 100vh;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.6;
}

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

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

/* =========================================
   HEADER FINAL (CENTRÉ + MOBILE BURGER)
   ========================================= */

/* 1. BARRE PRINCIPALE */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 90px;
    background-color: #0a0a0a;
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 9999;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.brand-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 2px;
}

/* 2. LE MENU (Desktop : Centrage Absolu) */
.menu {
    position: absolute;       /* C'est ça qui permet le centrage parfait */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
}

.menu a {
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: 0.3s ease;
}
.menu a:hover { color: #4CC9F0; }

/* 3. BOUTON CONTACT & BURGER */
.right-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cta-container .btn-primary {
    background-color: transparent;
    color: white;
    padding: 10px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 2px;
    transition: 0.3s;
    white-space: nowrap;
}
.cta-container .btn-primary:hover {
    border-color: #4CC9F0; color: #4CC9F0;
}

/* Le Burger (caché sur PC) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}
.hamburger span {
    width: 25px; height: 2px; background: white; transition: 0.3s;
}

/* =========================================
   RESPONSIVE MOBILE (ÉCRANS < 950px)
   ========================================= */
@media (max-width: 950px) {
    .navbar { padding: 0 20px; height: 70px; }
    
    /* On affiche le burger */
    .hamburger { display: flex; z-index: 10001; }
    
    /* Animation du Burger en Croix quand ouvert */
    .hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    /* LE MENU DÉROULANT (Overlay) */
    .menu {
        position: fixed;
        top: 0; left: 0;
        width: 100%; height: 100vh; /* Prend tout l'écran */
        background: #0a0a0a;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transform: translateY(-100%); /* Caché en haut par défaut */
        transition: 0.4s ease-in-out;
        z-index: 10000;
        opacity: 0;
    }

    /* Quand le menu est ouvert (via JS) */
    .menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .menu a { font-size: 24px; font-weight: 800; } /* Liens plus gros sur mobile */

    /* Bouton contact plus petit */
    .cta-container .btn-primary {
        padding: 6px 12px; font-size: 10px;
    }
}

/* ==========================================================================
   3. PAGE D'ACCUEIL (Hero & Sections)
   ========================================================================== */
.hero-section {
    height: 100vh;
    width: 100%;
    
    /* --- CORRECTION PAGE ACCUEIL --- */
    /* C'est ICI qu'on met l'image du bateau pour l'accueil uniquement */
    background-image: url('assets/img/rigid-fond.jpg'); 
    
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Effet Parallax */
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

/* Voile noir sur l'image */
.overlay-dark::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content-wrapper {
    max-width: 900px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(40px, 5vw, 80px);
    font-weight: 900;
    text-transform: uppercase;
    color: white;
    letter-spacing: 2px;
    margin-bottom: 25px;
    line-height: 1.1;
}

.hero-desc {
    color: #DDDDDD;
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: #0F172A;
    color: white;
    padding: 16px 32px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid transparent;
}
.btn-primary:hover { background-color: var(--primary-blue); color: #000; }

.btn-secondary {
    background: transparent;
    color: white;
    padding: 16px 32px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.5);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: white; }

/* Sections Standards */
.section-standard { padding: 100px 0; position: relative; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-header.center { text-align: center; margin-bottom: 60px; }
.subtitle { color: var(--primary-blue); font-size: 14px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; display: block; margin-bottom: 15px; }
h2 { font-size: 40px; color: white; text-transform: uppercase; font-weight: 800; margin-bottom: 20px; }
.desc { color: var(--text-gray); font-size: 18px; max-width: 700px; margin: 0 auto; }

/* Section Design (ZigZag) */
.flex-row { display: flex; align-items: center; gap: 80px; }
.reverse { flex-direction: row-reverse; }
.feature-image, .feature-content { flex: 1; }
.feature-image img { border-radius: 4px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }

/* Section Mission (Cards) */
.cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.card-mission { position: relative; height: 450px; border-radius: 8px; overflow: hidden; cursor: pointer; }
.card-bg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card-mission:hover .card-bg { transform: scale(1.05); }
.card-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    display: flex; flex-direction: column; align-items: flex-start;
}
.card-tag { background: var(--primary-blue); color: #000; padding: 4px 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; margin-bottom: 15px; border-radius: 2px; }
.card-mission h3 { color: white; font-size: 28px; font-weight: 700; margin-bottom: 15px; }
.link-arrow { color: white; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.3); }

/* ==========================================================================
   4. FOOTER
   ========================================================================== */
.main-footer { background: #050505; border-top: 1px solid #222; padding: 80px 0 30px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 60px; }
.footer-col h3 { color: white; font-size: 24px; margin-bottom: 20px; letter-spacing: 2px; font-weight: 800; text-transform: uppercase; }
.footer-col h4 { color: #555; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 25px; }
.footer-col p, .footer-col a { color: #888; font-size: 14px; line-height: 1.8; display: block; }
.footer-col a:hover { color: var(--primary-blue); padding-left: 5px; }
.footer-bottom { border-top: 1px solid #111; padding-top: 30px; text-align: center; }

/* ==========================================================================
   5. CONFIGURATEUR (Styles de base)
   ========================================================================== */
.page-configurator-container { padding-top: 40px; background-color: var(--dark-bg); }
.back-bar { max-width: 1200px; margin: 0 auto 20px; padding: 0 20px; }
.btn-back { display: inline-flex; align-items: center; color: var(--text-gray); font-size: 0.9rem; text-transform: uppercase; font-weight: 600; cursor: pointer; background: none; border: none; }
.btn-back:hover { color: var(--primary-blue); transform: translateX(-5px); }

/* ==========================================================================
   6. RESPONSIVE MOBILE & MENU BURGER
   ========================================================================== */

/* 1. STYLES DU MENU BURGER */
.burger-menu {
    display: none; /* Caché sur PC */
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    z-index: 10001; /* Au-dessus de tout */
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: 0.3s;
}

/* Animation Burger en Croix */
.burger-menu.toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.burger-menu.toggle span:nth-child(2) { opacity: 0; }
.burger-menu.toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Bouton Desktop caché sur mobile */
.desktop-only { display: block; }
.mobile-cta { display: none; margin-top: 20px; }


/* 2. MEDIA QUERIES (TABLETTES ET MOBILES) */
@media (max-width: 900px) {
    
    /* A. AFFICHAGE DU BURGER */
    .burger-menu { display: flex; }
    .desktop-only { display: none; } /* On cache le bouton configurer du header */

    /* B. DESIGN DU MENU MOBILE (PLEIN ÉCRAN) */
    .main-nav {
        position: fixed;
        top: 0; right: -100%; /* Caché à droite par défaut */
        width: 100%;
        height: 100vh;
        background-color: rgba(10, 10, 10, 0.98); /* Fond noir presque opaque */
        display: flex !important; /* Force l'affichage (flex pour centrer) */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
        z-index: 10000;
    }

    /* Quand on clique sur le burger */
    .main-nav.active { right: 0; }

    .nav-list {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .nav-list li a { font-size: 24px; font-weight: 800; }
    
    .mobile-cta { display: block; } /* Affiche le bouton configurer dans le menu */


    /* C. CORRECTIF IMAGE HERO (BUG IOS/MOBILE) */
    .hero-section {
        /* Sur mobile, "fixed" casse souvent. On remet en scroll standard. */
        background-attachment: scroll !important;
        background-position: center center !important;
        background-size: cover !important;
        /* On s'assure que la hauteur prend bien tout l'écran */
        height: 100vh; 
        min-height: 600px;
    }
    
    /* Ajustement titre mobile */
    h1.hero-title { font-size: 40px; line-height: 1.1; }
    
    /* Ajustements Grilles */
    .flex-row, .flex-row.reverse { flex-direction: column; gap: 40px; }
    .grid-2-cols, .cards-grid, .footer-grid, .news-grid, .tech-cards-grid, .mosaic-grid { 
        grid-template-columns: 1fr !important; 
    }
    
    /* Ajustement Tableau Tech */
    .tech-table { font-size: 0.8rem; }
    .tech-table th, .tech-table td { padding: 10px; }
}

/* ==========================================================================
   7. CORRECTIF BOUTON FOOTER (Anti-Bug)
   ========================================================================== */
/* 1. ÉTAT NORMAL */
.footer-col .btn-primary {
    background-color: #4CC9F0 !important;
    color: #000000 !important;
    border: 1px solid #4CC9F0 !important;
    text-decoration: none !important;
    display: inline-block !important;
    padding: 12px 24px !important;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    width: auto; 
    margin-top: 0;
}

/* 2. ÉTAT SURVOL */
.footer-col .btn-primary:hover {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    border-color: #FFFFFF !important;
    padding-left: 24px !important; /* Empêche le glissement */
    transform: none !important;
}
/* =========================================
   BOUTON CONTACT (NAVBAR)
   ========================================= */

/* On cible le lien qui contient le mot "contact" dans le header */
header a[href*="contact"] {
    border: 1px solid rgba(255, 255, 255, 0.5); /* Bordure blanche semi-transparente */
    padding: 10px 25px;       /* Espace interne pour créer le bouton */
    border-radius: 2px;       /* Légèrement arrondi comme le reste du site */
    margin-left: 15px;        /* Espace pour le séparer des autres liens */
    margin-right: 15px;
    transition: all 0.3s ease; /* Animation fluide */
}

/* Effet au survol de la souris */
header a[href*="contact"]:hover {
    border-color: #4CC9F0;    /* La bordure devient Cyan */
    color: #4CC9F0 !important; /* Le texte devient Cyan */
    background: rgba(76, 201, 240, 0.1); /* Petit fond léger */
}