/* ===================================
   Variables CSS
   =================================== */
:root {
    --primary-color: #60b2e5;
    --primary-dark: #4a9bd1;
    --secondary-color: #3273dc;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* ===================================
   Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden; /* Empêche le scroll horizontal */
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    padding: 0.5rem 0;
}

.navbar.is-scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.navbar-item {
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-item:hover {
    color: var(--primary-color);
    background-color: transparent !important;
}

.navbar-item.is-active {
    color: var(--primary-color);
    background-color: transparent !important;
}

.navbar-item.is-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.navbar-brand .logo {
    font-size: 1.3rem;
    font-weight: 700;
}

/* ===================================
   Main Content
   =================================== */
.main-content {
    min-height: calc(100vh - 300px);
    padding-top: 52px;
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    background: linear-gradient(135deg, #60b2e5 0%, #3273dc 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.85;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-cta {
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-cta .button {
    padding: 1.5rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}

.hero-cta .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ===================================
   Section Styles
   =================================== */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ===================================
   Cards
   =================================== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

/* Cards égales uniquement dans une grille de colonnes */
.columns .column .card {
    height: 100%;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
}

.card-header-title {
    color: white;
    font-weight: 600;
}

.card-content {
    padding: 2rem;
}

/* ===================================
   Timeline (Expériences)
   =================================== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color) 0%, rgba(96, 178, 229, 0.25) 100%);
}

.timeline-item {
    position: relative;
    padding-left: 100px;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Trait de connexion horizontal marqueur → card */
.timeline-item::after {
    content: '';
    position: absolute;
    left: 64px;
    top: 14px;
    width: 22px;
    height: 2px;
    background: var(--primary-color);
    opacity: 0.4;
}

.timeline-marker {
    position: absolute;
    left: 37px;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 4px rgba(96, 178, 229, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.65rem;
    z-index: 1;
}

/* Pulse sur le poste actuel */
.timeline-marker.is-active {
    animation: markerPulse 2s ease-in-out infinite;
}

@keyframes markerPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(96, 178, 229, 0.3); }
    50%       { box-shadow: 0 0 0 8px rgba(96, 178, 229, 0.08); }
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Couleurs de bordure selon le type */
.timeline-item.is-alternance .timeline-content  { border-left-color: #48c774; }
.timeline-item.is-alternance2 .timeline-content { border-left-color: #3298dc; }
.timeline-item.is-stage .timeline-content       { border-left-color: #ffdd57; }

/* ===================================
   Skills/Competences
   =================================== */
.skill-category {
    margin-bottom: 2rem;
}

.skill-item {
    background: var(--bg-light);
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.skill-item:hover {
    background: white;
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.skill-item .icon {
    color: var(--primary-color);
    margin-right: 1rem;
    font-size: 1.5rem;
}

.progress-wrapper {
    margin: 1.5rem 0;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background-color: var(--bg-light);
}

.progress::-webkit-progress-value {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

.progress::-moz-progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

/* ===================================
   Project Grid
   =================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.project-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    color: white;
}

.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
}

.tag {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===================================
   Pro Links (À propos - Liens professionnels)
   =================================== */
.pro-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pro-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e9ecef;
    transition: var(--transition);
}

.pro-link-item:hover {
    transform: translateX(4px);
    text-decoration: none;
    color: inherit;
}

.pro-link-linkedin:hover { background: #EBF5FB; border-color: #0077b5; }
.pro-link-cv:hover        { background: #FDEDEC; border-color: #e74c3c; }
.pro-link-github:hover    { background: #F4F4F4; border-color: #333; }

.pro-link-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.pro-link-linkedin .pro-link-icon { background: #0077b5; color: #fff; }
.pro-link-cv .pro-link-icon       { background: #e74c3c; color: #fff; }
.pro-link-github .pro-link-icon   { background: #333; color: #fff; }

.pro-link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.pro-link-text strong {
    font-size: 0.95rem;
}

.pro-link-text span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.pro-link-arrow {
    font-size: 0.8rem;
    color: var(--text-light);
    transition: var(--transition);
}

.pro-link-item:hover .pro-link-arrow {
    color: var(--text-dark);
}

/* ===================================
   Exp Cards (Parcours professionnel - home)
   =================================== */
.exp-card {
    display: flex;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    background: #fff;
    box-shadow: var(--shadow);
    overflow: hidden;
    height: 100%;
    transition: var(--transition);
}

.exp-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.exp-card-accent {
    width: 5px;
    flex-shrink: 0;
    background: #dee2e6;
}

.exp-card-accent.is-active {
    background: var(--primary-color);
}

.exp-card-body {
    padding: 1.4rem 1.5rem;
    flex: 1;
}

.exp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.exp-card-date {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 500;
}

.exp-card-company {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 0.6rem;
}

.exp-card-company i {
    margin-right: 0.3rem;
}

.exp-card-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
}

/* ===================================
   Experience Timeline (page /experiences)
   =================================== */
.exp-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.exp-timeline-title-block {
    display: flex;
    flex-direction: column;
}

.exp-timeline-company {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.92rem;
    margin-top: 0.25rem;
}

.exp-timeline-icon-wrap {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #fff;
    flex-shrink: 0;
}

.exp-timeline-icon-wrap.is-info    { background: #3298dc; }
.exp-timeline-icon-wrap.is-danger  { background: #f14668; }
.exp-timeline-icon-wrap.is-warning { background: #ffdd57; color: #333; }

.exp-timeline-badge {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-light);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
}

.exp-timeline-missions {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.exp-timeline-missions li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.91rem;
}

.exp-timeline-missions li i {
    color: var(--primary-color);
    margin-top: 0.3rem;
    flex-shrink: 0;
    font-size: 0.7rem;
}

.exp-timeline-missions li div {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.exp-timeline-missions li div span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.exp-timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    margin-top: 0.75rem;
}

/* ===================================
   Skill Exp Cards (compétences /experiences)
   =================================== */
.skill-exp-card {
    text-align: center;
    transition: var(--transition);
}

.skill-exp-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #fff;
    font-size: 1.4rem;
}

.skill-exp-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    margin-top: auto;
}

/* ===================================
   Contact Section
   =================================== */
.contact-info {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item .icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 1.5rem;
    width: 40px;
    text-align: center;
}

/* Contact Form Card */
.contact-form-card {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.contact-form .label {
    font-weight: 600;
    color: var(--text-dark);
}

.contact-form .input,
.contact-form .textarea {
    border-radius: 8px;
    border: 2px solid #e8e8e8;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.contact-form .input:focus,
.contact-form .textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(96, 178, 229, 0.15);
}

.contact-form .input.is-danger,
.contact-form .textarea.is-danger {
    border-color: #f14668;
}

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

/* Hero Contact */
.contact-hero {
    background: linear-gradient(135deg, #60b2e5 0%, #3273dc 100%);
}

/* CTA Box */
.cta-gradient-box {
    background: linear-gradient(135deg, #60b2e5 0%, #3273dc 100%) !important;
    border: none !important;
    padding: 4rem !important;
}

/* Flash notifications */
.flash-container {
    position: fixed;
    top: 70px;
    right: 1.5rem;
    z-index: 9999;
    max-width: 420px;
    width: calc(100% - 3rem);
}

.flash-notification {
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ===================================
   Buttons
   =================================== */
.button.is-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    font-weight: 600;
    transition: var(--transition);
}

.button.is-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(96, 178, 229, 0.4);
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

/* ===================================
   UTILITIES
   =================================== */
.mt-6 { margin-top: 4rem !important; }
.mb-6 { margin-bottom: 4rem !important; }

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   RESPONSIVE - Tablet (769px - 1024px)
   =================================== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1.2rem; }
    .section { padding: 60px 2rem; }
    .section-title { font-size: 2rem; }

    .contact-form-card {
        margin-top: 0;
    }
}

/* ===================================
   RESPONSIVE - Mobile (≤ 768px)
   =================================== */
@media screen and (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .hero-section {
        padding: 100px 1.25rem 50px !important;
    }

    .section {
        padding: 40px 1.25rem !important;
    }

    .section-title {
        font-size: 1.7rem;
    }

    /* Hero CTA buttons empilés */
    .hero-cta {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .hero-cta .button {
        width: 100%;
        max-width: 300px;
        margin-left: 0 !important;
    }

    /* Correction Timeline Mobile */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 52px;
    }

    .timeline-item::after {
        left: 32px;
        width: 14px;
        top: 12px;
    }

    .timeline-marker {
        left: 6px;
        width: 26px;
        height: 26px;
        font-size: 0.6rem;
    }

    /* Grille de projets fluide */
    .project-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }

    /* Contact */
    .contact-info {
        padding: 1.25rem;
    }

    .contact-form-card {
        margin-top: 2rem;
    }

    /* CTA Box padding réduit */
    .cta-gradient-box {
        padding: 2.5rem 1.5rem !important;
    }

    /* Flash container plein-écran mobile */
    .flash-container {
        left: 1rem;
        right: 1rem;
        max-width: 100%;
        width: auto;
    }

    /* Footer centré sur mobile */
    .footer .column {
        text-align: center !important;
    }

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

    /* Navbar burger visible */
    .navbar-menu.is-active {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }

    /* Section title centré */
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .has-text-centered .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ===================================
   RESPONSIVE - Très petit (≤ 480px)
   =================================== */
@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-cta .button {
        max-width: 100%;
    }

    .card-content {
        padding: 1.25rem;
    }

    .contact-form .columns {
        margin: 0;
    }

    .contact-form .columns .column {
        padding-left: 0;
        padding-right: 0;
    }

    .cta-gradient-box {
        padding: 2rem 1rem !important;
    }
}