/* =====================================================
   Public portal shared CSS
   Utilisé par index.php et toutes les pages publiques
   ===================================================== */

:root {
    --primary: #1a5490;
    --primary-dark: #0f3761;
    --primary-light: #2a73c2;
    --primary-gradient: linear-gradient(135deg, #0d3d66, #1a5490);
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --dark: #1e293b;
    --light-bg: #f8fafc;
    --card-border: #e2e8f0;
    --text-dark: #1e293b;
    --text-muted: #64748b;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #334155;
    background-color: #ffffff;
    scroll-behavior: smooth;
}

/* ── Navbar ─────────────────────────────────────── */
.portal-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}
.portal-nav .navbar-brand {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.portal-nav .nav-link {
    font-weight: 600;
    color: #475569;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.2s;
}
.portal-nav .nav-link:hover,
.portal-nav .nav-link.active {
    color: var(--primary);
    background: rgba(26, 84, 144, 0.07);
}
.portal-nav .nav-link.active {
    color: var(--primary) !important;
    font-weight: 700;
}

/* ── Page hero (sous-pages) ─────────────────────── */
.page-hero {
    background: linear-gradient(135deg, #0d3d66 0%, #1a5490 60%, #1e40af 100%);
    color: white;
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
    pointer-events: none;
}
.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 18px;
    backdrop-filter: blur(8px);
}
.page-hero h1 {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.page-hero p.lead {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    max-width: 600px;
    margin-bottom: 0;
}

/* ── Homepage Hero ─────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #0d3d66 0%, #1a5490 60%, #1e40af 100%);
    color: white;
    padding: 90px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero-section.has-bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-section::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.6;
    pointer-events: none;
}
.hero-section.has-bg-image::before {
    background-image: none;
    background: linear-gradient(135deg, rgba(13,61,102,0.82) 0%, rgba(26,84,144,0.78) 60%, rgba(30,64,175,0.75) 100%);
    opacity: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}
.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
    max-width: 620px;
    margin-bottom: 35px;
}
.stat-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 16px 20px;
    backdrop-filter: blur(8px);
}
.stat-pill h4 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    color: #fbbf24;
}
.stat-pill p {
    font-size: 0.85rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

/* ── Filter Pills ───────────────────────────────── */
.filter-btn {
    border-radius: 30px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--card-border);
    background: white;
    color: #475569;
    transition: all 0.2s ease;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(26, 84, 144, 0.25);
}

/* ── Service Cards ─────────────────────────────── */
.service-card {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}
.service-img-wrapper {
    position: relative;
    height: 210px;
    width: 100%;
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.service-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.service-card:hover .service-img-wrapper img {
    transform: scale(1.05);
}
.service-img-placeholder {
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.7;
}
.service-badge-featured {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.service-badge-cat {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
}
.service-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    line-height: 1.3;
}
.service-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 18px;
    flex-grow: 1;
}
.service-price-box {
    padding: 10px 14px;
    background: #f1f5f9;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.service-footer {
    display: flex;
    gap: 10px;
}

/* ── Process Steps ─────────────────────────────── */
.step-card {
    padding: 28px 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    text-align: center;
    height: 100%;
    position: relative;
}
.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 auto 16px;
    box-shadow: 0 6px 14px rgba(26, 84, 144, 0.25);
}

/* ── Contact ───────────────────────────────────── */
.contact-box {
    background: linear-gradient(135deg, #0d3d66 0%, #1a5490 100%);
    border-radius: 24px;
    padding: 45px;
    color: white;
}
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}
.contact-icon {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* ── Footer ────────────────────────────────────── */
footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 45px 0 25px;
}
footer .footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
footer .footer-link:hover { color: #ffffff; }

/* ── Custom Scrollbar ──────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Carrousel horizontal ─────────────────────── */
.infinite-carousel-section {
    padding: 50px 0 60px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--card-border);
}
.infinite-carousel-outer {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 15px 0 25px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
    touch-action: pan-y;
}
.infinite-carousel-outer::-webkit-scrollbar { display: none; }
.infinite-carousel-outer:active { cursor: grabbing; }
.infinite-carousel-outer::before,
.infinite-carousel-outer::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 100px;
    z-index: 5;
    pointer-events: none;
}
.infinite-carousel-outer::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}
.infinite-carousel-outer::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}
.infinite-carousel-track {
    display: flex;
    gap: 22px;
    width: max-content;
    will-change: transform;
    animation: infiniteScrollRightToLeft 38s linear infinite;
}
.infinite-carousel-outer:hover .infinite-carousel-track {
    animation-play-state: paused;
}
@keyframes infiniteScrollRightToLeft {
    0%   { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}
.carousel-slide-card {
    position: relative;
    width: 340px;
    cursor: pointer;
    height: 240px;
    flex-shrink: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.12);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
}
.carousel-slide-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 35px -5px rgba(0,0,0,0.22);
}
.carousel-slide-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.carousel-slide-card:hover img { transform: scale(1.08); }
.carousel-slide-zoom {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(0.6);
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    border: 2px solid rgba(255,255,255,0.5);
    color: #fff;
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 10;
}
.carousel-slide-card:hover .carousel-slide-zoom {
    opacity: 1;
    transform: translate(-50%,-50%) scale(1);
}
.carousel-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(15,23,42,0.85) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: #ffffff;
    transition: background 0.3s ease;
}
.carousel-slide-card:hover .carousel-slide-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(15,23,42,0.92) 100%);
}
.carousel-slide-badge {
    align-self: flex-start;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,255,255,0.3);
}
.carousel-slide-title {
    font-size: 1.12rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
    color: #ffffff;
}
.carousel-slide-desc {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.carousel-slide-price {
    font-size: 0.82rem;
    color: #fbbf24;
    font-weight: 700;
}

/* ── Galerie grille (page Réalisations) ────────── */
.realisation-grid-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.realisation-grid-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}
.realisation-grid-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.realisation-grid-card:hover img { transform: scale(1.08); }
.realisation-grid-card .carousel-slide-overlay { padding: 16px; }
.realisation-grid-card .carousel-slide-zoom {
    width: 44px; height: 44px; font-size: 1.2rem;
}

/* ── prefers-reduced-motion ────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .infinite-carousel-track {
        animation: none !important;
        transform: none !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    .carousel-slide-card { scroll-snap-align: start; }
    .infinite-carousel-outer::before,
    .infinite-carousel-outer::after { display: none; }
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .page-hero h1 { font-size: 1.7rem; }
    .contact-box { padding: 28px 20px; }
}
