/* Variables & Base */
:root {
    --primary-blue: #004b87;
    --primary-red: #c8102e;
    --bg-color: #f8f9fa;
    --text-color: #333333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

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

html, body {
    height: 100%;
    min-height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.page-container {
    padding: 45px 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

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

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

/* Header & Navigation */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo img {
    height: 60px; /* Adjust according to logo proportions */
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links li a {
    font-weight: 600;
    font-size: 1rem;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-red);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.btn-devis {
    background-color: var(--primary-red);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(200, 16, 46, 0.3);
}

.btn-devis::after {
    display: none;
}

.btn-devis:hover {
    background-color: #a00d25;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(200, 16, 46, 0.4);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 75, 135, 0.8), rgba(0, 75, 135, 0.8)), url('/public/img/hero-bg.jpg') center/cover;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInDown 1s ease;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease;
}

.cta-button {
    display: inline-block;
    background: var(--primary-red);
    color: var(--white);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    transition: var(--transition);
    animation: fadeInUp 1.2s ease;
}

.cta-button:hover {
    background: #a00d25;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    color: white;
}

/* Features Section */
.features-section {
    padding: 80px 20px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--white);
    padding: 40px 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.feature-card .icon {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

/* Forms (Devis, Contact) */
.form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 40px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 75, 135, 0.1);
}

/* Admin Modules Cards & Pill Buttons */
.admin-card {
    padding: 22px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 5px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.admin-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.admin-card p {
    margin: 0 0 16px 0;
    color: #374151;
    font-size: 0.96rem;
    line-height: 1.55;
}

.admin-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff !important;
    border-radius: 50px;
    text-decoration: none;
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.admin-pill-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.admin-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #dc2626 !important;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.08);
    line-height: 1;
}

.admin-logout-btn:hover {
    background: #dc2626;
    color: #ffffff !important;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.admin-logout-btn svg {
    display: block;
    transition: transform 0.2s ease;
}

.admin-logout-btn:hover svg {
    transform: translateX(2px);
}

/* Page Banner */
.page-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 55px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    width: 100%;
}

.page-banner-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-banner-title {
    color: var(--white);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.page-banner-subtitle {
    color: #e2e8f0;
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    line-height: 1.5;
}

/* Footer */
.main-footer {
    background: var(--primary-blue);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: auto;
    width: 100%;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3, .footer-col h4 {
    color: var(--white);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    color: #e2e8f0;
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 20px;
    font-size: 0.92rem;
    color: #e2e8f0;
}

/* Carousel */
.carousel-section {
    width: 100%;
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 30px 20px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    font-size: 1.5rem;
    padding: 15px 18px;
    cursor: pointer;
    border-radius: 50%;
    color: var(--primary-blue);
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Gallery / Album */
.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    background: #ffffff;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-caption {
    padding: 12px 14px;
    background: white;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    border-top: 1px solid #f1f5f9;
}

/* Lightbox Modal Fullscreen */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 25, 47, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex !important;
    opacity: 1;
}

.lightbox-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 90vh;
    max-height: 90dvh;
    position: relative;
    z-index: 10;
}

.lightbox-content {
    max-width: 92vw;
    max-height: 82vh;
    max-height: 82dvh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
    animation: zoomIn 0.3s ease;
}

.lightbox-caption {
    margin-top: 14px;
    color: #ffffff;
    padding: 7px 18px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    font-size: 1.05rem;
    font-weight: 500;
    text-align: center;
    max-width: 85vw;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 22px;
    right: 25px;
    color: #ffffff;
    font-size: 38px;
    line-height: 1;
    font-weight: 300;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 42px;
        height: 42px;
        font-size: 32px;
    }
    .lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    .lightbox-prev {
        left: 8px;
    }
    .lightbox-next {
        right: 8px;
    }
    .lightbox-content {
        max-width: 95vw;
        max-height: 75vh;
        max-height: 75dvh;
    }
}

@keyframes zoomIn {
    from {transform:scale(0.85); opacity: 0;}
    to {transform:scale(1); opacity: 1;}
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        position: sticky;
        top: 0;
        z-index: 9999;
    }
    .header-container {
        position: relative;
    }
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        font-size: 2.2rem;
        line-height: 1;
        background: transparent;
        border: none;
        color: var(--primary-blue);
        cursor: pointer;
        padding: 6px 10px;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 15px 0 25px 0;
        box-shadow: 0 12px 25px rgba(0,0,0,0.15);
        z-index: 99999;
        border-top: 1px solid #edf2f7;
        gap: 0;
    }
    .nav-links.active {
        display: flex !important;
    }
    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid #f7fafc;
    }
    .nav-links li a {
        display: inline-block;
        font-size: 1.15rem;
        padding: 6px 20px;
    }
    .nav-links li .btn-devis {
        margin-top: 10px;
        display: inline-block;
    }
    .hero-content h1 {
        font-size: 1.9rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .page-banner {
        padding: 35px 15px;
    }
    .page-banner-title {
        font-size: 1.65rem;
    }
    .page-banner-subtitle {
        font-size: 0.95rem;
    }
    .page-container {
        padding: 25px 15px;
    }
    .container {
        padding: 0 15px;
    }
    .form-container {
        padding: 22px 16px;
        margin: 15px auto;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .feature-card {
        padding: 25px 18px;
    }
    .carousel-slide img {
        height: 260px;
    }
    .carousel-caption {
        font-size: 0.95rem;
        padding: 15px 10px 10px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 25px;
    }
    .main-footer {
        padding: 35px 0 15px;
    }
}
