/* ===== Variables & Reset ===== */
:root {
    --color-primary: #b8668c;
    --color-primary-light: #d4a0b8;
    --color-primary-dark: #8c4a6a;
    --color-secondary: #c4a574;
    --color-secondary-light: #e0d0b8;
    --color-text: #3a3a3a;
    --color-text-light: #6a6a6a;
    --color-bg: #ffffff;
    --color-bg-soft: #faf8f6;
    --color-bg-accent: #f5f0eb;
    --color-blue: #1a5f7a;
    --color-blue-light: #2a7a8c;
    --color-blue-pale: #e8f4f8;

    --font-script: 'Alex Brush', cursive;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', -apple-system, sans-serif;

    --transition: 0.3s ease;
    --shadow-soft: 0 4px 20px rgba(184, 102, 140, 0.1);
    --shadow-medium: 0 8px 30px rgba(184, 102, 140, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-text);
    line-height: 1.7;
    background-color: var(--color-bg);
}

/* ===== Typography ===== */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.3;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

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

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

/* ===== Layout ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.section-intro {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-script);
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    position: relative;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--color-bg-soft) 0%, var(--color-bg-accent) 100%);
    padding: 6rem 2rem 0;
    position: relative;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 1000px;
    width: 100%;
}

.logo-container {
    flex-shrink: 0;
}

.logo-img {
    width: 350px;
    height: auto;
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
}

.hero-text {
    text-align: left;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

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

.hero-title {
    font-family: var(--font-script);
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 400;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-subtitle {
    font-family: var(--font-script);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 400;
    color: var(--color-primary-dark);
    margin-bottom: 0.3rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.1s;
}

.hero-phrase {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.4s;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 80px;
}

/* ===== Button ===== */
.btn {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.7s;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Form button - no animation delay */
.contact-form .btn {
    opacity: 1;
    animation: none;
}

/* ===== Services Section ===== */
.services {
    padding: 6rem 0;
    background: var(--color-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    padding: 2rem;
    background: var(--color-bg);
    border-radius: 12px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid var(--color-bg-accent);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-blue-light));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(184, 102, 140, 0.2);
    border-color: var(--color-primary-light);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: var(--color-primary);
    transition: all 0.4s ease;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

/* ===== Animations individuelles des icônes ===== */

/* 1. Checkmark - Le check se dessine */
.service-card--check .icon-check {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    transition: stroke-dashoffset 0.6s ease, stroke 0.3s ease;
}
.service-card--check .icon-circle {
    transition: stroke 0.3s ease, fill 0.3s ease;
    fill: transparent;
}
.service-card--check:hover .icon-check {
    stroke-dashoffset: 0;
    stroke: #2e7d32;
}
.service-card--check:hover .icon-circle {
    stroke: #2e7d32;
    fill: rgba(46, 125, 50, 0.1);
}

/* 2. Coeur - Bat et devient rouge */
.service-card--heart .icon-heart {
    transition: fill 0.3s ease, stroke 0.3s ease;
    transform-origin: center;
}
.service-card--heart:hover .icon-heart {
    fill: #e53935;
    stroke: #e53935;
    animation: heartbeat 0.8s ease-in-out infinite;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
    60% { transform: scale(1); }
}

/* 3. Médicaments - Le flacon se remplit */
.service-card--medicine .icon-liquid {
    transform-origin: bottom;
    transition: opacity 0.3s ease, transform 0.5s ease;
    transform: scaleY(0);
}
.service-card--medicine .icon-bottle {
    transition: stroke 0.3s ease;
}
.service-card--medicine:hover .icon-liquid {
    opacity: 0.6;
    transform: scaleY(1);
}
.service-card--medicine:hover .icon-bottle {
    stroke: var(--color-blue);
}

/* 4. Accompagnement - Les personnes se rapprochent */
.service-card--people .icon-person1,
.service-card--people .icon-person2 {
    transition: transform 0.4s ease, stroke 0.3s ease;
}
.service-card--people:hover .icon-person1 {
    transform: translateX(2px);
    stroke: var(--color-primary);
}
.service-card--people:hover .icon-person2 {
    transform: translateX(-3px);
    stroke: var(--color-blue);
}

/* 5. Surveillance/Pouls - La ligne pulse */
.service-card--pulse .icon-pulse-line {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    transition: stroke-dashoffset 0.8s ease, stroke 0.3s ease;
}
.service-card--pulse .icon-pulse-circle {
    transition: stroke 0.3s ease;
}
.service-card--pulse:hover .icon-pulse-line {
    stroke-dashoffset: 0;
    stroke: #e53935;
    animation: pulse-glow 1.5s ease-in-out infinite;
}
.service-card--pulse:hover .icon-pulse-circle {
    stroke: var(--color-blue);
}
@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 6. Maison - La fenêtre s'illumine */
.service-card--home .icon-glow {
    transition: opacity 0.5s ease;
    fill: #ffc107;
}
.service-card--home .icon-roof,
.service-card--home .icon-house,
.service-card--home .icon-window {
    transition: stroke 0.3s ease;
}
.service-card--home:hover .icon-glow {
    opacity: 0.8;
    animation: light-flicker 2s ease-in-out infinite;
}
.service-card--home:hover .icon-roof,
.service-card--home:hover .icon-house {
    stroke: var(--color-blue);
}
.service-card--home:hover .icon-window {
    stroke: #ffc107;
}
@keyframes light-flicker {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.5; }
    75% { opacity: 0.9; }
}

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

.service-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* ===== About Section ===== */
.about {
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-light) 100%);
    position: relative;
    padding: 4rem 0;
}

.about-wave-top,
.about-wave-bottom {
    position: absolute;
    left: 0;
    right: 0;
    line-height: 0;
}

.about-wave-top {
    top: 0;
}

.about-wave-bottom {
    bottom: 0;
}

.about-wave-top svg,
.about-wave-bottom svg {
    width: 100%;
    height: 60px;
}

.about-wave-top svg path {
    fill: var(--color-bg);
}

.about-wave-bottom svg path {
    fill: var(--color-bg);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem 0;
}

.about-content .section-title {
    font-family: var(--font-script);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    color: #ffffff;
}

.about-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--color-primary-light);
    margin-bottom: 1rem;
}

.about-credentials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.about-credentials p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-weight: 400;
}

.about-text {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

/* ===== Contact Section ===== */
.contact {
    padding: 6rem 0;
    background: var(--color-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    color: var(--color-primary);
    background: var(--color-bg-accent);
    border-radius: 50%;
    padding: 12px;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-text h3 {
    color: var(--color-primary-dark);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.contact-text a,
.contact-text p {
    color: var(--color-text-light);
    font-size: 1rem;
}

.contact-text a:hover {
    color: var(--color-primary);
}

/* ===== Contact Form ===== */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text);
}

.form-group input,
.form-group textarea {
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--color-bg-accent);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-bg);
    transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(184, 102, 140, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form alerts */
.form-alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.form-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.form-alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ===== Footer ===== */
.footer {
    background: var(--color-bg-accent);
    padding: 2rem;
    text-align: center;
}

.footer-text {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-credentials {
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 400;
}

/* ===== Responsive Design ===== */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        padding: 1rem 2rem 2rem;
        gap: 1rem;
        box-shadow: var(--shadow-soft);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .logo-img {
        width: 280px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-credentials {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 5rem;
    }

    .logo-img {
        width: 220px;
    }

    .btn {
        padding: 0.8rem 2rem;
        font-size: 0.85rem;
    }
}
