/* EventSika · Relief organique — charger en dernier. */
:root {
    --organic-page: #101427;
    --organic-card: #202640;
    --organic-bottom: #171d33;
    --organic-ink: #f7f3ff;
    --organic-muted: #c1c5db;
    --organic-accent: #c4adff;
    --organic-edge: #afa4e52e;
    --organic-shadow: 12px 18px 32px #03061780, -4px -5px 16px #727da91a, inset 0 1px 1px #ffffff24;
    --organic-inset: inset 4px 5px 10px #04081766, inset -3px -3px 8px #949bd414;
}

html[data-theme="light"] {
    --organic-page: #eae5f1;
    --organic-card: #fbf7ff;
    --organic-bottom: #e8e0f1;
    --organic-ink: #241d3a;
    --organic-muted: #59516c;
    --organic-accent: #6b3bb2;
    --organic-edge: #ffffffb3;
    --organic-shadow: 12px 18px 30px #5e486e33, -5px -6px 16px #ffffffb3, inset 0 1px 2px #ffffff;
    --organic-inset: inset 4px 5px 10px #69517526, inset -3px -3px 8px #ffffffb3;
}

html body.es-organic {
    color: var(--organic-ink);
    background-color: var(--organic-page) !important;
    background-image: url('../images/organic-grain.svg'), radial-gradient(ellipse at 4% 12%, #8b5cf620, transparent 55%);
    background-size: 180px 180px, auto;
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.65;
}

/* Le grain reste un fond : aucune couche ne recouvre les interactions. */
html body.es-organic :is(.events-page, .notifications-page, .about-page, .features-page, .organizer-page, .contact-page, .dashboard-content) {
    background: transparent !important;
}

html body.es-organic :is(.event-card, .category-card, .home-info-card, .value-card, .feature-card, .audience-card, .role-card, .dashboard-stat-card, .dashboard-panel, .dashboard-card, .reservation-card, .notification-item, .sb-card, .es-comment, .es-comment-form, .filter-box, .contact-form-box) {
    background: linear-gradient(145deg, var(--organic-card), var(--organic-bottom)) !important;
    border: 1px solid var(--organic-edge) !important;
    border-radius: 26px;
    box-shadow: var(--organic-shadow) !important;
    color: var(--organic-ink);
}

html body.es-organic :is(.category-card, .home-info-card, .value-card, .feature-card, .dashboard-stat-card) {
    transition: transform .25s ease, box-shadow .25s ease;
}

@media (hover: hover) {
    html body.es-organic :is(.category-card, .home-info-card, .value-card, .feature-card):hover {
        transform: translateY(-5px);
    }
}

html body.es-organic :is(.event-card, .category-card, .home-info-card, .dashboard-stat-card, .dashboard-panel, .reservation-card, .notification-item) :is(h2, h3, h4, strong) {
    color: var(--organic-ink);
    text-shadow: none;
}

html body.es-organic :is(.event-card, .category-card, .home-info-card, .dashboard-stat-card, .dashboard-panel, .reservation-card, .notification-item) :is(p, small, .dashboard-stat-label, .dashboard-stat-description) {
    color: var(--organic-muted);
    opacity: 1;
}

html body.es-organic :is(.center-header, .categories-header, .home-info-heading) p {
    color: var(--organic-muted);
    font-size: 16px;
}

html body.es-organic :is(.section-label, .dashboard-page-label, .dashboard-panel-label) {
    color: var(--organic-accent);
}

html body.es-organic :is(.step-icon, .category-icon, .home-info-icon, .dashboard-stat-icon) {
    background: linear-gradient(140deg, var(--organic-card), var(--organic-bottom)) !important;
    color: var(--organic-accent);
    border: 1px solid var(--organic-edge);
    box-shadow: 5px 9px 14px #07091d40, inset 0 1px 1px #ffffff40 !important;
    border-radius: 22px;
}

html body.es-organic :is(.btn-primary, .es-register, .dashboard-create-event, .reservations-explore-btn, .es-login-submit) {
    background: linear-gradient(125deg, #5846a5, #8e52d5) !important;
    color: #fff !important;
    border: 1px solid #d8bbff66;
    border-radius: 999px;
    box-shadow: 0 8px 18px #42276740, inset 0 2px 2px #ffffff40 !important;
}

html body.es-organic :is(.btn-primary, .es-register, .dashboard-create-event):active {
    transform: translateY(2px);
}

html body.es-organic :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select) {
    border-color: var(--organic-edge);
    color: var(--organic-ink);
    background-color: var(--organic-bottom);
    box-shadow: var(--organic-inset);
}

html body.es-organic :is(input, textarea)::placeholder {
    color: var(--organic-muted);
    opacity: 1;
}

html body.es-organic :is(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--organic-accent);
    outline-offset: 4px;
}

/* Navigation : profondeur, sans découper les menus déroulants. */
html body.es-organic .es-header {
    background: var(--organic-card) !important;
    border-bottom: 1px solid var(--organic-edge);
    box-shadow: 0 8px 24px #06091e24;
}

html body.es-organic :is(.es-dropdown, .notification-dropdown, .dashboard-profile-menu, .dashboard-notification-menu) {
    background: var(--organic-card) !important;
    color: var(--organic-ink);
    border-color: var(--organic-edge);
    box-shadow: var(--organic-shadow);
}

html body.es-organic :is(.es-nav-link, .es-disclosure>summary, .es-brand, .es-dropdown a) {
    color: var(--organic-ink);
}

html body.es-organic :is(.dashboard-sidebar, .dashboard-header) {
    background: var(--organic-card) !important;
    border-color: var(--organic-edge);
}

html body.es-organic .dashboard-nav-link {
    color: var(--organic-muted);
}

html body.es-organic .dashboard-nav-link.active {
    color: var(--organic-ink);
    background: #8b5cf626;
    box-shadow: var(--organic-inset);
}

/* Accueil : panneau sculpté, rappel des formes superposées de la référence. */
.es-organic-intro {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center;
    gap: 36px;
    max-width: 1240px;
    margin: 38px auto 32px;
    padding: clamp(28px, 5vw, 72px);
    border: 1px solid var(--organic-edge);
    border-radius: 36px 90px 36px 36px;
    background: linear-gradient(125deg, var(--organic-card), var(--organic-bottom));
    box-shadow: var(--organic-shadow);
    overflow: hidden;
}

.es-organic-intro h1 {
    max-width: 700px;
    margin: 16px 0 20px;
    font-size: clamp(32px, 4.6vw, 62px);
    line-height: 1.08;
    letter-spacing: -.045em;
    color: var(--organic-ink);
}

.es-organic-intro h1 em {
    color: var(--organic-accent);
    font-style: normal;
}

.es-organic-intro p {
    max-width: 530px;
    margin: 0;
    color: var(--organic-muted);
    font-size: 17px;
    line-height: 1.8;
}

.es-organic-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--organic-accent);
}

.es-organic-caption {
    display: inline-block;
    margin-top: 26px;
    padding: 10px 17px;
    border-radius: 99px;
    border: 1px solid var(--organic-edge);
    box-shadow: var(--organic-inset);
    font-size: 13px;
    color: var(--organic-ink);
}

.es-organic-art {
    position: relative;
    height: 280px;
    pointer-events: none;
}

.es-organic-art span {
    position: absolute;
    display: block;
    width: 115px;
    height: 240px;
    border-radius: 95% 8% 85% 12%;
    transform: rotate(-30deg);
    border: 1px solid #ffffff40;
    background: linear-gradient(120deg, #b995eb, #684691 55%, #302342);
    box-shadow: 14px 20px 22px #05091e55, inset 2px 2px 4px #ffffff60;
}

.es-organic-art span::after {
    content: '';
    position: absolute;
    top: 12%;
    bottom: 8%;
    left: 49%;
    width: 1px;
    background: #e6d6ff70;
    transform: rotate(8deg);
}

.es-organic-art span:nth-child(1) {
    left: 10%;
    top: 15px;
}

.es-organic-art span:nth-child(2) {
    left: 43%;
    top: -25px;
    transform: rotate(20deg);
    background: linear-gradient(120deg, #6579ad, #34436c 55%, #171e38);
}

.es-organic-art span:nth-child(3) {
    left: 43%;
    top: 75px;
    transform: rotate(60deg);
    background: linear-gradient(120deg, #edcfaa, #b88c6a 55%, #75544a);
}

/* Carrousel : scène texturée, ordre et données inchangés. */
html body.es-organic #heroCarousel {
    width: min(1240px, calc(100% - 40px));
    margin: 30px auto 70px;
    border: 1px solid var(--organic-edge);
    border-radius: 34px;
    background: radial-gradient(ellipse at 50% 25%, #7c54aa35, transparent 65%), url('../images/organic-grain.svg'), var(--organic-bottom) !important;
    box-shadow: var(--organic-shadow);
}

html body.es-organic #heroCarousel .hero-slide {
    background: var(--organic-card) !important;
    border-color: var(--organic-edge);
    border-radius: 27px;
    box-shadow: 0 18px 32px #03071a66, inset 0 1px 1px #ffffff40;
}

html body.es-organic #heroCarousel .hero-content {
    background: var(--organic-card) !important;
    color: var(--organic-ink);
}

html body.es-organic #heroCarousel .hero-content * {
    text-shadow: none !important;
}

html body.es-organic #heroCarousel .hero-featured-title {
    color: var(--organic-ink) !important;
    font-size: clamp(23px, 2.4vw, 30px) !important;
}

html body.es-organic #heroCarousel :is(.hero-event-info, .hero-event-info span, .hero-description) {
    color: var(--organic-muted) !important;
    opacity: 1 !important;
    font-size: 14px !important;
    line-height: 1.65;
}

html body.es-organic #heroCarousel .hero-event-info i {
    color: var(--organic-accent) !important;
}

html body.es-organic #heroCarousel .hero-event-category {
    background: #8b5cf622;
    color: var(--organic-accent);
}

html body.es-organic #heroCarousel .hero-arrow {
    background: var(--organic-card);
    color: var(--organic-ink);
    border-color: var(--organic-edge);
    box-shadow: var(--organic-inset);
}

html body.es-organic .how-section {
    max-width: 1240px;
    width: calc(100% - 40px);
    margin: 40px auto 70px;
    padding: 50px 22px;
    border-radius: 34px;
    border: 1px solid var(--organic-edge);
    background: linear-gradient(135deg, var(--organic-card), var(--organic-bottom)) !important;
    box-shadow: var(--organic-shadow);
}

html body.es-organic .step p {
    color: var(--organic-muted);
    font-size: 15px;
    line-height: 1.75;
}

html body.es-organic .step h3 {
    color: var(--organic-ink);
}

html body.es-organic .category-card:nth-child(3n+2) {
    background: linear-gradient(135deg, var(--organic-card), #7b50932b) !important;
}

html body.es-organic .category-card:nth-child(3n) {
    background: linear-gradient(135deg, var(--organic-card), #bc976a24) !important;
}

html body.es-organic .site-footer {
    background: var(--organic-bottom);
    border-top: 1px solid var(--organic-edge);
}

html body.es-organic .site-footer :is(p, a) {
    color: var(--organic-muted);
}

/* Authentification indépendante : mêmes matières et couleurs. */
html body.es-organic.es-login {
    --login-bg: var(--organic-page);
    --login-text: var(--organic-ink);
    --login-muted: var(--organic-muted);
}

html body.es-organic .es-login-card {
    padding: 26px;
    border: 1px solid var(--organic-edge);
    border-radius: 28px;
    background: linear-gradient(145deg, var(--organic-card), var(--organic-bottom));
    box-shadow: var(--organic-shadow);
}

@media (max-width: 760px) {
    .es-organic-intro {
        grid-template-columns: 1fr;
        margin: 22px 18px;
        gap: 8px;
        border-radius: 28px 65px 28px 28px;
    }

    .es-organic-art {
        height: 130px;
        width: 230px;
        justify-self: end;
    }

    .es-organic-art span {
        width: 65px;
        height: 135px;
    }

    .es-organic-art span:nth-child(3) {
        top: 35px;
    }

    html body.es-organic #heroCarousel {
        width: calc(100% - 24px);
        margin-bottom: 40px;
    }

    html body.es-organic .how-section {
        width: calc(100% - 24px);
        padding: 32px 12px;
    }

    html body.es-organic .es-login-card {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body.es-organic :is(.category-card, .home-info-card, .value-card, .feature-card, .dashboard-stat-card) {
        transition: none;
    }
}

/* Espacement intérieur du tableau de bord */
.dashboard-body .organizer-dashboard {
    box-sizing: border-box;
    padding: 28px;
    border-radius: 28px;
}

.dashboard-body .dashboard-welcome {
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-body .dashboard-welcome h2 {
    margin: 12px 0;
}

.dashboard-body .dashboard-welcome p {
    margin: 0;
    line-height: 1.7;
}

/* Mobile */
@media (max-width: 700px) {
    .dashboard-body .organizer-dashboard {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .dashboard-body .dashboard-welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
}

/* Champs de connexion : espacement et fond uniforme */
html body.es-login .es-login-input {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-inline: 18px;
}

html body.es-login .es-login-input > input {
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 15px 0;
    padding-left: 0.5rem !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--login-text);
}

html body.es-login .es-login-input > svg {
    flex-shrink: 0;
}

/* Icônes claires en mode sombre */
html[data-theme="dark"] body.es-login .es-login-input svg {
    stroke: var(--login-text);
    opacity: 1;
}

