/* ============================================
   Mr Dego Assainissement - Feuille de style
   Design moderne, coloré et dynamique
   ============================================ */

:root {
    --color-primary: #0066cc;
    --color-primary-dark: #004999;
    --color-primary-light: #3399ff;
    --color-secondary: #ff6b35;
    --color-secondary-dark: #e54d1c;
    --color-accent: #ffc233;
    --color-success: #00b894;
    --color-danger: #e74c3c;
    --color-bg: #ffffff;
    --color-bg-alt: #f0f7ff;
    --color-bg-soft: #fff5ee;
    --color-text: #1a2332;
    --color-text-light: #5a6c7d;
    --color-border: #e1e8ed;

    --gradient-primary: linear-gradient(135deg, #0066cc 0%, #00a8e8 100%);
    --gradient-secondary: linear-gradient(135deg, #ff6b35 0%, #ffc233 100%);
    --gradient-hero: linear-gradient(135deg, #004999 0%, #0066cc 40%, #00a8e8 100%);
    --gradient-cool: linear-gradient(135deg, #00b894 0%, #00cec9 100%);

    --shadow-sm: 0 2px 8px rgba(0, 102, 204, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 102, 204, 0.12);
    --shadow-lg: 0 16px 48px rgba(0, 102, 204, 0.18);
    --shadow-color: 0 8px 24px rgba(255, 107, 53, 0.25);

    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

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

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes bgShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== Typographie ===== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.85rem, 4vw, 2.75rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.45rem; margin-bottom: 0.75rem; font-weight: 700; }

p { margin-bottom: 1rem; color: var(--color-text-light); }

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

.gradient-text {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Header / Navigation ===== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-top {
    background: var(--gradient-primary);
    color: #fff;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.header-top::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    background-size: 200% 100%;
    animation: shimmer 4s linear infinite;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.header-top a {
    color: var(--color-accent);
    font-weight: 700;
}

.header-top a:hover {
    color: #fff;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--color-primary);
}

.logo-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 102, 204, 0.2));
}

.logo:hover .logo-icon {
    transform: rotate(-8deg) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.5);
}

.logo-text small {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: var(--font-body);
    margin-top: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-secondary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-primary);
}

.nav-cta {
    background: var(--gradient-secondary) !important;
    color: #fff !important;
    padding: 0.8rem 1.5rem !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.4);
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.55);
}

.mobile-toggle {
    display: none;
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 1.3rem;
    cursor: pointer;
}

/* ===== Boutons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: var(--gradient-secondary);
    color: #fff;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(255, 107, 53, 0.55);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: #fff;
    color: var(--color-primary);
    border-color: #fff;
    transform: translateY(-3px);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 650px;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    background-size: 200% 200%;
    animation: bgShift 15s ease infinite;
    color: #fff;
    padding: 5rem 0;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255, 194, 51, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px; left: -150px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

.hero .container {
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease;
}

.hero h1 {
    color: #fff;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.hero h1 .highlight {
    background: linear-gradient(120deg, var(--color-accent) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 2rem;
}

.hero-badges {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.hero-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== Sections ===== */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-alt {
    background: var(--color-bg-alt);
    position: relative;
}

.section-alt::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(180deg, var(--color-bg) 0%, transparent 100%);
}

.section-soft {
    background: var(--color-bg-soft);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    display: inline-block;
    background: var(--gradient-secondary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
}

.section-title {
    color: var(--color-text);
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-secondary);
    margin: 1.25rem auto 0;
    border-radius: 2px;
}

/* ===== Page Title (sous-pages) ===== */
.page-title {
    background: var(--gradient-hero);
    background-size: 200% 200%;
    animation: bgShift 15s ease infinite;
    color: #fff;
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-title::before {
    content: '';
    position: absolute;
    top: -100px; right: -50px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255, 194, 51, 0.2), transparent 70%);
    border-radius: 50%;
    animation: float 9s ease-in-out infinite;
}

.page-title .container { position: relative; z-index: 2; }
.page-title h1 { color: #fff; }
.page-title p { color: rgba(255, 255, 255, 0.95); font-size: 1.15rem; }

.breadcrumb {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.breadcrumb a {
    color: var(--color-accent);
    font-weight: 600;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== Grilles ===== */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ===== Cards ===== */
.card {
    background: #fff;
    padding: 2.2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 72px;
    height: 72px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}

.card:hover .card-icon {
    transform: rotate(-8deg) scale(1.1);
}

/* Cards aux variantes colorées (cible par :nth-child) */
.grid .card:nth-child(2) .card-icon {
    background: var(--gradient-secondary);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.grid .card:nth-child(3) .card-icon {
    background: var(--gradient-cool);
    box-shadow: 0 6px 16px rgba(0, 184, 148, 0.35);
}

.grid .card:nth-child(4) .card-icon {
    background: linear-gradient(135deg, #ffc233 0%, #ff6b35 100%);
    box-shadow: 0 6px 16px rgba(255, 194, 51, 0.4);
}

.grid .card:nth-child(5) .card-icon {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.4);
}

.grid .card:nth-child(6) .card-icon {
    background: linear-gradient(135deg, #e84393 0%, #fd79a8 100%);
    box-shadow: 0 6px 16px rgba(232, 67, 147, 0.4);
}

.card h3 {
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

/* ===== Service détaillé ===== */
.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
    margin-bottom: 5rem;
    padding-bottom: 5rem;
    border-bottom: 2px dashed rgba(0, 102, 204, 0.15);
}

.service-detail:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.service-detail.reverse .service-image {
    order: 2;
}

.service-image {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/3;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 5rem;
    position: