/* ============================================ */
/* PORTFOLIO DATA SCIENTIST & AI SPECIALIST    */
/* Design moderne avec glassmorphism et gradients */
/* ============================================ */

/* Variables CSS pour thème Data Science/IA */
:root {
    --primary-gradient: linear-gradient(135deg, #2c5282 0%, #1a365d 100%);
    --secondary-gradient: linear-gradient(135deg, #4a90a4 0%, #5fa8ba 100%);
    --accent-gradient: linear-gradient(135deg, #2c5282 0%, #4a90a4 100%);
    --dark-bg: #0f0f23;
    --card-bg: rgba(255, 255, 255, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --text-primary: #1a1a2e;
    --text-secondary: #64748b;
    --border-color: rgba(100, 116, 139, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Import Google Font - Inter pour un look moderne */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    line-height: 1.6;
}

/* ============================================ */
/* NAVBAR LAYOUT UTILITIES                      */
/* ============================================ */

.navbar-spacer {
    flex: 1;
}

.navbar-spacer-left {
    flex: 0 !important;
    width: 0 !important;
    display: none;
}

.navbar-left-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
}

.navbar-left-layout .navbar-brand-right {
    justify-content: flex-end;
    margin-left: auto;
    margin-right: 0;
    padding-left: 0;
    padding-right: 1rem;
    text-align: right;
}

.navbar-left-layout .navbar-brand-right span {
    text-align: right;
}

.navbar-left-layout .navbar-brand-right img {
    margin-left: 0;
    margin-right: 0.75rem;
}

.navbar-left-layout .navbar-collapse {
    flex-grow: 0 !important;
}

.navbar-left-layout .navbar-nav {
    margin-left: 0 !important;
    margin-right: auto !important;
    padding-right: 0 !important;
}

/* Groupement des métadonnées (auteur, profession, dates) */

.meta-info-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #64748b;
}

.meta-info-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    row-gap: 4px;
    color: inherit;
}

.meta-info-item.meta-date {
    color: #94a3b8;
    font-size: 0.875rem;
}

.meta-info-item.meta-profession {
    color: #64748b;
}

.meta-info-item.meta-profession::before {
    content: '•';
    font-size: 1.5em;
    line-height: 1;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    transform: translateY(-2px);
}

/* ============================================ */
/* NAVBAR RESPONSIVE - MOBILE FIRST            */
/* ============================================ */

/* Force le menu à rester collapsé sur mobile et tablette */
@media (max-width: 991px) {
    /* Affiche toujours le bouton hamburger */
    .navbar-toggler {
        display: block !important;
    }
    
    /* Cache le menu par défaut sur mobile */
    .navbar-collapse {
        display: none !important;
    }
    
    /* Affiche le menu seulement quand il est ouvert (classe .show ajoutée par Bootstrap) */
    .navbar-collapse.show {
        display: block !important;
    }
    
    /* Style du menu déroulant sur mobile */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 4px 12px rgba(44, 82, 130, 0.1);
        padding: 1rem;
        z-index: 1000;
    }
    
    /* Les liens de navigation en colonne sur mobile */
    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Ajuste les liens pour mobile */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        width: 100%;
        text-align: left;
    }
}

/* Séparateur de section minimaliste */
.section-separator {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(44, 82, 130, 0.15) 20%, 
        rgba(74, 144, 164, 0.2) 50%, 
        rgba(44, 82, 130, 0.15) 80%, 
        transparent 100%
    );
    margin: 3.5rem 0;
    width: 100%;
}

/* Pour les sections principales */
section {
    padding: 3rem 0;
}

/* Animation fade-in pour les sections */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cartes portfolio avec effet glassmorphism */
.portfolio-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

.portfolio-card:hover::before {
    opacity: 1;
}

.portfolio-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(44, 82, 130, 0.3);
}

.portfolio-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-card ul {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.9;
}

.portfolio-card ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.portfolio-card ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: #2c5282;
    font-weight: bold;
}

/* Cartes de projets/blogs/services - Design moderne */
.card-custom {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: var(--transition-smooth);
    height: 100%;
    background: var(--card-bg);
    overflow: hidden;
    position: relative;
}

.card-custom::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--secondary-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 0;
}

.card-custom:hover::after {
    opacity: 0.03;
}

.card-custom:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: rgba(0, 147, 233, 0.4);
}

.card-custom .card-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.card-custom .card-text {
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

.card-custom .card-body {
    position: relative;
    z-index: 1;
}

/* Boutons modernes avec style navbar - fond clair par défaut */
.btn-custom-primary {
    background: white;
    border: 2px solid #e2e8f0;
    color: #1a202c;
    border-radius: 8px;
    padding: 0.65rem 2rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(44, 82, 130, 0.08);
}

.btn-custom-primary:hover {
    background: #2c5282;
    color: white;
    border-color: #2c5282;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.2);
}

.btn-custom-outline {
    border: 2px solid #e2e8f0;
    background: white;
    color: #1a202c;
    border-radius: 8px;
    padding: 0.65rem 2rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(44, 82, 130, 0.08);
}

.btn-custom-outline:hover {
    background: #2c5282;
    color: white;
    border-color: #2c5282;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.2);
}

/* Liens "Voir tous" - style navbar */
.view-all-link {
    font-weight: 600;
    text-decoration: none;
    color: #1a202c;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(44, 82, 130, 0.08);
}

.view-all-link:hover {
    background: #2c5282;
    color: white;
    border-color: #2c5282;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.2);
    text-decoration: none;
}

/* Section d'introduction - style carte avec bordure à gauche */
.section-intro {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    color: #4a5568;
    line-height: 1.7;
}

.section-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

.section-intro:hover::before {
    opacity: 1;
}

.section-intro:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    border-color: rgba(44, 82, 130, 0.3);
}

/* Formulaire de contact moderne */
.contact-form {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.contact-form .form-control {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.9);
}

.contact-form .form-control:focus {
    border-color: #2c5282;
    box-shadow: 0 0 0 4px rgba(44, 82, 130, 0.1);
    background: white;
    outline: none;
}

/* Icônes sociales avec effet hover */
.social-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    transition: var(--transition-smooth);
    filter: grayscale(0%);
    border-radius: 12px;
    padding: 6px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-md);
    filter: grayscale(0%);
}

/* Icônes inline */
.icon-inline {
    width: 15px;
    height: 15px;
    object-fit: contain;
    margin-right: 4px;
    vertical-align: text-bottom;
}

/* Texte de localisation */
.location-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
}

/* Espacements et titres modernes */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Grille wrapper */
.grid-wrapper {
    margin-top: 2.5rem;
}

/* Badge tech pour compétences */
.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 4px;
    transition: var(--transition-smooth);
}

.tech-badge:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.tech-badge::before {
    content: '●';
    color: #2c5282;
    font-size: 0.6rem;
}

.tech-badge:hover::before {
    color: white;
}

/* Footer moderne */
footer a {
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Footer avec bordure gradient */
.footer-bleed {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    box-sizing: border-box;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid var(--border-color);
    position: relative;
}

.footer-bleed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    opacity: 0.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-separator {
        margin: 2rem 0;
    }
    
    section {
        padding: 1.5rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .portfolio-card {
        padding: 18px;
        margin-bottom: 1rem;
    }
}

/* Card media: responsive with adaptive sizing for full image visibility */
.card-media {
    width: 100%;
    max-height: 400px;
    min-height: 180px;
    overflow: hidden;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-media img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain; /* show full image without cropping */
    object-position: center center;
    display: block;
    background-color: transparent;
    transition: transform 0.3s ease;
}

/* Skeleton loading animation */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Hover effect: slight zoom on image */
.card-custom:hover .card-media img {
    transform: scale(1.05);
}

/* Tablet: slightly taller ratio */
@media (max-width: 992px) {
    .card-media {
        aspect-ratio: 16/10;
        max-height: 350px;
        min-height: 160px;
    }
    
    .card-media img {
        max-height: 350px;
    }
}

/* Mobile: square-ish ratio for better fit */
@media (max-width: 768px) {
    .card-media {
        aspect-ratio: 4/3;
        max-height: 280px;
        min-height: 140px;
    }
    
    .card-media img {
        max-height: 280px;
    }
}

/* Variant: Panoramic images */
.card-media.panorama {
    aspect-ratio: 21/9;
    max-height: 300px;
}

/* Variant: Square images (logos, portraits) */
.card-media.square {
    aspect-ratio: 1/1;
    max-height: 300px;
}

/* Variant: Portrait images */
.card-media.portrait {
    aspect-ratio: 3/4;
    max-height: 350px;
}

/* Logo-style small image used inside cards (compact) */
.card-logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: #ffffff; /* keep white/neutral background */
    border: 1px solid #e1e1e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
}

.content-body img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain; /* show entire inline images from rich text */
    margin: 12px auto;
}

.card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* fill the square and crop as needed */
    display: block;
    border-radius: inherit; /* match container rounding */
}

.card-body .card-title-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.card-body .card-title-row .card-title {
    margin: 0; /* remove default spacing when used inline */
}

/* User chip (navbar pill) */
/* user-chip removed: styles cleaned up */
