/**
 * =============================================
 * STYLES CSS - VERSION MOBILE DÉDIÉE
 * Fichier: assets/css/mobile.css
 * Astrid Jonathan - CV Mobile Optimisé
 * =============================================
 */

/* Variables CSS pour la cohérence */
:root {
    --primary-color: #b58cac;
    --primary-light: #d4a5c4;
    --background-dark: #000;
    --background-secondary: #1a1a1a;
    --text-light: #ccc;
    --text-white: #fff;
    --border-color: rgba(181, 140, 172, 0.3);
    --shadow-primary: rgba(181, 140, 172, 0.2);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));

    /* Spacings mobile */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem; /* Ajout d'une variable pour le padding mobile pour les très hauts écrans */

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-circle: 50%;
}

/* =============================================
   RESET ET BASE MOBILE
   ============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Le background de mobile-body est géré ici et prendra le dessus sur le background du body dans styles.css
   lorsque cette feuille de style est active (sur mobile). */
.mobile-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--background-dark); /* C'est ici que votre background sombre est défini pour le mobile */
    overflow-x: hidden;
    padding-bottom: 80px; /* Espace pour navigation fixe */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* =============================================
   SPLASH SCREEN
   ============================================= */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-circle);
    background: var(--text-white);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: var(--spacing-md);
    animation: pulse 2s infinite;
}

.splash-text {
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
}

.splash-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* =============================================
   PARTICULES MOBILE
   ============================================= */
.particles-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle-mobile {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: var(--radius-circle);
    opacity: 0.4;
    animation: float-mobile 8s infinite ease-in-out;
}

@keyframes float-mobile {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    25% { transform: translateY(-20px) translateX(10px) rotate(90deg); }
    50% { transform: translateY(-10px) translateX(-10px) rotate(180deg); }
    75% { transform: translateY(-30px) translateX(5px) rotate(270deg); }
}

/* =============================================
   LAYOUT MOBILE
   ============================================= */
.mobile-main {
    width: 100%;
    min-height: 100vh;
    padding-top: 32px; /* Espace pour header mobile */
}

.mobile-section {
    min-height: 100vh;
    padding: var(--spacing-lg) var(--spacing-sm);
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-section:nth-child(even) {
    /* C'est ici que le dégradé pour les sections paires est défini */
    background: linear-gradient(135deg, var(--background-secondary) 0%, var(--background-dark) 100%);
}

.mobile-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* =============================================
   TYPOGRAPHIE MOBILE
   ============================================= */
.section-title-mobile {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.title-icon {
    font-size: 1.5rem;
}

/* =============================================
   SECTION HERO MOBILE
   ============================================= */
.hero-section {
    /* C'est ici que le dégradé radial pour la section hero est défini */
    background: radial-gradient(circle at center, var(--background-secondary) 0%, var(--background-dark) 70%);
}

.hero-mobile {
    text-align: center;
}

.profile-circle {
    position: relative;
    margin: 0 auto var(--spacing-md);
    width: 120px;
    height: 120px;
}

.profile-img-mobile {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-circle);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--background-dark);
    font-weight: bold;
    border: 3px solid var(--primary-light);
    box-shadow: 0 8px 25px var(--shadow-primary);
}

.profile-status {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-circle);
    border: 3px solid var(--background-dark);
}

.profile-status.online {
    background: #00ff88;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title-mobile {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-weight: bold;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.badge {
    background: rgba(181, 140, 172, 0.2);
    color: var(--text-light);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.hero-description-mobile {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    color: var(--text-light);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* =============================================
   BOUTONS MOBILE
   ============================================= */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button.primary {
    background: var(--gradient-primary);
    color: var(--background-dark);
    box-shadow: 0 4px 15px var(--shadow-primary);
}

.cta-button.primary:hover,
.cta-button.primary:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-primary);
}

.cta-button.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-button.secondary:hover,
.cta-button.secondary:active {
    background: var(--primary-color);
    color: var(--background-dark);
}

.cta-button.large {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: 1.1rem;
}

/* =============================================
   COMPÉTENCES REGROUPÉES
   ============================================= */
.competences-group {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(181, 140, 172, 0.2);
}

.competences-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.competences-subtitle {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-md);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

/* =============================================
   CARTES À PROPOS
   ============================================= */
.about-cards {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.about-card {
    background: rgba(181, 140, 172, 0.1);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease;
}

.about-card:active {
    transform: scale(0.98);
}

.about-card.highlight {
    background: var(--gradient-primary);
    color: var(--background-dark);
    border-color: var(--primary-light);
}

.about-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.about-card h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.about-card.highlight h3 {
    color: var(--background-dark);
}

/* =============================================
   COMPÉTENCES MOBILE
   ============================================= */
.skills-mobile {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.skill-mobile {
    background: rgba(181, 140, 172, 0.1);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.skill-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.skill-icon {
    font-size: 1.5rem;
}

.skill-title {
    flex: 1;
    margin-left: var(--spacing-sm);
    color: var(--primary-color);
    font-size: 1.1rem;
}

.skill-level {
    color: var(--text-white);
    font-weight: bold;
    font-size: 0.9rem;
}

.skill-progress {
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    transition: width 1s ease;
    animation: progressLoad 2s ease-in-out;
}

@keyframes progressLoad {
    from { width: 0%; }
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.skill-tag {
    background: rgba(181, 140, 172, 0.2);
    color: var(--text-light);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

/* =============================================
   TIMELINE MOBILE
   ============================================= */
.timeline-mobile {
    position: relative;
    padding-left: var(--spacing-lg);
}

.timeline-mobile::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item-mobile {
    position: relative;
    margin-bottom: var(--spacing-xl);
    padding-left: var(--spacing-lg);
}

.timeline-marker {
    position: absolute;
    left: -25px;
    top: 10px;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-circle);
    background: var(--primary-color);
    border: 3px solid var(--background-dark);
    z-index: 1;
}

.timeline-item-mobile.current .timeline-marker {
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.timeline-content {
    background: rgba(181, 140, 172, 0.1);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.timeline-period {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
}

.timeline-title {
    color: var(--text-white);
    margin-bottom: var(--spacing-xs);
    font-size: 1.1rem;
}

.timeline-company {
    color: var(--primary-light);
    font-style: italic;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
}

.timeline-description {
    margin-bottom: var(--spacing-sm);
    font-size: 0.95rem;
    line-height: 1.5;
}

.timeline-achievements {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.achievement-tag {
    background: rgba(181, 140, 172, 0.2);
    color: var(--text-light);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

/* =============================================
   PROJETS MOBILE
   ============================================= */
.projects-grid-mobile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.project-card-mobile {
    background: rgba(181, 140, 172, 0.1);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.project-card-mobile:active {
    transform: scale(0.98);
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.project-icon {
    font-size: 2rem;
}

.project-count {
    background: var(--gradient-primary);
    color: var(--background-dark);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-lg);
    font-weight: bold;
    font-size: 0.9rem;
}

.project-title {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.project-description {
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tech-tag {
    background: rgba(181, 140, 172, 0.2);
    color: var(--text-light);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

/* =============================================
   FORMATIONS MOBILE
   ============================================= */
.education-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.education-item {
    display: flex;
    background: rgba(181, 140, 172, 0.1);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.education-item.highlight {
    background: var(--gradient-primary);
    color: var(--background-dark);
    border-color: var(--primary-light);
}

.education-item:active {
    transform: scale(0.98);
}

.education-year {
    background: var(--primary-color);
    color: var(--background-dark);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-weight: bold;
    font-size: 0.8rem;
    height: fit-content;
    margin-right: var(--spacing-md);
    white-space: nowrap;
}

.education-item.highlight .education-year {
    background: var(--background-dark);
    color: var(--primary-color);
}

.education-content {
    flex: 1;
}

.education-title {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
    font-size: 1rem;
}

.education-item.highlight .education-title {
    color: var(--background-dark);
}

.education-school {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
}

.education-item.highlight .education-school {
    color: rgba(0, 0, 0, 0.7);
}

/* =============================================
   CONTACT MOBILE
   ============================================= */
.contact-section {
    background: radial-gradient(circle at center, var(--background-secondary) 0%, var(--background-dark) 70%);
}

.contact-cards-mobile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.contact-card-mobile {
    background: rgba(181, 140, 172, 0.1);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card-mobile::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: top 0.3s ease;
    z-index: -1;
}

.contact-card-mobile:active::before {
    top: 0;
}

.contact-card-mobile:active {
    color: var(--background-dark);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.contact-card-mobile h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
    font-size: 1rem;
}

.contact-card-mobile:active h3 {
    color: var(--background-dark);
}

.contact-card-mobile p {
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
}

.contact-action {
    font-size: 0.8rem;
    opacity: 0.8;
    font-weight: 600;
}

.contact-cta {
    text-align: center;
    padding: var(--spacing-lg);
    background: rgba(181, 140, 172, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.contact-message {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-white);
}

/* =============================================
   NAVIGATION MOBILE FIXE
   ============================================= */
.nav-mobile-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-xs) 0;
    z-index: 1000;
    box-shadow: 0 -2px 20px var(--shadow-primary);
}

.nav-mobile-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.nav-mobile-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.3s ease;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    min-width: 45px;
}

.nav-mobile-item:active,
.nav-mobile-item.active {
    color: var(--primary-color);
    background: rgba(181, 140, 172, 0.1);
    transform: translateY(-2px);
}

.nav-mobile-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.nav-mobile-label {
    font-size: 0.65rem;
    font-weight: 500;
}

/* =============================================
   ANIMATIONS ET TRANSITIONS
   ============================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   RESPONSIVE MOBILE
   ============================================= */
@media (max-width: 375px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1.25rem;
        --spacing-lg: 1.75rem;
    }

    .hero-title-mobile {
        font-size: 1.8rem;
    }

    .section-title-mobile {
        font-size: 1.5rem;
    }

    .nav-mobile-label {
        font-size: 0.6rem;
    }

    .contact-cards-mobile {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-height: 667px) {
    .mobile-section {
        min-height: auto;
        padding: var(--spacing-md) var(--spacing-sm);
    }
}

/* =============================================
   DARK MODE SUPPORT
   ============================================= */
@media (prefers-color-scheme: dark) {
    .mobile-body {
        /* Ceci est une règle spécifique au mode sombre, elle s'appliquera si l'utilisateur
           a activé le mode sombre dans ses préférences système.
           Le background par défaut de .mobile-body reste var(--background-dark) */
        background: var(--background-dark);
    }
}

/* =============================================
   REDUCED MOTION SUPPORT
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .particles-mobile {
        display: none;
    }
}
