/**
 * Styles personnalisés - assurance-funeraire.be
 * Complément à Tailwind CSS
 */

/* ============================================================
   Base & Typography
   ============================================================ */

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Focus visible accessible */
:focus-visible {
    outline: 2px solid #0080AA;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================================
   Header - Shadow on scroll
   ============================================================ */

#main-header.scrolled {
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

/* ============================================================
   Boutons et CTAs
   ============================================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background-color: #0080AA;
    color: white;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgb(0 128 170 / 0.3);
}

.btn-primary:hover {
    background-color: #006688;
    box-shadow: 0 10px 15px -3px rgb(0 128 170 / 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background-color: white;
    color: #0080AA;
    font-weight: 600;
    border-radius: 9999px;
    border: 2px solid #0080AA;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #e6f4f9;
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background-color: #f4a261;
    color: white;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgb(244 162 97 / 0.3);
}

.btn-accent:hover {
    background-color: #ef8633;
    box-shadow: 0 10px 15px -3px rgb(244 162 97 / 0.3);
    transform: translateY(-1px);
}

/* ============================================================
   Cards
   ============================================================ */

.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
    border: 1px solid rgb(229 231 235);
    transition: all 0.2s ease;
    overflow: hidden;
}

@media (hover: hover) {
    .card:hover {
        box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.08);
        transform: translateY(-2px);
    }
}

/* ============================================================
   Séparateur décoratif
   ============================================================ */

.decorative-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    max-width: 240px;
    gap: 12px;
}

.decorative-separator::before,
.decorative-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #0080AA, transparent);
}

.decorative-separator span {
    display: block;
    width: 8px;
    height: 8px;
    background: #0080AA;
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* ============================================================
   Hero section - gradient overlay
   ============================================================ */

.hero-overlay {
    background: linear-gradient(135deg, rgba(27, 42, 74, 0.8) 0%, rgba(0, 128, 170, 0.6) 100%);
}

/* ============================================================
   Simulateur - Sliders
   ============================================================ */

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    outline: none;
    transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0080AA;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 128, 170, 0.4);
    transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #006688;
    box-shadow: 0 4px 12px rgba(0, 128, 170, 0.5);
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0080AA;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 128, 170, 0.4);
}

/* ============================================================
   Animations - Scroll reveal
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger les enfants */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.5s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.6s; }

.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   Testimonial cards
   ============================================================ */

.testimonial-card {
    position: relative;
    padding-top: 2rem;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: -0.5rem;
    left: 1.5rem;
    font-size: 5rem;
    font-family: Georgia, serif;
    color: #0080AA;
    opacity: 0.15;
    line-height: 1;
}

/* ============================================================
   Form inputs
   ============================================================ */

.form-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    color: #1B2A4A;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #0080AA;
    box-shadow: 0 0 0 3px rgba(0, 128, 170, 0.15);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #444f5a;
}

.form-select {
    display: block;
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    color: #1B2A4A;
    background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3e%3cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3e%3c/svg%3e") no-repeat right 0.75rem center;
    background-size: 1.25rem;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: #0080AA;
    box-shadow: 0 0 0 3px rgba(0, 128, 170, 0.15);
}

/* ============================================================
   Cookie consent banner
   ============================================================ */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

#cookie-banner.visible {
    transform: translateY(0);
}

/* ============================================================
   Print styles
   ============================================================ */

/* ============================================================
   Mobile - Form & overflow fixes
   ============================================================ */

input, select, textarea, button {
    max-width: 100%;
    box-sizing: border-box;
}

/* Prevent long button text from overflowing */
.btn-primary,
.btn-secondary,
.btn-accent {
    white-space: normal;
    word-break: break-word;
}

/* ============================================================
   Print styles
   ============================================================ */

@media print {
    header, footer, .btn-primary, .btn-secondary, #cookie-banner, section:last-of-type {
        display: none !important;
    }
    main {
        padding: 0 !important;
    }
}
