/*
=====================================================================
    PROJECT PAGES - CSS COMMUN
    Utilisé par: hairbnb.html, couscoustajine.html, etc.
=====================================================================
*/

/* ==========================================
   HERO PROJECT
   ==========================================
*/
.project-hero {
    padding-top: 100px;
    min-height: 100vh;
}

.project-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.2;
}

.project-hero h1 .subtitle-hero {
    display: block;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.5rem;
}

/* Carousel Hero */
.hero-carousel {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.hero-carousel .carousel-item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: top;
}

.carousel-caption-custom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.95), transparent);
}

.carousel-caption-custom span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-gradient);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bg-primary);
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}

.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev { left: 10px; }
.carousel-control-next { right: 10px; }

.carousel-indicators {
    margin-bottom: 1rem;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    margin: 0 5px;
}

.carousel-indicators button.active {
    background: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

/* ==========================================
   CHALLENGE CARDS
   ==========================================
*/
.challenge-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
}

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

.challenge-card.challenge:hover {
    border-color: var(--accent-cyan);
}

.challenge-card.solution:hover {
    border-color: #22c55e;
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.2);
}

.challenge-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
}

.challenge-icon.solution-icon {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.challenge-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.challenge-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.challenge-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.challenge-list li:last-child {
    margin-bottom: 0;
}

.challenge-list li i {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* ==========================================
   FEATURE CARDS
   ==========================================
*/
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
}

.feature-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-5px);
}

.feature-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--accent-gradient);
    color: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--bg-primary);
    margin-bottom: 1.5rem;
}

.feature-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tags span {
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* ==========================================
   TECH GRID
   ==========================================
*/
.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 991px) {
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }
}

.tech-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tech-category:hover {
    border-color: var(--accent-cyan);
}

.tech-category h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-cyan);
}

.tech-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
}

.tech-item img {
    width: 32px;
    height: 32px;
}

.tech-item span {
    font-weight: 500;
}

/* ==========================================
   GALLERY FULL (pour screenshots desktop)
   ==========================================
*/
.gallery-grid-full {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 991px) {
    .gallery-grid-full {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .gallery-grid-full {
        grid-template-columns: 1fr;
    }
}

.gallery-item-full {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.gallery-item-full:hover {
    border-color: var(--accent-cyan);
    transform: scale(1.02);
    box-shadow: var(--glow-cyan);
}

.gallery-item-full img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: top;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 212, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item-full:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2rem;
    color: white;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.9), transparent);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ==========================================
   IMAGE MODAL
   ==========================================
*/
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.3);
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
}

/* ==========================================
   LINK CARDS
   ==========================================
*/
.link-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
}

.link-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
    transition: all 0.3s ease;
}

.link-icon.github {
    background: linear-gradient(135deg, #333, #24292e);
    color: white;
}

.link-card:hover .link-icon.github {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.link-card h5 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.link-card p {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* ==========================================
   CTA BOX
   ==========================================
*/
.cta-box {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid var(--accent-cyan);
    border-radius: 24px;
    padding: 3rem;
    text-align: center;
}

.cta-box h3 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.cta-box p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================
   RESPONSIVE
   ==========================================
*/
@media (max-width: 991px) {
    .hero-carousel .carousel-item img {
        height: 400px;
    }
    
    .project-hero {
        padding-top: 80px;
    }
    
    .hero-carousel {
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    .hero-carousel .carousel-item img {
        height: 300px;
    }
    
    .cta-box {
        padding: 2rem;
    }
    
    .cta-box h3 {
        font-size: 1.5rem;
    }
}
