/* Variables pour un thème facile à modifier */
:root {
    --primary: #2B2D42;
    --secondary: #8D99AE;
    --accent: #EF233C;
    --bg-color: #EDF2F4;
    --text-color: #2B2D42;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 5% 0.2rem 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    height: 3.5rem;
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

.burger {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* zone de citations inspirantes */
.quote-container {
    background: var(--secondary);
    overflow: hidden;
    padding: 1rem 0;
}
.quote-slide {
    display: flex;
    gap: 2rem;           /* plus d'espacement entre les blocs */
    animation: slide 30s linear infinite;
    will-change: transform;
}
.quote-box {
    background: white;
    color: var(--primary);
    padding: 1rem;
    flex: 0 0 25%;       /* chaque boîte prend 1/4 de la largeur visible */
    min-width: 200px;    /* permet de rétrécir un peu sur petits écrans */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;    /* empeche le text de déborder */
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.quote-box p {
    margin-bottom: 0.5rem;
    font-style: italic;
}
.quote-box span {
    text-align: right;
    font-weight: bold;
}
@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Sections Hero */
.profiles {
    display: flex;
    justify-content: center;
    gap: 6rem;
    padding: 3rem 5%;
    background: white;
}
.profiles .profile-card {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    max-width: 450px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* ensures equal height */
    min-height: 570px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

/* Portfolio sections */
.portfolio-container section {
    margin-bottom: 3rem;
}
.portfolio-container h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}
.portfolio-container ul {
    list-style: disc inside;
}
.portfolio-container .about p {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}
.profiles .profile-card img {
    width: 210px;
    height: 210px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 1rem auto; /* center horizontally */
    display: block;
}

.profiles .profile-card:hover {
    background: #e0e7ef; /* light highlight */
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.profiles .profile-card {
    max-width: 450px;
    padding: 3rem;
}

.social-icons {
    margin-top: 1rem;
    display: flex;
    gap: 0.4rem;
    justify-content: center;
}


/* portfolio button styling */
.portfolio-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

/* social icon links */
.icon-link {
    width: 40px;
    height: 40px;
    display: inline-block;
}
.icon-link img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: contain;
}

.profile-buttons .btn i {
    /* no margin, icon centered */
    margin: 0;
}

/* helper class for screen-reader-only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--primary);
    color: white;
}

.personal-hero {
    background: var(--secondary); /* Différencier visuellement le portfolio */
}

/* Latest Articles */
.latest-articles {
    padding: 3rem 5%;
    background: white;
}

/* Languages */
.languages-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.language-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    max-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.language-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.language-card img {
    width: 80px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
}

/* Carousel common */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;    
    background: transparent;
    padding: 1rem 0;
}
.carousel-slide {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s ease-in-out;
}
.carousel-item {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 1rem;
    text-align: center;
    border: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease, box-shadow 0.3s;
    opacity: 0.4;
    transform: scale(0.9);
}
.carousel-item.active:hover {
    transform: scale(1) translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}
.carousel-content {
    max-width: 600px;
    margin: 0 auto;
}
.carousel-img {
    width: 100%;
    height: 125px;
    object-fit: contain;
    margin-bottom: 1rem;
    background: transparent;
}
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
}
.carousel-prev { left: 0.5rem; }
.carousel-next { right: 0.5rem; }





.latest-articles h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.latest-articles .grid {
    margin-bottom: 2rem;
}

.latest-articles .btn {
    display: block;
    margin: 0 auto;
    width: fit-content;
}

/* Grilles (Blog et Portfolio) */
main {
    padding: 3rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

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

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

/* Cartes (Articles/Projets) */
.card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img {
    height: 150px;
    background: transparent; /* Espace pour une image */
    border-radius: 4px;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

footer {
    text-align: center;
    padding: 2rem;
    background: var(--primary);
    color: white;
    margin-top: 2rem;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Subscription form */
.subscribe {
    max-width: 800px; /* expand slightly for larger devices */
    margin: 2rem auto;
    padding: 2rem 1rem;
    background: #e9f2f7; /* light blue background separate from page */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}
.subscribe-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}
.subscribe-form input[type="email"] {
    flex: 1 1 220px;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.subscribe-form button {
    padding: 0.6rem 1.2rem;
}
@media (max-width: 480px) {
    .subscribe {
        padding: 1.5rem 0.5rem;
    }
    .subscribe-form {
        flex-direction: column;
    }
    .subscribe-form input[type="email"],
    .subscribe-form button {
        width: 100%;
    }
}


.contact-form h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-form form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

/* Responsive (Mobiles) */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Caché sur mobile, à gérer avec JS */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        overflow-y: auto;
        max-height: 0;
        transition: max-height 0.25s ease;
    }
    .nav-links.show {
        display: flex;
        max-height: 300px; /* allow showing full menu */
    }
    .burger {
        display: block;
    }

    /* layout tweaks */
    .profiles {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 5%;
    }
    .profiles .profile-card {
        max-width: 90%;
        width: 100%;
        margin: 0 auto;
    }
    .quote-box {
        flex: 0 0 70%;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .hero {
        padding: 3rem 1rem;
        /* ensure text wraps nicely */
        word-wrap: break-word;
    }
    .portfolio-container,
    .blog-container {
        padding: 2rem 1rem;
    }
    .quote-container {
        padding: 1rem 0;
    }
    .quote-slide {
        gap: 1rem;
    }
    .profiles .profile-card img {
        width: 150px;
        height: 150px;
    }
    .logo {
        height: 2.5rem;
    }
    /* navigation stacking priority */
    .nav-links {
        z-index: 1100;
    }
    .burger {
        z-index: 1200;
    }
}