/* African Inspired & Modernized Style */

:root {
    --primary-color: #A0522D; /* Sienna - Earthy/Terracotta */
    --accent-color: #FFD700; /* Gold - Vibrant accent */
    --text-color: #333333;
    --light-bg: #F0F0E4; /* Off-white/Beige */
    --dark-bg: #1A3E5C; /* Deep Indigo for contrast */
    --page-bg: #ffffff;
    --card-bg: #ffffff;
    --muted-text: #5f6c7b;
    --transition-speed: 0.3s;
}

html {
    scroll-behavior: smooth;
}

/* African Inspired & Modernized Style */

/* ... (Vos variables :root restent identiques) ... */

* {
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

/* ⚠️ CHANGEMENT : "Carrosserie" redevient "body" */
body { 
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--page-bg);
    scroll-snap-type: y proximity;
    min-height: 100vh;
}

.snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: auto;
}

@media (max-width: 768px) {
    body {
        scroll-snap-type: none;
    }
    .snap-section {
        min-height: auto;
    }
}

.theme-toggle {
    position: fixed;
    top: 110px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background-color: rgba(0, 0, 0, 0.08);
    color: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1500;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

body.theme-dark {
    --primary-color: #f7a042;
    --accent-color: #ffe066;
    --text-color: #e5e7eb;
    --light-bg: #152238;
    --dark-bg: #050f1f;
    --page-bg: #020817;
    --card-bg: #0f172a;
    --muted-text: #c2cad6;
    background-color: var(--page-bg);
    color: var(--text-color);
}

body.theme-dark a {
    color: var(--accent-color);
}

body.theme-dark a:hover {
    color: var(--primary-color);
}

body.theme-dark .text-muted,
body.theme-dark .text-muted small {
    color: var(--muted-text) !important;
}

body.theme-dark .card,
body.theme-dark .project-card,
body.theme-dark .skill-box,
body.theme-dark .tool-card {
    background-color: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .progress {
    background-color: rgba(255, 255, 255, 0.15);
}

body.theme-dark .theme-toggle {
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--accent-color);
}

/* === Sticky Navigation === */
.site-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 48px;
    z-index: 1200;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.site-header.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.nav-brand {
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--dark-bg);
}

.site-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-weight: 600;
    color: var(--dark-bg);
    position: relative;
    padding-bottom: 4px;
    transition: color var(--transition-speed);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-speed);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    transform: scaleX(1);
}

.nav-cta {
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    transition: all var(--transition-speed);
}

.nav-cta:hover {
    background-color: var(--primary-color);
    color: white;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    width: 26px;
    height: 2px;
    background-color: var(--dark-bg);
    display: block;
    transition: transform var(--transition-speed);
}

.nav-toggle.open span:first-child {
    transform: rotate(45deg) translateY(5px);
}

.nav-toggle.open span:last-child {
    transform: rotate(-45deg) translateY(-5px);
}

@media (max-width: 992px) {
    .site-header {
        padding: 14px 24px;
    }
    .nav-toggle {
        display: flex;
    }
    .site-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--page-bg);
        flex-direction: column;
        gap: 16px;
        padding: 100px 32px;
        transition: right var(--transition-speed);
    }
    .site-nav.open {
        right: 0;
    }
    .nav-cta {
        display: none;
    }
}

body.theme-dark .site-header {
    background-color: rgba(2, 8, 23, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .nav-link,
body.theme-dark .nav-brand {
    color: var(--text-color);
}

body.theme-dark .nav-toggle span {
    background-color: var(--text-color);
}

.scroll-progress {
    position: fixed;
    top: 74px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.05);
    z-index: 1100;
}

.scroll-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transition: width 0.1s ease;
}

body.theme-dark .scroll-progress {
    background-color: rgba(255, 255, 255, 0.08);
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ... (Le reste du CSS reste identique jusqu'à la fin) ... */
/* === General & Typography === */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}
a:hover {
    color: var(--accent-color);
}

h1, h2, h3, h4, h5 {
    color: var(--dark-bg);
    font-weight: 700;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 8px;
}

/* === Cover/Hero Section (Dark Indigo & Gold) === */
div.cover {
    background-color: var(--dark-bg);
    min-height: 100vh;
    padding: 30px 40px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    align-items: center;
}

.cover-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cover-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

img.cover-profile {
    height: 420px;
    width: 420px;
    border: 5px solid var(--accent-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.cover-contact-left {
    border-left: 4px solid var(--accent-color);
    padding-left: 16px;
}

.round-image {
    border-radius: 50%;
    object-fit: cover;
}

h1#typewriter {
    color: white;
    font-size: 3rem;
    margin-top: 8px;
    margin-bottom: 8px;
}


/* Contact Info on Cover */
div.cover-contact {
    position: absolute;
    top: 20px;
    left: 20px;
    border-left: 4px solid var(--accent-color); /* Gold accent line */
    padding-left: 10px;
}

div.cover-contact p {
    text-align: left;
    margin: 5px 0;
}

div.cover-contact * {
    color: white;
    font-size: 0.95rem;
}

.contact-item {
    display: flex;
    align-items: center;
}

.phone-icon, .envelope-icon {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    filter: invert(100%); /* Assumes dark icons, makes them white */
}

/* Contact Button */
.contact-button {
    background-color: var(--accent-color) !important;
    color: var(--dark-bg) !important;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
    transition: all var(--transition-speed);
    border: none !important;
}
.contact-button:hover {
    background-color: #e6b800 !important;
    color: var(--dark-bg) !important;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

/* === Section Layouts === */
.section {
    padding: 40px 40px;
    overflow: hidden;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

/* Section Grise 1 replacement (Intro/Motto) */
.section-intro {
    background-color: var(--light-bg);
    padding: 40px;
    border-top: 5px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.intro-tagline {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--primary-color);
    max-width: 900px;
    margin: 0 auto;
    font-weight: 700;
    line-height: 1.2;
}

/* === About Section (En savoir plus) === */
.about-subtitle {
    font-size: 1.1rem;
    color: var(--text-color);
}
.about-image {
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.about-text h2 {
    text-align: left;
    color: var(--primary-color);
}


/* === SKILLS SECTION (New) === */
.skills-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.skill-box {
    background-color: var(--card-bg);
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: 100%;
    transition: transform var(--transition-speed);
    text-align: center;
}
.skill-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.progress-bar {
    background-color: var(--accent-color) !important;
}
.progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
}
.badge.bg-primary { background-color: #1A3E5C !important; color: white !important; }
.badge.bg-success { background-color: #3CB371 !important; color: white !important; } 
.badge.bg-info { background-color: #B0E0E6 !important; color: var(--dark-bg) !important; } 
.badge.bg-warning { background-color: #FFD700 !important; color: var(--dark-bg) !important; } 
.badge.bg-danger { background-color: var(--primary-color) !important; color: white !important; } 
.badge.bg-secondary { background-color: #6c757d !important; color: white !important; } 

/* === Tools & Platforms Grid === */
.tools-subtitle {
    max-width: 640px;
    margin: 0 auto;
}
.tools-grid {
    margin-top: 10px;
}
.tool-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 18px 14px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    height: 100%;
    border: 1px solid rgba(26, 62, 92, 0.08);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}
.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}
.tool-card h6 {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark-bg);
}
.tool-card p {
    font-size: 0.9rem;
    color: var(--muted-text);
    margin: 0;
}
.tool-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.icon-python { background: linear-gradient(135deg, #306998, #FFD43B); }
.icon-js { background: linear-gradient(135deg, #f7df1e, #f2a900); color: #1a1a1a; }
.icon-php { background: linear-gradient(135deg, #4F5B93, #8892BF); }
.icon-mobile { background: linear-gradient(135deg, #FF7E5F, #FD3A84); }
.icon-cms { background: linear-gradient(135deg, #21759b, #34a0ff); }
.icon-data { background: linear-gradient(135deg, #0B486B, #1A3E5C); }
.icon-docker { background: linear-gradient(135deg, #0db7ed, #084d6e); }
.icon-cloud { background: linear-gradient(135deg, #8E2DE2, #4A00E0); }

.section-lead {
    font-size: 1.1rem;
    max-width: 820px;
    margin: 0 auto 12px;
}

.service-points {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-points article {
    display: flex;
    gap: 16px;
    padding: 18px;
    border-radius: 14px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
}

body.theme-dark .service-points article {
    background-color: rgba(15, 23, 42, 0.85);
}

.service-points h5 {
    margin: 0 0 4px 0;
    font-weight: 700;
    color: var(--primary-color);
}

.service-points p {
    margin: 0;
    color: var(--muted-text);
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-color: rgba(255, 215, 0, 0.18);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

body.theme-dark .icon-circle {
    background-color: rgba(255, 224, 102, 0.15);
    color: var(--accent-color);
}

/* === Impact Section === */
.impact-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(26, 62, 92, 0.06));
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.kpi-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.kpi-label {
    font-size: 0.95rem;
    color: var(--muted-text);
}

.testimonial-card {
    background-color: var(--card-bg);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(26, 62, 92, 0.08);
}

.testimonial-quote {
    font-style: italic;
    color: var(--dark-bg);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-author img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--muted-text);
}

body.theme-dark .kpi-card,
body.theme-dark .testimonial-card {
    background-color: rgba(15, 23, 42, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .testimonial-quote {
    color: var(--text-color);
}


/* === Portfolio Section (Modernized Cards) === */
.responsive-img {
    width: 100%;
    height: 280px; 
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.project-card {
    background-color: var(--card-bg);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
    border-color: var(--primary-color);
}

.card-title {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}

.project-tags .badge {
    font-size: 0.85em;
    padding: 6px 10px;
    margin-right: 5px;
    border-radius: 20px;
    font-weight: normal;
}


.btn-outline-dark {
    color: var(--dark-bg);
    border-color: var(--dark-bg);
    transition: all var(--transition-speed);
}
.btn-outline-dark:hover {
    color: white;
    background-color: var(--dark-bg);
    border-color: var(--dark-bg);
}

/* === Back to Top Button === */
.iconbutton {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    right: 3%;
    bottom: 3%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: background-color var(--transition-speed);
}
.iconbutton:hover {
    background-color: #8B4513; 
}
.iconbutton svg {
    stroke: white;
    width: 24px;
    height: 24px;
}

/* === Other Overrides and Cleanup === */
div.section-grise1, div.section-grise2 {
    background: none;
    background-color: var(--light-bg);
    padding-bottom: 60px;
    padding-top: 60px;
}

div.separateur {
    display: none;
}
div.texte-avec-ligne-verticale {
    border-left: 4px solid var(--accent-color);
}
    iframe { width: 100%;
    border: none;
    height: 350px;
}

div
.float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
/* === Responsive adjustments === */
@media only screen and (max-width: 767px) {
    div.cover {
        min-height: auto;
        padding-top: 30px;
        padding-bottom: 30px;
    }
    img.cover-profile {
        height: 100px;
        width: 100px;
        margin-left: -50px;
    }
    h1#typewriter {
        font-size: 2.5rem;
    }
    .section {
        padding: 40px 20px;
    }
    .section-intro p {
        font-size: 1.3rem;
    }
    .responsive-img {
        height: 200px; 
    }
}

.float {
    animation: float 3s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.float img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* === Responsive adjustments === */
@media only screen and (max-width: 767px) {
    .float {
        height: 200px; /* Adjust the height as needed for smaller screens */
    }

    .float img {
        border-radius: 0; /* Remove the rounded corners for smaller screens */
        box-shadow: none; /* Remove the shadow for smaller screens */
    }
}

/* --- RÈGLES DE RESPONSIVENESS POUR MOBILE (AJOUTER À LA FIN) --- */
@media (max-width: 768px) {
    /* 1. La section de couverture s'adapte à la hauteur du contenu */
    div.cover {
        height: auto; 
        padding-bottom: 30px;
    }
    
    /* 2. Centrage du bloc de contact (téléphone, email, WhatsApp) */
    div.cover-contact {
        position: relative; /* Désactive la position absolue (haut-gauche) */
        top: auto;
        left: auto;
        padding-top: 10px;
        padding-left: 0;
        border-left: none; /* Supprime la ligne d'accentuation en mode centré */
        width: 100%;
        margin-top: 20px;
        text-align: center; /* Centre le texte */
    }
    
    /* 3. Centrage des éléments (icône + texte) */
    div.cover-contact p.contact-item {
        justify-content: center; /* Utilise Flexbox pour centrer l'icône et le texte */
    }

    /* 4. Ajustement pour le profil (déjà centré par le CSS initial, mais s'adapte) */
    img.cover-profile {
        margin-bottom: 20px;
    }
}
/* --- Correction de la hauteur de l'iframe sur mobile --- */
@media (max-width: 768px) {
    /* Augmenter TRES SIGNIFICATIVEMENT la hauteur de l'iframe pour qu'elle puisse contenir 
       le contenu de contact empilé (image, texte, 3 blocs de boutons, footer) */
    iframe {
        height: 750px !important; /* J'augmente à 750px par sécurité. */
    }

    .cover-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    img.cover-profile {
        height: 280px;
        width: 280px;
    }

    div.cover {
        min-height: auto;
        padding: 20px;
    }
}