:root {
    --white: #f1f1f1;
    --text: #cdd6f4;
    --dark: #151517;
    --grey: #1b1b1c;
    --grey-light: #2c2c2e;
    --primary: #ab9ff2;
    --rose: #cba6f7;
    --rose2: #f5c2e7;
    --violet2: #cba6f7;
    --border: #dcdcdc;
    --shadow: rgba(0, 0, 0, 0.1);
    --input: #f9f9f9;
    --secondary: #2575fc;
    --success: #60d394;
    --error: #ee6055;
    --jaune: #ffd97d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--dark);
    color: var(--rose);
}

.header {
    background: var(--dark);
    border-bottom: 1px solid var(--border);
    padding: 0.4rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 0.4rem;
    font-weight: lighter;
    color: var(--border);
    text-decoration: none;
}

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

.nav-links a {
    color: var(--rose);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--border);
}

.auth-section {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.auth-buttons {
    gap: 10px;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--border);
    color: var(--dark);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--violet2), var(--rose));
}

.btn-secondary {
    background: transparent;
    color: var(--rose);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border);
}

.btn-cta {
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    color: #0f0f16;
    padding: 12px 18px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(203, 166, 247, 0.08);
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-weight: bold;
}

/* ====== LAYOUT PRINCIPAL ====== */
.top-section {
    display: flex;
    max-height: 600px;

    flex: 1;
    overflow: hidden;
    border-bottom: 1px solid var(--dark);
}

h1 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.sidebar {
    max-width: 400px;
    background: var(--dark);
    padding: 20px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    transition: max-width 0.3s ease;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
}

.viewer-container {
    flex: 1;
    position: relative;
    background: rgba(17, 17, 27, 0.515);
    display: flex;
    align-items: center;
    justify-content: center;
}

#viewer {
    width: 100%;
    height: 100%;
    max-width: 750px;
}

/* ====== SCROLL RULER ====== */
.scroll-ruler {
    height: 60px;
    background: var(--dark);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.ruler-track {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.ruler-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--grey);
    border-radius: 50%;
    top: -5px;
    transform: translateX(-50%);
    cursor: pointer;
}

/* ====== CODE EXPORTER ====== */
.code-exporter {
    background: var(--grey-light);
    border-top: 1px solid var(--border);
    padding: 20px;
    margin: 20px;
    border-radius: 8px;
}

.code-exporter h2 {
    margin-bottom: 15px;
}

.code-editors {

    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.code-box {
    flex: 1 1 30%;
    background: var(--grey);
    height: 200px;
    border: 1px solid var(--border);
    border-radius: 8px;
    position: relative;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.code-box textarea {
    flex: 1;
    width: 100%;
    background: var(--grey-light);
    border: none;
    color: var(--rose);
    resize: none;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.4;
    outline: none;
}

.copy-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--border);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--rose);
    transition: background 0.2s, transform 0.2s;
}

.copy-icon:hover {
    background: #45475a;
    transform: scale(1.1);
}

.code-box-title {
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .code-editors {
        flex-direction: column;
    }

    .code-box {
        flex: 1 1 100%;
    }
}

.section {
    background: var(--grey-light);
    padding: 10px 10px;
    border-radius: 8px;
    border: 1px solid grey;
}

.section-title {
    font-size: 16px;
    margin-bottom: 12px;
    color: red;
    font-weight: 600;
}

/* rendre public  */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Segoe UI', sans-serif;
    font-size: 16px;
    color: var(--grey-light);
    transition: all 0.3s ease;
}

.toggle-switch:hover {
    color: var(--rose);
}

.toggle-input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 60px;
    height: 30px;
    background: #e0e0e0;
    border-radius: 34px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked+.toggle-slider {
    background: var(--rose);
}

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

.toggle-text {
    font-weight: 500;
    user-select: none;
}


/* ====== RESPONSIVE ====== */
@media (max-width: 724px) {
    .top-section {
        flex-direction: column;
    }

    .sidebar {
        max-width: 400px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        height: 10%;
        z-index: 1000;
    }

    .viewer-container {
        min-height: 300px;
        max-width: 700px;
    }
}

@media (max-width: 600px) {
    .code-exporter {
        padding: 20px 10px;
    }
}

#viewer {
    width: 100%;
    height: 100%;
}

.scroll-ruler {
    height: 60px;
    background: var(--dark);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

.ruler-track {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.ruler-marker {
    position: absolute;
    width: 2px;
    height: 20px;
    background: var(--primary);
    top: -7px;
    transform: translateX(-50%);
    cursor: pointer;
}

.ruler-percentage {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--border);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--grey-light);
    white-space: nowrap;
}

.ruler-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    top: -5px;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 10;
}

.section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--primary);
    font-weight: 600;
}

.btn {
    background: var(--border);
    color: var(--dark);
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    width: 100%;
    margin-bottom: 10px;
}

.btn:hover {
    background: var(--primary);
}

.btn-secondary {
    background: #585b70;
    color: var(--rose);
}

.btn-secondary:hover {
    background: #6c7086;
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #a6adc8;
}

input,
select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--grey);
    color: var(--rose);
    fill: var(--rose);
}

.keyframes-list {
    max-height: 200px;
    overflow-y: auto;
    background: var(--grey-light);
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
}

.keyframe-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.keyframe-item:hover {
    border: 1px solid var(--primary);
    border-radius: 8px;
}

.keyframe-item.active {
    background: var(--rose);
}

.keyframe-percentage {
    font-weight: bold;
    color: var(--primary);
}

.keyframe-actions {
    display: flex;
    gap: 10px;
}

.keyframe-actions button {
    background: none;
    border: none;
    color: var(--rose);
    cursor: pointer;
    font-size: 14px;
}

.keyframe-actions button:hover {
    color: var(--primary);
}

.code-editor {
    width: 90%;
    height: 200px;
    background: var(--grey-light);
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
    font-family: monospace;
    font-size: 14px;
    color: var(--rose);
    border: 1px solid var(--border);
    resize: vertical;
}

.preview-container {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(24, 24, 37, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    z-index: 100;
}

.preview-title {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--primary);
}

.preview-scroll {
    width: 200px;
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    position: relative;
    cursor: pointer;
}

.preview-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    top: -3px;
    left: 0;
    transform: translateX(-50%);
    cursor: pointer;
}

.preview-percentage {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
}

.instructions {
    font-size: 12px;
    color: #a6adc8;
    margin-top: 10px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.tab-container {
    display: flex;
    margin-bottom: 15px;
}

.tab {
    padding: 8px 15px;
    background: var(--grey);
    border: 1px solid var(--border);
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    margin-right: 5px;
}

.tab.active {
    background: var(--grey-light);
    color: var(--input);
    border: 1px solid var(--grey-light);
}

.tab-content {
    display: block;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary);
    font-size: 18px;
}

.code-exporter {
    background: var(--dark);
    border-radius: 8px;
    padding: 20px;
    margin: 20px;
}

.code-tab {
    display: none;
}

.code-tab.active {
    display: block;
}

.code-exporter .tab-container {
    margin-bottom: 15px;
}

.code-exporter .tab {
    padding: 8px 15px;
    background: var(--grey);
    border: 1px solid var(--border);
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    margin-right: 5px;
}

.code-exporter .tab.active {
    background: var(--border);
    border-bottom: 1px solid var(--border);

}

.code-exporter .code-editor {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.4;
}

#open-codepen {
    display: flex;
    margin: 0 auto;
    background: transparent;
    color: #f1f1f1;
    border: 1px solid var(--rose);
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    width: auto;
    margin-top: 20px;
    margin-bottom: 20px;
}

#open-codepen:hover {
    background: linear-gradient(135deg, #ab9ff2 0%, #cba6f7 100%);
    color: #333;
}

/* Cahrgement model test */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(17, 17, 27, 0.9);
    color: #cba6f7;
    padding: 1rem 2rem;
    border-radius: 10px;
    border: 2px solid #cba6f7;
    z-index: 1000;
    font-weight: bold;
    text-align: center;
    backdrop-filter: blur(10px);
}

.loading::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

/* SHOP DE POINTS */
.points-shop {
    background-image: url('../img/mascotte-sunset.png');
    padding: 75px 80px;
    border-radius: 10px;
    margin: 20px 0;
}

.point-packs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.point-pack {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.point-pack:hover {
    border-color: var(--primary);
    transform: translateY(-25px);
    box-shadow: 0 6px 20px rgba(203, 166, 247, 0.08);
}

.point-pack.popular {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
}

.point-pack .badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.points-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 10px 0;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 10px 0;
    color: var(--text);
}

/* system de points */
.user-points {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 8px;
    font-weight: bold;
}

.points-info {
    background: var(--grey-light);
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    text-align: center;
}

.points-cost {
    color: var(--rose);
    font-weight: bold;
}

/* SYSTEM DE NOTIF */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    background: #181825;
    border: 1px solid;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(400px);
    opacity: 0;
}

.notification.success {
    border-color: #a6e3a1;
    background: linear-gradient(135deg, #181825 0%, #1a1b26 100%);
}

.notification.error {
    border-color: #f38ba8;
    background: linear-gradient(135deg, #181825 0%, #1a1b26 100%);
}

.notification.warning {
    border-color: #f9e2af;
    background: linear-gradient(135deg, #181825 0%, #1a1b26 100%);
}

.notification.info {
    border-color: #89b4fa;
    background: linear-gradient(135deg, #181825 0%, #1a1b26 100%);
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification.success .notification-icon {
    color: #a6e3a1;
}

.notification.error .notification-icon {
    color: #f38ba8;
}

.notification.warning .notification-icon {
    color: #f9e2af;
}

.notification.info .notification-icon {
    color: #89b4fa;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #cdd6f4;
}

.notification-message {
    color: #a6adc8;
    font-size: 14px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #6c7086;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    color: #cdd6f4;
    background: rgba(108, 112, 134, 0.1);
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    border-radius: 0 0 12px 12px;
    opacity: 0.6;
    animation: progressBar 5s linear forwards;
}

@keyframes progressBar {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .notification {
        max-width: none;
    }
}

/* Modal sketchfab */
.sketchfab-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
  z-index: 1000;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

.particles-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.sketchfab-modal {
  position: relative;
  background: rgba(27, 27, 28, 0.92);
  border: 1px solid var(--grey-light);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  width: 80%;
  max-width: 900px;
  color: var(--text);
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  z-index: 1;
  animation: modalPop 0.5s ease forwards;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: var(--dark);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--grey-light);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sketchfab-logo {
  width: 28px;
  height: 28px;
  filter: brightness(1.1) contrast(1.2);
}

.close-modal {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--dark);
  cursor: pointer;
  transition: transform 0.2s;
}

.close-modal:hover {
  transform: rotate(90deg);
}

.search-section {
  padding: 1.5rem;
  background: var(--grey);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.search-bar {
  display: flex;
  flex: 1;
  max-width: 600px;
  background: var(--grey-light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.search-bar input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.search-btn {
  background: var(--primary);
  border: none;
  padding: 0 1.2rem;
  cursor: pointer;
  color: var(--dark);
  transition: background 0.3s;
}

.search-btn:hover {
  background: var(--rose);
}

.filters select {
  background: var(--grey-light);
  border: 1px solid var(--grey-light);
  padding: 0.8rem;
  border-radius: 8px;
  color: var(--text);
  outline: none;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
}

.models-grid .loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--rose);
  font-size: 1.1rem;
  animation: pulse 1.5s infinite ease-in-out;
}

/* Animations */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.model-card {
    background: var(--grey);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.model-card:hover {
    transform: translateY(-5px);
}

.model-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.model-info {
    padding: 1rem;
}

.model-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.model-info p {
    margin: 0 0 0.5rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.model-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Styles pour la modal de sauvegarde */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: var(--grey);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    color: var(--text);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background);
    color: var(--text);
    font-size: 0.875rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input {
    width: auto;
    margin: 0;
}

.reward-notice {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

/* Authentification Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.auth-modal-content {
    background: #1e1e2e;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    border: 1px solid #313244;
    position: relative;
}

.auth-modal-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-modal-header h2 {
    color: #cdd6f4;
    font-size: 1.3rem;
}

.close-btn {
    background: none;
    border: none;
    color: #a6adc8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.close-btn:hover {
    color: #f38ba8;
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-btn {
    padding: 1rem;
    border: 1px solid #313244;
    border-radius: 8px;
    background: #181825;
    color: #cdd6f4;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    border-color: #cba6f7;
    background: #1a1b26;
}

.google-btn:hover {
    border-color: #4285f4;
}

.github-btn:hover {
    border-color: #6e5494;
}

.auth-benefits {
    background: #181825;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.auth-benefits h4 {
    color: #cba6f7;
    margin-bottom: 1rem;
}

.auth-benefits ul {
    list-style: none;
    padding: 0;
}

.auth-benefits li {
    padding: 0.25rem 0;
    color: #a6adc8;
}

.auth-footer {
    text-align: center;
    color: #6c7086;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #89b4fa;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Guest State */
.code-guest {
    text-align: center;
    padding: 3rem 2rem;
}

.guest-message {
    max-width: 400px;
    margin: 0 auto;
}

.guest-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.guest-icon img {
    width: 120px;
    height: auto;
}

.points-mascot {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.guest-message h3 {
    color: #cdd6f4;
    margin-bottom: 1rem;
}

.guest-message p {
    color: #a6adc8;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Upgrade CTA */
.upgrade-cta {
    background: linear-gradient(135deg, #181825 0%, #1a1b26 100%);
    border: 1px solid #313244;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
    position: relative;
}

.upgrade-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f5c2e7 0%, #cba6f7 100%);
    color: #1e1e2e;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.upgrade-cta h4 {
    color: #f5c2e7;
    margin-bottom: 1rem;
}

.upgrade-cta p {
    color: #a6adc8;
    margin-bottom: 1rem;
}

.upgrade-cta ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.upgrade-cta li {
    padding: 0.5rem 0;
    color: #a6adc8;
    border-bottom: 1px solid #313244;
}

.upgrade-cta li:last-child {
    border-bottom: none;
}

.btn-premium {
    background: linear-gradient(135deg, #f5c2e7 0%, #cba6f7 100%);
    color: #1e1e2e;
    border: none;
    font-weight: bold;
}

.btn-premium:hover {
    background: linear-gradient(135deg, #e8b6d8 0%, #b692f6 100%);
    transform: translateY(-2px);
}
/* Nouveaux styles pour la section code */
.unlock-code-section {
    text-align: center;
    padding: 2rem;
    background: var(--grey-light);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.cost-badge {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.cost-info {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.code-actions {
    transition: all 0.3s ease;
}

.point-pack {
    position: relative;
    transition: transform 0.2s ease;
}

.point-pack:hover {
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* User Menu */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #cba6f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e1e2e;
    font-weight: bold;
    margin-right: 0.5rem;
}

.user-name {
    color: #cdd6f4;
    margin-right: 1rem;
}

/* Pro Actions */
.pro-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pro-actions .btn {
    flex: 1;
}


/* GUIDE onboarding */
/* Personnalisation Intro.js pour ton thème */
.introjs-tooltip {
    background: var(--grey-light) !important;
    border: 2px solid var(--primary) !important;
    border-radius: 12px !important;
    color: var(--text) !important;
    min-width: 300px;
}

.introjs-tooltip-header {
    border-bottom: 1px solid var(--grey) !important;
}

.introjs-tooltip-title {
    color: var(--text) !important;
    font-weight: bold !important;
}

.introjs-button {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    text-shadow: none !important;
}

.introjs-button:hover {
    background: var(--primary-dark) !important;
}

.introjs-button.introjs-prevbutton {
    background: var(--grey) !important;
    color: var(--text) !important;
}

.introjs-bullets ul li a {
    background: var(--grey) !important;
}

.introjs-bullets ul li a.active {
    background: var(--primary) !important;
}

.introjs-helperLayer {
    box-shadow: 0 0 0 10000px rgba(0,0,0,0.7), 
                0 0 0 4px var(--primary),
                0 0 20px rgba(139, 69, 255, 0.5) !important;
    border-radius: 8px !important;
}

/* ====== GALLERY PAGE ====== */
.search-bar {
    max-width: 500px;
    margin: 0 auto;
}

.search-container {
    display: flex;
    border: 2px solid var(--dark);
    border-radius: 25px;
    overflow: hidden;
    background: var(--grey-light);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 16px;
}

.search-btn {
    padding: 12px 20px;
    background: var(--grey-light);
    border: 1px solid var(--dark);
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.search-btn:hover {
    background: var(--primary);
}

/* Suggestions */
.search-autocomplete {
    position: relative;
    margin-top: 20px;
    margin-bottom: 20px;
}

#suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--grey-light);
    color: var(--rose);
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestion-item:hover {
    background: #f8f9fa;
}

/* animation de gain 💎 */
/* ===== ANIMATIONS DE GAINS ===== */
.gain-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    pointer-events: none;
}

.gain-particle {
    position: absolute;
    font-size: 2rem;
    font-weight: bold;
    opacity: 0;
    animation: floatUp 2s ease-out forwards;
}

.gain-particle.points {
    color: #fff;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.gain-particle.gems {
    color: #ee6055;
    text-shadow: 0 0 10px rgba(185, 16, 16, 0.5);
}

.gain-particle.premium {
    color: #6366f1;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }

    20% {
        opacity: 1;
        transform: translateY(-20px) scale(1.2);
    }

    80% {
        opacity: 1;
        transform: translateY(-80px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0.8);
    }
}

/* Variantes de positions */
.gain-particle:nth-child(1) {
    animation-delay: 0s;
    left: -50px;
}

.gain-particle:nth-child(2) {
    animation-delay: 0.1s;
    left: -25px;
}

.gain-particle:nth-child(3) {
    animation-delay: 0.2s;
    left: 0px;
}

.gain-particle:nth-child(4) {
    animation-delay: 0.3s;
    left: 25px;
}

.gain-particle:nth-child(5) {
    animation-delay: 0.4s;
    left: 50px;
}

/* Animation de vibration pour le compteur */
@keyframes pulseGain {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.points-counter.pulse {
    animation: pulseGain 0.6s ease;
}

.credits-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.credits-info {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.credits-section .btn {
    margin: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#code-editors {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

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

.guest-message {
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}
.crypto-payment-modal {
    background: var(--grey-light);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 400px;
    margin: 2rem auto;
}

.amount-section {
    text-align: center;
    margin: 1.5rem 0;
}

.crypto-amount {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.fiat-equivalent {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.rate-info {
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
}

.pack-info {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--grey);
    border-radius: 8px;
}

.points-amount {
    color: var(--accent);
    font-weight: bold;
}

.wallet-info {
    text-align: center;
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(0,0,0,0.1);
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
}