/* ====================================================================
   PORTFOLIO MOBILE - TUILES + ACCORDÉON
   ==================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    color: #333;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

/* SECTIONS */
.section {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    min-height: 100vh;
    padding-bottom: 40px;
}

.section.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* ========== HOME SECTION ========== */
#home-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.profile-header {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.profile-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    opacity: 0.95;
}

.profile-subtitle {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* CATEGORIES GRID */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px;
    flex: 1;
}

.category-tile {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.category-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.category-tile[data-category="experiences"]::before {
    background: #3498db;
}

.category-tile[data-category="formations"]::before {
    background: #e74c3c;
}

.category-tile[data-category="competences"]::before {
    background: #2ecc71;
}

.category-tile[data-category="projets"]::before {
    background: #f39c12;
}

.category-tile:active {
    transform: scale(0.98);
}

.category-tile:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.tile-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.tile-label {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.tile-count {
    font-size: 0.85rem;
    color: #999;
}

/* FOOTER INFO */
.footer-info {
    padding: 20px;
    text-align: center;
    color: white;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.1);
    margin: 20px;
    border-radius: 12px;
}

.footer-info p {
    margin: 5px 0;
}

/* ========== DETAIL SECTION ========== */
.detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.back-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.detail-title {
    font-size: 1.3rem;
    font-weight: 700;
    flex: 1;
}

/* ACCORDION */
.accordion-container {
    padding: 20px;
}

.accordion-item {
    margin-bottom: 12px;
    border-radius: 12px;
    border-left: 5px solid #ccc;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.accordion-item[data-category="experiences"] {
    border-left-color: #3498db;
}

.accordion-item[data-category="formations"] {
    border-left-color: #e74c3c;
}

.accordion-item[data-category="competences"] {
    border-left-color: #2ecc71;
}

.accordion-item[data-category="projets"] {
    border-left-color: #f39c12;
}

.accordion-header {
    padding: 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    transition: all 0.2s;
}

.accordion-header:active {
    background: #f0f0f0;
}

.accordion-title {
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
}

.accordion-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

.accordion-toggle {
    font-size: 1.2rem;
    color: #999;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-toggle {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 0 16px 16px 16px;
}

.accordion-content p {
    margin: 10px 0;
    line-height: 1.6;
    font-size: 0.95rem;
    color: #555;
}

.accordion-content strong {
    color: #333;
    font-weight: 600;
}

.accordion-content ul {
    margin: 10px 0 10px 20px;
    list-style: disc;
}

.accordion-content li {
    margin: 6px 0;
    color: #666;
    font-size: 0.95rem;
}

.content-section {
    margin-bottom: 12px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
    .profile-header {
        padding: 30px 15px;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .profile-header h1 {
        font-size: 1.7rem;
    }

    .categories-grid {
        gap: 10px;
        padding: 15px;
    }

    .category-tile {
        padding: 16px;
    }

    .tile-icon {
        font-size: 2.2rem;
    }

    .tile-label {
        font-size: 0.95rem;
    }

    .tile-count {
        font-size: 0.8rem;
    }
}

/* ANIMATIONS */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section.active {
    animation: slideIn 0.3s ease;
}
