/* assets/css/style.css */

/* Import Google Fonts for friendly, professional typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f9fafb; /* Soft off-white for warmth */
    color: #1e293b; /* Slate for readability */
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #1e293b;
}

/* Typography */
h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: #475569;
}

/* Container */
.container {
    max-width: 1240px;
    padding: 0 20px;
    margin: 0 auto;
}

/* Navbar */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    transition: color 0.2s ease;
}

.navbar-brand img {
    max-height: 40px;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: rotate(10deg);
}

.nav-link {
    color: #1e293b !important;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    background-color: #e0f2fe; /* Light blue hover */
    color: #0284c7 !important; /* Sky blue */
}

.dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    padding: 8px 0;
}

.dropdown-item {
    font-size: 0.95rem;
    padding: 8px 20px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #0284c7;
    color: #ffffff;
}

/* Buttons */
.btn-primary {
    background-color: #0284c7; /* Sky blue */
    border-color: #0284c7;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    color: #ffffff;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background-color: #0369a1;
    border-color: #0369a1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-secondary {
    background-color: #10b981; /* Emerald green */
    border-color: #10b981;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    color: #ffffff;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-secondary:hover {
    background-color: #059669;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Hero Section (index.php) */
.hero {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.9), rgba(6, 182, 212, 0.7)), url('/assets/img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 120px 0;
    color: #ffffff;
    background-repeat: no-repeat;
    text-align: center;
    position: relative;
    overflow: hidden;
    background-image: url('../img/hero.jpg');
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero p.lead {
    font-size: 1.5rem;
    color: #e0f2fe;
    margin-bottom: 2rem;
}

.hero .btn-lg {
    padding: 16px 32px;
    font-size: 1.25rem;
    border-radius: 10px;
}

/* Sections */
section {
    padding: 80px 0;
}

.bg-light {
    background-color: #f3f4f6 !important; /* Softer gray */
}

/* Cards (index.php, projets.php, services/*.php) */
.card {
    border: none;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    max-height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 24px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.card-text {
    font-size: 0.95rem;
    color: #475569;
}

/* Portfolio Section (index.php) */
.portfolio-section {
    background-color: #ffffff;
    padding: 80px 0;
    position: relative;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(243, 244, 246, 0.5), #ffffff);
    z-index: -1;
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.portfolio-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(2, 132, 199, 0.2), rgba(2, 132, 199, 0.9));
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    text-align: center;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.portfolio-service {
    font-size: 0.9rem;
    font-weight: 500;
    color: #e0f2fe;
    margin-bottom: 8px;
}

.portfolio-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 90%;
}

/* Forms (devis.php, candidater.php, contact.php) */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 12px;
    font-size: 1rem;
    background-color: #f9fafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.2);
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-label {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
}

.is-invalid {
    border-color: #ef4444 !important;
}

.invalid-feedback {
    font-size: 0.85rem;
    color: #ef4444;
}

/* Alerts */
.alert {
    border-radius: 8px;
    padding: 16px;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d1fae5;
    color: #064e3b;
    border-color: #6ee7b7;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #f87171;
}

/* Footer */
footer {
    background: linear-gradient(180deg, #1e293b, #0f172a);
    color: #f1f5f9;
    padding: 60px 0 24px;
}

footer h5 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    color: #ffffff;
}

footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #10b981; /* Green accent */
}

footer .social-links a {
    font-size: 1.75rem;
    margin-right: 16px;
    transition: transform 0.3s ease, color 0.2s ease;
}

footer .social-links a:hover {
    transform: scale(1.2);
    color: #10b981;
}

/* Map (contact.php) */
.map-container {
    margin-top: 24px;
}

.map-container iframe {
    border-radius: 12px;
    width: 100%;
    height: 360px;
    border: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Projects Page (projets.php) */
.project-card .card-img-top {
    max-height: 240px;
}

.project-card .card-body {
    padding: 20px;
}

.project-card .text-muted {
    font-size: 0.9rem;
    color: #64748b;
}

/* Testimonials (index.php) */
.testimonial-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #0284c7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Mentions Légales (mentions-legales.php) */
.legal-section {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin: 40px 0;
}

.legal-section h2 {
    font-size: 1.75rem;
    margin-bottom: 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .hero, .form-control, .btn, .portfolio-card {
    animation: fadeIn 0.6s ease-out;
}


/* assets/css/style.css */
.accordion-button {
    font-weight: 600;
    color: #1e293b;
    background-color: #ffffff;
    border-radius: 8px;
}
.accordion-button:not(.collapsed) {
    color: #0284c7;
    background-color: #e0f2fe;
}
.accordion-item {
    border: none;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.modal-content {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.75rem;
    }
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    .navbar-nav {
        text-align: center;
        padding: 16px 0;
    }
    .dropdown-menu {
        text-align: center;
    }
    .portfolio-img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0;
    }
    .hero h1 {
        font-size: 2.25rem;
    }
    .hero p.lead {
        font-size: 1.25rem;
    }
    .card-img-top {
        max-height: 180px;
    }
    .portfolio-img {
        height: 180px;
    }
    .portfolio-title {
        font-size: 1.1rem;
    }
    .portfolio-service, .portfolio-desc {
        font-size: 0.8rem;
    }
    .map-container iframe {
        height: 280px;
    }
    footer .col-md-4 {
        margin-bottom: 32px;
    }
    .btn-lg {
        padding: 12px 24px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    .hero {
        padding: 60px 0;
    }
    .card-body {
        padding: 16px;
    }
    .portfolio-img {
        height: 160px;
    }
    .portfolio-overlay {
        padding: 12px;
    }
    .form-control, .form-select {
        font-size: 0.95rem;
    }
    .table th, .table td {
        font-size: 0.85rem;
        padding: 8px;
    }
}


/* assets/css/style.css (append to existing) */

/* About Page */
.about-image {
    max-height: 400px;
    object-fit: cover;
}
.about-section i {
    transition: transform 0.3s ease;
}
.about-section i:hover {
    transform: scale(1.1);
}

/* Gallery Page */
.gallery-slideshow {
    position: relative;
    max-width: 100%;
    margin-bottom: 30px;
}
.gallery-slideshow .swiper-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
}
.swiper-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    border-radius: 5px;
}
.swiper-caption h3 {
    margin: 0;
    font-size: 1.5rem;
}
.swiper-caption p {
    margin: 5px 0 0;
    font-size: 1rem;
}
.swiper-button-next, .swiper-button-prev {
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 50%;
}
.swiper-pagination-bullet-active {
    background: #007bff;
}
.gallery-filters .btn {
    margin: 5px;
    transition: background-color 0.3s ease;
}
.gallery-filters .btn.active, .gallery-filters .btn:hover {
    background-color: #0056b3;
}
.gallery-item {
    transition: opacity 0.3s ease;
}
.gallery-item.hidden {
    display: none;
}
.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.portfolio-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.portfolio-card:hover .portfolio-img {
    transform: scale(1.05);
}
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    text-align: center;
}
.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}
.portfolio-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}
.portfolio-service, .portfolio-desc {
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .gallery-slideshow .swiper-slide img {
        height: 300px;
    }
    .swiper-caption h3 {
        font-size: 1.2rem;
    }
    .swiper-caption p {
        font-size: 0.9rem;
    }
    .portfolio-img {
        height: 200px;
    }
    .portfolio-title {
        font-size: 1rem;
    }
    .portfolio-service, .portfolio-desc {
        font-size: 0.8rem;
    }
}



/* Admin About and Gallery Pages */
.image-entry {
    background: #f8f9fa;
    border-radius: 8px;
}
#images-table img {
    border-radius: 4px;
    max-height: 50px;
    object-fit: cover;
}
.remove-image {
    margin-top: 10px;
}

/* assets/css/style.css (append to existing) */

/* Fancybox Customizations */
.fancybox-caption {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    font-size: 1rem;
}
.fancybox-image {
    border-radius: 8px;
}

/* Accessibility */
.gallery-filters .btn:focus,
.swiper-button-next:focus,
.swiper-button-prev:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Placeholder Image */
.placeholder-img {
    background: #f8f9fa;
    color: #6c757d;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
}

/* Existing styles (unchanged) */
.image-entry { /* ... */ }
#images-table img { /* ... */ }
.gallery-slideshow { /* ... */ }
.about-image { /* ... */ }
.map-container { /* ... */ }
.editable { /* ... */ }
.whatsapp-float { /* ... */ }
#back-to-top { /* ... */ }
footer .row .col.text-center p strong { /* ... */ }
.sidebar { /* ... */ }
.email-header { /* ... */ }
.dashboard-card { /* ... */ }
.table-hover tbody tr:hover { /* ... */ }


.slideshow-section .carousel {
    border-radius: 15px;
    overflow: hidden;
}

.slideshow-section .carousel-item img {
    object-fit: cover;
    height: 500px; /* Adjust height as needed */
    transition: transform 0.5s ease;
}

.slideshow-section .carousel-item.active img {
    transform: scale(1.05); /* Slight zoom effect on active slide */
}

.slideshow-section .carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 15px;
    bottom: 20px;
    animation: fadeInUp 0.5s ease;
}

.slideshow-section .carousel-caption h5 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.slideshow-section .carousel-caption p {
    font-size: 1rem;
    color: #ddd;
}

.slideshow-section .carousel-control-prev,
.slideshow-section .carousel-control-next {
    width: 5%;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.slideshow-section .carousel-control-prev:hover,
.slideshow-section .carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.6);
}

.slideshow-section .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #fff;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.slideshow-section .carousel-indicators .active {
    opacity: 1;
    background-color: #007bff; /* Matches btn-primary */
}

/* Animation for captions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .slideshow-section .carousel-item img {
        height: 300px; /* Smaller height for mobile */
    }

    .slideshow-section .carousel-caption h5 {
        font-size: 1.2rem;
    }

    .slideshow-section .carousel-caption p {
        font-size: 0.9rem;
    }
}
