/* Variables globales */
:root {
    --primary-color: #7B61FF;
    --bg-color: #f5f5fa;
    --text-color: #1a1a2e;
    --secondary-color: #9B8AFB;
    --section-bg: #f3f4f6;
    --spacing-unit: 1rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Sections communes */
section {
    padding: 5rem 2rem;
}

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

section.dark-section h2,
section.dark-section h3 {
    color: white;
}

h1, h2, h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    text-align: center;
}

/* Titres de section */
section h2 {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

section.dark-section h2 {
    color: white;
}

section.dark-section h2::after {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

@media (max-width: 768px) {
    section h2 {
        font-size: 2.8rem;
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 480px) {
    section h2 {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
}

.background-transition {
    height: 10px;
    margin: 0;
    background: linear-gradient(to bottom, var(--text-color) 70%, var(--bg-color) 100%);
}

.background-transition2 {
    height: 10px;
    margin: 0;
    background: linear-gradient(to bottom, var(--bg-color) 70%, var(--text-color) 100%);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--text-color);
    padding: 2rem;
}

.hero-container {
    max-width: 1400px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    flex: 1;
    text-align: center;
    padding-right: 2rem;
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 700;
    background: linear-gradient(45deg, #fff, var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.subtitle {
    font-size: 1.25rem;
    color: #e5e7eb;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-design {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.design-element {
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    position: relative;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 0 50px rgba(123, 97, 255, 0.3);
}

.design-element::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, var(--secondary-color), transparent);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.design-element::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    z-index: -1;
    filter: blur(15px);
    opacity: 0.5;
}

.code-elements {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.code-line {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    margin: 8px 0;
    border-radius: 2px;
    animation: codetype 3s infinite;
}

.code-line:nth-child(2) {
    width: 40px;
    animation-delay: 0.5s;
}

.code-line:nth-child(3) {
    width: 70px;
    animation-delay: 1s;
}

@keyframes codetype {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.7;
    }
    50% {
        transform: translateX(10px);
        opacity: 1;
    }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    animation: floatShape 4s ease-in-out infinite;
}

.shape-1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.shape-2 {
    top: 60%;
    right: 20%;
    animation-delay: 1s;
}

.shape-3 {
    bottom: 30%;
    left: 40%;
    animation-delay: 2s;
}

@keyframes floatShape {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(10px, -10px) rotate(5deg);
    }
    50% {
        transform: translate(0, -20px) rotate(0deg);
    }
    75% {
        transform: translate(-10px, -10px) rotate(-5deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.btn.secondary {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1024px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        padding-right: 0;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 2rem;
        text-align: center;
    }

    .design-element {
        width: 300px;
        height: 300px;
    }

    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .design-element {
        width: 200px;
        height: 200px;
    }
}

/* À propos */
.about-section {
    background-color: var(--bg-color);
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.about-text {
    text-align: left;
    padding: 3.5rem;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        inset 0 -2px 6px rgba(123, 97, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-text:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.15),
        inset 0 -2px 6px rgba(123, 97, 255, 0.2);
}

.highlight-text {
    font-size: 2.4rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.main-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
    max-width: 1100px;
    margin: 0 auto;
}

.main-text p {
    margin-bottom: 1.8rem;
    padding-left: 1.5rem;
    border-left: 3px solid transparent;
    transition: border-left-color 0.3s ease, padding-left 0.3s ease;
}

.main-text p:hover {
    border-left-color: var(--primary-color);
    padding-left: 2rem;
}

.about-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
}

.about-buttons .btn {
    min-width: 200px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.about-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(123, 97, 255, 0.3);
}

@media (max-width: 768px) {
    .about-text {
        padding: 2rem;
    }

    .highlight-text {
        font-size: 2rem;
    }

    .main-text {
        font-size: 1.05rem;
    }

    .about-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
}

/* À propos - Section détaillée */
#details-section {
    opacity: 0;
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease, height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
}

#details-section.visible {
    opacity: 1;
    height: auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    opacity: 1;
    visibility: visible;
}

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

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

.about-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

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

#details-section.visible .about-card {
    opacity: 1;
    transform: translateY(0);
}

#details-section.visible .about-card:nth-child(1) {
    transition-delay: 0.2s;
}

#details-section.visible .about-card:nth-child(2) {
    transition-delay: 0.4s;
}

#details-section.visible .about-card:nth-child(3) {
    transition-delay: 0.6s;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .highlight-text {
        font-size: 1.75rem;
    }
    
    .main-text {
        font-size: 1.1rem;
    }
}

/* Styles pour la section À propos */
.content-hidden {
    display: none;
}

.content-visible {
    display: block;
}

/* Sections sombres communes */
.dark-section {
    background-color: var(--text-color);
    color: white;
}

.dark-section h2 {
    color: white;
}

/* Sections claires communes */
section:not(.dark-section) {
    background-color: var(--bg-color);
}

section:not(.dark-section) h2 {
    color: var(--text-color);
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

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

.btn.secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn:hover {
    transform: translateY(-2px);
}

/* Compétences */
.skills-section {
    background-color: var(--text-color);
    color: white;
}

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

.skill-category {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px var(--primary-color);
}

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

.skill-category ul {
    list-style: none;
    color: #e5e7eb;
}

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

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

/* Projets */
.projects-section {
    background-color: var(--bg-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: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

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

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 1rem;
    margin: 0;
    color: var(--text-color);
}

.project-card p {
    padding: 0 1rem;
    color: #666;
}

.technologies {
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tech-tag {
    border: 1px solid var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--text-color);
}

.project-links {
    padding: 1rem;
    display: flex;
    gap: 1rem;
}

/* Parcours */
.timeline-section {
    background-color: var(--text-color);
    color: white;
    position: relative;
    overflow: hidden;
}

.timeline-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
}

.timeline {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
}

.timeline h2 {
    color: var(--primary-color);
    margin-bottom: 3rem;
    text-align: center;
    font-size: 1.8rem;
}

.experiences, .formations {
    margin-bottom: 4rem;
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), transparent);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    transition: transform 0.3s ease;
}

.timeline-item:hover::after {
    transform: scale(1.3);
}

.timeline-date {
    position: absolute;
    left: -160px;
    top: -4px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.8rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.timeline-content:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px var(--primary-color);
}

.timeline-content h4 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-content h5 {
    margin: 0.5rem 0;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 500;
}

.timeline-content p {
    margin: 1rem 0 0;
    color: #9ca3af;
    line-height: 1.6;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .timeline {
        padding: 2rem 1rem;
    }

    .timeline-item {
        padding-left: 2rem;
    }

    .timeline-date {
        position: relative;
        left: 0;
        top: 0;
        margin-bottom: 1rem;
        display: inline-block;
    }
}

/* Contact */
.contact-section {
    background-color: white;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

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

/* Footer */
footer {
    background-color: var(--text-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Media Queries */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    section {
        padding: 3rem 1rem;
    }
}

/* Bouton pour afficher les détails */
#show-details {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#show-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#show-details:active {
    transform: translateY(0);
}

/* Gestion du contenu alternant */
.content-wrapper {
    width: 100%;
}

#main-content, #details-section {
    width: 100%;
}

/* Style des cartes */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.4rem;
}

.about-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

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

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* Nouveau design géométrique */
.geometric-design {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circle {
    position: absolute;
    border-radius: 50%;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), transparent);
    animation: rotate 20s linear infinite;
}

.circle-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(-45deg, var(--secondary-color), transparent);
    animation: rotate 15s linear infinite reverse;
}

.square {
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    animation: float 6s ease-in-out infinite;
}

.dots {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate 30s linear infinite;
}

.dot {
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--secondary-color);
    border-radius: 50%;
}

.dot:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.dot:nth-child(2) { top: 60%; right: 20%; animation-delay: 0.5s; }
.dot:nth-child(3) { bottom: 20%; left: 40%; animation-delay: 1s; }
.dot:nth-child(4) { top: 40%; right: 40%; animation-delay: 1.5s; }
.dot:nth-child(5) { bottom: 40%; left: 20%; animation-delay: 2s; }

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: rotate(45deg) translate(0, 0);
    }
    50% {
        transform: rotate(45deg) translate(0, -20px);
    }
}

.dot {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

@media (max-width: 1024px) {
    .geometric-design {
        width: 400px;
        height: 400px;
    }
    
    .circle-1 {
        width: 250px;
        height: 250px;
    }
    
    .circle-2 {
        width: 150px;
        height: 150px;
    }
    
    .square {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .geometric-design {
        width: 300px;
        height: 300px;
    }
    
    .circle-1 {
        width: 200px;
        height: 200px;
    }
    
    .circle-2 {
        width: 120px;
        height: 120px;
    }
    
    .square {
        width: 80px;
        height: 80px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}