/* ============================================
   CMS MUSÉE RÉGIONAL - STYLES PRINCIPAUX
   Musée Régional de l'Histoire de la Révolution
   et de l'Indépendance Algériennes
   ============================================ */

:root {
    --primary-color: #8BC34A;
    --primary-dark: #689F38;
    --primary-light: #F1F8E9;
    --secondary-color: #F5F5F0;
    --accent-color: #C41E3A;
    --text-color: #2C2C2C;
    --text-muted: #6C757D;
    --white: #FFFFFF;
    --border-color: #D4DDD4;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --font-heading: 'Georgia', 'Times New Roman', serif;
    --font-body: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--secondary-color);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-dark);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    font-size: 0.85rem;
}

.language-switcher a:hover {
    text-decoration: underline !important;
}

/* ============================================
   MAIN HEADER
   ============================================ */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-link {
    color: var(--primary-dark);
}

.logo-img {
    object-fit: contain;
    max-height: 70px;
}

.logo-placeholder {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--border-radius);
}

.logo-text h1 {
    font-size: 1rem;
    color: var(--primary-dark);
    line-height: 1.3;
}

.navbar-nav .nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: var(--border-radius);
    margin: 0 2px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.navbar-toggler {
    border: 2px solid var(--primary-color);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28107,155,107,1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   CAROUSEL / HERO
   ============================================ */
.hero-carousel {
    position: relative;
}

.hero-carousel .carousel-item {
    height: 420px;
}

.hero-carousel .carousel-item img {
    object-fit: cover;
    height: 100%;
    filter: brightness(0.6);
}

.carousel-caption {
    bottom: 20%;
    padding: 2rem;
}

.carousel-caption h2 {
    font-size: 2.8rem;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
}

.carousel-caption p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    max-width: 700px;
    margin: 0 auto;
}

.carousel-indicators button {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    margin: 0 6px !important;
    background-color: rgba(255,255,255,0.5) !important;
}

.carousel-indicators button.active {
    background-color: var(--primary-color) !important;
}

.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    backdrop-filter: blur(5px);
}

/* ============================================
   SECTIONS
   ============================================ */
.section-padding {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

.section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 15px auto 0;
}

/* ============================================
   CARDS
   ============================================ */
.card-museum {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    border: none;
}

.card-museum:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-museum .card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.card-museum .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-museum:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-museum .card-body {
    padding: 1.5rem;
}

.card-museum .card-title {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.card-museum .card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-museum .card-date {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
}

.card-museum .card-location {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   BADGES
   ============================================ */
.badge-museum {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-museum {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(107,155,107,0.3);
}

.btn-museum:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107,155,107,0.4);
    color: var(--white);
}

.btn-outline-museum {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
}

.btn-outline-museum:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   PRESENTATION SECTION
   ============================================ */
.presentation-section {
    background: var(--white);
}

.presentation-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.presentation-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.presentation-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.presentation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   MAP SECTION
   ============================================ */
.map-container {
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 1.5rem 1rem 1rem;
    color: var(--white);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    height: 100%;
}

.contact-info-card i {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(107,155,107,0.25);
}

/* ============================================
   SEARCH
   ============================================ */
.search-box {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.search-result-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.search-result-item:hover {
    box-shadow: var(--shadow-hover);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link {
    color: var(--primary-dark);
    border-color: var(--border-color);
}

.pagination .page-link:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: linear-gradient(135deg, #1a3a1a 0%, #2d5a2d 100%);
    color: var(--white);
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact i {
    color: var(--primary-color);
    width: 20px;
}

.footer-contact li span {
    word-break: break-word;
    overflow-wrap: break-word;
}

.social-links a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
    display: inline-block;
}

.social-links a:hover {
    color: var(--white);
    transform: translateY(-3px);
}

.footer-logo-placeholder {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--border-radius);
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 50px 0;
    color: var(--white);
}

.breadcrumb-section h1 {
    color: var(--white);
    font-size: 2.2rem;
}

.breadcrumb-item a {
    color: rgba(255,255,255,0.8);
}

.breadcrumb-item.active {
    color: var(--white);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.6);
}

/* ============================================
   DETAIL PAGE
   ============================================ */
.detail-header {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.detail-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5);
}

.detail-header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 0;
    color: var(--white);
}

.detail-content {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-meta-item {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.detail-meta-item i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* ============================================
   ANNOUNCEMENTS
   ============================================ */
.announcement-card {
    border-left: 4px solid var(--accent-color);
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.announcement-card:hover {
    box-shadow: var(--shadow-hover);
}

.announcement-card.pinned {
    border-left-color: var(--primary-color);
    background: linear-gradient(to right, var(--primary-light), var(--white));
}

/* ============================================
   ALERTS / FLASH MESSAGES
   ============================================ */
.alert-museum {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .hero-carousel .carousel-item {
        height: 320px;
    }

    .carousel-caption h2 {
        font-size: 1.8rem;
    }

    .carousel-caption p {
        font-size: 1rem;
    }

    .section-padding {
        padding: 50px 0;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .navbar-collapse {
        background: var(--white);
        padding: 1rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-carousel .carousel-item {
        height: 220px;
    }

    .carousel-caption {
        bottom: 10%;
        padding: 1rem;
    }

    .carousel-caption h2 {
        font-size: 1.3rem;
    }

    .detail-content {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

/* ============================================
   SCROLLBAR CUSTOM
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ============================================
   LOADING / ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}
