﻿/* =====================================================
   SITE CSS - MITHabits DevLife
   Styles complémentaires et utilitaires
   ===================================================== */

/* ===== THEME VARIABLES ===== */
:root {
  /* Charte graphique MIT – Light */
  --bg-color: #FEFEFE;
  --bg-secondary: #F5F7FB;
  --text-color: #111827;
  --text-secondary: #6B7280;
  --color-primary: #2D6CB5;
  --color-accent: #34C759;
  --border-color: #E5E7EB;
  --card-bg: #FEFEFE;
  --navbar-bg: #111827;
  --footer-bg: #111827;
  --shadow: rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
  --hover-shadow: rgba(0, 0, 0, 0.14);
  /* Typographie */
  --font-family: Inter, system-ui, sans-serif;
  --font-size-xl: 24px;
  --font-size-l: 20px;
  --font-size-m: 18px;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  /* Espacements */
  --spacing-base: 16px;
  --spacing-lg: 24px;
  /* Formes */
  --radius: 8px;
}

[data-theme="dark"] {
  /* Charte graphique MIT – Dark */
  --bg-color: #121214;
  --bg-secondary: #20242C;
  --text-color: #FFFFFF;
  --text-secondary: #A0A6B1;
  --color-primary: #60A5FA;
  --color-accent: #4ADE80;
  --border-color: #2D3139;
  --card-bg: #20242C;
  --navbar-bg: #0A0A0C;
  --footer-bg: #0A0A0C;
  --shadow: rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.5);
  --hover-shadow: rgba(0, 0, 0, 0.7);
}

/* ===== APPLY THEME COLORS ===== */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.card {
  background-color: var(--card-bg);
  border-color: var(--border-color);
  color: var(--text-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.card-header,
.card-footer {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
}

.bg-light {
  background-color: var(--bg-secondary) !important;
}

[data-theme="dark"] .bg-light {
  background-color: var(--bg-secondary) !important;
  color: var(--text-color) !important;
}

.table {
  color: var(--text-color);
}

.table-hover tbody tr:hover {
  background-color: var(--bg-secondary);
}

[data-theme="dark"] .table-light {
  background-color: #21262d;
  color: var(--text-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .table-light th {
  background-color: #21262d;
  color: var(--text-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .text-muted {
  color: var(--text-secondary) !important;
}

[data-theme="dark"] small.text-muted {
  color: #8b949e !important;
}

/* Amélioration du contraste pour les badges en dark mode */
[data-theme="dark"] .badge {
  border: 1px solid rgba(240, 246, 252, 0.2);
}

[data-theme="dark"] .badge.bg-primary {
  background-color: #1f6feb !important;
  color: #ffffff !important;
}

[data-theme="dark"] .badge.bg-success {
  background-color: #2ea043 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .badge.bg-danger {
  background-color: #da3633 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .badge.bg-warning {
  background-color: #d29922 !important;
  color: #000000 !important;
}

[data-theme="dark"] .badge.bg-info {
  background-color: #1f6feb !important;
  color: #ffffff !important;
}

/* Progress bars en dark mode */
[data-theme="dark"] .progress {
  background-color: #21262d;
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .progress-bar {
  color: #ffffff;
}

[data-theme="dark"] .progress-bar.bg-primary {
  background-color: #1f6feb !important;
}

[data-theme="dark"] .progress-bar.bg-success {
  background-color: #2ea043 !important;
}

[data-theme="dark"] .progress-bar.bg-info {
  background-color: #1f6feb !important;
}

[data-theme="dark"] .progress-bar.bg-warning {
  background-color: #d29922 !important;
}

[data-theme="dark"] .progress-bar.bg-danger {
  background-color: #da3633 !important;
}

/* Icons et texte coloré - amélioration du contraste */
[data-theme="dark"] .text-primary {
  color: #58a6ff !important;
}

[data-theme="dark"] .text-success {
  color: #3fb950 !important;
}

[data-theme="dark"] .text-danger {
  color: #f85149 !important;
}

[data-theme="dark"] .text-warning {
  color: #f2cc60 !important;
}

[data-theme="dark"] .text-info {
  color: #58a6ff !important;
}

[data-theme="dark"] .text-white {
  color: #ffffff !important;
}

[data-theme="dark"] .text-black {
  color: #f0f6fc !important;
}

/* Bordures colorées en dark mode */
[data-theme="dark"] .border-primary {
  border-color: #1f6feb !important;
}

[data-theme="dark"] .border-success {
  border-color: #2ea043 !important;
}

[data-theme="dark"] .border-danger {
  border-color: #da3633 !important;
}

[data-theme="dark"] .border-warning {
  border-color: #d29922 !important;
}

[data-theme="dark"] .border-info {
  border-color: #1f6feb !important;
}

/* Alert boxes en dark mode */
[data-theme="dark"] .alert-warning {
  background-color: #332b1a;
  border-color: #4d3b1a;
  color: #f4d03f;
}

[data-theme="dark"] .alert-info {
  background-color: #1b2b33;
  border-color: #2a4a52;
  color: #85d1e7;
}

/* ===== THEME SWITCHER ===== */
/* Theme Switcher Button */
.theme-switcher-btn {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px var(--shadow);
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
  background-color: var(--card-bg);
  color: var(--text-color);
}

[data-theme="dark"] .theme-switcher-btn {
  background-color: #21262d;
  border-color: #30363d;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .theme-switcher-btn:hover {
  background-color: #2d333b;
  border-color: #444c56;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
}

.theme-switcher-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--hover-shadow);
}

.theme-switcher-btn i {
  transition: transform 0.3s ease;
  color: var(--text-color);
}

[data-theme="dark"] .theme-switcher-btn i {
  color: #f0f6fc;
}

.theme-switcher-btn:hover i {
  transform: rotate(20deg);
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--color-primary);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  padding-top: 56px; /* Pour compenser la navbar fixed */
}

/* ===== NAVIGATION ===== */
.navbar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

[data-theme="dark"] .navbar {
  background-color: var(--navbar-bg) !important;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
}

/* ===== MIT LOGO ===== */
.mit-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.mit-logo-text {
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.mit-logo-icon {
  color: var(--color-accent);
  font-size: 1.15rem;
  transition: transform 0.3s ease;
}

.mit-logo:hover {
  text-decoration: none;
}

.mit-logo:hover .mit-logo-icon {
  transform: translateX(4px);
}

/* Logo MIT sur fond sombre (navbar, footer) – contraste garanti */
.navbar .mit-logo-text,
footer .mit-logo-text {
  color: #60A5FA;
}

.navbar .mit-logo-icon,
footer .mit-logo-icon {
  color: #4ADE80;
}

.navbar-nav .nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--color-primary) !important;
}

/* ===== FOOTER ===== */
footer {
  margin-top: auto;
  background-color: var(--footer-bg);
}

[data-theme="dark"] footer {
  background-color: var(--footer-bg) !important;
}

footer a:hover {
  color: white !important;
  opacity: 0.8;
}

/* ===== FORMS ===== */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: var(--bg-secondary);
  color: var(--text-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: var(--bg-secondary);
  color: var(--text-color);
  border-color: #4A90E2;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== UTILITIES ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== SMOOTH SCROLLING ===== */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ===== RESPONSIVE IMAGES ===== */
img {
  max-width: 100%;
  height: auto;
}

/* ===== ACCESSIBILITY ===== */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-content:focus {
  top: 0;
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar,
  footer,
  .btn,
  .no-print,
  .theme-switcher-btn {
    display: none !important;
  }
  
  body {
    padding-top: 0;
  }
}

/* Centrage vertical et horizontal pour la page de login */
.login-page-wrapper {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
}

.login-page-wrapper main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .theme-switcher-btn {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
    top: 70px;
    right: 15px;
  }
}

/* ===================================================== */
/* SKELETON LOADING */
/* Skeleton Loading Animations for MemberArea */

/* Animation de pulsation pour les skeletons - réduite pour éviter le clignotement */
@keyframes skeleton-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

/* Classe de base pour les skeletons */
.skeleton {
    animation: skeleton-pulse 2s ease-in-out infinite;
    background: linear-gradient(
        90deg,
        #f0f0f0 0px,
        #e0e0e0 40px,
        #f0f0f0 80px
    );
    background-size: 200%;
    border-radius: 4px;
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(
        90deg,
        #2d2d30 0px,
        #3d3d40 40px,
        #2d2d30 80px
    );
    background-size: 200%;
}

.skeleton-shimmer {
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

/* Styles spécifiques pour les différents éléments */
.skeleton-welcome-card {
    height: 200px;
    border-radius: 15px;
    margin-bottom: 1.5rem;
}

.skeleton-advice-card {
    height: 180px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.skeleton-stat-card {
    height: 120px;
    border-radius: 8px;
}

.skeleton-nav-card {
    height: 400px;
    border-radius: 15px;
}

.skeleton-table-row {
    height: 40px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-text {
    height: 20px;
    margin-bottom: 10px;
    border-radius: 4px;
}

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

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

.skeleton-title {
    height: 32px;
    width: 40%;
    margin-bottom: 16px;
    border-radius: 6px;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

/* Skeleton spécifique pour les cartes de navigation */
.skeleton-nav-content {
    padding: 3rem 2rem;
    text-align: center;
}

.skeleton-nav-content .skeleton-icon {
    width: 100px;
    height: 100px;
}

/* Skeleton pour les tableaux */
.skeleton-table {
    width: 100%;
}

.skeleton-table-header {
    height: 45px;
    margin-bottom: 10px;
    border-radius: 8px 8px 0 0;
}

/* Animation progressive d'apparition */
.skeleton-stagger {
    animation: skeleton-pulse 2s ease-in-out infinite;
}

.skeleton-stagger:nth-child(1) { animation-delay: 0s; }
.skeleton-stagger:nth-child(2) { animation-delay: 0.1s; }
.skeleton-stagger:nth-child(3) { animation-delay: 0.2s; }
.skeleton-stagger:nth-child(4) { animation-delay: 0.3s; }
.skeleton-stagger:nth-child(5) { animation-delay: 0.4s; }

/* Optimisation des performances */
.skeleton-container {
    will-change: opacity;
    transform: translateZ(0);
}

/* Skeletons génériques pour toutes les pages */
.skeleton-card {
    height: 200px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.skeleton-hero {
    height: 400px;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.skeleton-section {
    height: 300px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.skeleton-form-group {
    height: 60px;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.skeleton-button {
    height: 50px;
    width: 200px;
    border-radius: 8px;
}

.skeleton-image {
    height: 200px;
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.skeleton-list-item {
    height: 60px;
    margin-bottom: 0.5rem;
    border-radius: 6px;
}

/* Responsive */
@media (max-width: 768px) {
    .skeleton-nav-card {
        height: 350px;
    }
    
    .skeleton-welcome-card {
        height: 180px;
    }
    
    .skeleton-advice-card {
        height: 150px;
    }
    
    .skeleton-hero {
        height: 300px;
    }
    
    .skeleton-section {
        height: 250px;
    }
}

/* Style pour le message de chargement initial */
.loading-message {
    text-align: center;
    padding: 2rem;
    color: var(--color-primary);
    font-weight: 600;
}

.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(45, 108, 181, 0.25);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spinner 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Animation de chargement pour les images - simplifiée */
img[data-lazy] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[data-lazy].loaded {
    opacity: 1;
}

/* Skeleton pour grilles de cartes */
.skeleton-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.skeleton-grid-item {
    height: 300px;
    border-radius: 12px;
}

/* Masquer le contenu réel pendant le chargement des skeletons */
.hidden-while-loading {
    opacity: 0;
    transform: translateY(8px);
}

/* Révéler le contenu avec une transition douce */
.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}



/* ===================================================== */
/* COOKIE CONSENT */
/* ===================================
   Styles pour le système de cookies RGPD
   Compatible avec Brave et navigateurs modernes
   =================================== */

/* Banner de consentement */
.cookie-consent-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #111827 0%, #1A3A5C 100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #2D6CB5;
}

.cookie-consent-banner.show {
    bottom: 0;
}

.cookie-consent-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-consent-icon {
    font-size: 3rem;
    color: var(--color-accent);
    flex-shrink: 0;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.cookie-consent-description {
    color: #b8c5d6;
    margin-bottom: 0;
    line-height: 1.6;
}

.cookie-consent-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-consent-actions .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-consent-actions .btn-accept {
    background: linear-gradient(135deg, var(--color-accent) 0%, #28A742 100%);
    border: none;
}

.cookie-consent-actions .btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.4);
}

.cookie-consent-actions .btn-customize,
.cookie-consent-actions .btn-refuse {
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent-actions .btn-customize:hover,
.cookie-consent-actions .btn-refuse:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Modal de personnalisation */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-modal.show {
    display: flex;
    opacity: 1;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.cookie-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cookie-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-color);
    transform: rotate(90deg);
}

.cookie-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Catégories de cookies */
.cookie-category {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(45, 108, 181, 0.1);
}

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

.cookie-category-info {
    flex: 1;
}

.cookie-category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.cookie-category-description {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.6;
}

.cookie-category-toggle {
    flex-shrink: 0;
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

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

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

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-accent);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

input:disabled + .slider {
    background-color: var(--color-accent);
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-text {
    display: inline-block;
    margin-left: 10px;
    color: var(--color-accent);
    font-weight: 600;
}

/* Détails des cookies */
.cookie-category-details {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.cookie-category-details ul {
    margin: 0;
    padding-left: 1.5rem;
}

.cookie-category-details li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Boîte d'information */
.cookie-info-box {
    background: rgba(45, 108, 181, 0.08);
    border-left: 4px solid var(--color-primary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.cookie-info-box i {
    font-size: 1.5rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.cookie-info-box strong {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.cookie-info-box p {
    margin: 0;
    color: var(--text-secondary);
}

.cookie-info-box a {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Footer du modal */
.cookie-modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 0 0 16px 16px;
}

.cookie-modal-footer .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Bouton flottant pour rouvrir les paramètres */
.cookie-settings-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary) 0%, #1A5EA0 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(45, 108, 181, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 9998;
    transition: all 0.3s ease;
}

.cookie-settings-button:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(45, 108, 181, 0.6);
}

/* Notification toast */
.cookie-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10001;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

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

.cookie-notification-success {
    border-left: 4px solid var(--color-accent);
}

.cookie-notification-info {
    border-left: 4px solid var(--color-primary);
}

.cookie-notification i {
    font-size: 1.5rem;
}

.cookie-notification-success i {
    color: var(--color-accent);
}

.cookie-notification-info i {
    color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-consent-actions .btn {
        width: 100%;
    }

    .cookie-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .cookie-modal-header,
    .cookie-modal-body {
        padding: 1.5rem;
    }

    .cookie-modal-footer {
        flex-direction: column-reverse;
        padding: 1rem 1.5rem;
    }

    .cookie-modal-footer .btn {
        width: 100%;
    }

    .cookie-category-header {
        flex-direction: column;
    }

    .cookie-settings-button {
        bottom: 10px;
        left: 10px;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .cookie-notification {
        right: 10px;
        left: 10px;
        bottom: 70px;
    }
}

[data-theme="dark"] .cookie-modal-content {
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .cookie-modal-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .cookie-modal-title,
[data-theme="dark"] .cookie-category-title {
    color: var(--text-color);
}

[data-theme="dark"] .cookie-category {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .cookie-category-description,
[data-theme="dark"] .cookie-category-details li {
    color: var(--text-secondary);
}

[data-theme="dark"] .cookie-category-details {
    background: var(--bg-color);
}

[data-theme="dark"] .cookie-modal-footer {
    background: var(--bg-secondary);
    border-top-color: var(--border-color);
}

[data-theme="dark"] .cookie-notification {
    background: var(--card-bg);
    color: var(--text-color);
}

/* Accessibilité - Focus visible */
*:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* Animation de pulse pour attirer l'attention */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.cookie-settings-button {
    animation: pulse 2s infinite;
}



/* ===================================================== */
/* ERROR PAGE */
.error-container {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}
.error-content {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 800px;
    position: relative;
}
.error-emoji {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    animation: monkey-bounce 1.2s infinite alternate;
}
@keyframes monkey-bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-18px); }
}
.error-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #e67e22;
}
.error-code {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e74c3c;
    margin-bottom: 1rem;
}
.error-message {
    font-size: 1.15rem;
    color: #444;
    margin-bottom: 1.5rem;
}
.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.btn-warning {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background: #f7ca18;
    color: #222;
    border: none;
}
.btn-warning:hover {
    background: #f5b041;
    color: #fff;
}
.btn-primary {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
}
.error-tip {
    font-size: 0.95rem;
    color: #888;
    margin-top: 1.5rem;
}
.error-tip a {
    color: #e67e22;
    text-decoration: underline;
}
.error-request-id {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}
.error-request-id small {
    font-size: 0.85rem;
    color: #999;
    font-family: monospace;
}

.dev-details {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #1e1e1e;
    border-radius: 0.5rem;
    text-align: left;
    border: 2px solid #e74c3c;
}
.dev-details-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f39c12;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dev-details-header i {
    color: #e74c3c;
}
.dev-detail-item {
    margin-bottom: 1.2rem;
    color: #d4d4d4;
}
.dev-detail-item strong {
    color: #4ec9b0;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.dev-detail-item code {
    background: #2d2d30;
    padding: 0.3rem 0.6rem;
    border-radius: 0.3rem;
    color: #ce9178;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
}
.dev-message {
    background: #2d2d30;
    padding: 0.8rem;
    border-radius: 0.3rem;
    color: #dcdcaa;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    word-wrap: break-word;
}
.dev-stacktrace {
    background: #2d2d30;
    padding: 1rem;
    border-radius: 0.3rem;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}


/* ===================================================== */
/* PREMIUM CONTENT */
/* Premium Content Styles */
.premium-content-blurred {
    position: relative;
    overflow: hidden;
}

.premium-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10;
    padding: 2rem;
}

.premium-upgrade-message {
    text-align: center;
    color: white;
    background: linear-gradient(135deg, #2D6CB5 0%, #1A5EA0 100%);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
}

.premium-upgrade-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.premium-upgrade-message h5 {
    margin-bottom: 1rem;
    font-weight: bold;
}

.premium-upgrade-message p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.premium-upgrade-message .btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
}

/* Premium Badge */
.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Pack Detail Styles (pour la page Subscribe) */
.min-vh-50 {
    min-height: 50vh;
}

.pricing-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hover-lift {
    transition: transform 0.2s;
}

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

