/* Variables CSS */
:root {
    --primary-color: #003366; /* Bleu foncé de la mairie */
    --secondary-color: #0066cc; /* Bleu clair de la mairie */
    --accent-color: #ff9900; /* Orange pour les accents */
    --text-color: #333333;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --gradient-start: #003366;
    --gradient-end: #0066cc;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --header-height: 80px;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body {
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
}

/* Header et Navigation */
header {
    background-color: rgba(0, 51, 102, 0.9);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: background-color 0.3s ease;
}

header.scrolled {
    background-color: rgba(0, 51, 102, 0.95);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-menu {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu a[aria-current="page"] {
    color: var(--secondary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Hamburger menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: transform 0.3s ease;
}

/* Main content */
main {
    flex: 1;
    margin-top: var(--header-height);
    padding: 0;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    border-radius: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.1;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    from { background-position: 0 0; }
    to { background-position: 100% 100%; }
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.intro-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.8;
    opacity: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    color: #ffffff;
    background-color: rgba(0, 51, 102, 0.3);
    padding: 1rem 2rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

/* Skills Section */
.skills-section {
    padding: 6rem 2rem;
    background-color: var(--card-bg);
    position: relative;
}

.skills-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
}

.skills-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-card {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

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

.skill-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.skill-card:hover i {
    transform: scale(1.1);
}

.skill-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card ul {
    list-style: none;
    text-align: left;
}

.skill-card li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.skill-card li::before {
    content: "•";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
}

/* Projects Section */
.projects-section {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, var(--bg-color), var(--card-bg));
}

.projects-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.project-card:hover::after {
    transform: scaleX(1);
}

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

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Perspectives Section */
.perspectives-section {
    padding: 6rem 2rem;
    background-color: var(--card-bg);
    position: relative;
}

.perspectives-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}

.perspectives-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.perspectives-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.perspective-card {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.perspective-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: var(--transition);
}

.perspective-card:hover::before {
    transform: scaleY(1);
}

.perspective-card:hover {
    transform: translateX(8px);
    box-shadow: var(--card-shadow);
}

.perspective-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

footer a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
}

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

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

/* Media Queries */
@media (max-width: 1024px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .intro-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

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

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

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

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

    nav {
        padding: 0 1rem;
    }

    .hero-section {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .skills-grid,
    .projects-grid,
    .perspectives-content {
        grid-template-columns: 1fr;
    }

    section {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    section h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .intro-text {
        font-size: 1rem;
    }
    
    .skill-card,
    .project-card,
    .perspective-card {
        padding: 1.5rem;
    }

    section {
        padding: 1.5rem;
    }

    section p {
        font-size: 1rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

.cards-section {
    background: transparent;
    box-shadow: none;
    padding: 2rem;
}

.cards-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.card i {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    background: rgba(0, 51, 102, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
}

.card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.card-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1.5rem;
}

.card-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Modal/Pop-up styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.modal p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }
}

/* Content Sections */
section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
}

section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

section p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

section p:last-child {
    margin-bottom: 0;
}