/* Variables migrated to modules/_variables.css */

/* ========================================
   SYSTÈME DE BOUTONS RESCA
   ======================================== */

/* Base commune */
.resca-btn {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    border-radius: var(--radius-pill);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.4;
    box-sizing: border-box;
}

/* Bouton Principal (accent) */
.resca-btn--primary {
    background: var(--resca-accent);
    color: var(--resca-dark);
    font-weight: 800;
}

.resca-btn--primary:hover {
    background: var(--resca-dark);
    color: var(--resca-accent);
    transform: translateY(-1px);
}

/* Bouton Secondaire (blanc avec bordure) */
.resca-btn--secondary {
    background: var(--resca-white);
    color: var(--resca-dark);
    border: 1px solid var(--resca-dark);
    box-shadow: var(--shadow-btn);
}

.resca-btn--secondary:hover {
    background: var(--resca-dark);
    color: var(--resca-white);
}

/* Bouton Outline (minimaliste) */
.resca-btn--outline {
    background: transparent;
    color: var(--resca-text-muted);
    border: 1px solid var(--resca-border);
}

.resca-btn--outline:hover {
    background: var(--resca-grey);
    color: var(--resca-dark);
}

/* Bouton Danger */
.resca-btn--danger {
    background: #FFDFDC;
    color: #530226;
}

.resca-btn--danger:hover {
    background: #FFB8B0;
}

/* Variantes de taille */
.resca-btn--sm {
    padding: 8px 20px;
    font-size: 12px;
}

.resca-btn--lg {
    padding: 15px 40px;
    font-size: 16px;
}

/* Bouton pleine largeur */
.resca-btn--block {
    width: 100%;
    display: block;
}

/* ========================================
   MAIN DASHBOARD CSS
   ======================================== */

/* Main Dashboard CSS */
html {
    background-color: var(--resca-bg-light);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--resca-bg-light);
    color: var(--resca-text-main);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    /* Safari iOS specific */
}

/* Fix iOS Safari safe-area bottom gap - using body background color */
body::after {
    content: "";
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: env(safe-area-inset-bottom);
    background-color: var(--resca-bg-light);
    z-index: -1;
    pointer-events: none;
}

.euzhan-navbar,
.navbar-fixed-bottom {
    padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
}

.resca-layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    position: relative;
}

.resca-sidebar {
    width: 260px;
    background-color: var(--resca-white);
    border-top-right-radius: 30px;
    border-bottom-right-radius: 30px;
}

/* ========================================
   PWA / BROWSER CONDITIONAL DISPLAY
   ======================================== */

.pwa-only { display: none !important; }
.browser-only { display: block; }

/* In Standalone Mode (PWA Installed) */
@media (display-mode: standalone) {
    .pwa-only { display: block !important; }
    .browser-only { display: none !important; }
}

/* JS Fallback (for older iOS or edge cases) */
body.is-standalone .pwa-only { display: block !important; }
body.is-standalone .browser-only { display: none !important; }

.resca-sidebar {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    overflow-y: auto;
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

.sidebar-header {
    height: 100px;
    background-color: var(--resca-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header img {
    max-height: 40px;
}

[data-theme="dark"] .sidebar-header img,
[data-theme="dark"] .mobile-logo img {
    filter: brightness(0) invert(1);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: auto;
    padding: 20px 0;
    overflow-y: auto;
}

/* Sidebar Profile Info */
.sidebar-profile-card {
    display: flex;
    align-items: center;
    padding: 5px 20px;
    margin: 10px 0;
    background-color: transparent;
    border-radius: 15px;
    text-decoration: none;
    transition: opacity 0.2s;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.sidebar-profile-card:hover {
    opacity: 0.7;
}

.sidebar-profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.sidebar-profile-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-profile-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--resca-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    margin-bottom: 2px;
}

.sidebar-profile-job {
    font-weight: 500;
    font-size: 12px;
    color: var(--resca-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.nav-group-top {
    flex: 1;
}

.nav-group-bottom {
    margin-top: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 0 10px 5px 10px;
    border-radius: 50px;
    color: var(--resca-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--resca-primary);
    color: var(--resca-white);
}

.nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 15px;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* Icons Masks using local assets */
.icon-dashboard {
    -webkit-mask-image: url('../icons/dashboard.svg');
    mask-image: url('../icons/dashboard.svg');
}

.icon-logout {
    -webkit-mask-image: url('../icons/logout.svg');
    mask-image: url('../icons/logout.svg');
}

.icon-settings {
    -webkit-mask-image: url('../icons/settings.svg');
    mask-image: url('../icons/settings.svg');
}

.icon-sources {
    -webkit-mask-image: url('../icons/sources.svg');
    mask-image: url('../icons/sources.svg');
}

.icon-articles {
    -webkit-mask-image: url('../icons/articles.svg');
    mask-image: url('../icons/articles.svg');
}

.icon-euzhan {
    -webkit-mask-image: url('../icons/euzhan.svg');
    mask-image: url('../icons/euzhan.svg');
}

.icon-profile {
    -webkit-mask-image: url('../icons/profile.svg');
    mask-image: url('../icons/profile.svg');
}

.icon-tools {
    -webkit-mask-image: url('../icons/tools.svg');
    mask-image: url('../icons/tools.svg');
}

.icon-videos {
    -webkit-mask-image: url('../icons/boutonplay.svg');
    mask-image: url('../icons/boutonplay.svg');
}

.icon-contract {
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/></svg>');
}

.icon-calendar {
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>');
}



.resca-content-area {
    flex: 1;
    background-color: transparent;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

.sidebar-separator {
    display: none;
}

/* Burger Menu & Mobile Styles */
.burger-menu-btn {
    display: none;
}

/* FIX: Hide Mobile Header by default on Desktop */
.mobile-header {
    display: none;
}

.burger-icon {
    width: 24px;
    height: 24px;
    background-color: var(--resca-dark);
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* Sidebar fin (Tablet/Small Desktop) */
@media (min-width: 901px) and (max-width: 1140px) {
    .resca-sidebar {
        width: 80px;
    }

    .nav-item {
        justify-content: center;
        padding: 12px 0;
        font-size: 0 !important;
    }

    .nav-icon {
        margin-right: 0;
        width: 24px;
        height: 24px;
    }

    .sidebar-header img {
        display: none;
    }

    .sidebar-header {
        background-image: url('../icons/resca_logo_r.svg');
        background-repeat: no-repeat;
        background-position: center;
        background-size: auto 40px;
    }

    .nav-group-bottom div[style*="font-size:11px"] {
        display: none;
    }
}

@media (max-width: 900px) {

    /* Hide desktop burger button if any left */
    .burger-menu-btn {
        display: none !important;
    }

    /* STICKY HEADER */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--resca-white);
        padding-top: env(safe-area-inset-top);
        padding-bottom: 0;
        padding-left: 20px;
        padding-right: 20px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(60px + env(safe-area-inset-top));
        min-height: 0;
        z-index: 1001;
        box-sizing: border-box;
        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    }

    .mobile-logo img {
        height: 25px;
        display: block;
    }

    .mobile-burger-btn {
        width: 30px;
        height: 24px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .burger-bar {
        height: 3px;
        background: var(--resca-dark);
        border-radius: 3px;
        transition: all 0.4s cubic-bezier(.68, -.6, .32, 1.6);
        transform-origin: center;
    }

    /* Closed State */
    .burger-bar:nth-child(1) {
        width: 50%;
        transform-origin: center;
    }

    .burger-bar:nth-child(2) {
        width: 100%;
        transform-origin: center;
    }

    .burger-bar:nth-child(3) {
        width: 75%;
        align-self: flex-start;
        transform-origin: center;
    }

    /* Open State Animation */

    /* Bar 1 */
    body.sidebar-open .burger-bar:nth-child(1) {
        transform-origin: bottom;
        transform: rotateZ(45deg) translate(4.7px, 1.5px);
    }

    /* Bar 2 */
    body.sidebar-open .burger-bar:nth-child(2) {
        transform-origin: top;
        transform: rotateZ(-45deg);
    }

    /* Bar 3 */
    body.sidebar-open .burger-bar:nth-child(3) {
        width: 50%;
        transform-origin: bottom;
        transform: translate(12.8px, -6.1px) rotateZ(45deg);
    }

    .resca-sidebar {
        position: fixed;
        top: calc(60px + env(safe-area-inset-top));
        left: 0;
        width: 100%;
        height: auto;
        max-height: 0;
        overflow: hidden;
        background: var(--resca-white);
        border-radius: 0 0 15px 15px;

        z-index: 1000;
        margin: 0;

        transition: .4s cubic-bezier(.68, -.6, .32, 1.6);
        padding: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        display: block;
    }

    .resca-sidebar.active {
        max-height: 80vh;
        padding: 20px 0 10px 0;
    }

    .resca-sidebar .nav-item {
        width: auto;
        margin: 0 20px 8px 20px;
        box-sizing: border-box;
        padding: 18px 30px;
        font-size: 15px;
    }

    .sidebar-profile-card {
        margin: 0 20px 20px 20px;
    }

    .sidebar-header.mobile-hidden {
        display: none;
    }

    .sidebar-separator {
        display: block;
        height: 1px;
        background-color: var(--resca-border);
        margin: 15px 30px;
    }

    .resca-content-area {
        margin-left: 0;
        padding: calc(80px + env(safe-area-inset-top)) 20px calc(60px + env(safe-area-inset-bottom)) 20px;
        min-height: 100vh;
        min-height: 100dvh;
        min-height: -webkit-fill-available;
    }

    .mobile-overlay {
        position: fixed;
        top: calc(60px + env(safe-area-inset-top));
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    body.sidebar-open .mobile-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

.resca-wrap {
    background: transparent;
    padding: 40px 60px;
    box-sizing: border-box;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.resca-grid {
    display: grid;
    grid-template-columns: 25% 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 1400px) {
    .resca-grid {
        grid-template-columns: 30% 1fr;
    }
}

/* HEADER : ExtraBold, Fond Couleur */
.section-header {
    background-color: var(--resca-accent);
    color: var(--resca-text-main);
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 800;
    font-size: 16px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    box-shadow: var(--shadow-sm);
}

/* HEADER SIMPLE (Suggestions) : Bold, Noir, Sans fond */
.section-header-simple {
    color: var(--resca-header-simple-color);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
    display: block;
}

.news-item {
    background-color: var(--resca-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    color: var(--resca-text-main);
}

.news-title {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--resca-text-main);
}

.news-source {
    font-size: 11px;
    font-weight: 600;
    color: var(--resca-dark);
    display: inline-block;
    opacity: 1;
    text-transform: uppercase;
    background-color: var(--resca-grey);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.news-source:hover {
    background-color: var(--resca-accent);
    color: var(--resca-dark);
}

.sugg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 0;
}

.sugg-item {
    background-color: var(--resca-white);
    border: 1px solid var(--resca-accent);
    border-radius: 10px;
    padding: 15px;
    color: var(--resca-text-main);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.hidden {
    display: none !important;
}

.sugg-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(166, 242, 232, 0.3);
}

.sugg-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--resca-text-main);
    line-height: 1.3;
}

.sugg-preview {
    font-size: 12px;
    color: var(--resca-text-muted);
    line-height: 1.4;
    font-weight: 400;
    flex-grow: 1;
}

.network-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--resca-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.network-toggle:hover {
    background-color: rgba(0, 43, 38, 0.05);
    color: var(--resca-primary, #002B26);
}

.network-toggle.active {
    background-color: rgba(0, 43, 38, 0.05);
    color: var(--resca-primary, #002B26);
}

.input-card {
    background: var(--resca-input-bg);
    padding: 0;
    border-radius: 12px;
    margin-bottom: 5px;
    box-shadow: none;
    border: none;
}

textarea#euzhan-input {
    width: 100%;
    border: 1px solid var(--resca-border);
    border-radius: var(--radius-md);
    padding: 10px;
    font-size: 14px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    min-height: 80px;
}

textarea#euzhan-input:focus {
    border-color: var(--resca-accent);
    outline: none;
}

/* Legacy spacer for generate button */
.resca-btn-gen-wrapper {
    float: right;
    margin-top: 0;
    margin-bottom: 40px;
}

.resca-col-right::after {
    content: "";
    display: table;
    clear: both;
}

.editor-zone {
    clear: both;
    background: var(--resca-white);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    margin-top: 40px;
    border-top: 4px solid var(--resca-accent);
    border: 1px solid var(--resca-border-light);
}

label {
    font-weight: 700;
    font-size: 12px;
    color: var(--resca-dark);
    margin-bottom: 8px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#resca-root input[type="text"],
#resca-root input[type="email"],
#resca-root input[type="date"],
#resca-root input[type="password"],
#resca-root input[type="url"],
#resca-root textarea,
#resca-root select {
    width: 100%;
    border: none !important;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 15px;
    margin-bottom: 0px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background: var(--resca-input-bg);
    color: var(--resca-dark);
    transition: all var(--transition-fast);
    resize: vertical;
    outline: none;
    box-shadow: none;
}

#resca-root input[type="text"]:focus,
#resca-root input[type="email"]:focus,
#resca-root input[type="date"]:focus,
#resca-root input[type="password"]:focus,
#resca-root input[type="url"]:focus,
#resca-root textarea:focus,
#resca-root select:focus {
    outline: none !important;
    border: none !important;
    background: var(--resca-white);
    box-shadow: 0 0 0 3px rgba(166, 242, 232, 0.2) !important;
}

#resca-root input::placeholder,
#resca-root textarea::placeholder {
    color: var(--resca-text-muted);
}

.loader {
    text-align: center;
    color: var(--resca-text-muted);
    font-style: italic;
    padding: 20px;
}

.update-badge {
    font-size: 11px;
    color: var(--resca-text-muted);
    float: right;
    margin-top: 8px;
    transition: color 0.3s ease;
}

.update-badge--refreshing {
    color: var(--resca-primary);
    animation: pulse-badge 1.5s ease-in-out infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.media-preview {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    display: none;
    border-radius: 5px;
}

#btn-show-more-news {
    display: none;
    width: 100%;
    padding: 10px;
    background: var(--resca-grey);
    border: none;
    color: var(--resca-dark);
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    font-size: 12px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    transition: background var(--transition-fast);
}

#btn-show-more-news:hover {
    background: var(--resca-white);
}

@media (max-width: 900px) {

    .news-item.mobile-hidden,
    h4.mobile-hidden {
        display: none;
    }

    #btn-show-more-news {
        display: block;
    }
}

/* --- SOCKET PREVIEW & GRID LAYOUT (BETA 3) --- */

/* CONTENEUR PRINCIPAL (La Feuille) */
.editor-zone {
    background: var(--resca-white);
    padding: 50px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    margin-top: 40px;
    border: 1px solid var(--resca-border-light);
}

textarea#final-title {
    font-size: 16px;
    /* Same as content */
    font-weight: 600;
    /* Semi-bold */
    color: var(--resca-dark);
    border: 1px solid transparent;
    /* Prepare for hover/focus */
    background: transparent;
    width: 100%;
    padding: 0px;
    margin-bottom: 0px;
    outline: none;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    resize: none;
    overflow: hidden;
    display: block;
    border-radius: var(--radius-sm);
}

textarea#final-title::placeholder {
    color: var(--resca-border);
}

/* LE CORPS DU TEXTE (Corps de l'article) */
textarea#final-content {
    width: 100%;
    border: none;
    background: transparent;
    padding: 0px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--resca-text-main);
    resize: none;
    min-height: 100px;
    outline: none;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    overflow: hidden;
    /* Pour auto-resize */
    border-radius: 4px;
    box-shadow: none;
    /* No shadow */
}

/* Focus States (Simplified like Title) */
textarea#final-content:focus {
    border: none;
    background-color: transparent;
    box-shadow: none;
    outline: none;
}

textarea#final-title:focus {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

textarea#final-content:hover {
    border-color: #f0f0f0;
}

textarea#final-title:hover {
    /* No hover effect for title */
}

.editor-main-col>label {
    display: none;
}

/* Layout Grid Desktop */
@media (min-width: 1400px) {
    #editor-zone {
        display: grid;
        grid-template-columns: 1fr 340px;
        gap: 50px;
        align-items: start;
    }

    .editor-main-col {
        min-width: 0;
    }

    .editor-preview-col {
        /* Sticky disabled */
    }
}

/* Disclaimer Left Align */
#ai-disclaimer {
    text-align: left;
    margin-top: 5px;
    font-style: italic;
    font-size: 0.9em;
    color: var(--resca-text-muted);
}

/* Social Preview Container */
.insta-preview-wrapper {
    width: 100%;
    max-width: 320px;
    margin: 10px auto 0;
}

.insta-preview-container {
    position: relative;
    width: 100%;
    padding-bottom: 133.33%;
    /* Aspect Ratio 3:4 (1080x1440) */
    background-color: #f0f0f0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    border-radius: 4px;
    cursor: pointer;
    /* Clickable for upload */
    transition: transform 0.2s ease;
}

.insta-preview-container:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.insta-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.insta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Default to Transparent -> Theme Color Gradient */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, var(--theme-overlay-color, rgba(32, 223, 198, 0.8)) 100%);
    z-index: 2;
}

.insta-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.insta-territory {
    position: absolute;
    /* PHP Calcs Baseline Corrected */
    top: 53.9%;
    right: 5.2%;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    text-align: right;
    text-transform: uppercase;
}

.insta-category {
    position: absolute;
    /* PHP Calcs Baseline Corrected */
    top: 64.4%;
    left: 3.9%;
    color: var(--theme-color, #20dfc6);
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.insta-title {
    position: absolute;
    /* PHP Calcs */
    top: 70.4%;
    left: 3.7%;
    width: 92.49%;
    color: #fff;
    font-size: 21px;
    font-weight: bold;
    line-height: 1.02;
    letter-spacing: -0.047em;
    text-transform: uppercase;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.theme-default {
    --theme-color: #20dfc6;
    --theme-overlay-color: rgba(7, 51, 44, 0.9);
}

.theme-culture {
    --theme-color: #ff8b80;
    --theme-overlay-color: rgba(83, 2, 38, 0.9);
}

.theme-sport {
    --theme-color: #47d6ff;
    --theme-overlay-color: rgba(0, 43, 103, 0.9);
}

/* ========================================
   PREVIEW ACTIONS OVERLAY (Hover/Tap)
   ======================================== */

.preview-actions-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

/* Hide overlay if no media is loaded */
.insta-preview-container:not(.has-media) .preview-actions-overlay {
    display: none !important;
}

/* Show overlay on hover (desktop only — pointer:fine excludes touch devices) */
@media (hover: hover) and (pointer: fine) {
    .insta-preview-container:hover .preview-actions-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Show overlay when tapped (mobile) */
.preview-actions-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Pill Buttons */
.preview-action-btn {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 10px 0;
    width: 200px;
    display: flex;
    justify-content: center;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

/* Filled white */
.preview-action-btn--filled {
    background: var(--resca-white);
    color: var(--resca-dark);
    border: 2px solid var(--resca-white);
}

.preview-action-btn--filled:hover {
    background: var(--resca-accent);
    border-color: var(--resca-accent);
}

/* Outline white */
.preview-action-btn--outline {
    background: transparent;
    color: var(--resca-white);
    border: 2px solid var(--resca-white);
}

.preview-action-btn--outline:hover {
    background: rgba(255, 255, 255, 0.15);
}


/* Hide overlay and text layers when cropping is active */
.insta-preview-container.cropping-active .insta-overlay,
.insta-preview-container.cropping-active .insta-text-layer,
.insta-preview-container.cropping-active .preview-actions-overlay {
    display: none !important;
}

/* During cropping: remove the padding-based height trick so Cropper.js
   can measure real dimensions. The image becomes static in the flow. */
/* Restore fixed 3:4 Aspect Ratio (Instagram Portrait) */
.insta-preview-container.cropping-active {
    padding-bottom: 133.33% !important;
    height: 0 !important;
    overflow: hidden;
    /* Hide anything outside the 3:4 box */
    cursor: default;
    background: #000;
    /* Black background for the "mask" effect */
}

/* Force Cropper.js to fill the 3:4 container exactly */
.insta-preview-container.cropping-active .cropper-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

/* Make image static so Cropper can initialize, but it will be hidden/wrapped by Cropper */
.insta-preview-container.cropping-active .insta-bg-img {
    display: block;
    /* Let Cropper handle visibility */
}

/* "Mask" everything outside the crop box (the "modal" layer) */
.cropper-modal {
    background-color: var(--resca-bg-light) !important;
    /* Match page background color */
    opacity: 1 !important;
    /* Fully hide outside area */
}

/* Crop actions bar — sits OUTSIDE the card (in the DOM flow) */
.crop-actions-bar {
    display: flex;
    justify-content: space-between;
    /* Spread buttons */
    gap: 15px;
    margin-top: 15px;
    padding: 0;
    width: 100%;
    background: transparent;
}

.crop-actions-bar .preview-action-btn {
    padding: 12px 0;
    flex: 1;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#btn-crop-confirm {
    background: var(--resca-accent) !important;
    color: var(--resca-dark) !important;
    border: none !important;
}

#btn-crop-confirm:hover {
    background: var(--resca-dark) !important;
    color: var(--resca-accent) !important;
}

#btn-crop-cancel {
    background: transparent !important;
    color: var(--resca-dark) !important;
    border: 2px solid var(--resca-dark) !important;
}

#btn-crop-cancel:hover {
    background: var(--resca-dark) !important;
    color: var(--resca-white) !important;
}

.cropper-container {
    max-width: 100% !important;
}

.insta-preview-container:has(.preview-actions-overlay) {
    cursor: default;
}

.disclaimer-text {
    font-size: 11px;
    color: var(--resca-text-muted);
    font-style: italic;
    margin-top: 5px;
    text-align: center;
}

.profile-card {
    max-width: 100%;
    margin: 0 auto;
    background: var(--resca-white);
    color: var(--resca-dark);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

@media (max-width: 900px) {
    .resca-wrap {
        margin-left: 0;
        padding: 10px;
    }

    .resca-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .update-badge {
        float: none;
        display: block;
        margin-top: 5px;
    }

    .section-header {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    h1 {
        font-size: 24px !important;
    }

    .editor-zone {
        padding: 25px !important;
    }

    .profile-card {
        padding: 15px;
        margin: 0;
    }
}


.pencil-trick-container {
    display: block;
    perspective: 1000px;
    margin: -20px 20px 30px 10px;
    text-align: left;
}

.switch-ios {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    vertical-align: middle;
    flex-shrink: 0;
}

.switch-ios input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-ios {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    box-sizing: border-box;
}

.slider-ios:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-ios.switch-ios--hydrating .slider-ios,
.switch-ios.switch-ios--hydrating .slider-ios:before {
    transition: none !important;
}

input:checked+.slider-ios {
    background-color: #006255;
}

input:checked+.slider-ios:before {
    transform: translateX(22px);
}

body.euzhan-no-scroll,
body.euzhan-no-scroll .resca-layout,
body.euzhan-no-scroll .resca-content-area {
    overflow: hidden !important;
    touch-action: none !important;
}

.pwa-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

.pwa-overlay.is-open {
    display: block;
    opacity: 1;
}

.pwa-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--resca-white);
    border-radius: 20px 20px 0 0;
    padding: 25px 20px calc(40px + env(safe-area-inset-bottom)) 20px;
    z-index: 10000;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0s linear 0.3s;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    margin: 0 auto;
}

.pwa-sheet.is-open {
    display: block;
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0s linear 0s;
}

@media(min-width: 768px) {
    .pwa-sheet {
        bottom: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, 50%) scale(0.9);
        width: 100%;
        max-width: 450px;
        border-radius: 20px;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s;
    }

    .pwa-sheet.is-open {
        transform: translate(-50%, 50%) scale(1);
        opacity: 1;
        pointer-events: all;
    }
}

.pwa-app-card {
    display: flex;
    align-items: center;
    background: var(--resca-grey);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
}

.pwa-app-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pwa-app-info h3 {
    margin: 0 0 2px 0;
    font-size: 16px;
    color: var(--resca-dark);
    font-weight: 800;
}

.pwa-app-info p {
    margin: 0;
    font-size: 12px;
    color: var(--resca-text-muted);
}

.pwa-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pwa-step {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--resca-dark);
}

.pwa-step-num {
    background: var(--resca-accent);
    color: var(--resca-dark);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 12px;
}

/* SVG Icons */
.pwa-icon {
    width: 20px;
    height: 20px;
    vertical-align: text-bottom;
    margin: 0 2px;
    display: inline-block;
    fill: currentColor;
}

.pwa-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--resca-dark);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.pwa-close:hover {
    background: none;
    color: var(--resca-dark);
}

/* Welcome Screen Styles - Bottom Sheet Style */
.welcome-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s;
}

.welcome-overlay.is-open {
    display: block;
    opacity: 1;
}

.welcome-sheet {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--resca-white);
    border-radius: 20px 20px 0 0;
    padding: 25px 20px calc(40px + env(safe-area-inset-bottom)) 20px;
    z-index: 100000;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0s linear 0.3s;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    margin: 0 auto;
}

.welcome-sheet.is-open {
    display: block;
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), visibility 0s linear 0s;
}

@media(min-width: 768px) {
    .welcome-sheet {
        bottom: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, 50%) scale(0.9);
        width: 100%;
        max-width: 450px;
        border-radius: 20px;
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s;
    }

    .welcome-sheet.is-open {
        transform: translate(-50%, 50%) scale(1);
        opacity: 1;
        pointer-events: all;
    }
}

.welcome-overlay.closing,
.welcome-overlay.closing .welcome-sheet {
    animation: welcomeFadeOut 0.3s ease forwards;
}

@keyframes welcomeFadeOut {
    to {
        opacity: 0;
        transform: translateY(100%);
    }
}

.welcome-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--resca-dark);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.welcome-app-card {
    display: flex;
    align-items: center;
    background: var(--resca-grey);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.welcome-app-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.welcome-app-info h3 {
    margin: 0 0 2px 0;
    font-size: 16px;
    color: var(--resca-dark);
    font-weight: 800;
}

.welcome-app-info p {
    margin: 0;
    font-size: 12px;
    color: var(--resca-text-muted);
}

.welcome-title {
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--resca-text-muted);
    margin-bottom: 10px;
}

.welcome-message {
    font-size: 14px;
    color: var(--resca-text-main);
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Articles UI CSS */
.fab-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--resca-dark);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.fab-btn:hover {
    transform: scale(1.1);
    background-color: var(--resca-primary);
}

@keyframes pencil-bounce {
    0% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(-15deg);
    }

    40% {
        transform: rotate(15deg);
    }

    60% {
        transform: rotate(-5deg);
    }

    80% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.fab-btn:hover .fab-icon {
    animation: pencil-bounce 0.6s cubic-bezier(0.36, 0, 0.66, -0.56);
    animation-iteration-count: 1;
}

.fab-icon {
    width: 28px;
    height: 28px;
    /* Invert to make white if svg is black, or just load directly */
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
}

/* Cards */
.article-card {
    background: var(--resca-white);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    padding: 15px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ac-img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #eee;
    flex-shrink: 0;
    margin-right: 20px;
}

.ac-info {
    flex: 1;
}

.ac-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--resca-dark);
    margin-bottom: 5px;
    line-height: 1.3;
}

.ac-status {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    background: var(--resca-grey);
    color: var(--resca-text-muted);
}

.ac-status.pub {
    background: #d4edda;
    color: var(--resca-success);
}

.ac-status.draft {
    background: #fff3cd;
    color: var(--resca-warning);
}

.ac-status.pending {
    background: #d1ecf1;
    color: #0c5460;
}

.ac-author {
    font-size: 12px;
    color: var(--resca-text-muted);
    margin-top: 2px;
    margin-bottom: 4px;
    font-style: italic;
}

/* Category Checkboxes */
.category-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-checkbox-label {
    cursor: pointer;
    user-select: none;
}

.category-checkbox-label input[type="checkbox"] {
    display: none;
}

.category-checkbox-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--radius-pill, 50px);
    background: var(--resca-white) !important;
    color: var(--resca-dark);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.category-checkbox-label input[type="checkbox"]:checked+.category-checkbox-pill {
    background: var(--resca-dark) !important;
    color: var(--resca-white, #fff);
    border-color: var(--resca-dark);
    box-shadow: 0 2px 8px rgba(0, 43, 38, 0.15);
}

.category-checkbox-pill:hover {
    background: #f8fcfb;
}

/* Save as Draft Button */
.btn-save-draft {
    background: none;
    border: none;
    color: var(--resca-text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.2s;
    font-family: inherit;
}

.btn-save-draft:hover {
    color: var(--resca-dark);
    text-decoration: underline;
}

.btn-save-draft:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Editor */
#editor-container {
    height: 300px;
    background: var(--resca-white);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

#editor-container .ql-editor p {
    margin-bottom: 24px;
}

#editor-container .ql-editor img {
    max-width: 100%;
    max-height: 200px;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    display: block;
    margin: 10px 0;
}

#editor-container .ql-editor .ql-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
}

/* Editor Layout */
.editor-top-layout {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: stretch;
    /* Make image height match fields height */
}

.editor-fields-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.editor-top-layout .upload-zone {
    width: 100px;
    min-height: 100px;
    margin-bottom: 0;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--resca-white) !important;
    border: 2px dashed var(--resca-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.editor-top-layout .upload-prev {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    border-radius: var(--radius-sm);
}

.editor-top-layout .upload-hint {
    font-size: 9px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--resca-primary);
}

.editor-top-layout .editor-header-input,
.editor-top-layout .editor-chapo-input {
    width: 100%;
    border: 1px solid var(--resca-border);
    border-radius: var(--radius-md);
    background: var(--resca-white) !important;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    color: var(--resca-dark);
}

.editor-top-layout .editor-header-input {
    font-size: 16px;
    padding: 10px 12px;
    margin-bottom: 0;
    font-weight: 700;
}

.editor-top-layout .editor-chapo-input {
    font-size: 13px;
    padding: 10px 12px;
    margin-bottom: 0;
    flex: 1;
    resize: none;
}

.editor-header-input::placeholder {
    color: var(--resca-border);
}

.upload-zone {
    border: 2px dashed var(--resca-border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    cursor: pointer;
    background: var(--resca-white, #fff);
    transition: background var(--transition-fast);
}

.upload-zone:hover {
    background: #eef7f6;
}

.upload-prev {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    display: none;
    margin: 0 auto;
}

.upload-hint {
    color: var(--resca-dark);
    font-weight: 600;
    font-size: 13px;
}

/* Profile Avatar CSS */
.locked-field {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--resca-grey) !important;
    color: var(--resca-text-muted);
}

.profile-avatar-section {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-block;
}

.profile-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    margin-bottom: 10px;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.profile-avatar-img:hover {
    opacity: 0.9;
}

.avatar-edit-icon {
    position: absolute;
    bottom: 10px;
    right: 0;
    width: 32px;
    height: 32px;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-edit-icon:hover {
    transform: scale(1.1);
}

.saving-spinner {
    display: none;
    color: #004d44;
    font-weight: 600;
    font-size: 12px;
    margin-top: 5px;
}

/* === SKELETON SCREEN === */
.skeleton-wrapper {
    padding: 40px 60px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.skeleton-header {
    width: 40%;
    height: 28px;
    background: var(--resca-skeleton-bg);
    border-radius: 6px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.skeleton-line {
    height: 16px;
    background: var(--resca-skeleton-bg);
    border-radius: 4px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

.skeleton-line.long {
    width: 100%;
}

.skeleton-block {
    height: 120px;
    background: var(--resca-skeleton-bg);
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* Shimmer Animation */
.skeleton-header::after,
.skeleton-line::after,
.skeleton-block::after,
.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            var(--resca-skeleton-shimmer),
            transparent);
    animation: shimmer 1.2s infinite ease-in-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(200%);
    }
}

/* Grid skeleton for dashboard */
.skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.skeleton-card {
    height: 100px;
    background: var(--resca-skeleton-bg);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 900px) {
    .skeleton-wrapper {
        padding: 20px;
    }

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

/* Contracts Section Styles */


/* --- Contracts Section (Refined List) --- */

.contrats-list {
    background: var(--resca-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    /* Clean look without heavy shadows as requested */
    border: 1px solid var(--resca-border-light);
}

.contrat-item {
    display: block;
    padding: 15px 20px;
    text-decoration: none !important;
    color: var(--resca-dark) !important;
    background: var(--resca-white);
    border-bottom: 1px solid var(--resca-border-light);
    /* Separator line */
    transition: background-color var(--transition-fast);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.contrat-item:last-child {
    border-bottom: none;
}

.contrat-item:hover {
    background-color: var(--resca-grey);
}

.contrat-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 3-Column Layout */
.contrat-col-type {
    flex: 1;
    text-align: left;
}

.contrat-col-date {
    flex: 1;
    text-align: center;
}

.contrat-col-status {
    flex: 1;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    /* Space between pill and chevron */
}

/* Typography */
.contrat-item-title {
    margin: 0;
    color: var(--resca-dark);
    font-size: 16px;
    font-weight: 600;
}

.contrat-item-meta {
    font-size: 14px;
    color: var(--resca-text-muted);
}

/* Status Pill */
.contrat-status-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background-color: var(--resca-accent);
    color: var(--resca-dark);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chevron */
.contrat-item-chevron {
    width: 20px;
    height: 20px;
    color: var(--resca-border);
    transition: color var(--transition-fast);
}

.contrat-item:hover .contrat-item-chevron {
    color: var(--resca-dark);
}

.contrat-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--resca-white);
    border-radius: var(--radius-md);
}

.contrat-empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.contrat-empty-text {
    color: var(--resca-text-muted);
    font-size: 16px;
    margin: 0;
}

.gauge-container {
    margin-top: 25px;
}

.gauge-bar-bg {
    margin-top: 10px;
    background: #e9ecef;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
}

.gauge-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
}

.gauge-text {
    margin-top: 8px;
    font-size: 13px;
    color: var(--resca-text-muted);
}

/* Mobile: Stack contract type and date vertically */
@media (max-width: 900px) {
    .contrat-item-header {
        flex-wrap: wrap;
    }

    .contrat-col-type {
        flex: none;
        width: auto;
        margin-right: 15px;
    }

    .contrat-col-date {
        flex: none;
        width: 100%;
        order: 3;
        text-align: left;
        margin-top: 5px;
    }

    .contrat-col-status {
        flex: 1;
        justify-content: flex-end;
    }

    .contrat-item-meta {
        font-size: 12px;
    }
}

/* === UPDATE TOAST (PWA Soft Update) === */
.update-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 99999;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.3s ease;
    pointer-events: none;
}

.update-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.update-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--resca-white);
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--resca-border-light);
    max-width: calc(100vw - 40px);
}

.update-toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--resca-accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--resca-dark);
}

.update-toast-icon svg {
    width: 20px;
    height: 20px;
}

.update-toast-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.update-toast-text strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--resca-dark);
}

.update-toast-text span {
    font-size: 12px;
    color: var(--resca-text-muted);
}

.update-toast-btn {
    flex-shrink: 0;
    /* Using standard button tokens */
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background: var(--resca-accent);
    color: var(--resca-dark);
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: 8px;
    box-shadow: var(--shadow-btn);
}

.update-toast-btn:hover {
    background: var(--resca-dark);
    color: var(--resca-accent);
    transform: translateY(-1px);
}

.update-toast-btn:active {
    transform: scale(0.98);
}

.update-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

.update-toast-close:hover {
    color: var(--resca-text-main);
    background: none;
}

.update-toast.is-loading .update-toast-btn {
    opacity: 0.7;
    pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .update-toast {
        bottom: calc(15px + env(safe-area-inset-bottom));
        left: 15px;
        right: 15px;
        transform: translateX(0) translateY(100px);
    }

    .update-toast.is-visible {
        transform: translateX(0) translateY(0);
    }

    .update-toast-content {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 14px;
    }

    .update-toast-text {
        flex: 1;
        min-width: 0;
    }

    .update-toast-btn {
        flex: 1 0 100%;
        margin-left: 0;
        margin-top: 5px;
        text-align: center;
    }

    .update-toast-close {
        position: absolute;
        top: 8px;
        right: 8px;
    }
}

/* ========================================
   TAG PILLS SYSTEM
   ======================================== */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 0;
    min-height: auto;
    margin-top: 8px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    background: var(--resca-accent);
    color: var(--resca-dark);
    padding: 6px 8px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
    white-space: nowrap;
}

.tag-pill-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background var(--transition-fast);
}

.tag-pill-close:hover {
    background: rgba(0, 0, 0, 0.3);
}

.tag-input {
    flex: 1;
    min-width: 120px;
    border: none !important;
    background: var(--resca-grey) !important;
    padding: 8px 12px !important;
    border-radius: var(--radius-md);
    font-size: 14px;
    outline: none;
    box-shadow: none !important;
}

/* ========================================
   SKELETON LOADER
   ======================================== */
.skeleton-item {
    pointer-events: none;
}

.skeleton-title {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
    background: var(--resca-skeleton-bg);
    position: relative;
    overflow: hidden;
}

.skeleton-title.short {
    width: 60%;
}

.skeleton-source {
    height: 20px;
    width: 50px;
    border-radius: var(--radius-md);
    background: var(--resca-skeleton-bg);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

#sugg-feed-skeleton {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
}

.skeleton-preview {
    height: 12px;
    margin-bottom: 6px;
    border-radius: 4px;
    background: var(--resca-skeleton-bg);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.skeleton-preview.short {
    width: 70%;
}

.skeleton-title::after,
.skeleton-source::after,
.skeleton-preview::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--resca-skeleton-shimmer), transparent);
    transform: translateX(-100%);
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.tag-input:focus {
    outline: none;
    box-shadow: none !important;
}

/* === DYNAMIC GENERATION FEEDBACK === */

@property --trail-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@property --trail-color-start {
    syntax: '<color>';
    initial-value: transparent;
    inherits: false;
}

@property --trail-spread {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes spin-loop {
    from {
        --trail-angle: 0deg;
        --trail-color-start: transparent;
        --trail-spread: 30deg;
    }

    to {
        --trail-angle: 360deg;
        --trail-color-start: transparent;
        --trail-spread: 30deg;
    }
}

@keyframes fill-solid-ease-in {
    from {
        --trail-angle: 360deg;
        --trail-color-start: transparent;
        --trail-spread: 30deg;
    }

    to {
        --trail-angle: 360deg;
        --trail-color-start: #A6F2E8;
        --trail-spread: 360deg;
    }
}

.resca-btn.btn-generating,
.resca-btn.btn-generated-success {
    position: relative;
    overflow: hidden;
    border-color: transparent !important;
    background: var(--resca-dark) !important;
    color: var(--resca-white) !important;
    transition: background 0.5s ease, color 0.5s ease;
}

.resca-btn.btn-generated-success.fade-out {
    background: var(--resca-white) !important;
    color: var(--resca-dark) !important;
}

.resca-btn.btn-generating::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 4px;
    background: conic-gradient(from var(--trail-angle), var(--trail-color-start) 0deg, #A6F2E8 var(--trail-spread), transparent var(--trail-spread));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: 10;
    opacity: 1;
    animation: spin-loop 1s linear infinite;
    pointer-events: none;
}

.resca-btn.btn-generated-success::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 4px;
    background: conic-gradient(from var(--trail-angle), var(--trail-color-start) 0deg, #A6F2E8 var(--trail-spread), transparent var(--trail-spread));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: 10;
    opacity: 1;
    animation: fill-solid-ease-in 0.8s ease-in forwards;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.resca-btn.btn-generated-success.fade-out::before {
    opacity: 0;
}

/* Skeleton Output */
.skeleton-text-line {
    background: var(--resca-skeleton-bg);
    height: 16px;
    margin-bottom: 8px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    display: block;
}

.skeleton-text-line.full {
    width: 100%;
}

.skeleton-text-line.three-quarter {
    width: 75%;
}

.skeleton-text-line.half {
    width: 50%;
}

.skeleton-text-line.one-third {
    width: 33%;
}

.skeleton-text-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--resca-skeleton-shimmer), transparent);
    animation: shimmer 1.2s infinite ease-in-out;
}

/* ========================================
   SPLIT BUTTON & DROPDOWN SYSTEM
   ======================================== */
.resca-split-btn-group {
    display: flex;
    width: 100%;
    margin-top: 10px;
    position: relative;
    box-shadow: var(--shadow-btn);
    border-radius: var(--radius-pill);
    overflow: visible;
}

.resca-btn-split-main {
    flex: 0 0 88%;
    border-radius: var(--radius-pill) 0 0 var(--radius-pill) !important;
    border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
}

.resca-btn-split-arrow {
    flex: 0 0 12%;
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0 !important;
    padding: 12px 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}

.resca-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--resca-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    min-width: 220px;
    display: none;
    overflow: hidden;
    border: 1px solid var(--resca-border-light);
}

.resca-dropdown-menu.active {
    display: block;
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.resca-dropdown-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: var(--resca-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background var(--transition-fast);
    cursor: pointer;
}

.resca-dropdown-item:hover {
    background: var(--resca-grey);
}

.resca-dropdown-item i {
    margin-right: 10px;
    font-size: 16px;
}

/* ========================================
   MODAL SYSTEM
   ======================================== */
.resca-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.resca-modal.active {
    display: flex;
}

.resca-modal-content {
    background: var(--resca-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    padding: 35px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resca-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    color: var(--resca-text-muted);
    cursor: pointer;
    line-height: 1;
}

.resca-modal h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--resca-dark);
    font-weight: 800;
    font-size: 22px;
}

.resca-modal-body {
    margin-bottom: 25px;
}

.resca-timezone-info {
    font-size: 12px;
    color: var(--resca-text-muted);
    margin-top: 8px;
    font-weight: 500;
}

#schedule-datetime {
    margin-top: 10px;
    font-weight: 600;
}

/* ========================================
   DROPDOWN DIVIDER
   ======================================== */
.resca-dropdown-divider {
    height: 1px;
    background: var(--resca-border-light);
    margin: 8px 0;
}

/* ========================================
   DRAFT ITEMS
   ======================================== */
.draft-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    background: var(--resca-grey);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
    gap: 15px;
}

.draft-item:hover {
    background: var(--resca-accent);
}

.draft-item-info {
    flex: 1;
    min-width: 0;
}

.draft-item-title {
    font-weight: 700;
    color: var(--resca-dark);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.draft-item-excerpt {
    font-size: 13px;
    color: var(--resca-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.draft-item-meta {
    font-size: 11px;
    color: var(--resca-text-muted);
    display: flex;
    gap: 15px;
}

.draft-item-delete {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.1);
    color: #c62828;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition-fast);
}

.draft-item-delete:hover {
    background: #c62828;
    color: white;
}

.drafts-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--resca-text-muted);
    font-style: italic;
}

/* ========================================
   VIDEO MENU UI SKELETON
   ======================================== */

.video-section {
    margin-bottom: 30px;
}

.video-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    /* Hide scrollbar for Safari and Chrome */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.video-scroll-container::-webkit-scrollbar {
    display: none;
}

/* Base Card Styles */
.video-card-vertical,
.video-card-horizontal {
    flex: 0 0 auto;
    background-color: var(--resca-white);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--resca-border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.video-card-vertical:hover,
.video-card-horizontal:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Dimensions 9:16 (Shorts, Reels, TikTok) */
.video-card-vertical {
    width: 200px;
    height: 355px;
    /* Ratio 9:16 */
}

/* Dimensions 16:9 (YouTube) */
.video-card-horizontal {
    width: 320px;
    height: 180px;
    /* Ratio 16:9 */
}

/* Upload Button Styling (First Item) */
.video-upload-btn {
    background-color: var(--resca-grey);
    /* Light grey background */
    border: 1px solid var(--resca-border-light);
    align-items: center;
    justify-content: center;
    color: var(--resca-dark);
}

.video-upload-btn:hover {
    background-color: rgba(166, 242, 232, 0.2);
}

.upload-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--resca-accent);
    /* Resca Accent circle */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--resca-dark);
    /* Plus resca dark */
    box-shadow: 0 4px 10px rgba(0, 43, 38, 0.1);
}



/* Skeleton Loaders for Video Cards */
.skeleton-video {
    background-color: var(--resca-white);
    pointer-events: none;
}

.skeleton-video-thumbnail {
    width: 100%;
    flex: 1;
    /* Takes up remaining space above the meta info */
    background: var(--resca-skeleton-bg);
    position: relative;
    overflow: hidden;
}

.skeleton-video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--resca-skeleton-shimmer), transparent);
    animation: skeletonLoading 1.5s infinite;
}

.video-card-horizontal .skeleton-video-thumbnail {
    height: 120px;
    flex: none;
}

.video-card-vertical .skeleton-video-thumbnail {
    /* Fills the whole card mostly, will leave space for title */
    height: calc(100% - 70px);
    flex: none;
}

.skeleton-video-title {
    height: 14px;
    width: 80%;
    background: var(--resca-skeleton-bg);
    margin: 15px 15px 8px 15px;
    border-radius: 4px;
}

.skeleton-video-meta {
    height: 12px;
    width: 50%;
    background: var(--resca-skeleton-bg);
    margin: 0 15px 15px 15px;
    border-radius: 4px;
}