/* ===================================
   AFRONET INTERNATIONAL - CSS Principal
   Design Premium & Moderne
   =================================== */

/* === VARIABLES === */
:root {
    /* Couleurs principales */
    --primary-blue: #0A2540;
    --secondary-blue: #1E4976;
    --accent-orange: #FF6B35;
    --accent-green: #00B894;
    --dark-bg: #0D1B2A;
    --light-bg: #F8F9FA;
    
    /* Nuances */
    --blue-light: #2E5C8A;
    --orange-light: #FF8C61;
    --green-light: #55EFC4;
    
    /* Texte */
    --text-dark: #1A1A1A;
    --text-light: #FFFFFF;
    --text-gray: #6C757D;
    --text-medium: #4A5568;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.2);
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #FFFFFF;
}

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

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

ul {
    list-style: none;
}

/* === CONTAINER === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* === PRELOADER === */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s, visibility 0.5s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.loader-inner {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.loader-line {
    width: 4px;
    height: 40px;
    background: var(--accent-orange);
    animation: loaderAnimation 1s infinite ease-in-out;
}

.loader-line:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-line:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loaderAnimation {
    0%, 40%, 100% {
        transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1);
    }
}

.loader-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: 3px;
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-normal);
    padding: var(--spacing-sm) 0;
}

.navbar.scrolled,
.navbar.navbar-solid {
    background: rgba(10, 37, 64, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-light);
    letter-spacing: 2px;
}

.logo-sub {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-orange);
    letter-spacing: 3px;
    margin-top: -5px;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link:hover {
    color: var(--accent-orange);
}

.nav-link.nav-cta {
    background: var(--accent-orange);
    color: var(--text-light);
    border-radius: var(--radius-md);
}

.nav-link.nav-cta:hover {
    background: var(--orange-light);
    transform: translateY(-2px);
}

.nav-link.nav-cta::after {
    display: none;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-light);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* === HERO SECTION === */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.95), rgba(30, 73, 118, 0.85));
    z-index: 2;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    animation: heroZoom 20s infinite alternate;
}

@keyframes heroZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--text-light);
}

.hero-text {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: var(--spacing-md);
}

.hero-title-main {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title-sub {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 300;
    color: var(--accent-orange);
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px;
}

.scroll-indicator span {
    width: 4px;
    height: 10px;
    background: var(--accent-orange);
    border-radius: 2px;
    animation: scrollAnimation 2s infinite;
}

@keyframes scrollAnimation {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    text-align: center;
}

.btn-primary {
    background: var(--accent-orange);
    color: var(--text-light);
    border-color: var(--accent-orange);
}

.btn-primary:hover {
    background: var(--orange-light);
    border-color: var(--orange-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.btn-outline:hover {
    background: var(--text-light);
    color: var(--primary-blue);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* === SECTIONS === */
.section-padding {
    padding: var(--spacing-xl) 0;
}

.section-dark {
    background: var(--dark-bg);
    color: var(--text-light);
}

.section-biomedical {
    background: linear-gradient(135deg, #004d40 0%, #00695c 100%);
    color: var(--text-light);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
}

.section-header-left {
    text-align: left;
    margin-bottom: var(--spacing-lg);
}

.section-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--accent-orange);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
    border-radius: 20px;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

.section-tag.biomedical-tag {
    background: rgba(0, 184, 148, 0.1);
    color: var(--accent-green);
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: inherit;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    line-height: 1.8;
}

.section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.section-cta {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* === STATS SECTION === */
.stats-section {
    background: var(--primary-blue);
    padding: var(--spacing-lg) 0;
    margin-top: calc(-1 * var(--spacing-lg));
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.stat-item {
    text-align: center;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.stat-icon {
    font-size: 3rem;
    color: var(--accent-orange);
    margin-bottom: var(--spacing-sm);
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-light);
}

.stat-number::after {
    content: '+';
    color: var(--accent-orange);
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* === ABOUT SECTION === */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.about-card {
    background: #FFFFFF;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid #E8E8E8;
}

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

.about-card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--accent-orange), var(--orange-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.about-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-blue);
}

.about-card p {
    color: var(--text-medium);
    line-height: 1.8;
}

/* === POLES SECTION === */
.poles-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-blue) 100%);
    color: var(--text-light);
}

.poles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.pole-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

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

.pole-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.pole-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.pole-card:hover .pole-image img {
    transform: scale(1.1);
}

.pole-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-end;
    padding: var(--spacing-md);
}

.pole-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-orange);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-light);
}

.pole-content {
    padding: var(--spacing-lg);
}

.pole-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.pole-description {
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
    opacity: 0.9;
}

.pole-features {
    margin-bottom: var(--spacing-md);
}

.pole-features li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.9;
}

.pole-features i {
    color: var(--accent-orange);
    font-size: 1.1rem;
}

.pole-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-orange);
    font-weight: 600;
    transition: var(--transition-normal);
}

.pole-link:hover {
    gap: 15px;
}

/* === PROJECTS === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.project-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--spacing-md);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-category {
    background: var(--accent-orange);
    color: var(--text-light);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-link {
    width: 50px;
    height: 50px;
    background: var(--text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 1.2rem;
    transition: var(--transition-normal);
}

.project-link:hover {
    transform: rotate(45deg);
    background: var(--accent-orange);
    color: var(--text-light);
}

.project-content {
    padding: var(--spacing-md);
}

.project-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-blue);
}

.project-description {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.project-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--text-gray);
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-meta i {
    color: var(--accent-orange);
}

/* === CTA SECTION === */
.cta-section {
    position: relative;
    padding: var(--spacing-xl) 0;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.95), rgba(255, 107, 53, 0.9));
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.cta-subtitle {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.biomedical-cta .cta-overlay {
    background: linear-gradient(135deg, rgba(0, 77, 64, 0.95), rgba(0, 184, 148, 0.9));
}

/* === FOOTER === */
.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0;
}

.footer-logo span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-orange);
    letter-spacing: 3px;
}

.footer-description {
    margin: var(--spacing-md) 0;
    line-height: 1.8;
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.social-link:hover {
    background: var(--accent-orange);
    transform: translateY(-3px);
}

.footer-col h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
}

.footer-links a {
    opacity: 0.8;
    transition: var(--transition-normal);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent-orange);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 12px;
    opacity: 0.8;
}

.footer-contact i {
    color: var(--accent-orange);
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-contact a:hover {
    color: var(--accent-orange);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-legal {
    margin-top: 8px;
    font-size: 0.85rem;
}

/* === SCROLL TO TOP === */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-orange);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--orange-light);
    transform: translateY(-5px);
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--primary-blue);
        padding: 100px 30px 30px;
        transition: right var(--transition-normal);
        box-shadow: var(--shadow-xl);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero-title-main {
        font-size: 2.5rem;
    }
    
    .hero-title-sub {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .poles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    .hero {
        min-height: 600px;
    }
    
    .hero-title-main {
        font-size: 2rem;
    }
    
    .hero-title-sub {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .projects-grid,
    .poles-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
}