/* ================================
   Arthur Saynes - Portfolio scolaire
   ================================ */

:root {
    --color-primary: #2c3e50;
    --color-accent: #3498db;
    --color-body-bg: #fff;
    --color-body-text: #333;
    --color-navbar-bg: #212529;
    --color-section-alt: #f8f9fa;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--color-body-text);
    background: var(--color-body-bg);
}

footer { background-color: var(--color-navbar-bg) !important; }
.bg-light { background-color: var(--color-section-alt) !important; }

/* Hero */
.hero {
    min-height: 60vh;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

/* Sections */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.section-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 3px;
    background: var(--color-accent);
    margin-top: 0.5rem;
}

.text-center .section-title::after {
    margin-left: auto;
    margin-right: auto;
}

/* Photo placeholder */
.photo-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.1rem;
    color: #6c757d;
}

/* Profile photo */
.profile-photo-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    margin: 0;
}

.profile-photo-wrapper:hover .profile-photo-overlay {
    opacity: 1;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-accent);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--color-accent);
}

/* Cards */
.card {
    border: none;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px);
}

/* Progress bars */
.progress {
    height: 22px;
    border-radius: 12px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Gallery */
.gallery-thumb img,
.gallery-thumb-img {
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
    transition: opacity 0.2s;
}

.gallery-thumb:hover img,
.gallery-thumb-img:hover {
    opacity: 0.8;
}

.gallery-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    line-height: 1;
    font-size: 1.1rem;
    padding: 2px 7px;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-item:hover .gallery-delete-btn {
    opacity: 1;
}

.gallery-item[draggable="true"] {
    cursor: grab;
}

.gallery-item.dragging {
    opacity: 0.4;
}

.gallery-item.drag-over {
    outline: 2px dashed var(--color-accent);
    outline-offset: -2px;
    border-radius: 0.375rem;
}

/* Portfolio intro */
.portfolio-intro p {
    color: #555;
    line-height: 1.7;
}

.portfolio-intro h4,
.portfolio-intro h5 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Category drag & drop */
.category-section[draggable="true"] {
    cursor: grab;
}

.category-section.drag-over {
    outline: 2px dashed var(--color-accent);
    outline-offset: 4px;
    border-radius: 0.5rem;
}

/* Voir tout tile */
.voir-tout-tile {
    aspect-ratio: 1;
    width: 100%;
    font-weight: 500;
    transition: background 0.2s;
}

.voir-tout-tile:hover {
    background: #e9ecef !important;
    color: #333 !important;
}

/* Drop zone */
.border-dashed {
    border-style: dashed !important;
}

/* Footer navigation */
.footer-nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.footer-nav-link:hover,
.footer-nav-link.active {
    color: #fff;
}
