/* ===== VARIABLES CSS ===== */
:root {
    --primary-color: #1a5276;
    --secondary-color: #2e86ab;
    --accent-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --light-text: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(26, 82, 118, 0.3);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.logo-text span {
    color: var(--accent-color);
}

.logo-text small {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--light-text);
    letter-spacing: 0.5px;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: var(--dark-text);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

nav ul li a:hover {
    color: var(--primary-color);
}

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

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.nav-cta {
    background: var(--accent-color);
    color: white !important;
    padding: 10px 25px !important;
    border-radius: 25px;
}

.nav-cta:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.nav-cta::after {
    display: none !important;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 150px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    background-size: 200px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text h1 span {
    color: #7dcea0;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #219a52;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    color: #7dcea0;
}

.stat-card .label {
    font-size: 0.9rem;
    opacity: 0.9;
}


/* ===== SECTIONS GÉNÉRALES ===== */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--light-text);
    max-width: 600px;
    margin: 0 auto;
}

.section-title .underline {
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* ===== SERVICES SECTION ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
    color: white;
}

.service-card h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--light-text);
    margin-bottom: 20px;
}

.service-card ul {
    margin-bottom: 20px;
}

.service-card ul li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--dark-text);
}

.service-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.service-link {
    color: var(--secondary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.service-link:hover {
    color: var(--accent-color);
    gap: 10px;
}

/* ===== IDC INFO SECTION ===== */
.idc-section {
    background: var(--light-bg);
}

.idc-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.idc-text h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.idc-text p {
    margin-bottom: 15px;
    color: var(--dark-text);
}

.threshold-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.threshold-table th,
.threshold-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.threshold-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.threshold-table tr:hover {
    background: var(--light-bg);
}

.status-ok { color: var(--accent-color); font-weight: 600; }
.status-warning { color: var(--warning-color); font-weight: 600; }
.status-danger { color: var(--danger-color); font-weight: 600; }

/* ===== ENERGY LABEL ===== */
.energy-label {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.energy-label h4 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.label-scale {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.label-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.label-item:hover { transform: translateX(10px); }
.label-A { background: #00a651; width: 30%; }
.label-B { background: #50b848; width: 40%; }
.label-C { background: #bdd62e; width: 50%; }
.label-D { background: #fff200; width: 60%; color: #333; }
.label-E { background: #fdb913; width: 70%; }
.label-F { background: #f37021; width: 80%; }
.label-G { background: #ed1c24; width: 90%; }
.label-item span { margin-left: auto; font-size: 0.9rem; }

/* ===== SUBVENTIONS SECTION ===== */
.subventions-highlight {
    background: linear-gradient(135deg, var(--accent-color), #219a52);
    color: white;
    padding: 60px;
    border-radius: var(--border-radius);
    text-align: center;
    margin-bottom: 50px;
}

.subventions-highlight h3 { font-size: 2rem; margin-bottom: 15px; }
.subventions-highlight .amount { font-size: 3.5rem; font-weight: 700; display: block; margin: 20px 0; }

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

.subvention-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--accent-color);
}

.subvention-card h4 { color: var(--primary-color); margin-bottom: 15px; }
.subvention-card .price { font-size: 1.5rem; font-weight: 700; color: var(--accent-color); margin-bottom: 10px; }
.subvention-card p { color: var(--light-text); font-size: 0.95rem; }

/* ===== TIMELINE ===== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 45%;
    padding: 20px 30px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.timeline-item:nth-child(odd) { margin-left: 5%; }
.timeline-item:nth-child(even) { margin-left: 50%; }

.timeline-item::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow);
}

.timeline-item:nth-child(odd)::before { right: -40px; }
.timeline-item:nth-child(even)::before { left: -40px; }
.timeline-item h4 { color: var(--primary-color); margin-bottom: 10px; }
.timeline-item .date { color: var(--accent-color); font-weight: 600; font-size: 0.9rem; }


/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.cta-section h2 { font-size: 2.5rem; margin-bottom: 20px; }
.cta-section p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }

/* ===== CONTACT FORM ===== */
.contact-section { background: var(--light-bg); }

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

.contact-info h3 { color: var(--primary-color); margin-bottom: 20px; font-size: 1.5rem; }

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-item .icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.contact-item h4 { color: var(--dark-text); margin-bottom: 5px; }
.contact-item p { color: var(--light-text); }

.contact-form {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-form h3 { color: var(--primary-color); margin-bottom: 30px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--dark-text); font-weight: 500; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.1);
}

.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.btn-submit {
    width: 100%;
    background: var(--accent-color);
    color: white;
    padding: 15px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover { background: #219a52; transform: translateY(-2px); }

/* ===== FOOTER ===== */
footer {
    background: var(--dark-text);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 { color: white; margin-bottom: 20px; font-size: 1.2rem; }
.footer-col p { color: rgba(255,255,255,0.7); line-height: 1.8; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.7); transition: var(--transition); }
.footer-col ul li a:hover { color: var(--accent-color); padding-left: 5px; }

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo .logo-icon {
    width: 45px;
    height: 45px;
    font-size: 14px;
    border-radius: 8px;
}

.footer-logo span { font-size: 1.2rem; font-weight: 700; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p { color: rgba(255,255,255,0.6); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: var(--accent-color); }

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 150px 0 80px;
    text-align: center;
}

.page-header h1 { font-size: 2.8rem; margin-bottom: 15px; }
.page-header p { font-size: 1.2rem; opacity: 0.9; }
.breadcrumb { margin-top: 20px; }
.breadcrumb a { color: rgba(255,255,255,0.8); }
.breadcrumb a:hover { color: white; }
.breadcrumb span { color: var(--accent-color); }

/* ===== CONTENT PAGES ===== */
.content-section { padding: 60px 0; }

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 50px;
}

.main-content h2 { color: var(--primary-color); margin: 40px 0 20px; font-size: 1.8rem; }
.main-content h2:first-child { margin-top: 0; }
.main-content h3 { color: var(--secondary-color); margin: 30px 0 15px; font-size: 1.4rem; }
.main-content p { margin-bottom: 15px; color: var(--dark-text); }
.main-content ul { margin: 15px 0 25px 20px; }
.main-content ul li { padding: 8px 0; padding-left: 25px; position: relative; }
.main-content ul li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-color); font-weight: bold; }

/* ===== SIDEBAR ===== */
.sidebar { position: sticky; top: 100px; }

.sidebar-widget {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.sidebar-widget h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-bg);
}

.sidebar-widget ul li { padding: 10px 0; border-bottom: 1px solid var(--light-bg); }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { color: var(--dark-text); display: flex; justify-content: space-between; align-items: center; }
.sidebar-widget ul li a:hover { color: var(--accent-color); }

.cta-widget {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.cta-widget h4 { color: white; border-bottom-color: rgba(255,255,255,0.2); }
.cta-widget p { margin-bottom: 20px; opacity: 0.9; }

/* ===== INFO BOX ===== */
.info-box {
    background: #e8f6f3;
    border-left: 4px solid var(--accent-color);
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.info-box.warning { background: #fef9e7; border-left-color: var(--warning-color); }
.info-box.danger { background: #fdedec; border-left-color: var(--danger-color); }
.info-box h4 { color: var(--dark-text); margin-bottom: 10px; }


/* ===== FAQ ACCORDION ===== */
.faq-section { background: var(--light-bg); }

.faq-item {
    background: white;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-question:hover { background: var(--light-bg); }
.faq-question::after { content: '+'; font-size: 1.5rem; font-weight: 300; transition: var(--transition); }
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.active .faq-answer { max-height: 500px; }
.faq-answer p { padding: 0 25px 20px; color: var(--dark-text); }

/* ===== ABOUT PAGE ===== */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 60px;
}

.about-image {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    padding: 40px;
    color: white;
    text-align: center;
}

.about-image .icon { font-size: 80px; margin-bottom: 20px; }

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

.certification-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

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

.certification-card .badge {
    width: 80px;
    height: 80px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.certification-card h4 { color: var(--primary-color); margin-bottom: 10px; }

/* ===== RESSOURCES LINKS ===== */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.resource-link:hover { border-color: var(--accent-color); transform: translateX(5px); }

.resource-link .icon {
    width: 50px;
    height: 50px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
}

.resource-link span { color: var(--dark-text); font-weight: 500; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-stats { max-width: 500px; margin: 0 auto; }
    .hero-buttons { justify-content: center; }
    .idc-content { grid-template-columns: 1fr; }
    .content-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-intro { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
    
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow);
    }
    
    nav ul.active { display: flex; }
    nav ul li { border-bottom: 1px solid var(--light-bg); }
    nav ul li a { display: block; padding: 15px 0; }
    .hero { padding: 120px 0 60px; }
    .hero-text h1 { font-size: 2rem; }
    .stat-card .number { font-size: 2rem; }
    .services-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .timeline::before { left: 20px; }
    .timeline-item { width: calc(100% - 50px); margin-left: 50px !important; }
    .timeline-item::before { left: -40px !important; right: auto !important; }
    .section-title h2 { font-size: 2rem; }
    .page-header h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .hero-stats { grid-template-columns: 1fr; }
    .btn { padding: 12px 25px; font-size: 0.9rem; }
    .subventions-highlight { padding: 40px 20px; }
    .subventions-highlight .amount { font-size: 2.5rem; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.6s ease forwards; }
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
