/*
Theme Name: Eco Habitat Transition
Theme URI: https://eco-habitat-innovant.com
Author: Adrien Amasse / Wellness Wave
Description: Page de transition élégante et minimaliste redirigeant vers le Château de l'Étang et Wellness Wave. Illustrations vectorielles originales (horizon, château, Wellness Wave, emblème).
Version: 1.2
License: Proprietary
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..700;1,400..700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1A3026;
    --accent: #C5A059;
    --accent-light: #E3C88F;
    --sand: #F7F5F0;
    --dark: #0D1B14;
    --water: #08130D;
    --text-muted: #6B7280;
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--dark);
    color: var(--sand);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

h1, h2, .serif {
    font-family: 'Playfair Display', serif;
}

.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: radial-gradient(circle at 20% 30%, rgba(26, 48, 38, 0.8) 0%, rgba(13, 27, 20, 1) 70%),
                radial-gradient(circle at 80% 80%, rgba(197, 160, 89, 0.15) 0%, transparent 50%);
    animation: pulseBg 10s ease-in-out infinite alternate;
}

/* Ciel étoilé discret, en tuile vectorielle */
.bg-stars {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url('assets/illustrations/stars.svg');
    background-size: 420px 420px;
    opacity: 0.55;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 85%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 85%);
    animation: starsDrift 120s linear infinite, starsGlow 9s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes pulseBg {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

@keyframes starsDrift {
    from { background-position: 0 0; }
    to { background-position: -420px 210px; }
}

@keyframes starsGlow {
    from { opacity: 0.35; }
    to { opacity: 0.7; }
}

.container {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1200px;
    padding: clamp(2.5rem, 7vh, 5rem) 2rem 0;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Emblème */
.emblem {
    display: block;
    width: 76px;
    height: 76px;
    margin: 0 auto 1.75rem;
    filter: drop-shadow(0 0 18px rgba(197, 160, 89, 0.25));
    animation: fadeInDown 1s ease forwards, floatSoft 7s ease-in-out 1s infinite;
}

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

.badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 50px;
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease forwards;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

h1 span {
    color: var(--accent);
    font-style: italic;
}

p.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #9CA3AF;
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
    line-height: 1.6;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

/* Trois repères : ce que devient l'éco-habitat */
.pillars {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: -1.25rem auto 3.5rem;
    animation: fadeInUp 1s ease 0.5s forwards;
    opacity: 0;
}

.pillars li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.75rem;
}

.pillars li + li {
    border-left: 1px solid rgba(197, 160, 89, 0.15);
}

.pillar-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 0.35rem;
    fill: none;
    stroke: var(--accent);
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pillars strong {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 1.15rem;
    color: var(--sand);
}

.pillars span {
    max-width: 240px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #9CA3AF;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.card {
    background: rgba(13, 27, 20, 0.55);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(197, 160, 89, 0.4);
    background: rgba(18, 36, 27, 0.7);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
    opacity: 1;
}

/* Illustration en tête de carte */
.card-visual {
    position: relative;
    margin: -2.5rem -2rem 1.75rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid rgba(197, 160, 89, 0.22);
    background: var(--primary);
}

.card-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
    filter: saturate(0.95) brightness(0.96);
}

.card-visual::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 35%;
    background: linear-gradient(to top, rgba(13, 27, 20, 0.55), transparent);
    pointer-events: none;
}

.card:hover .card-visual img {
    transform: scale(1.05);
    filter: saturate(1.05) brightness(1.04);
}

.card-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 600;
}

.card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.card p {
    color: #9CA3AF;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sand);
    font-weight: 500;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.card:hover .card-cta {
    gap: 1rem;
    color: var(--accent);
}

/* Horizon illustré en pied de page */
.horizon {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: clamp(-8rem, -7vw, -2.5rem);
    pointer-events: none;
    animation: fadeIn 1.6s ease 0.7s forwards;
    opacity: 0;
}

.horizon img {
    display: block;
    width: 100%;
    height: clamp(260px, 34vw, 560px);
    object-fit: cover;
    object-position: 62% 100%;
}

footer {
    width: 100%;
    padding: 0.5rem 2rem 2rem;
    background: var(--water);
    text-align: center;
    font-size: 0.85rem;
    color: #6B7280;
    animation: fadeIn 1s ease 0.8s forwards;
    opacity: 0;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

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

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

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

@media (max-width: 720px) {
    .pillars {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .pillars li + li {
        border-left: 0;
        border-top: 1px solid rgba(197, 160, 89, 0.15);
        padding-top: 1.25rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .card {
        padding: 2rem 1.5rem;
    }

    .card-visual {
        margin: -2rem -1.5rem 1.5rem;
    }

    .emblem {
        width: 64px;
        height: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
