:root {
    --primary: #2A6B7E;
    --primary-dark: #1A5568;
    --primary-light: #7DB1C3;
    --secondary: #8A5A44;
    --accent: #C45B3C;
    --neutral-dark: #2B2D42;
    --neutral: #4A4E69;
    --neutral-light: #F2F2F2;
    --background: #F9F7F4;
    --text: #333333;
    --text-light: #6D6D6D;
    --success: #10B981;
    --warning: #F59E0B;
    --white: #FFFFFF;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--background);
    padding: 1rem;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    padding: clamp(1.5rem, 5vw, 2.5rem);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.875rem;
    border-bottom: 2px solid var(--primary-light);
}

.header-content h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--primary);
    line-height: 1.2;
}

.tagline {
    font-size: clamp(1rem, 4vw, 1.2rem);
    color: var(--text-light);
    margin-bottom: 1.25rem;
    font-weight: 400;
    line-height: 1.4;
}

.header-badges {
    display: flex;
    justify-content: center;
    gap: 0.9375rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1.25rem;
    font-size: clamp(0.75rem, 3vw, 0.85rem);
    font-weight: 500;
    white-space: nowrap;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

h2 {
    font-size: clamp(1.5rem, 6vw, 1.8rem);
    margin-bottom: 1.875rem;
    color: var(--primary);
    font-weight: 600;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid var(--primary-light);
}

/* Timeline Experience */
.timeline {
    position: relative;
    padding-left: 0;
    margin-left: 1.5rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 2.5rem;
}

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.marker-icon {
    color: var(--primary);
    font-size: 0.875rem;
}

.timeline-content {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-content h3 {
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    margin-bottom: 0.5rem;
    color: var(--neutral-dark);
    line-height: 1.3;
}

.company {
    color: var(--primary);
    font-weight: 500;
    margin-right: 0.9375rem;
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.date {
    color: var(--text-light);
    font-size: clamp(0.8rem, 3vw, 0.9rem);
}

.timeline-content p {
    margin: 0.9375rem 0;
    color: var(--text);
    font-size: clamp(0.9rem, 3vw, 1rem);
    line-height: 1.5;
}

/* Interactive Elements */
.interactive-card {
    transition: var(--transition);
    cursor: pointer;
}

.interactive-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.project-details-toggle {
    margin-top: 1.25rem;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.toggle-btn:hover {
    color: var(--primary-dark);
}

.toggle-btn i {
    transition: var(--transition);
    font-size: 0.875rem;
}

.toggle-btn.active i {
    transform: rotate(180deg);
}

.project-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.project-details.active {
    max-height: 500px;
    margin-top: 0.9375rem;
}

.project-details ul {
    list-style-type: none;
    margin-bottom: 1.25rem;
}

.project-details li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.625rem;
    color: var(--text);
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.project-details li::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.stat {
    text-align: center;
    padding: 0.9375rem;
    background: var(--neutral-light);
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: clamp(1.5rem, 6vw, 1.8rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: clamp(0.8rem, 3vw, 0.9rem);
    color: var(--text-light);
    margin-top: 0.3125rem;
}

/* Skills Visualization */
.skill-visualization {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--neutral-light);
}

.skill-visualization h4 {
    margin-bottom: 0.9375rem;
    color: var(--neutral-dark);
    font-size: clamp(1rem, 4vw, 1.1rem);
}

.skill-evolution {
    display: flex;
    flex-direction: column;
    gap: 0.9375rem;
}

.skill-bar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-bar span {
    font-weight: 500;
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.bar-container {
    height: 10px;
    background: var(--neutral-light);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    border-radius: 5px;
    width: 0;
    transition: width 1s ease-in-out;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1.5625rem;
    margin-bottom: 2.5rem;
}

.skill-category {
    padding: 1.5625rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary);
}

.skill-category h3 {
    font-size: clamp(1.1rem, 4vw, 1.2rem);
    margin-bottom: 1.25rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 0.9375rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-level {
    display: flex;
}

.level-dots {
    display: flex;
    gap: 0.3125rem;
}

.dot {
    width: clamp(10px, 3vw, 12px);
    height: clamp(10px, 3vw, 12px);
    border-radius: 50%;
    background: var(--neutral-light);
    transition: var(--transition);
}

.dot.active {
    background: var(--primary);
}

.dot:hover {
    transform: scale(1.2);
}

/* Certifications */
.certifications {
    padding: 1.5625rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-top: 1.875rem;
}

.certifications h3 {
    margin-bottom: 1.25rem;
    color: var(--primary);
    font-size: clamp(1.2rem, 4vw, 1.4rem);
}

.certs-container {
    display: flex;
    flex-direction: column;
    gap: 0.9375rem;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 0.9375rem;
    padding: 0.9375rem;
    background: var(--neutral-light);
    border-radius: 8px;
    transition: var(--transition);
    flex-wrap: wrap;
}

.cert-item:hover {
    background: var(--primary-light);
    transform: translateX(5px);
}

.cert-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.cert-info {
    flex: 1;
    min-width: 200px;
}

.cert-info h4 {
    font-size: clamp(0.95rem, 3vw, 1rem);
    margin-bottom: 0.3125rem;
    color: var(--neutral-dark);
    line-height: 1.3;
}

.cert-info span {
    font-size: clamp(0.8rem, 3vw, 0.9rem);
    color: var(--text-light);
}

.cert-verify {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 0.9375rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: clamp(0.8rem, 3vw, 0.9rem);
    white-space: nowrap;
}

.cert-verify:hover {
    background: var(--primary-dark);
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 1.5625rem;
}

.achievement-card {
    padding: 1.5625rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--accent);
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.achievement-icon {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.25rem;
    font-size: 1.5rem;
}

.achievement-card h3 {
    font-size: clamp(1.1rem, 4vw, 1.2rem);
    margin-bottom: 0.9375rem;
    color: var(--neutral-dark);
    line-height: 1.3;
}

.achievement-card p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
    font-size: clamp(0.9rem, 3vw, 1rem);
    line-height: 1.5;
}

.details-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.details-btn:hover {
    background: var(--primary-dark);
}

/* Contact - CORRECTION DES LIGNES HORIZONTALES */
.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.875rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.9375rem;
    padding: 1rem;
    background: var(--neutral-light);
    border-radius: 8px;
    transition: var(--transition);
}

/* SUPPRIMER LES SÉPARATEURS PROBLÉMATIQUES */
.contact-item:not(:last-child)::after {
    content: none !important;
    display: none !important;
}

.contact-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
}

.contact-details h4 {
    font-size: clamp(0.95rem, 3vw, 1rem);
    margin-bottom: 0.3125rem;
    color: var(--neutral-dark);
    font-weight: 600;
}

.contact-details span {
    font-size: clamp(0.85rem, 3vw, 0.9rem);
    color: var(--text-light);
    display: block;
}

.contact-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: clamp(0.8rem, 3vw, 0.9rem);
    font-weight: 500;
    white-space: nowrap;
}

.contact-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.contact-form {
    padding: 1.25rem;
    background: var(--neutral-light);
    border-radius: 8px;
}

.contact-form h4 {
    margin-bottom: 1.25rem;
    color: var(--primary);
    font-size: clamp(1.1rem, 4vw, 1.2rem);
}

.form-group {
    margin-bottom: 0.9375rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    transition: var(--transition);
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(42, 107, 126, 0.2);
}

.contact-form button {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    font-size: clamp(0.9rem, 3vw, 1rem);
}

.contact-form button:hover {
    background: var(--primary-dark);
}

/* Styles pour la puce du tableau de bord */
.dashboard-pulse {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity 0.5s ease;
}

.dashboard-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, #2A6B7E 0%, #1A5568 100%);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
    cursor: pointer;
}

.dashboard-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(42, 107, 126, 0.4);
}

.math-symbol {
    font-size: 1.5rem;
    font-weight: bold;
}

.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2B2D42;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 0.625rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #2B2D42 transparent transparent transparent;
}

.dashboard-icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Media Queries spécifiques */
@media (min-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr 1fr;
        gap: 1.875rem;
    }
    
    .timeline {
        padding-left: 1.875rem;
        margin-left: 0;
    }
    
    .timeline-item {
        padding-left: 0;
    }
    
    .timeline-marker {
        left: -1.875rem;
    }
    
    .skill-bar {
        flex-direction: row;
        align-items: center;
    }
    
    .skill-bar span {
        width: 150px;
    }
    
    .contact-item:hover {
        background: var(--primary-light);
        transform: translateX(5px);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: clamp(2rem, 5vw, 2.5rem);
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Version mobile spécifique pour la section contact */
@media (max-width: 768px) {
    .contact-info {
        gap: 0.5rem;
    }
    
    .contact-item {
        background: transparent;
        padding: 1rem 0.5rem;
        border-bottom: 1px solid rgba(42, 107, 126, 0.1);
        border-radius: 0;
    }
    
    .contact-item:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    .container {
        padding: 1.25rem;
        border-radius: 8px;
    }
    
    .header-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .badge {
        width: 100%;
        text-align: center;
    }
    
    .cert-item {
        flex-direction: column;
        text-align: center;
        gap: 0.625rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
    }
    
    .contact-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .dashboard-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .math-symbol {
        font-size: 1.25rem;
    }
}

/* Améliorations d'accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Support des appareils tactiles */
@media (hover: none) {
    .interactive-card:hover {
        transform: none;
    }
    
    .dashboard-icon:hover {
        transform: none;
    }
}

/* Correction pour iOS */
@supports (-webkit-touch-callout: none) {
    .contact-form input,
    .contact-form textarea {
        font-size: 16px;
    }
}

/*************************************************************/
/* Correction pour l'affichage des listes sur tous les appareils */
.feature-list {
    margin: 20px 0;
    width: 100%;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    transition: var(--transition);
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.feature-text {
    flex: 1;
    min-width: 0; /* Empêche le débordement */
}

.feature-text h4 {
    margin-bottom: 5px;
    color: var(--secondary);
    font-size: 1.1rem;
    line-height: 1.3;
    word-wrap: break-word;
}

.feature-text p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Correction spécifique pour les écrans larges et paysage */
@media (min-width: 768px) {
    .feature {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .feature-icon {
        margin-top: 3px;
    }
}

/* Correction pour les petits écrans */
@media (max-width: 767px) {
    .feature {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .feature-icon {
        margin-top: 3px;
        flex-shrink: 0;
    }
    
    .feature-text {
        width: calc(100% - 40px); /* Prend tout l'espace disponible moins l'icône */
    }
}

/* Correction spécifique pour les très petits écrans */
@media (max-width: 480px) {
    .feature {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .feature-icon {
        font-size: 1.2rem;
    }
    
    .feature-text h4 {
        font-size: 1rem;
    }
    
    .feature-text p {
        font-size: 0.9rem;
    }
}

/* Correction pour l'alignement vertical */
.detail-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.text-content {
    width: 100%;
    max-width: 800px;
}

/**********************puce problèmes *******************************/
/* ========== CORRECTIONS POUR COMPATIBILITÉ ANDROID ========== */

/* Correction pour l'alignement des listes sur tous les appareils */
.competence-category, .experience-item, .education-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Correction spécifique pour les listes à puces */
.competence-list {
    width: 100%;
    padding-left: 1.2rem;
    margin: 0.8rem 0;
}

.competence-list li {
    margin-bottom: 0.5rem;
    position: relative;
    width: 100%;
    display: block;
}

/* Assurer que le texte ne déborde pas */
.competence-list li, .experience-details, .education-details {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Correction pour l'alignement vertical */
.competence-item, .experience-header, .education-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

/* Correction pour les écrans Android spécifiques */
@media screen and (max-width: 768px) {
    .competence-list {
        padding-left: 1rem;
    }
    
    .competence-list li {
        margin-bottom: 0.6rem;
    }
    
    /* Force l'alignement correct sur les appareils Android */
    .competence-category > h3, .experience-item > h3, .education-item > h3 {
        width: 100%;
        display: block;
        margin-bottom: 0.8rem;
    }
}

/* Correction spécifique pour les très petits écrans */
@media screen and (max-width: 480px) {
    .competence-list {
        padding-left: 0.8rem;
    }
    
    .competence-list li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* Correction pour les navigateurs WebKit (Android) */
@supports (-webkit-touch-callout: none) {
    .competence-list {
        -webkit-padding-start: 1.2rem;
        padding-left: 1.2rem;
    }
    
    .competence-list li {
        -webkit-margin-after: 0.5rem;
        margin-bottom: 0.5rem;
    }
}

/* Garantir un espacement cohérent */
.competence-category {
    margin-bottom: 2rem;
}

.competence-category:last-child {
    margin-bottom: 0;
}