/* ========================================= */
/* === WidgetVault Global Styles & Variables === */
/* ========================================= */
:root {
    --ic-bg: #111827;
    --ic-surface: #1f2937;
    --ic-border: #374151;
    --ic-text: #f9fafb;
    --ic-text-muted: #9ca3af;
    --ic-primary: #4a90e2;
    --ic-primary-light: #6fbaff;
    --ic-radius: 12px;
    --ic-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Review form textarea sizing */
.review-form textarea {
    resize: none;
    min-height: 120px;
    max-height: 120px;
}

/* Reviews */
.reviews-section {
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    max-width: 1200px;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reviews-meta {
    margin: 0.25rem 0 0;
    color: var(--ic-text-muted);
}

.reviews-login {
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: var(--ic-primary);
    color: #fff;
    border: 1px solid var(--ic-primary);
    text-decoration: none;
}

.reviews-login:hover {
    text-decoration: none;
    background: var(--ic-primary-light);
}

.review-form {
    background: var(--ic-surface);
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.review-form label {
    font-weight: 600;
    color: var(--ic-text);
}

.rating-picker {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.rating-picker input {
    margin-right: 0.25rem;
}

.rating-picker span {
    color: #fbbf24;
    font-weight: 700;
}

.review-form textarea {
    width: 98%;
    background: var(--ic-bg);
    border: 1px solid var(--ic-border);
    border-radius: 10px;
    padding: 0.75rem;
    color: var(--ic-text);
}

.review-submit {
    width: fit-content;
    background: linear-gradient(135deg, var(--ic-primary), var(--ic-primary-light));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
}

.review-submit:hover {
    opacity: 0.95;
}

.reviews-list {
    display: grid;
    gap: 1rem;
}

.review-card {
    background: var(--ic-surface);
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    padding: 1rem;
}

.review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.review-user {
    font-weight: 700;
}

.review-rating {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--ic-border);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-weight: 700;
}

.review-comment {
    margin: 0 0 0.5rem;
    color: var(--ic-text);
    line-height: 1.5;
}

.review-date {
    color: var(--ic-text-muted);
    font-size: 0.85rem;
}

:root.light-mode {
    --ic-bg: #f9fafb;
    --ic-surface: #ffffff;
    --ic-border: #e5e7eb;
    --ic-text: #1f2937;
    --ic-text-muted: #6b7280;

    /* On garde le mauve pour la couleur primaire */
    --ic-primary: #4a90e2;
    --ic-primary-light: #6fbaff;

    /* WallVault palette overrides */
    --wv-bg: #f6f6f6;
    --wv-surface: #ffffff;
    --wv-surface-soft: rgba(0, 0, 0, 0.04);
    --wv-border: rgba(0, 0, 0, 0.08);
    --wv-text: #121212;
    --wv-text-muted: rgba(0, 0, 0, 0.6);
    --wv-accent: #c11119;
    --wv-accent-soft: rgba(193, 17, 25, 0.15);
    --wv-pill: rgba(0, 0, 0, 0.04);
    --wv-shadow: 0 25px 60px rgba(12, 12, 12, 0.12);
}

/* On s'assure que les ombres sont visibles en mode clair */
body.light-mode {
    --ic-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--ic-surface);
    border: 1px solid var(--ic-border);
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--ic-primary);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    color: var(--ic-text-muted);
}

/* On cache l'icône qui ne correspond pas au thème actuel */
.theme-toggle .icon-sun {
    display: none;
}

.theme-toggle .icon-moon {
    display: block;
}

.light-mode .theme-toggle .icon-sun {
    display: block;
}

.light-mode .theme-toggle .icon-moon {
    display: none;
}

body.light-mode .ic-nav-links a.active {
    background-color: var(--ic-primary);
    /* Purple background */
    border-color: var(--ic-primary);
    color: #ffffff;
    /* White text for contrast */
}

/* 1. Corrige le bouton de menu actif et au survol */
body.light-mode .ic-nav-links a:hover,
body.light-mode .ic-nav-links a.active {
    background-color: var(--ic-primary);
    /* Fond mauve */
    border-color: var(--ic-primary);
    color: #ffffff;
    /* Texte blanc pour le contraste */
}

/* 3. Corrige les champs de formulaire */
body.light-mode .form-group input[type="text"],
body.light-mode .form-group input[type="email"],
body.light-mode .form-group input[type="password"],
body.light-mode .form-group input[type="url"] {
    background-color: #f3f4f6;
    /* Fond gris très clair */
    border-color: var(--ic-border);
    color: var(--ic-text);
}

body {
    background-color: var(--ic-bg);
    color: var(--ic-text);
    font-family: var(--font-family);
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

a:hover {
    text-decoration: underline;
}

/* ========================================= */
/* === WidgetVault Homepage Styles           === */
/* ========================================= */

.ic-main {
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* --- Section Hero --- */
.ic-hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.ic-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin: 0 0 1rem;
}

.ic-hero p {
    font-size: 1.125rem;
    color: var(--ic-text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* --- Barre de recherche --- */
.ic-search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    background-color: var(--ic-surface);
}

.ic-search-form input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 0.9rem 1.25rem;
    color: var(--ic-text);
    font-size: 1rem;
}

.ic-search-form input:focus {
    outline: none;
}

.ic-search-form button {
    border: none;
    background: linear-gradient(135deg, var(--ic-primary), var(--ic-primary-light));
    color: var(--ic-text);
    padding: 0 1.75rem;
    border-radius: 0 var(--ic-radius) var(--ic-radius) 0;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ic-search-form button:hover {
    background-color: var(--ic-primary-light);
}

/* --- Sections de grille (Featured/Latest) --- */
.ic-grid-section {
    margin-bottom: 4rem;
}

.ic-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.ic-grid-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
}

.ic-grid-header a {
    font-weight: 500;
}

.ic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* NOUVEAU : Règle spécifique pour le MOBILE */
@media (max-width: 768px) {
    .ic-grid {
        /* On réduit la taille minimale des cartes pour en afficher deux */
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
        /* On peut réduire un peu l'espacement sur mobile */
    }
}

/* ================================================================= */
/* === NOUVELLE STRUCTURE DE CARTE ROBUSTE (CORRECTIF DÉFINITIF) === */
/* ================================================================= */

/* La carte parente gère le fond, la bordure, etc. */
.ic-pack-card {
    background-color: var(--ic-surface);
    border-radius: var(--ic-radius);
    border: 1px solid var(--ic-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    /* Important pour les coins arrondis */
}

.ic-pack-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Le nouveau conteneur pour l'image */
.card-image-wrapper {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
}

.card-main-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Les informations en bas */
.ic-pack-card-info {
    padding: 1rem;
}

.ic-pack-card-info h3 {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
}

.ic-pack-card-info h3 a {
    text-decoration: none;
    color: var(--ic-text);
}

.ic-pack-card-info p {
    margin: 0;
    color: var(--ic-text-muted);
    font-size: 0.875rem;
}

/* Le lien invisible qui ne recouvre QUE la zone de l'image */
.card-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Le bouton favori est positionné par rapport au conteneur d'image */
.favorite-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    /* Au-dessus du lien overlay */
}

/* L'aperçu ne recouvre que la zone de l'image */
.preview-carousel {
    position: absolute;
    top: 0;
    left: 0;
}

/* ========================================= */
/* === WidgetVault Login Page Styles         === */
/* ========================================= */

body.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: var(--ic-surface);
    border-radius: 1rem;
    box-shadow: var(--ic-shadow);
    padding: 2.5rem;
    border: 1px solid var(--ic-border);
}

.login-container .brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

.login-container .brand .logo {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    margin-bottom: 1rem;
    background-image: url('assets/logo.png');
    /* Assurez-vous que le chemin est correct */
    background-size: cover;
    background-position: center;
}

.login-container .brand h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.login-container .brand .subtitle {
    margin: 0.25rem 0 0;
    color: var(--ic-text-muted);
}

.login-container .error-message {
    background-color: #371B1B;
    color: #fca5a5;
    border: 1px solid #b91c1c;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.login-container form {
    display: grid;
    gap: 1.25rem;
}

.login-container .form-group {
    position: relative;
}

.login-container .form-control {
    width: 92%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--ic-border);
    background-color: #374151;
    color: var(--ic-text);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-container .form-control:focus {
    outline: none;
    border-color: var(--ic-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ic-primary) 25%, transparent);
}

.login-container .submit-btn {
    border: none;
    background-image: linear-gradient(135deg, var(--ic-primary), var(--ic-primary-light));
    color: #fff;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.login-container .submit-btn:hover {
    box-shadow: var(--ic-shadow);
    transform: translateY(-1px);
}

.login-container .aux-links {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--ic-text-muted);
    text-align: center;
}

.login-container .aux-links a {
    color: var(--ic-primary-light);
    font-weight: 500;
}

/* ========================================= */
/* === WidgetVault Pack Detail Page Styles   === */
/* ========================================= */

.detail-page {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ic-text-muted);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 500;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .detail-grid {
        grid-template-columns: 3fr 2fr;
        /* Colonne images plus grande */
    }
}

/* --- Carrousel d'images --- */
.carousel {
    position: relative;
    border-radius: var(--ic-radius);
    overflow: hidden;
    border: 1px solid var(--ic-border);
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease;
}

.carousel-slide {
    flex: 0 0 100%;
    aspect-ratio: 16 / 9;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(31, 41, 55, 0.6);
    /* Fond semi-transparent */
    border: 1px solid var(--ic-border);
    border-radius: 50%;
    /* Boutons ronds */
    width: 44px;
    /* Taille du bouton */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* Légère ombre */
}

.carousel-nav:hover {
    background-color: var(--ic-primary);
    /* Couleur principale au survol */
    border-color: var(--ic-primary-light);
    transform: translateY(-50%) scale(1.05);
    /* Effet d'agrandissement */
}

.carousel-nav svg {
    width: 22px;
    /* Taille de l'icône SVG */
    height: 22px;
    color: white;
    /* Couleur de l'icône */
}

.carousel-nav.prev {
    left: 1rem;
}

.carousel-nav.next {
    right: 1rem;
}

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: white;
}

/* --- Colonne d'informations --- */
.info-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.info-logo {
    width: 80px;
    height: 80px;
    border-radius: 1rem;
    object-fit: cover;
    border: 1px solid var(--ic-border);
}

.info-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 6px 0;
}

.btn.ghost {
    background: transparent;
    border: 1px solid var(--ic-border);
    color: inherit;
}

.info-title h1 {
    font-size: 2.5rem;
    margin: 0;
}

.info-title p {
    font-size: 1.125rem;
    color: var(--ic-text-muted);
    margin: 0.25rem 0 0;
}

.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.pill {
    background-color: var(--ic-surface);
    border: 1px solid var(--ic-border);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 500;
}

.info-actions {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-playstore {
    display: inline-block;
    background-color: var(--ic-primary);
    color: var(--ic-surface);
    padding: 1rem 2rem;
    border-radius: var(--ic-radius);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn-playstore:hover {
    background-color: var(--ic-primary-light);
}

.pill-link {
    color: var(--ic-primary);
    border-color: rgba(103, 99, 255, 0.35);
}

.info-about h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--ic-border);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.info-about p {
    line-height: 1.7;
    color: var(--ic-text-muted);
    white-space: pre-wrap;
    /* Respecte les sauts de ligne de la base de données */
}

/* =================================================================== */
/* === Carrousel HORIZONTAL classique dans un cadre VERTICAL === */
/* =================================================================== */

.carousel-wrapper {
    /* Le conteneur qui définit la forme verticale */
    width: 100%;
    max-width: 614px;
    /* Largeur de type "téléphone", à ajuster si besoin */
    margin: 0 auto;
    /* Pour centrer le bloc */
    aspect-ratio: 11 / 15;
    /* Le ratio portrait qui donne la forme verticale */
    position: relative;
    /* Important pour positionner les flèches */
}

.carousel {
    /* Le cadre de visualisation */
    width: 101%;
    height: 107%;
    overflow: hidden;
    border-radius: var(--ic-radius);
    border: 1px solid var(--ic-border);
    background: #000;
}

.carousel-track {
    /* La piste qui défile horizontalement */
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.carousel-slide {
    /* Chaque diapositive prend 100% de la largeur du cadre */
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Assure que toute l'image est visible */
}

/* --- Les flèches de navigation (gauche/droite) --- */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(31, 41, 55, 0.7);
    border: 1px solid var(--ic-border);
    color: var(--ic-text);
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
    line-height: 40px;
    text-align: center;
}

.carousel-nav.prev {
    left: 1rem;
    /* Flèche gauche */
}

.carousel-nav.next {
    right: 1rem;
    /* Flèche droite */
}

/* Style pour l'image unique quand il n'y a pas de carrousel */
.single-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--ic-radius);
    border: 1px solid var(--ic-border);
}

/* ========================================= */
/* === New Floating Glass Menu Styles    === */
/* ========================================= */

.ic-header {
    position: sticky;
    top: 1rem;
    z-index: 1000;
    margin: 0 auto;
    max-width: 1200px;
    pointer-events: none;
    /* Allow clicks to pass through the empty areas around the nav */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.ic-nav {
    pointer-events: auto;
    /* Re-enable clicks on the nav itself */
    background: rgba(31, 41, 55, 0.7);
    /* Dark semi-transparent --ic-surface */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    /* Pronounced border radius */
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Light mode adjustments */
body.light-mode .ic-nav {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Ensure branding and links look good */
.ic-nav-brand {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--ic-text);
    text-decoration: none;
    margin-right: 2rem;
    display: flex;
    align-items: center;
}

.ic-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ic-nav-links a {
    color: var(--ic-text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    text-decoration: none;
}

.ic-nav-links a:hover,
.ic-nav-links a.active {
    color: var(--ic-primary-light);
    text-decoration: none;
}

/* User pill and buttons */
.user-pill {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    color: var(--ic-text) !important;
    font-size: 0.9rem;
}

body.light-mode .user-pill {
    background: rgba(0, 0, 0, 0.05);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .ic-header {
        top: 0.5rem;
        padding: 0 0.5rem;
    }

    .ic-nav {
        padding: 0.5rem 1rem;
        border-radius: 16px;
    }

    .desktop-nav,
    .desktop-only {
        display: none !important;
    }
}


/* ========================================= */
/* === Refined Floating Menu (Left & Compact) === */
/* ========================================= */

.ic-header {
    /* Override previous centering */
    margin: 0 !important;
    left: 1rem;
    right: auto;
    width: fit-content;
    max-width: 98%;
    top: 1.5rem;
}

.ic-nav {
    /* More compact padding */
    padding: 0.5rem 1rem !important;
    border-radius: 16px !important;
    gap: 1.5rem;
}

.ic-nav-brand {
    margin-right: -1.5rem !important;
    font-size: 1.1rem !important;
}

.ic-nav-links {
    gap: 0.75rem !important;
    /* Reduce gap between links */
}

.ic-nav-links a {
    font-size: 0.9rem !important;
}

/* Adjust buttons/pills to be smaller */
.user-pill {
    padding: 0.25rem 0.75rem !important;
    font-size: 0.85rem !important;
}

.btn-admin {
    padding: 0.25rem 0.75rem !important;
    font-size: 0.85rem !important;
}

/* Ensure right nav items are close together */
.nav-right .ic-nav-links {
    gap: 0.5rem !important;
}

/* Theme toggle size */
.theme-toggle {
    width: 32px !important;
    height: 32px !important;
}

.theme-toggle svg {
    width: 16px !important;
    height: 16px !important;
}

/* Lang toggle adjustments */
.lang-toggle {
    transform: scale(0.9);
}

/* ========================================= */
/* === Menu Pills & Lang Toggle Redesign === */
/* ========================================= */

/* Transform all standard nav links to pills */
.ic-nav-links>a:not(.btn):not(.user-pill) {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem !important;
    border-radius: 99px;
    color: var(--ic-text-muted) !important;
    font-weight: 500;
    font-size: 0.85rem !important;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none !important;
}

.ic-nav-links>a:not(.btn):not(.user-pill):hover,
.ic-nav-links>a:not(.btn):not(.user-pill).active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--ic-text) !important;
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Ensure User Pill matches */
.user-pill {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Redesigned Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 32px;
    box-sizing: border-box;
    width: auto !important;
    /* Override old width */
}

.lang-toggle a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px !important;
    height: 100%;
    border-radius: 99px;
    font-size: 0.7rem !important;
    font-weight: 800;
    color: var(--ic-text-muted) !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent !important;
    /* Override generic pill */
    border: none !important;
    margin: 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-toggle a:hover {
    color: var(--ic-text) !important;
}

/* Active State for Lang Toggle */
/* Default: FR Active (first child) */
.lang-toggle:not(.en-active) a:first-child {
    background: var(--ic-primary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

/* EN Active (last child) */
.lang-toggle.en-active a:last-child {
    background: var(--ic-primary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

/* ========================================= */
/* === Vault Logos in Menu               === */
/* ========================================= */

.vault-logos {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: 1.5rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    height: 24px;
}

.vault-logo-link {
    display: block;
    height: 24px;
    width: auto;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.vault-logo-link:hover {
    opacity: 1;
    transform: scale(1.1);
}

.vault-logo-link img {
    height: 100%;
    width: auto;
    display: block;
}

/* Light mode adjustment */
body.light-mode .vault-logos {
    border-left-color: rgba(0, 0, 0, 0.1);
}

/* ========================================= */
/* === Light Mode Fixes for Menu         === */
/* ========================================= */

.light-mode .ic-nav {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.light-mode .ic-nav-links>a:not(.btn):not(.user-pill) {
    background: transparent;
    color: var(--ic-text-muted) !important;
}

.light-mode .ic-nav-links>a:not(.btn):not(.user-pill):hover,
.light-mode .ic-nav-links>a:not(.btn):not(.user-pill).active {
    background: rgba(0, 0, 0, 0.05);
    color: var(--ic-text) !important;
    border-color: rgba(0, 0, 0, 0.05);
}

.light-mode .user-pill {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
    color: var(--ic-text) !important;
}

.light-mode .lang-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.05);
}

.light-mode .lang-toggle a {
    color: var(--ic-text-muted) !important;
}

.light-mode .lang-toggle a:hover {
    color: var(--ic-text) !important;
}

.light-mode .vault-logos {
    border-left-color: rgba(0, 0, 0, 0.1);
}

/* ========================================= */
/* === Menu Alignment & Gap Fix          === */
/* ========================================= */

.ic-header {
    left: 1rem !important;
    margin-left: 0 !important;
    top: 1rem !important;
    margin-bottom: -1rem !important;
}

.ic-hero {
    padding-top: 1rem !important;
}



/* ========================================= */
/* === Full Width Menu Layout            === */
/* ========================================= */

.ic-header {
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    box-sizing: border-box;
    top: 1rem !important;
    margin-bottom: -1rem !important;
}

.ic-nav {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0.5rem 1rem !important;
    box-sizing: border-box;
}

.nav-left {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.ic-nav-links.right-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Remove pseudo-elements that might create lines */
.ic-header::after {
    display: none !important;
}

/* ========================================= */
/* === Mobile Menu                       === */
/* ========================================= */

#mobile-menu-panel {
    position: fixed !important;
    top: calc(1rem + 60px + 0.5rem) !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    width: calc(100% - 4rem) !important;
    max-width: 1200px !important;
    background: rgba(17, 24, 39, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25) !important;
    border-radius: 24px !important;
    padding: 1.5rem !important;
    gap: 1rem !important;
    z-index: 999 !important;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    visibility: hidden;
    pointer-events: none;
}

body.mobile-menu-open #mobile-menu-panel {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#mobile-menu-panel a {
    color: var(--ic-text-muted) !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    padding: 0.75rem 1rem !important;
    border-radius: 12px !important;
    transition: all 0.2s ease;
    display: block;
}

#mobile-menu-panel a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--ic-text) !important;
    padding-left: 1.5rem !important;
}

.light-mode #mobile-menu-panel {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}






.iv-quicktags {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.iv-tag {
    background: var(--iv-soft);
    color: var(--iv-dim);
    border: 1px solid #1f2630;
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
}

.iv-tag:hover {
    color: var(--iv-text);
    border-color: #2b3644;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    /* Espace entre les tags */
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-top: 1px solid var(--ic-border);
    border-bottom: 1px solid var(--ic-border);
}

#iv-tag {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: var(--ic-surface);
    color: var(--ic-text-muted);
    border-radius: 99px;
    /* Forme de pilule */
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--ic-border);
    transition: all 0.2s ease;
}

#iv-tag:hover {
    background-color: var(--ic-primary);
    color: var(--ic-text);
    border-color: var(--ic-primary);
}

/* Style pour le tag actuellement sélectionné */
#iv-tag.active {
    background-color: var(--ic-primary-light);
    color: var(--ic-text);
    border-color: var(--ic-primary-light);
}

/* Style spécifique pour le bouton admin */
.ic-nav-links a.btn-admin {
    background-color: var(--ic-primary);
    /* Couleur primaire pour le distinguer */
    color: #fff;
    border-radius: 99px !important;
    padding: 0.6rem 1.2rem !important;
    font-size: 0.85rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
    transition: all 0.2s ease;
}

.ic-nav-links a.btn-admin:hover {
    box-shadow: 0 6px 8px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}

/* ======================================= */
/* === Style pour l'aperçu au survol   === */
/* ======================================= */

.ic-pack-card a {
    position: relative;
    overflow: hidden;
    /* Important pour que l'aperçu ne dépasse pas */
}

.preview-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Prend toute la place de l'image principale */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
    /* Permet de cliquer à travers */
}

.ic-pack-card:hover .preview-carousel {
    opacity: 1;
    /* Affiche le carrousel au survol de la carte */
}

/* === NOUVEAUX STYLES POUR LE LOGO TEXTE === */
.ic-nav-brand span {
    font-size: 1.6rem;
    /* Police un peu plus grande */
    font-weight: 800;
    /* Police plus épaisse (bold) */
    letter-spacing: -1px;
    /* Resserre un peu les lettres pour un effet logo */

    /* Dégradé rouge WallVault */
    background-image: linear-gradient(45deg, #4a90e2, #6fbaff);

    /* Magie CSS pour appliquer le dégradé au texte */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ic-nav-brand:hover {
    text-decoration: none;
    /* Enlève le soulignement au survol du logo */
}

/* ======================================= */
/* === Style pour la pagination        === */
/* ======================================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.btn-page {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--ic-surface);
    color: var(--ic-text);
    border-radius: var(--ic-radius);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid var(--ic-border);
    transition: all 0.2s ease;
}

.btn-page:hover {
    background-color: var(--ic-primary);
    border-color: var(--ic-primary);
}

/* ====================================================== */
/* === Style pour le bouton d'ajout aux collections   === */
/* ====================================================== */

.favorite-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background-color: rgba(31, 41, 55, 0.6);
    /* Fond semi-transparent */
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2.5;
    /* Ligne un peu plus épaisse */
    fill: none;
}

/* Par défaut, on affiche le PLUS et on cache le CHECK */
.favorite-btn .icon-check {
    display: none;
}

.favorite-btn .icon-plus {
    display: block;
}

/* Quand le pack est dans une collection (classe 'is-favorited') */
.favorite-btn.is-favorited {
    background-color: rgba(34, 197, 94, 0.2);
    /* Fond vert clair transparent */
}

.favorite-btn.is-favorited .icon-plus {
    display: none;
}

.favorite-btn.is-favorited .icon-check {
    display: block;
    stroke: #34D399;
    /* Trait vert */
}

.pill-founder {
    background: var(--ic-primary);
    color: #fff;
    border-color: var(--ic-primary);
}

.founder-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--ic-primary);
    color: #fff;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.ic-pack-card {
    /* Cette ligne est nécessaire pour que le bouton favori (en position: absolute)
       se positionne correctement à l'intérieur de la carte. */
    position: relative;
}

/* Style pour le bouton du profil utilisateur */
.ic-nav-links a.user-pill {
    background-color: var(--ic-surface);
    color: var(--ic-text);
    font-weight: 500;
    border-radius: 99px;
    padding: 0.6rem 1.2rem;
}

.ic-nav-links a.btn-admin {
    background-color: var(--ic-primary);
    color: #fff;
}

/* ======================================= */
/* === Style pour les formulaires publics (Profil) === */
/* ======================================= */

.form-container {
    max-width: 1200px;
    margin: 2rem auto;
    background-color: var(--ic-surface);
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--ic-text-muted);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    background-color: var(--ic-bg);
    border: 1px solid var(--ic-border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: var(--ic-text);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--ic-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ic-primary) 25%, transparent);
}

.form-group input[disabled] {
    background-color: var(--ic-bg);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--ic-primary);
    color: #fff;
    transition: background-color 0.2s ease;
}

.form-btn:hover {
    background-color: var(--ic-primary-light);
}

/* Messages d'alerte */
.alert-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
}

.alert-error {
    background-color: #371B1B;
    color: #fca5a5;
    border-color: #b91c1c;
}

.alert-success {
    background-color: #112d1c;
    color: #a7f3d0;
    border-color: #15803d;
}

/* ====================================================== */
/* === Style pour description dépliable (Mis à jour) === */
/* ====================================================== */

#description-wrapper {
    position: relative;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
    padding-right: 15px;
    /* Espace pour la barre de défilement */
}

#description-wrapper.description-collapsed {
    max-height: 200px;
    /* Hauteur quand replié */
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

#description-wrapper.description-expanded {
    max-height: 400px;
    /* NOUVELLE HAUTEUR - Vous pouvez ajuster cette valeur */
    overflow-y: auto;
    -webkit-mask-image: none;
    mask-image: none;
}

/* NOUVEAU STYLE POUR LE BOUTON */
#read-more-btn {
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ic-text-muted);
    background-color: transparent;
    border: 1px solid var(--ic-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#read-more-btn:hover {
    background-color: var(--ic-surface);
    color: var(--ic-text);
}


/* Style optionnel pour la barre de défilement */
#description-wrapper::-webkit-scrollbar {
    width: 8px;
}

#description-wrapper::-webkit-scrollbar-track {
    background: var(--ic-surface);
    border-radius: 4px;
}

#description-wrapper::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

#description-wrapper::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.info-pills .favorite-btn {
    position: static;
    /* C'est la ligne la plus importante : elle annule le positionnement absolu */
    transform: none;
    /* Annule l'effet de scale au survol par défaut */

}

.info-pills .favorite-btn:hover {
    border-color: var(--ic-primary);
    transform: scale(1.05);
    /* On peut ajouter un léger zoom ici */
}

.info-pills .favorite-btn.is-favorited {
    border-color: #34D399;
    /* Bordure verte quand activé */
}

.info-pills .favorite-btn.is-favorited svg {
    stroke: #34D399;
    /* Icône verte quand activé */
}

/* ====================================================== */
/* === Style pour la navigation (Desktop + Mobile)      === */
/* ====================================================== */

/* Assure une bonne disposition sur desktop */
.ic-nav {
    display: flex;
    justify-content: space-between;
    /* Pousse nav-left et nav-right aux extrémités */
    align-items: center;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Par défaut, le bouton hamburger est caché et le menu desktop est visible */
.mobile-menu-toggle {
    display: none;
}

.desktop-only {
    display: flex;
    /* Sur desktop, on utilise flex */
    gap: 0.5rem;
    align-items: center;
}

/* Panneau mobile (en superposition) */
#mobile-menu-panel {
    display: none;
    position: absolute;
    top: 69px;
    /* Hauteur du header */
    left: 0;
    width: 100%;
    background-color: var(--ic-surface);
    border-bottom: 1px solid var(--ic-border);
    z-index: 1000;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
}

#mobile-menu-panel a {
    color: var(--ic-text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
}

.mobile-menu-divider {
    border: none;
    border-top: 1px solid var(--ic-border);
    margin: 0;
}


/* Media Query pour les écrans de moins de 820px */
/* Media Query pour les écrans de moins de 1120px */
@media (max-width: 1120px) {

    /* On cache les menus du bureau */
    .desktop-nav,
    .right-nav.desktop-only {
        display: none;
    }

    /* On affiche le bouton hamburger et on le centre */
    .mobile-menu-toggle {
        display: flex;
        /* Utilise flexbox pour le centrage */
        align-items: center;
        justify-content: center;
        width: 40px;
        /* Zone cliquable définie */
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        margin-left: auto;
    }

    /* La barre du milieu est le point de référence */
    .hamburger-icon {
        position: relative;
        /* Contexte pour les barres du haut/bas */
        display: block;
        width: 24px;
        /* Largeur des barres */
        height: 3px;
        /* Épaisseur des barres */
        background-color: var(--ic-text);
        border-radius: 3px;
        transition: background-color 0.1s 0.2s ease;
    }

    /* Les barres du haut et du bas sont positionnées par rapport à la barre du milieu */
    .hamburger-icon::before,
    .hamburger-icon::after {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 100%;
        /* Même épaisseur */
        background-color: var(--ic-text);
        border-radius: 3px;
        transition: transform 0.3s ease, top 0.3s ease;
    }

    .hamburger-icon::before {
        top: -8px;
        /* Position au-dessus */
    }

    .hamburger-icon::after {
        top: 8px;
        /* Position en dessous */
    }

    /* --- Animation en croix --- */
    body.mobile-menu-open .hamburger-icon {
        background-color: transparent;
        /* La barre du milieu disparaît */
    }

    body.mobile-menu-open .hamburger-icon::before {
        top: 0;
        /* Revient au centre */
        transform: rotate(45deg);
    }

    body.mobile-menu-open .hamburger-icon::after {
        top: 0;
        /* Revient au centre */
        transform: rotate(-45deg);
    }

    body.mobile-menu-open #mobile-menu-panel {
        display: flex;
    }
}

.similar-packs-section {
    margin-top: 4rem;
    /* Ajoute un grand espace après la description */
    padding-top: 2rem;
    border-top: 1px solid var(--ic-border);
}

.page-lang-switcher {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.page-lang-switcher a {
    font-weight: 700;
    opacity: 0.6;
    color: var(--ic-text);
    text-decoration: none;
}

.page-lang-switcher a.active {
    opacity: 1;
    text-decoration: underline;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"] {
    /* Ligne ajoutée */
    width: 100%;
    background-color: var(--ic-bg);
    border: 1px solid var(--ic-border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: var(--ic-text);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.developer-profile-header {
    position: relative;
    border-radius: var(--ic-radius);
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid var(--ic-border);
    background-color: var(--ic-surface);
    text-align: center;
}

/* Default (No Banner) styles */
.developer-profile-header:not(.with-banner) {
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--ic-border);
    border-radius: 0;
    background-color: transparent;
    margin-bottom: 2rem;
}

/* With Banner Styles */
.developer-profile-header.with-banner {
    height: 300px;
    /* Limited height */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    background-color: var(--ic-surface);
    border: 1px solid var(--ic-border);
    box-shadow: var(--ic-shadow);
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.header-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    padding: 2rem 3rem;
}

.developer-profile-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0 0 0.5rem;
}

/* Text colors when banner is present */
.developer-profile-header.with-banner h1 {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.developer-stats {
    color: var(--ic-text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.developer-profile-header.with-banner .developer-stats {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.developer-stats span {
    display: inline-block;
}

.developer-actions .btn-playstore {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

/* Mobile adjustments for banner */
@media (max-width: 768px) {
    .developer-profile-header.with-banner {
        height: 200px;
        /* Adjusted height for mobile */
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        width: calc(100% + 3rem);
        border-radius: 0;
        border: none;
    }

    .header-content {
        padding: 1.5rem;
    }
}

.tutorial-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
    line-height: 1.7;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--ic-surface);
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
}

.tutorial-step {
    margin-bottom: 2.5rem;
    position: relative;
    padding-left: 4rem;
}

.tutorial-step:last-child {
    margin-bottom: 0;
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 48px;
    height: 48px;
    background-color: var(--ic-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: var(--ic-shadow);
}

.tutorial-step h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--ic-text);
}

.tutorial-step p {
    color: var(--ic-text-muted);
    line-height: 1.6;
}

.tutorial-note {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: rgba(79, 70, 229, 0.1);
    border-left: 4px solid var(--ic-primary);
    border-radius: 8px;
}

.tutorial-note p {
    margin: 0;
    color: var(--ic-text-muted);
}

.tutorial-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tutorial-tips,
.tutorial-launchers {
    background-color: rgba(79, 70, 229, 0.05);
    padding: 1.5rem;
    border-radius: var(--ic-radius);
    border: 1px solid var(--ic-border);
}

.tutorial-tips h3,
.tutorial-launchers h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--ic-primary);
    font-size: 1.25rem;
}

.tutorial-tips ul,
.tutorial-launchers ul {
    margin: 0;
    padding-left: 1.5rem;
}

.tutorial-tips li,
.tutorial-launchers li {
    margin-bottom: 0.75rem;
    color: var(--ic-text-muted);
    line-height: 1.5;
}

.tutorial-tips li:last-child,
.tutorial-launchers li:last-child {
    margin-bottom: 0;
}

.tutorial-launchers p {
    color: var(--ic-text-muted);
    margin-bottom: 1rem;
}

/* Legacy styles for compatibility */
.tutorial-steps h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    border-bottom: 1px solid var(--ic-border);
    padding-bottom: 0.5rem;
}

.tutorial-steps h2:first-of-type {
    margin-top: 0;
}

.tutorial-steps p {
    color: var(--ic-text-muted);
}

.tutorial-image img {
    width: 81%;
    border-radius: var(--ic-radius);
    border: 1px solid var(--ic-border);
}

@media (max-width: 820px) {
    .tutorial-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .tutorial-step {
        padding-left: 3.5rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* ====================================================== */
/* === Style pour les vignettes du carrousel (Grille de 7) === */
/* ====================================================== */

/* Conteneur des vignettes (maintenant une grille) */
.carousel-thumbnails {
    display: grid;
    /* CORRECTION : Crée une grille de 7 colonnes égales */
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    padding-top: 0.5rem;
}

/* Style de chaque vignette (reste inchangé) */
.thumbnail-item {
    width: 100%;
    /* L'item prend toute la largeur de sa colonne */
    aspect-ratio: 1 / 1;
    /* Assure que les vignettes restent carrées */
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.thumbnail-item:hover {
    border-color: var(--ic-text-muted);
}

.thumbnail-item.active {
    border-color: var(--ic-primary);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ======================================= */
/* === Style pour la Lightbox (Zoom)     === */
/* ======================================= */

.lightbox {
    display: none;
    /* Caché par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.9);
    /* Fond sombre semi-transparent */
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
    /* Affiché quand actif */
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-image {
    display: block;
    max-width: 90%;
    /* L'image ne dépassera jamais 90% de la largeur de l'écran */
    max-height: 90%;
    /* L'image ne dépassera jamais 90% de la hauteur de l'écran */
    object-fit: contain;
    /* Garde les bonnes proportions sans déformer */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    /* Ajoute une ombre pour un effet "pop-up" */
}

/* Boutons de contrôle (fermer, précédent, suivant) */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--ic-primary-light);
}

.lightbox-close {
    top: 1.5rem;
    right: 2rem;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

/* Rendre l'image du carrousel cliquable */
.carousel-slide {
    cursor: pointer;
}

/* ======================================= */
/* === Style pour le Footer              === */
/* ======================================= */

.ic-footer {
    background-color: var(--ic-surface);
    border-top: 1px solid var(--ic-border);
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.footer-brand .ic-nav-brand {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--ic-text-muted);
    line-height: 1.6;
    max-width: 350px;
    margin: 0;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ic-text);
    margin-top: 0;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--ic-text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--ic-text);
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--ic-border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--ic-text-muted);
}

.footer-bottom p {
    margin: 0;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        margin-bottom: 2rem;
    }

    .footer-tagline {
        margin: 0 auto;
    }
}

/* === Style et positionnement du bouton FaceVault sur le Hero (VERSION DYNAMIQUE) === */
.btn-facevault-hero {
    position: fixed;

    /* Position de départ, avec l'espace pour le header */
    top: 5.5rem;
    right: 1.5rem;
    z-index: 999;

    /* Styles visuels (inchangés) */
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-image: linear-gradient(45deg, #34D399, #A7F3D0);
    border: none;
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.75rem 1.25rem !important;
    border-radius: 9999px;
    text-decoration: none !important;
    font-size: 0.95rem;
    /* On ajoute une transition sur la propriété 'top' pour un effet fluide */
    transition: top 0.4s ease-in-out, transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.btn-facevault-hero:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px #A7F3D0;
}

/* NOUVELLE CLASSE : Appliquée par JavaScript quand on a scrollé */
.btn-facevault-hero.scrolled {
    /* Nouvelle position, plus proche du haut */
    top: 1.5rem;
    box-shadow: 0 6px 20px #A7F3D0;
    /* On peut accentuer l'ombre */
}


.btn-facevault-hero .facevault-brand {
    font-weight: 800;
    text-transform: uppercase;
}

/* === Style pour le lien FaceVault dans le menu mobile === */
.mobile-facevault-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--ic-text);
    text-decoration: none;
    font-weight: 600;
    background-color: var(--ic-surface);
    border-top: 1px solid var(--ic-border);
    border-bottom: 1px solid var(--ic-border);
    margin: 1rem 0;
    text-align: center;
    transition: background-color 0.2s ease;
}

.mobile-facevault-link:hover {
    background-color: #374151;
}

/* ======================================= */
/* === Style pour les Tags sur Page Pack === */
/* ======================================= */

.info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    /* Espace avant le bouton Play Store */
}

.tag-link {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    background-color: var(--ic-surface);
    color: var(--ic-text-muted);
    border-radius: 99px;
    /* Forme de pilule */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid var(--ic-border);
    transition: all 0.2s ease;
}

.tag-link:hover {
    background-color: var(--ic-primary);
    color: var(--ic-text);
    border-color: var(--ic-primary);
    text-decoration: none;
}

/* Style pour la Modale Collection */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: var(--ic-surface);
    padding: 2rem;
    border-radius: var(--ic-radius);
    width: 90%;
    max-width: 400px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ic-text-muted);
    cursor: pointer;
}

#collection-modal-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.collection-choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ====================================================== */
/* === Style pour la Modale d'Ajout aux Collections   === */
/* ====================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    /* Effet de flou en arrière-plan */
}

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

.modal-content {
    background: var(--ic-surface);
    padding: 1.5rem 2rem 2rem 2rem;
    border-radius: var(--ic-radius);
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid var(--ic-border);
    box-shadow: var(--ic-shadow);
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ic-text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--ic-text);
}

.modal-content h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

#collection-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* Espace réduit entre les boutons */
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

/* ====================================================== */
/* === Style pour la Modale d'Ajout aux Collections   === */
/* ====================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);

    /* --- ANIMATION --- */
    display: flex;
    opacity: 0;
    /* Caché par défaut */
    pointer-events: none;
    /* Inactive quand cachée */
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay.active {
    opacity: 1;
    /* Visible */
    pointer-events: auto;
    /* Active quand visible */
}

.modal-content {
    background: var(--ic-surface);
    padding: 1.5rem 2rem 2rem 2rem;
    border-radius: var(--ic-radius);
    width: 90%;
    max-width: 400px;
    position: relative;
    border: 1px solid var(--ic-border);
    box-shadow: var(--ic-shadow);

    /* --- ANIMATION --- */
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s ease-in-out;
}

/* L'animation se déclenche quand la modale est active */
.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--ic-text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--ic-text);
}

.modal-content h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

#collection-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

/* --- Style pour les boutons de sélection --- */
.collection-choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
    background-color: var(--ic-bg);
    border: 1px solid var(--ic-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease-in-out;
}

.collection-choice:hover {
    border-color: var(--ic-primary-light);
}

.collection-choice input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ic-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}

.checkbox-custom svg {
    width: 14px;
    height: 14px;
    stroke: white;
    stroke-width: 3;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease-in-out;
}

/* Style lorsque la case est cochée */
.collection-choice input[type="checkbox"]:checked~.checkbox-custom {
    background-color: var(--ic-primary);
    border-color: var(--ic-primary);
}

.collection-choice input[type="checkbox"]:checked~.checkbox-custom svg {
    opacity: 1;
    transform: scale(1);
}

/* Le bouton entier change de style quand il est sélectionné */
.collection-choice input[type="checkbox"]:checked+.collection-choice-container {
    border-color: var(--ic-primary);
    background-color: color-mix(in srgb, var(--ic-primary) 10%, var(--ic-bg));
}

/* ======================================= */
/* === Gestion des Collections (Page)  === */
/* ======================================= */

.collection-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-danger {
    background-color: #991B1B;
    /* Rouge foncé */
    color: #fca5a5;
    border-color: #7F1D1D;
}

.btn-danger:hover {
    background-color: #B91C1C;
    /* Rouge un peu plus clair */
}

/* On s'assure que le formulaire de renommage utilise bien le style des autres formulaires */
#rename-container .form-container {
    padding: 2rem;
}

/* ======================================= */
/* === Skeleton Loader Animation       === */
/* ======================================= */

.skeleton-card {
    background-color: var(--ic-surface);
    border-radius: var(--ic-radius);
    border: 1px solid var(--ic-border);
    overflow: hidden;
}

.skeleton-image {
    aspect-ratio: 1 / 1;
    background-color: var(--ic-border);
}

.skeleton-info {
    padding: 1rem;
}

.skeleton-text {
    height: 20px;
    background-color: var(--ic-border);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

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

/* Animation de balayage */
.skeleton-card {
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        left: 150%;
    }
}

/* Logique pour cacher/afficher les éléments */
.ic-grid.is-loading .ic-pack-card {
    display: none;
    /* Cache les vraies cartes pendant le chargement */
}

.ic-grid:not(.is-loading) .skeleton-card {
    display: none;
    /* Cache les fantômes une fois le chargement terminé */
}

/* ======================================= */
/* === Style pour l'Appel à l'Action (CTA) === */
/* ======================================= */
.ic-hero {
    position: relative;
}

.hero-cta-box {
    position: absolute;
    top: -1.5rem;
    left: -0.5rem;
    background-color: var(--ic-primary);
    /* Fond mauve */
    border-radius: var(--ic-radius);
    padding: 1.25rem;
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
    z-index: 998;
    max-width: 280px;
    border: 1px solid var(--ic-primary-light);
}

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

.cta-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
    /* Titre en blanc */
}

.cta-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.cta-close:hover {
    color: #fff;
}

.hero-cta-box p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    /* Texte en blanc semi-transparent */
    line-height: 1.5;
}

.cta-btn {
    display: inline-block;
    width: 89%;
    text-align: center;
    background-color: #fff;
    /* Fond du bouton blanc */
    color: var(--ic-primary) !important;
    /* Texte du bouton en mauve, !important pour forcer la couleur */
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: background-color 0.2s ease;
}

.cta-btn:hover {
    background-color: #eef2ff;
    text-decoration: none;
}

@media (max-width: 768px) {
    .hero-cta-box {
        display: none !important;
    }
}

.info-pills .favorite-btn {
    position: static;
    /* C'est la ligne la plus importante : elle annule le positionnement absolu */
    transform: none;
    /* Annule l'effet de scale au survol par défaut */

    /* On lui redonne un style de pilule circulaire */
    width: 42px;
    height: 42px;
    background-color: var(--ic-surface);
    border: 1px solid var(--ic-border);
}

.info-pills .favorite-btn:hover {
    border-color: var(--ic-primary);
    transform: scale(1.05);
    /* On peut ajouter un léger zoom ici */
}

/* On s'assure que les icônes sont de la bonne couleur */
.info-pills .favorite-btn svg {
    stroke: var(--ic-text);
}

.info-pills .favorite-btn.is-favorited {
    border-color: #34D399;
    /* Bordure verte quand activé */
}

.info-pills .favorite-btn.is-favorited svg {
    stroke: #34D399;
    /* Icône verte quand activé */
}

.vault-family-bar {
    width: 100%;
    background: rgba(10, 13, 23, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--ic-border);
    position: relative;
    z-index: 20;
    color: var(--ic-text);
    --vault-bar-bg: #111827;
    --vault-bar-border: rgba(255, 255, 255, 0.08);
    --vault-label-color: rgba(226, 232, 240, 0.65);
    --vault-icon-color: rgba(226, 232, 240, 0.75);
    --vault-pill-shadow: 0 12px 32px rgba(15, 23, 42, 0.45);
}

.vault-family-bar {
    background: var(--vault-bar-bg);
    border-bottom-color: var(--vault-bar-border);
}

.light-mode .vault-family-bar {
    --vault-bar-bg: #f8fafc;
    --vault-bar-border: rgba(15, 23, 42, 0.08);
    --vault-label-color: rgba(71, 85, 105, 0.9);
    --vault-icon-color: rgba(15, 23, 42, 0.5);
    --vault-pill-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
    color: #0f172a;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.vault-family-inner {
    width: 100%;
    margin: 0;
    padding: 0.45rem clamp(1rem, 3vw, 1.50rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-sizing: border-box;
}

.vault-family-label {
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--vault-label-color);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.vault-family-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--vault-icon-color);
    fill: none;
    stroke-width: 1.4;
}

.vault-family-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.vault-family-links a {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--vault-link-text, #f8fafc);
    padding: 0.38rem 1.15rem;
    border-radius: 999px;
    border: none;
    background-image: linear-gradient(125deg, var(--vault-link-start, #6d28d9), var(--vault-link-end, #a855f7));
    background-size: 150% 150%;
    background-position: 0% 50%;
    box-shadow: var(--vault-pill-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
    transition: background-position 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
}

.vault-family-links a:hover,
.vault-family-links a:focus-visible {
    background-position: 100% 50%;
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.45);
    opacity: 0.98;
}

.light-mode .vault-family-links a:hover,
.light-mode .vault-family-links a:focus-visible {
    box-shadow: 0 15px 32px rgba(15, 23, 42, 0.18);
}

.vault-family-links a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 3px;
}

.light-mode .vault-family-links a:focus-visible {
    outline-color: rgba(79, 70, 229, 0.45);
}

.vault-family-links a.active {
    opacity: 1;
    transform: translateY(-1px);
}

.vault-family-links a[data-vault="facevault"] {
    --vault-link-start: #34d399;
    --vault-link-end: #a7f3d0;
    --vault-link-text: #064e3b;
}

.vault-family-links a[data-vault="widgetvault"] {
    --vault-link-start: #4a90e2;
    --vault-link-end: #6fbaff;
    --vault-link-text: #f8fafc;
}

.vault-family-links a[data-vault="tweakvault"] {
    --vault-link-start: #ff7e5f;
    --vault-link-end: #feb47b;
    --vault-link-text: #ffffff;
}

@media (max-width: 768px) {
    .vault-family-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.8rem clamp(1rem, 4vw, 0.50rem);
        gap: 0.65rem;
    }

    .vault-family-links {
        width: 100%;
    }

    .vault-family-links a {
        padding: 0.4rem 0.9rem;
    }
}

/* --- Section Hero --- */
.ic-hero {
    padding: 3rem 0;
    margin-bottom: 2rem;
}

/* New Split Hero Layout */
.ic-hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 50/50 split */
    gap: 3rem;
    align-items: stretch;
}

.ic-hero-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 1rem;
}

.ic-hero-content h1 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 700;
    margin: 0 0 1.5rem;
    line-height: 1.1;
}

.ic-hero-content p {
    font-size: 1.25rem;
    color: var(--ic-text-muted);
    margin: 0 0 2.5rem;
    max-width: 600px;
}

/* Hero Carousel */
.ic-hero-carousel {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: 100%;
    min-height: 450px;
    width: 100%;
    box-shadow: var(--ic-shadow);
    background: var(--ic-surface);
}

.hero-carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
}

.hero-carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.6s ease;
}

.hero-carousel-slide.active img {
    animation: pan-vertical 10s ease-in-out infinite alternate;
}

/* Pause animation on hover */
.ic-hero-carousel:hover .hero-carousel-slide.active img {
    animation-play-state: paused;
}

@keyframes pan-vertical {
    0% {
        object-position: center top;
    }

    100% {
        object-position: center bottom;
    }
}

.hero-carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: white;
    z-index: 3;
    pointer-events: none;
    text-align: left;
    /* Force left alignment */
}

.hero-carousel-caption h3 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-align: left;
    /* Ensure title is left aligned */
}

.hero-carousel-caption p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    /* Ensure subtitle is left aligned */
}

.hero-carousel-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
}

/* Carousel Navigation */
.hero-carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 5;
    pointer-events: none;
}

.hero-carousel-nav button {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.hero-carousel-nav button:hover {
    background: rgba(255, 255, 255, 0.9);
    color: black;
    transform: scale(1.1);
}

.hero-carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.6rem;
    z-index: 5;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-dot.active {
    background: white;
    transform: scale(1.3);
}

/* Responsive */
@media (max-width: 900px) {
    .ic-hero-split {
        grid-template-columns: 1fr;
        text-align: left;
        /* Changed from center to left */
        gap: 2rem;
    }

    .ic-hero-content {
        text-align: left;
        /* Changed from center to left */
        order: 2;
        padding-right: 0;
    }

    .ic-hero-content p {
        margin-left: 0;
        /* Changed from auto */
        margin-right: 0;
        /* Changed from auto */
    }

    .ic-hero-carousel {
        order: 1;
    }

    .ic-search-form {
        margin-left: 0;
        /* Changed from auto */
        margin-right: 0;
        /* Changed from auto */
    }

    .iv-quicktags {
        justify-content: flex-start !important;
    }
}

/* --- CTA (create collections) --- */
.hero-cta-box {
    position: fixed;
    top: 135px;
    left: 18px;
    width: 320px;
    max-width: calc(100% - 32px);
    background: var(--ic-surface);
    border: 1px solid var(--ic-border);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    display: none;
    /* toggled by JS */
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1200;
    text-align: left;
    animation: cta-pop 180ms ease-out;
}

.hero-cta-box .cta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.hero-cta-box h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.hero-cta-box p {
    margin: 0;
    color: var(--ic-text-muted);
    line-height: 1.45;
}

.hero-cta-box .cta-close {
    background: transparent;
    border: none;
    color: var(--ic-text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
}

.hero-cta-box .cta-close:hover {
    color: var(--ic-text);
}

.hero-cta-box .cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, var(--ic-primary), var(--ic-primary-light));
    color: #fff;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font-weight: 600;
    box-shadow: 0 12px 25px rgba(79, 70, 229, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.hero-cta-box .cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(79, 70, 229, 0.4);
}

.hero-cta-box .cta-btn:active {
    transform: translateY(0);
}

@keyframes cta-pop {
    from {
        transform: translateY(6px) scale(0.98);
        opacity: 0;
    }

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

@media (max-width: 768px) {
    .hero-cta-box {
        position: fixed;
        top: 170px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }
}

/* --- Barre de recherche --- */
.ic-search-form {
    display: flex;
    max-width: 600px;
    margin: 0 0 1.5rem 0;
    /* Left align */
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    background-color: var(--ic-surface);
}

.ic-search-form input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 0.9rem 1.25rem;
    color: var(--ic-text);
    font-size: 1rem;
}

.ic-search-form input:focus {
    outline: none;
}

.ic-search-form button {
    border: none;
    background: linear-gradient(135deg, var(--ic-primary), var(--ic-primary-light));
    color: var(--ic-text);
    padding: 0 1.75rem;
    border-radius: 0 var(--ic-radius) var(--ic-radius) 0;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ic-search-form button:hover {
    background-color: var(--ic-primary-light);
}

/* Quicktags left aligned */
.iv-quicktags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start !important;
    /* Ensure left alignment */
}

.iv-tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    background: var(--ic-surface);
    border: 1px solid var(--ic-border);
    color: var(--ic-text-muted);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.iv-tag:hover {
    border-color: var(--ic-primary);
    color: var(--ic-primary);
    background: rgba(79, 70, 229, 0.05);
}

/* ====================================================== */
/* === NEW PACK DETAIL LAYOUT (Full Width)            === */
/* ====================================================== */

.pack-detail-layout {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* --- Hero Section --- */
.pack-hero {
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-end;
    padding: 4rem 5%;
    color: #fff;
    overflow: hidden;
    margin-top: -4rem;
}

.pack-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    margin-bottom: -4rem;
}

.pack-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.6);
    transform: scale(1.1);
}

.pack-hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--ic-bg) 0%, transparent 100%);
}

.pack-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 2.5rem;
    width: 100%;
    max-width: 1400px;
    margin: 4rem auto 0 auto;
}

.pack-hero-cover {
    width: 180px;
    height: 180px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.pack-hero-info {
    flex: 1;
    margin-bottom: 0.5rem;
}

.pack-hero-info h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.pack-hero-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.pack-hero-meta a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.pack-hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-hero-primary {
    background: #fff;
    color: #000;
    padding: 0.8rem 2rem;
    border-radius: 99px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.btn-hero-primary:hover {
    transform: scale(1.05);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 99px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* --- Gallery Section --- */
.pack-gallery-section {
    width: 100%;
    margin-bottom: 3rem;
    padding: 0 5%;
}

.pack-gallery-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.pack-gallery-item {
    scroll-snap-align: start;
    flex-shrink: 0;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pack-gallery-item:hover {
    transform: translateY(-5px);
}

.pack-gallery-item img {
    height: 100%;
    width: auto;
    display: block;
}

/* --- Content Grid --- */
.pack-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto 4rem auto;
    padding: 0 5%;
}

.pack-main-col h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--ic-border);
    padding-bottom: 0.5rem;
}

.pack-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--ic-text);
    margin-bottom: 3rem;
}

.pack-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.pack-tag {
    background: var(--ic-surface);
    border: 1px solid var(--ic-border);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    color: var(--ic-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.pack-tag:hover {
    border-color: var(--ic-primary);
}

.pack-sidebar-card {
    background: var(--ic-surface);
    border: 1px solid var(--ic-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.pack-sidebar-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.pack-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--ic-border);
}

.pack-stat-row:last-child {
    border-bottom: none;
}

.pack-stat-label {
    color: var(--ic-text-muted);
}

.pack-stat-value {
    font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .pack-hero {
        min-height: auto;
        padding: 6rem 5% 3rem 5%;
        align-items: flex-end;
    }

    .pack-hero-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 1.5rem;
    }

    .pack-hero-info h1 {
        font-size: 2.5rem;
    }

    .pack-hero-meta {
        justify-content: flex-start;
    }

    .pack-hero-actions {
        justify-content: flex-start;
    }

    .pack-content-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    /* Move sidebar (Info) above Main content */
    .pack-sidebar-col {
        order: -1;
    }

    .pack-gallery-item {
        height: 300px;
    }

    /* Disable sticky sidebar on mobile */
    .pack-sidebar-col.sticky-sidebar {
        position: static;
        height: auto;
    }
}

/* ====================================================== */
/* === ENHANCEMENTS (Sticky, Animations, Share)       === */
/* ====================================================== */

/* --- Sticky Sidebar (Desktop Only) --- */
@media (min-width: 901px) {
    .pack-sidebar-col.sticky-sidebar {
        position: sticky;
        top: 2rem;
        align-self: start;
        height: fit-content;
    }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-enter {
    opacity: 0;
    /* Start hidden */
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* --- Share Button --- */
.btn-share {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-share:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.btn-share svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Enhanced Lightbox Transitions --- */
.lightbox {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    background: rgba(0, 0, 0, 0.9);
    /* Darker background */
    backdrop-filter: blur(5px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(0.95);
}

.lightbox.active .lightbox-image {
    transform: scale(1);
}

/* ====================================================== */
/* === SCROLLBAR FIXES                                === */
/* ====================================================== */

/* Custom scrollbar for gallery */
.pack-gallery-scroll::-webkit-scrollbar {
    height: 8px;
}

.pack-gallery-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.pack-gallery-scroll::-webkit-scrollbar-thumb {
    background-color: var(--ic-border);
    border-radius: 4px;
}

.pack-gallery-scroll::-webkit-scrollbar-thumb:hover {
    background-color: var(--ic-text-muted);
}

.pack-gallery-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--ic-border) transparent;
}

/* Prevent global horizontal scroll */
body {
    overflow-x: hidden;
}

/* Ensure box-sizing is correct globally if not already */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Description Collapsed State */
.description-collapsed {
    max-height: 200px;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    transition: max-height 0.5s ease;
}

.description-expanded {
    max-height: 2000px;
    /* Large enough value */
    mask-image: none;
    -webkit-mask-image: none;
}

#read-more-btn {
    background: none;
    border: none;
    color: var(--ic-primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-top: 0.5rem;
    font-size: 1rem;
}

#read-more-btn:hover {
    text-decoration: underline;
}

/* ========================================= */
/* === Submit Page Redesign                === */
/* ========================================= */

.submit-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    padding: 2rem 5%;
    box-sizing: border-box;
}

.submit-form-col {
    /* Left column */
}

/* Fix alignment: remove default margins from the form container */
.submit-form-col .form-container {
    margin-top: 0;
    margin-bottom: 0;
}

.submit-preview-col {
    /* Right column */
}

.submit-preview-sticky {
    position: sticky;
    top: 2rem;
}

.submit-preview-card {
    background: var(--ic-surface);
    border: 1px solid var(--ic-border);
    border-radius: var(--ic-radius);
    overflow: hidden;
    box-shadow: var(--ic-shadow);
    transition: all 0.3s ease;
    opacity: 0.7;
    pointer-events: none;
}

.submit-preview-card.active {
    opacity: 1;
    pointer-events: auto;
}

.preview-header {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid var(--ic-border);
}

.preview-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: var(--ic-bg);
    object-fit: cover;
}

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

.preview-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-dev {
    font-size: 0.9rem;
    color: var(--ic-text-muted);
}

.preview-body {
    padding: 1.5rem;
}

.preview-desc {
    font-size: 0.95rem;
    color: var(--ic-text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-imgs {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.preview-img {
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.submit-status-msg {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    background: var(--ic-bg);
    border: 1px solid var(--ic-border);
}

.submit-status-msg.error {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.05);
}

.submit-status-msg.success {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(16, 185, 129, 0.05);
}

/* ========================================= */
/* === Discover Page Styles                === */
/* ========================================= */

.discover-header {
    margin-bottom: 2rem;
}

.discover-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
}

.discover-section {
    margin-bottom: 4rem;
}

.discover-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Developers Grid */
.developers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.developer-pill-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    background-color: var(--ic-surface);
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--ic-border);
}

.developer-pill-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.dev-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
    z-index: 1;
}

.dev-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
}

.dev-name {
    font-size: 1.25rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.dev-count {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 4px;
    backdrop-filter: blur(4px);
}

/* Tags Visual Grid */
.tags-visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.tag-visual-card {
    position: relative;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    text-decoration: none;
    background-color: var(--ic-surface);
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--ic-border);
    transition: transform 0.2s ease;
}

/* When no image is present, give it a subtle gradient */
.tag-visual-card.no-image {
    background: linear-gradient(135deg, var(--ic-surface), var(--ic-bg));
}

.tag-visual-card:hover {
    transform: scale(1.02);
}

.tag-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* If no image, lighter overlay or none */
.tag-visual-card.no-image .tag-card-overlay {
    background: transparent;
}

.tag-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: 100%;
    color: white;
}

.tag-visual-card.no-image .tag-card-content {
    color: var(--ic-text);
}

.tag-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    backdrop-filter: blur(4px);
}

.tag-visual-card.no-image .tag-icon-circle {
    background: var(--ic-border);
    color: var(--ic-text);
}

.tag-icon-circle svg {
    width: 16px;
    height: 16px;
}

.tag-name {
    font-weight: 700;
    font-size: 1.05rem;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chevron-right {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

/* Special case for light mode text on cards with images (keep text white because of overlay) */
body.light-mode .tag-visual-card.has-image .tag-card-content,
body.light-mode .developer-pill-card .dev-card-content {
    color: white;
}