/* Styles additionnels personnalisés */

/* ── Illustration hero animée ── */
@keyframes illustrationEntrance {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

.hero-illustration {
    opacity: 0;
    animation:
        illustrationEntrance 0.9s cubic-bezier(0.2, 0.8, 0.25, 1) 0.3s forwards,
        float 5s 1.2s ease-in-out infinite;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
}

.font-rotunda {
    font-weight: 300 ;
}

.btn-primary {
    @apply bg-orange text-white px-6 py-3 rounded-lg hover:bg-orange/90 transition-colors;
}

.container-custom {
    @apply container mx-auto px-4 md:px-6 lg:px-8;
}

.hero-dynamic-word {
    display: inline-block;
    position: relative;
    white-space: nowrap;
    padding: 0 0.1em;
    color: #D05D49;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-dynamic-word::after {
    content: "";
    position: absolute;
    inset-inline: 15%;
    height: 2px;
    bottom: -0.25em;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 9999px;
    z-index: -1;
}

.hero-dynamic-word.is-exiting {
    opacity: 0;
    transform: translateY(-0.4em);
}

.hero-dynamic-word.is-entering {
    opacity: 1;
    transform: translateY(0);
}

.site-header {
    transition: background-color 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease, transform 0.25s ease;
}

.site-header .logo-square {
    display: block;
    transition: width 0.25s ease, transform 0.25s ease;
}

.site-header.header--home {
    background-color: transparent;
}

.site-header.header--scrolled {
    background-color: #D05D49;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
}

.site-header.header--home:not(.header--scrolled) nav {
    min-height: 6.5rem;
}

.site-header.header--home:not(.header--scrolled) .logo-square {
    width: 7rem;
}

@media (min-width: 768px) {
    .site-header.header--home:not(.header--scrolled) nav {
        min-height: 7.5rem;
    }

    .site-header.header--home:not(.header--scrolled) .logo-square {
        width: 9rem;
    }
}

.home-hero {
    margin-top: -7.5rem;
    padding-top: 9.5rem;
}

@media (min-width: 768px) {
    .home-hero {
        margin-top: -8.5rem;
        padding-top: 10.5rem;
    }
}

.top-hero {
    margin-top: -7.5rem;
    padding-top: 25vh;
}

@media (min-width: 768px) {
    .top-hero {
        margin-top: -8.5rem;
        padding-top: 25vh;
    }
}

[data-animate="fade-up"] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: var(--a-delay, 0s);
    will-change: opacity, transform;
}

[data-animate="fade-up"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="grow-plant"] {
    opacity: 0;
    transform-origin: bottom center;
    transform: translateY(40px) scaleY(0.4);
    will-change: opacity, transform;
}

[data-animate="grow-plant"].is-visible {
    animation: hero-plant-grow 1300ms cubic-bezier(0.2, 0.8, 0.25, 1) forwards;
    transition-delay: var(--a-delay, 0s);
}

/* ── Nav pill sliding indicator ── */
#nav-pill-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    height: calc(100% - 12px);
    width: 0;
    transform: translateY(-50%);
    background-color: #D05D49;
    border-radius: 9999px;
    pointer-events: none;
    opacity: 0;
    z-index: 0;
}

#nav-pill-indicator.is-active {
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.18s ease;
}

.nav-pill-link {
    position: relative;
    z-index: 1;
    color: #1a1a1a;
    transition: color 0.18s ease;
    text-decoration: none;
}

/* Au survol d’un lien → seul ce lien en beige (sous la pill orange) */
.nav-pill-link:hover {
    color: #f3efe8;
    text-decoration: none;
}

/* Lien actif (page en cours) en beige quand on ne survole pas la pill */
.nav-pill-link.is-current {
    color: #f3efe8;
    text-decoration: none;
}

/* Quand on survole un autre lien, l’actif redevient noir pour ne pas rester beige sur fond beige */
#nav-pill.pill-hovering .nav-pill-link.is-current {
    color: #1a1a1a;
}

/* ── Fenêtres flottantes Royaume ── */
.rw-window {
    background: white;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    will-change: transform;
}

.rw-header {
    background: #D05D49;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rw-logo {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.rw-tabs {
    display: flex;
    gap: 2px;
    overflow: hidden;
}

.rw-tab {
    font-size: 6.5px;
    color: rgba(255,255,255,0.5);
    padding: 2px 5px;
    white-space: nowrap;
    border-radius: 20px;
}

.rw-tab--active {
    background: rgba(255,255,255,0.22);
    color: white;
    font-weight: 600;
}

.rw-body {
    background: #f3efe8;
    padding: 10px;
}

@keyframes hero-plant-grow {
    0% {
        opacity: 0;
        transform: translateY(40px) scaleY(0.4);
    }
    55% {
        opacity: 1;
        transform: translateY(-6px) scaleY(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

/* ── Bandeau consentement cookies ── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 0 1rem 1rem;
    pointer-events: none;
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.cookie-banner--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-banner--hide {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.cookie-banner__inner {
    max-width: 860px;
    margin: 0 auto;
    background: #1a1a1a;
    color: #f3efe8;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 -4px 40px rgba(0,0,0,0.18), 0 8px 32px rgba(0,0,0,0.14);
}

.cookie-banner__content {
    margin-bottom: 16px;
}

.cookie-banner__title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: #f3efe8;
}

.cookie-banner__text {
    font-size: 0.78rem;
    color: rgba(243,239,232,0.7);
    line-height: 1.5;
}

.cookie-banner__link {
    color: #D05D49;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.cookie-banner__link:hover {
    color: #f3efe8;
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cookie-banner__btn {
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    border-radius: 999px;
    padding: 9px 20px;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
    white-space: nowrap;
}

.cookie-banner__btn--accept {
    background: #D05D49;
    color: white;
}

.cookie-banner__btn--accept:hover {
    background: #b84d3b;
}

.cookie-banner__btn--refuse {
    background: rgba(243,239,232,0.12);
    color: #f3efe8;
    border: 1px solid rgba(243,239,232,0.2);
}

.cookie-banner__btn--refuse:hover {
    background: rgba(243,239,232,0.2);
}

.cookie-banner__btn--link {
    background: transparent;
    color: rgba(243,239,232,0.5);
    padding: 9px 8px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner__btn--link:hover {
    color: #f3efe8;
}

/* Panneau personnalisation */
.cookie-banner__details {
    border-top: 1px solid rgba(243,239,232,0.12);
    margin-top: 16px;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cookie-banner__toggle-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.cookie-banner__toggle-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f3efe8;
    margin-bottom: 2px;
}

.cookie-banner__toggle-desc {
    font-size: 0.72rem;
    color: rgba(243,239,232,0.5);
    line-height: 1.4;
}

.cookie-banner__badge {
    font-size: 0.7rem;
    color: #596c5c;
    background: rgba(89,108,92,0.18);
    border: 1px solid rgba(89,108,92,0.35);
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Toggle switch */
.cookie-banner__switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

.cookie-banner__switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-banner__slider {
    position: absolute;
    inset: 0;
    background: rgba(243,239,232,0.15);
    border-radius: 999px;
    transition: background 0.25s;
}

.cookie-banner__slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
}

.cookie-banner__switch input:checked + .cookie-banner__slider {
    background: #D05D49;
}

.cookie-banner__switch input:checked + .cookie-banner__slider::before {
    transform: translateX(18px);
}

.cookie-banner__switch input:focus-visible + .cookie-banner__slider {
    outline: 2px solid #D05D49;
    outline-offset: 2px;
}

/* Accessibilité */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

/* Mobile */
@media (max-width: 640px) {
    .cookie-banner {
        padding: 0 0.75rem 0.75rem;
    }

    .cookie-banner__inner {
        padding: 16px 18px;
        border-radius: 14px;
    }

    .cookie-banner__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner__btn {
        text-align: center;
    }

    .cookie-banner__btn--link {
        text-align: center;
        padding: 6px 8px;
    }
}
