/* Styles personnalisés pour le portfolio */

:root {
    --section-padding: 80px 0;
}

body {
    padding-top: 56px;
}

/* Section Hero */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::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 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.social-links a {
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-section > .container {
    animation: fadeInUp 1s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .d-flex.gap-3 {
        flex-direction: column;
        gap: 1rem !important;
    }
}

/* Section À propos */
.about-section {
    background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
}

.underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.about-card {
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.profile-placeholder {
    padding: 20px;
}

.contact-info {
    font-size: 0.9rem;
}

.contact-info p {
    display: flex;
    align-items: center;
}

.icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.skill-badge {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.skill-badge:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.skill-badge i {
    color: #667eea;
}

@media (max-width: 768px) {
    .about-section {
        padding: 40px 0;
    }

    .skill-badge {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

/* Section Compétences */
.skills-section {
    background: linear-gradient(to bottom, #16213e 0%, #0f3460 100%);
    min-height: 100vh;
}

.tech-card {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tech-card:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.tech-icon {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.tech-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
}

.skills-section card {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3 ease;
}

.skills-section .card:hover {
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .tech-card {
        padding: 15px 10px;
    }

    .tech-icon i,
    .tech-icon img {
        font-size: 2rem !important;
        width: 40px !important;
        height: 40px !important;
    }

    .tech-name {
        font-size: 0.8rem;
    }
}

/* Section Expérience */
.experience-section {
    background: linear-gradient(to bottom, #0f3460 0%, #1a1a2e 100%);
    min-height: 100vh;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 40px;
}

.timeline-badge {
    position: absolute;
    left: 13px;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    z-index: 2;
    border: 3px solid #1a1a2e;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.timeline-badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.2);
}

.timeline-badge.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    box-shadow: 0 0 0 4px rgba(23, 162, 184, 0.2);
}

.timeline-card {
    position: relative;
}

.timeline-card .card {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.timeline-card .card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.missions-list li {
    margin-bottom: 10px;
    padding-left: 5px;
}

.tech-used .badge {
    font-size: 0.85rem;
    padding: 6px 12px;
    font-weight: 500;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-badge {
        left: 3px;
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .timeline-card .card:hover {
        transform: translateY(-3px);
    }
}

/* Section Projets */
.projects-section {
    background: linear-gradient(to bottom, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
}

.project-card {
    height: 100%;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-img {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: calc(0.375rem - 1px) calc(0.375rem - 1px) 0 0;
}

.project-overlay {
    color: white;
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.project-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 0;
}

.project-card .card {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.project-card:hover .card {
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    border-color: #667eea !important;
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-details ul {
    padding-left: 1.2rem;
}

.project-details ul li {
    margin-bottom: 5px;
    color: #a0a0a0;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tech-tags .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
    font-weight: 500;
}

.card-footer {
    padding: 15px 20px;
}

/* Animation pour les cartes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeInUp 0.6s ease-out;
}

.project-card:nth-child(1) {
    animation-delay: 0.1s;
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .project-img {
        height: 150px;
    }

    .project-overlay i {
        font-size: 2.5rem !important;
    }
}

/* Section Contact */
.contact-section {
    background: linear-gradient(to bottom, #16213e 0%, #0f3460 100%);
    min-height: 100vh;
}

.contact-info-wrapper {
    height: 100%;
}

.contact-item {
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.contact-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
    color: white;
}

.contact-item h6 {
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-item a {
    color: #667eea;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #764ba2;
}

.social-buttons .btn {
    transition: all 0.3s ease;
}

.social-buttons .btn:hover {
    transform: translateX(5px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

/* Formulaire */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #fff;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

#contactForm button[type="submit"] {
    transition: all 0.3s ease;
}

#contactForm button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Footer */
.footer {
    background: #0a0e27;
    border-top: 2px solid rgba(102, 126, 234, 0.3);
}

.footer p {
    color: #a0a0a0;
}

.social-links-footer a {
    color: #667eea;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links-footer a:hover {
    color: #764ba2;
    transform: translateY(-3px);
}

/* Animation pour le formulaire */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.contact-section .col-lg-8 > .card {
    animation: slideInRight 0.6s ease-out;
}

.contact-section .col-lg-4 > .contact-info-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1rem;
        margin-right: 12px;
    }

    .footer .row {
        text-align: center !important;
    }

    .footer .col-md-4 {
        margin-bottom: 15px;
    }
}

/* Bouton Retour en haut */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1000;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.back-to-top.show {
    display: flex;
}

/* Optimisations Performance */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Preload animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Smooth scroll pour navigateurs compatibles */
html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
}