/* =========================================
   1. VARIABLES & THÈMES
   ========================================= */
:root {
    --gradient-primary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-btn: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-body: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    
    --primary-color: #5b6cf9;
    --accent-color: #ff6b6b;
    --success-color: #00d2d3;
    
    --text-main: #2d3436;
    --text-light: #636e72;
    --bg-card: #ffffff;
    
    --header-bg: rgba(255, 255, 255, 0.7);
    --header-text: #2d3436;
    
    --radius-l: 24px; --radius-m: 16px; --radius-btn: 50px;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px -5px rgba(0, 0, 0, 0.15);
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.dark-mode {
    --text-main: #dfe6e9; --text-light: #b2bec3;
    --bg-gradient-body: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --bg-card: #1e293b;
    --header-bg: rgba(15, 23, 42, 0.7); --header-text: #ffffff;
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

/* =========================================
   2. RESET & STYLES GLOBAUX
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif; line-height: 1.7; color: var(--text-main);
    background: var(--bg-gradient-body); background-attachment: fixed;
    transition: color 0.3s ease; padding-top: 0; min-height: 100vh;
}
h1, h2, h3, h4 { font-weight: 700; color: var(--text-main); text-align: center; }
.section-description, section p { text-align: center; max-width: 800px; margin: 0 auto; }
a { text-decoration: none; color: var(--primary-color); transition: var(--transition); font-weight: 600; }
ul { list-style: none; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   3. HEADER
   ========================================= */
header {
    background-color: var(--header-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    padding: 0.8rem 0; position: fixed; width: 100%; top: 0; z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255, 0.1); box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}
header.hide { transform: translateY(-100%); }
header .container { display: flex; justify-content: space-between; align-items: center; }

.logo-img { height: 80px; width: auto; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); transition: transform 0.3s ease; }
.logo-img:hover { transform: scale(1.05); }

nav ul { display: flex; align-items: center; gap: 1.5rem; }
nav ul li a { color: var(--header-text); font-weight: 500; font-size: 0.95rem; position: relative; padding: 5px 0; }
nav ul li a:not(.cta-nav)::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 3px;
    background: var(--gradient-btn); border-radius: 2px; transition: 0.3s ease;
}
nav ul li a:not(.cta-nav):hover::after { width: 100%; }

.cta-nav {
    background: var(--gradient-btn); color: white !important;
    padding: 0.6rem 1.5rem !important; border-radius: var(--radius-btn);
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}
#theme-toggle-nav {
    background: transparent; border: 2px solid var(--header-text); color: var(--header-text);
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; cursor: pointer;
    font-size: 1.2rem; transition: var(--transition);
}
#theme-toggle-nav:hover { transform: rotate(20deg) scale(1.1); background: var(--text-main); color: var(--bg-card); }
.mobile-menu { display: none; font-size: 2rem; color: var(--header-text); cursor: pointer; }

/* =========================================
   4. SECTIONS
   ========================================= */
section { padding: 6rem 0; opacity: 0; transform: translateY(20px); transition: 0.6s ease-out; }
section.visible { opacity: 1; transform: translateY(0); }

.hero {
    background: var(--gradient-hero); color: white; text-align: center;
    padding: 12rem 0 10rem; margin-top: -80px; border-radius: 0 0 60px 60px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1); position: relative; overflow: hidden;
}
.hero-bg-image {
    position: absolute; top: 0; right: 0; width: 60%; height: 100%;
    background-image: url('https://images.unsplash.com/photo-1531482615713-2afd69097998?auto=format&fit=crop&w=1000&q=80');
    background-size: cover; background-position: center; opacity: 0.25;
    -webkit-mask-image: linear-gradient(to right, transparent, black);
    mask-image: linear-gradient(to right, transparent, black); pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero h2 { color: white; font-size: 3.5rem; margin-bottom: 1.5rem; text-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.hero p { color: rgba(255, 255, 255, 0.95); font-size: 1.3rem; max-width: 800px; margin: 0 auto 3rem; }
section h2::after { content: ''; display: block; width: 80px; height: 6px; background: var(--gradient-btn); margin: 20px auto 0; border-radius: 10px; }

/* =========================================
   5. CARTES & GRILLES
   ========================================= */
.pc-grid, .service-cards, .vente-categories, .pack-cards, .numerisation-categories {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem; margin-top: 3rem; justify-content: center;
}
.features, .values-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 3rem; }
.features > :nth-child(4), .values-cards > :nth-child(4) { grid-column: 2; }

@media (max-width: 992px) {
    .features, .values-cards { grid-template-columns: repeat(2, 1fr); }
    .features > :nth-child(4), .values-cards > :nth-child(4) { grid-column: auto; }
}

.card, .pc-card, .vente-card, .numerisation-card, .feature, .value-card {
    background-color: var(--bg-card); border-radius: var(--radius-l);
    padding: 2.5rem 2rem; box-shadow: var(--shadow-card); transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.5); display: flex; flex-direction: column;
    align-items: center; text-align: center; position: relative; overflow: hidden; height: 100%;
}
.card:hover, .pc-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }

/* IMAGES PC */
.pc-image { width: 100%; height: 220px; object-fit: contain; border-radius: var(--radius-m); margin-bottom: 1.5rem; background: #fff; padding: 10px; }

.price { font-size: 2rem; font-weight: 800; color: var(--primary-color); margin: 0.5rem 0 1.5rem; display: block; }
.card ul, .pc-card ul { text-align: left; width: 100%; margin-bottom: 1.5rem; }
.card ul li, .pc-card ul li { margin-bottom: 0.8rem; padding-left: 2rem; position: relative; font-size: 1rem; color: var(--text-light); }
.card ul li::before, .pc-card ul li::before {
    content: '✓'; position: absolute; left: 0; color: var(--success-color); font-weight: 900;
    background: rgba(0, 210, 211, 0.1); width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
}
.icon { font-size: 4rem; margin-bottom: 1.5rem; background: var(--gradient-btn); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }

.cta-button, .cta-nav {
    display: inline-block; background: var(--gradient-btn); color: white;
    border: none; padding: 1rem 2rem; border-radius: var(--radius-btn);
    cursor: pointer; font-weight: 600; font-size: 1rem; text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); margin-top: auto;
    transition: transform 0.3s, box-shadow 0.3s;
}
.cta-button:hover, .cta-nav:hover { transform: scale(1.1) translateY(-3px) !important; box-shadow: 0 10px 25px rgba(102, 126, 234, 0.6); color: white; filter: brightness(1.1); }

/* =========================================
   6. MODALE (POPUP)
   ========================================= */
.modal {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0;
    width: 100%; height: 100%; overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px);
}
.modal-content {
    background-color: transparent; margin: 2% auto; border-radius: var(--radius-l);
    width: 95%; max-width: 1100px; position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(50px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

.close-btn {
    color: white; background: var(--accent-color); width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: bold;
    position: absolute; right: 15px; top: 15px; cursor: pointer; z-index: 20;
    transition: 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.close-btn:hover { background: #ff4757; transform: rotate(90deg) scale(1.1); }

/* FORMULAIRE MODALE */
.contact-section-modern { background-color: #050b14; color: #fff; position: relative; padding: 3rem 2rem; border-radius: var(--radius-l); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
.contact-header { text-align: center; margin-bottom: 4rem; }
.contact-header h2 { color: white; font-size: 2.5rem; margin-bottom: 1rem; }
.contact-header p { color: #94a3b8; font-size: 1.1rem; }
.contact-grid-wrapper { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; align-items: start; }
.contact-left-col { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-info-card { background: #0f172a; padding: 1.5rem; border-radius: 16px; border: 1px solid #1e293b; display: flex; align-items: center; gap: 1rem; }
.icon-box { background: #1e293b; width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.info-text .label { font-size: 0.85rem; color: #64748b; }
.info-text .value { font-size: 1.1rem; font-weight: 700; color: white; }
.contact-right-col { background: #0f172a; padding: 2.5rem; border-radius: 24px; border: 1px solid #1e293b; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.9rem; color: #94a3b8; margin-bottom: 0.5rem; text-align: left; }
.input-wrapper { position: relative; }
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #64748b; }
.contact-right-col input, .contact-right-col select, .contact-right-col textarea {
    width: 100%; background: #1e293b; border: 1px solid #334155; color: white;
    padding: 1rem 1rem 1rem 3rem; border-radius: 12px; font-size: 0.95rem; transition: 0.3s;
}
.contact-right-col textarea { padding: 1rem; height: 150px; resize: vertical; }
.contact-right-col input:focus, .contact-right-col textarea:focus { border-color: #3b82f6; outline: none; background: #0f172a; }
.submit-btn { width: 100%; background: #2563eb; color: white; padding: 1rem; border-radius: 12px; border: none; font-size: 1rem; font-weight: 600; cursor: pointer; transition: 0.3s; }
.submit-btn:hover { background: #1d4ed8; }

/* FOOTER */
footer { background: var(--bg-card); color: var(--text-main); text-align: center; padding: 4rem 0 2rem; border-top: 1px solid rgba(0,0,0,0.05); }
.footer-links { margin-top: 1.5rem; display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .contact-grid-wrapper { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .contact-left-col { display: none; } /* Cache infos gauche sur mobile pour gagner place */
    .modal-content { width: 100%; height: 100%; border-radius: 0; margin: 0; }
    .modal-content .contact-section-modern { height: 100vh; overflow-y: auto; padding-top: 80px; border-radius: 0; }
    .close-btn { top: 20px; right: 20px; position: fixed; }
}
@media (max-width: 768px) {
    .mobile-menu { display: block; }
    nav ul {
        position: fixed; top: 0; right: 0; height: 100vh; width: 80%;
        background: rgba(255, 255, 255, 0.98); flex-direction: column; justify-content: center;
        transform: translateX(100%); transition: transform 0.4s ease; padding: 2rem;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }
    body.dark-mode nav ul { background: #1e293b; }
    nav ul.active { transform: translateX(0); }
    .hero { padding: 8rem 0 4rem; border-radius: 0 0 30px 30px; }
    .features, .values-cards { grid-template-columns: 1fr; }
}