/* ============================================================================
   CONTRAST COLOR TOOL v14.0 — Feuille de styles principale
   
   Ce fichier contient tous les styles de l'application, organisés en sections :
   
   1. RESET                   — Remise à zéro des styles navigateur
   2. VARIABLES / THÈMES      — Couleurs, ombres, accents pour chaque thème
   3. TAILLES                  — Petite / Moyenne / Grande / Très grande
   4. BASE                     — Typographie, corps de page
   5. LAYOUT                   — Grille principale (ribbon, sidebar, workspace, propriétés)
   6. RIBBON                   — Barre supérieure type Office
   7. BOUTONS / INPUTS         — Styles de formulaire
   8. SIDEBAR                  — Menu latéral de navigation
   9. WORKSPACE                — Zone de travail centrale
   10. PROPRIÉTÉS              — Panneau latéral droit
   11. GRILLE DE COULEURS      — Cartes de couleurs (palette, dictionnaire)
   12. TABLEAUX                — Tableaux de données style Excel
   13. BARRE D'ÉTAT            — Pied de page informatif
   14. SCORES / BADGES WCAG    — Affichage des scores et conformité
   15. TOASTS / NOTIFICATIONS  — Messages temporaires
   16. CATÉGORIES              — Cartes de catégories
   17. CONTRASTE               — Prévisualisation de contraste
   18. CHAMPS / SECTIONS       — Mise en page des formulaires
   19. EASTER EGGS             — Messages surprises
   20. DÉGRADÉS                — Aperçu des dégradés CSS
   21. UTILITAIRES             — Classes helper (hidden, flex, etc.)
   22. SCROLLBAR               — Personnalisation de la barre de défilement
   23. SPINNER                 — Indicateur de chargement
   24. RESPONSIVE              — Tablette, mobile, paysage, impression
   25. SÉLECTEUR DE COULEURS   — Roue chromatique, sliders HSL/RGB
   26. ACHIEVEMENTS            — Système de succès / badges
   27. STATISTIQUES            — Cartes de stats
   28. DALTONISME              — Module d'accessibilité visuelle
   29. DÉGRADÉS V14            — Générateur de dégradés avancé
   30. CONTRASTE V14           — Analyseur de contraste enrichi
   
   Auteur : Émile SNYERS
   Version : 14.0
   Licence : © Tous droits réservés 
  // 🌍 Vous êtes autorisé à utiliser ce code, modifié ou non modifié, gratuitement et sans demande préalable, sous les conditions suivantes :  
  //  
  // 🇫🇷 Français :  
  // - Pour les entreprises ou associations opérant dans le secteur du nucléaire, l'utilisation est libre et sans aucune restriction.  
  // - Pour les entreprises ou associations exerçant en dehors du secteur du nucléaire, l'utilisation est permise uniquement dans un cadre non lucratif.  
  //  
  // 🇬🇧 English:  
  // - You are allowed to use this code, modified or unmodified, for free and without prior request, under the following conditions:  
  // - For companies or organizations operating in the nuclear sector, usage is free and without any restrictions.  
  // - For companies or organizations outside the nuclear sector, usage is allowed only in a non-profit context.  
  //  
  // 🇪🇸 Español:  
  // - Se le permite utilizar este código, modificado o no modificado, de forma gratuita y sin solicitud previa, bajo las siguientes condiciones:  
  // - Para empresas u organizaciones que operan en el sector nuclear, el uso es libre y sin restricciones.  
  // - Para empresas u organizaciones fuera del sector nuclear, el uso está permitido solo en un contexto sin fines de lucro.  
  //  
  // 🇩🇪 Deutsch:  
  // - Sie dürfen diesen Code, verändert oder unverändert, kostenlos und ohne vorherige Anfrage unter den folgenden Bedingungen verwenden:  
  // - Für Unternehmen oder Organisationen im Nuklearsektor ist die Nutzung kostenlos und uneingeschränkt.  
  // - Für Unternehmen oder Organisationen außerhalb des Nuklearsektors ist die Nutzung nur im gemeinnützigen Rahmen erlaubt.  
  //  
  // 🇮🇹 Italiano:  
  // - È consentito utilizzare questo codice, modificato o non modificato, gratuitamente e senza previa richiesta, alle seguenti condizioni:  
  // - Per le aziende o associazioni che operano nel settore nucleare, l'uso è gratuito e senza restrizioni.  
  // - Per le aziende o associazioni al di fuori del settore nucleare, l'uso è consentito solo in un contesto non profit.  
  //  
  // 🇷🇺 Русский:  
  // - Вам разрешено использовать этот код, измененный или неизмененный, бесплатно и без предварительного запроса на следующих условиях:  
  // - Для компаний или организаций, работающих в ядерной отрасли, использование бесплатно и без ограничений.  
  // - Для компаний или организаций за пределами ядерной отрасли использование разрешено только в некоммерческом контексте.  
  //  
  // 🇨🇳 中文:  
  // - 您可以在以下条件下免费使用此代码，无论是否经过修改，无需事先请求：  
  // - 对于在核能领域运营的企业或组织，可免费且无限制地使用。  
  // - 对于非核能领域的企业或组织，仅允许在非营利背景下使用。  
  //  
  // 🇯🇵 日本語:  
  // - 本コードを修正済みまたは未修正の状態で、以下の条件に基づき、事前の要請なしに無料で使用することが許可されています：  
  // - 原子力分野で活動する企業や団体は、自由かつ無制限に使用できます。  
  // - 原子力分野以外の企業や団体は、非営利目的の場合のみ使用が許可されます。  
  //  
  // 🇰🇷 한국어:  
  // - 이 코드를 수정하거나 수정하지 않은 상태로 다음 조건에 따라 사전 요청 없이 무료로 사용할 수 있습니다:  
  // - 핵 분야에서 활동하는 기업이나 단체는 무료로 제한 없이 사용할 수 있습니다.  
  // - 핵 분야 이외의 기업이나 단체는 비영리 목적으로만 사용이 허용됩니다.  
  //  
  // 🇧🇷 Português:  
  // - Você está autorizado a usar este código, modificado ou não modificado, gratuitamente e sem solicitação prévia, sob as seguintes condições:  
  // - Para empresas ou organizações que operam no setor nuclear, o uso é gratuito e sem restrições.  
  // - Para empresas ou organizações fora do setor nuclear, o uso é permitido apenas em um contexto sem fins lucrativos.  
  //  
  // 🇦🇪 العربية:  
  // - يُسمح لك باستخدام هذا الرمز، سواء كان معدلاً أو غير معدل، مجانًا وبدون طلب مسبق، بموجب الشروط التالية:  
  // - يُسمح للشركات أو الجمعيات العاملة في قطاع الطاقة النووية بالاستخدام مجانًا وبدون أي قيود.  
  // - يُسمح للشركات أو الجمعيات خارج قطاع الطاقة النووية بالاستخدام فقط في إطار غير        
============================================================================ */

/* ==================== RESET ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==================== VARIABLES PROFESSIONNELLES - THÈMES MULTIPLES ==================== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --bg-hover: #dee2e6;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --border: #ced4da;
  --border-dark: #adb5bd;
  --accent: #0d6efd;
  --accent-hover: #0b5ed7;
  --accent-light: #cfe2ff;
  --success: #198754;
  --warning: #fd7e14;
  --danger: #dc3545;
  --info: #0dcaf0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] {
  --bg-primary: #1a1d20;
  --bg-secondary: #25292e;
  --bg-tertiary: #343a40;
  --bg-hover: #495057;
  --text-primary: #f8f9fa;
  --text-secondary: #dee2e6;
  --text-muted: #adb5bd;
  --border: #495057;
  --border-dark: #6c757d;
  --accent: #0d6efd;
  --accent-light: #084298;
}

[data-theme="forest"] {
  --bg-primary: #f0f4f0;
  --bg-secondary: #d4e4d4;
  --bg-tertiary: #b8d4b8;
  --bg-hover: #9cc49c;
  --text-primary: #1a3a1a;
  --text-secondary: #2d5a2d;
  --text-muted: #4a7a4a;
  --border: #8ab48a;
  --border-dark: #6a946a;
  --accent: #2d7a2d;
  --accent-hover: #1a5a1a;
  --accent-light: #c4e4c4;
}

[data-theme="ocean"] {
  --bg-primary: #e8f4f8;
  --bg-secondary: #d0e8f0;
  --bg-tertiary: #b8dce8;
  --bg-hover: #a0d0e0;
  --text-primary: #0a2a3a;
  --text-secondary: #1a4a5a;
  --text-muted: #2a6a7a;
  --border: #6ab4d4;
  --border-dark: #4a94b4;
  --accent: #0077be;
  --accent-hover: #005a9e;
  --accent-light: #c0e0f0;
}

[data-theme="sunset"] {
  --bg-primary: #fff5e8;
  --bg-secondary: #ffe8d0;
  --bg-tertiary: #ffd8b8;
  --bg-hover: #ffc8a0;
  --text-primary: #3a1a0a;
  --text-secondary: #5a2a1a;
  --text-muted: #7a4a2a;
  --border: #d49a6a;
  --border-dark: #b47a4a;
  --accent: #ff6b35;
  --accent-hover: #e55525;
  --accent-light: #ffe0d0;
}

[data-theme="nuclear"] {
  --bg-primary: #0a1a0a;
  --bg-secondary: #152815;
  --bg-tertiary: #1f3a1f;
  --bg-hover: #2a4a2a;
  --text-primary: #d0ff00;
  --text-secondary: #a0d000;
  --text-muted: #70a000;
  --border: #3a5a3a;
  --border-dark: #4a7a4a;
  --accent: #00ff41;
  --accent-hover: #00d035;
  --accent-light: #1a3a1a;
  --success: #00ff41;
  --warning: #ffff00;
  --danger: #ff0000;
  --shadow-sm: 0 1px 3px rgba(0, 255, 65, 0.3);
  --shadow-md: 0 2px 6px rgba(0, 255, 65, 0.4);
  --shadow-lg: 0 4px 12px rgba(0, 255, 65, 0.5);
}

[data-theme="purple"] {
  --bg-primary: #f5f0ff;
  --bg-secondary: #e8d8ff;
  --bg-tertiary: #d8c0ff;
  --bg-hover: #c8a8ff;
  --text-primary: #2a0a3a;
  --text-secondary: #4a1a5a;
  --text-muted: #6a2a7a;
  --border: #9a6ad4;
  --border-dark: #7a4ab4;
  --accent: #7c3aed;
  --accent-hover: #6c2acd;
  --accent-light: #e0d0f0;
}

/* ==================== TAILLES PERSONNALISABLES ==================== */
[data-size="small"] { font-size: 9pt; }
[data-size="medium"] { font-size: 11pt; }
[data-size="large"] { font-size: 13pt; }
[data-size="xlarge"] { font-size: 15pt; }

/* ==================== BASE ==================== */
body {
  font-family: 'Segoe UI', 'Calibri', Arial, sans-serif;
  font-size: 11pt;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-secondary);
  overflow: hidden;
  transition: all 0.3s ease;
}

/* ==================== LAYOUT PRINCIPAL ==================== */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ==================== RIBBON (BARRE SUPÉRIEURE) ==================== */
.ribbon {
  background: var(--bg-primary);
  border-bottom: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.ribbon-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
  border-bottom: 1px solid var(--border);
}

.ribbon-title {
  font-size: 12pt;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ribbon-user {
  font-size: 10pt;
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ribbon-user::before {
  content: '👤';
  font-size: 14pt;
}

.ribbon-tabs {
  display: flex;
  background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-tertiary));
  border-bottom: 1px solid var(--border);
  padding: 0 8px;
}

.ribbon-tab {
  background: transparent;
  border: none;
  padding: 8px 20px;
  font-size: 10pt;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  font-weight: 500;
}

.ribbon-tab:hover {
  background: rgba(13, 110, 253, 0.1);
  color: var(--accent);
}

.ribbon-tab.active {
  background: var(--bg-primary);
  border-bottom-color: var(--accent);
  font-weight: 600;
  color: var(--accent);
}

.ribbon-commands {
  display: flex;
  gap: 6px;
  padding: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--bg-primary);
}

.ribbon-group {
  display: flex;
  gap: 6px;
  padding: 0 12px;
  border-right: 2px solid var(--border);
  align-items: center;
}

.ribbon-group:last-child {
  border-right: none;
}

.ribbon-group-label {
  font-size: 8pt;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 8px;
  font-weight: 600;
}

/* ==================== BOUTONS STYLE OFFICE AMÉLIORÉS ==================== */
button, .btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 14px;
  font-size: 10pt;
  font-family: inherit;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

button:hover, .btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button:active, .btn:active {
  background: var(--bg-hover);
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

button:focus, .btn:focus {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

button.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

button.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

button.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

button.btn-small {
  padding: 4px 10px;
  font-size: 9pt;
}

/* ==================== INPUTS STYLE OFFICE ==================== */
input, select, textarea {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 10pt;
  font-family: inherit;
  border-radius: 3px;
  transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

label {
  font-size: 9pt;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

/* ==================== LAYOUT CORPS ==================== */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  width: 220px;
  background: var(--bg-primary);
  border-right: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-left: 4px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
  background: transparent;
  border-right: none;
  border-top: none;
  border-bottom: none;
  text-align: left;
  width: 100%;
  font-size: 10pt;
  font-weight: 500;
}

.sidebar-item:hover {
  background: var(--bg-secondary);
  border-left-color: var(--accent-light);
}

.sidebar-item.active {
  background: var(--accent-light);
  border-left-color: var(--accent);
  font-weight: 600;
  color: var(--accent);
}

.sidebar-icon {
  font-size: 16pt;
  width: 24px;
  text-align: center;
}

/* ==================== WORKSPACE ==================== */
.workspace {
  flex: 1;
  background: var(--bg-secondary);
  overflow-y: auto;
  padding: 20px;
}

/* ==================== PANNEAU PROPRIÉTÉS ==================== */
.properties-panel {
  width: 320px;
  background: var(--bg-primary);
  border-left: 2px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.properties-section {
  padding: 16px;
  border-bottom: 2px solid var(--border);
}

.properties-section h3 {
  font-size: 10pt;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.property-row {
  margin-bottom: 12px;
}

.property-row:last-child {
  margin-bottom: 0;
}

/* ==================== GRILLE DE COULEURS AMÉLIORÉE ==================== */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.color-cell {
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  animation: fadeInUp 0.4s ease;
}

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

.color-cell:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.color-cell.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.color-cell.locked {
  border-color: var(--warning);
  box-shadow: 0 0 0 3px rgba(253, 126, 20, 0.2);
}

.color-preview {
  height: 100px;
  width: 100%;
  position: relative;
}

.color-preview::after {
  content: '📋';
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12pt;
  opacity: 0;
  transition: opacity 0.2s;
}

.color-cell:hover .color-preview::after {
  opacity: 1;
}

.color-info {
  padding: 10px;
  font-size: 9pt;
  line-height: 1.4;
  background: var(--bg-primary);
}

.color-hex {
  font-weight: 700;
  font-family: 'Consolas', 'Courier New', monospace;
  margin-bottom: 6px;
  font-size: 10pt;
  color: var(--accent);
}

.color-values {
  color: var(--text-secondary);
  font-size: 8pt;
  font-family: 'Consolas', 'Courier New', monospace;
  line-height: 1.5;
}

.color-actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

/* ==================== TABLEAU STYLE EXCEL ==================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid var(--border);
  background: var(--bg-primary);
  font-size: 10pt;
  box-shadow: var(--shadow-md);
  border-radius: 6px;
  overflow: hidden;
}

.data-table th {
  background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-tertiary));
  padding: 10px;
  text-align: left;
  font-weight: 700;
  border: 1px solid var(--border);
  font-size: 9pt;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.data-table td {
  padding: 10px;
  border: 1px solid var(--border);
}

.data-table tbody tr:nth-child(even) {
  background: var(--bg-secondary);
}

.data-table tbody tr:hover {
  background: var(--accent-light);
}

/* ==================== BARRE D'ÉTAT ==================== */
.status-bar {
  background: var(--bg-primary);
  border-top: 2px solid var(--border);
  padding: 6px 16px;
  display: flex;
  gap: 24px;
  font-size: 9pt;
  color: var(--text-secondary);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-item strong {
  color: var(--accent);
  font-weight: 600;
}

.status-link {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.status-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* ==================== SCORES AMÉLIORÉS ==================== */
.score-display {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.score-item {
  flex: 1;
  text-align: center;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  transition: all 0.3s;
}

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

.score-label {
  font-size: 8pt;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.score-value {
  font-size: 20pt;
  font-weight: 700;
  color: var(--accent);
}

/* ==================== BADGES WCAG ==================== */
.wcag-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 10px;
  font-size: 8pt;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* ==================== TOAST AMÉLIORÉ ==================== */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  padding: 14px 18px;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  font-size: 10pt;
  z-index: 1000;
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  color: var(--accent);
  max-width: 350px;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast.toast-success {
  border-color: var(--success);
  color: var(--success);
}

.toast.toast-warning {
  border-color: var(--warning);
  color: var(--warning);
}

.toast.toast-info {
  border-color: var(--info);
  color: var(--info);
}

/* ==================== CATEGORY CARD ==================== */
.category-card {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
}

.category-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.category-name {
  font-weight: 700;
  font-size: 11pt;
  color: var(--text-primary);
}

.category-color-preview {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.category-color-preview:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

/* ==================== CONTRAST PREVIEW AMÉLIORÉ ==================== */
.contrast-preview-box {
  padding: 30px;
  border: 2px solid var(--border);
  margin-bottom: 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.contrast-example {
  margin-bottom: 20px;
  padding: 20px;
  border-radius: 6px;
  animation: fadeIn 0.5s ease;
}

.contrast-example h1 {
  font-size: 32pt;
  margin-bottom: 10px;
  font-weight: 700;
}

.contrast-example h2 {
  font-size: 24pt;
  margin-bottom: 10px;
  font-weight: 600;
}

.contrast-example h3 {
  font-size: 18pt;
  margin-bottom: 10px;
  font-weight: 600;
}

.contrast-example p {
  font-size: 12pt;
  line-height: 1.8;
  margin-bottom: 10px;
}

.contrast-example .small-text {
  font-size: 9pt;
}

.contrast-example .button-demo {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  margin-right: 10px;
  margin-top: 10px;
  transition: all 0.2s;
}

.contrast-example .button-demo:hover {
  transform: scale(1.05);
}

.contrast-example .link-demo {
  text-decoration: underline;
  cursor: pointer;
}

/* ==================== FIELD GROUP ==================== */
.field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
}

/* ==================== SECTION HEADERS ==================== */
.section-header {
  font-size: 14pt;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--accent);
  animation: fadeIn 0.5s ease;
}

/* ==================== EASTER EGG AMÉLIORÉ ==================== */
.easter-egg {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 10pt;
  z-index: 999;
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 350px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes bounceIn {
  0% { 
    transform: scale(0) translateY(100px);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) translateY(-10px);
  }
  100% { 
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* ==================== GRADIENT PREVIEW ==================== */
.gradient-preview {
  height: 120px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.3s;
}

.gradient-preview:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* ==================== UTILITIES ==================== */
.hidden { display: none !important; }
.w-full { width: 100%; }
.mt-1 { margin-top: 8px; }
.mb-1 { margin-bottom: 8px; }
.flex { display: flex; }
.gap-1 { gap: 8px; }
.items-center { align-items: center; }

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-dark);
  border: 3px solid var(--bg-secondary);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==================== LOADING SPINNER ==================== */
.spinner {
  border: 3px solid var(--bg-tertiary);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* ============================================================================
   STYLES RESPONSIVE POUR MOBILE
   Adaptations pour téléphones et tablettes
============================================================================ */

/* ==================== TABLETTES (max 1024px) ==================== */
@media screen and (max-width: 1024px) {
  /* Réduire les marges globales */
  .app-container {
font-size: 10pt;
  }
  
  /* Panneau de propriétés masqué par défaut */
  .properties-panel {
width: 0;
min-width: 0;
opacity: 0;
pointer-events: none;
  }
  
  /* Workspace prend toute la largeur */
  .main-layout {
grid-template-columns: auto 1fr;
  }
}

/* ==================== MOBILE (max 768px) ==================== */
@media screen and (max-width: 768px) {
  
  /* --- TYPOGRAPHIE MOBILE --- */
  body {
font-size: 10pt;
  }
  
  h1 { font-size: 18pt; }
  h2 { font-size: 16pt; }
  h3 { font-size: 14pt; }
  
  /* --- RIBBON (BARRE SUPÉRIEURE) --- */
  .ribbon-header {
padding: 6px 12px;
flex-wrap: wrap;
  }
  
  .ribbon-title {
font-size: 11pt;
  }
  
  .ribbon-user {
font-size: 9pt;
  }
  
  /* Tabs du ribbon en scroll horizontal */
  .ribbon-tabs {
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
scrollbar-width: thin;
  }
  
  .ribbon-tab {
font-size: 9pt;
padding: 6px 12px;
flex-shrink: 0;
  }
  
  /* Commandes du ribbon empilées */
  .ribbon-commands {
padding: 8px;
  }
  
  /* --- SIDEBAR COLLAPSIBLE --- */
  .sidebar {
position: fixed;
left: -250px;
top: 0;
height: 100vh;
width: 250px;
z-index: 1000;
transition: left 0.3s ease;
box-shadow: var(--shadow-lg);
  }
  
  .sidebar.open {
left: 0;
  }
  
  /* Bouton menu hamburger */
  .mobile-menu-btn {
position: fixed;
bottom: 80px;
left: 12px;
width: 50px;
height: 50px;
background: var(--accent);
color: white;
border: none;
border-radius: 50%;
font-size: 20pt;
box-shadow: var(--shadow-lg);
z-index: 999;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
  }
  
  /* Overlay pour fermer la sidebar */
  .sidebar-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
display: none;
  }
  
  .sidebar-overlay.visible {
display: block;
  }
  
  .sidebar-item {
padding: 12px 16px;
font-size: 10pt;
  }
  
  .sidebar-icon {
font-size: 16pt;
  }
  
  /* --- LAYOUT PRINCIPAL --- */
  .main-layout {
grid-template-columns: 1fr;
padding-left: 0;
  }
  
  .workspace {
padding: 12px;
margin-left: 0;
  }
  
  /* --- GRILLE DE COULEURS --- */
  .color-grid {
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
gap: 12px;
  }
  
  .color-box {
min-height: 100px;
  }
  
  /* --- BOUTONS TACTILES --- */
  button, .btn, .ribbon-tab, .sidebar-item {
min-height: 44px; /* Taille minimale recommandée pour le tactile */
min-width: 44px;
touch-action: manipulation;
  }
  
  .color-actions button {
width: 36px;
height: 36px;
font-size: 14pt;
  }
  
  /* --- FORMULAIRES --- */
  input[type="text"],
  input[type="number"],
  input[type="color"],
  select,
  textarea {
font-size: 16px; /* Évite le zoom automatique sur iOS */
padding: 12px;
min-height: 44px;
  }
  
  input[type="color"] {
width: 60px;
height: 60px;
border-radius: 8px;
  }
  
  /* --- BARRE D'ÉTAT --- */
  .status-bar {
flex-wrap: wrap;
padding: 8px;
font-size: 8pt;
gap: 8px;
  }
  
  .status-item {
padding: 4px 8px;
min-width: auto;
  }
  
  /* --- MODALES ET POPUPS --- */
  .modal {
padding: 12px;
  }
  
  .modal-content {
width: 95%;
max-width: 95%;
margin: 20px auto;
padding: 16px;
  }
  
  /* --- TOASTS --- */
  .toast {
left: 12px;
right: 12px;
bottom: 80px;
max-width: calc(100% - 24px);
font-size: 9pt;
  }
  
  /* --- TABLEAUX RESPONSIVE --- */
  table {
display: block;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
  }
  
  /* --- EASTER EGGS --- */
  .easter-egg {
left: 12px;
right: 12px;
bottom: 80px;
max-width: calc(100% - 24px);
  }
  
  /* --- SECTIONS --- */
  .section-header {
font-size: 12pt;
padding-bottom: 6px;
  }
  
  /* --- CARTES --- */
  .category-card,
  .gradient-preview {
margin-bottom: 12px;
  }
}

/* ==================== PETITS MOBILES (max 480px) ==================== */
@media screen and (max-width: 480px) {
  
  /* Encore plus compact */
  body {
font-size: 9pt;
  }
  
  .ribbon-title {
font-size: 10pt;
  }
  
  .ribbon-tab {
font-size: 8pt;
padding: 6px 10px;
  }
  
  /* Grille de couleurs en 2 colonnes max */
  .color-grid {
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
gap: 8px;
  }
  
  .color-box {
min-height: 80px;
  }
  
  /* Texte des couleurs plus petit */
  .color-info {
font-size: 8pt;
  }
  
  .color-hex {
font-size: 9pt;
  }
  
  /* Workspace plus compact */
  .workspace {
padding: 8px;
  }
  
  /* Boutons plus compacts */
  .btn {
padding: 8px 12px;
font-size: 9pt;
  }
  
  /* Modal plein écran */
  .modal-content {
width: 100%;
height: 100%;
margin: 0;
border-radius: 0;
  }
}

/* ==================== MODE PAYSAGE MOBILE ==================== */
@media screen and (max-width: 768px) and (orientation: landscape) {
  
  /* Réduire la hauteur du ribbon */
  .ribbon-header {
padding: 4px 8px;
  }
  
  .ribbon-tabs {
padding: 2px 8px;
  }
  
  .ribbon-tab {
padding: 4px 10px;
  }
  
  /* Status bar plus compact */
  .status-bar {
padding: 4px 8px;
  }
  
  /* Utiliser tout l'espace vertical */
  .workspace {
padding: 8px;
  }
}

/* ==================== AMÉLIORATIONS TACTILES ==================== */

/* Feedback visuel au toucher */
@media (hover: none) and (pointer: coarse) {
  
  button:active,
  .btn:active,
  .ribbon-tab:active,
  .sidebar-item:active {
transform: scale(0.95);
transition: transform 0.1s;
  }
  
  .color-box:active {
transform: scale(0.98);
  }
  
  /* Désactiver les effets hover qui ne marchent pas bien sur tactile */
  *:hover {
transition: none;
  }
}

/* ==================== ACCESSIBILITÉ MOBILE ==================== */

/* Améliorer la lisibilité */
@media screen and (max-width: 768px) {
  
  /* Contraste amélioré pour petits écrans */
  .text-muted {
color: var(--text-secondary);
  }
  
  /* Espacement augmenté pour faciliter la lecture */
  p, li {
line-height: 1.6;
margin-bottom: 12px;
  }
  
  /* Zones de clic plus grandes */
  a, button, .clickable {
padding: 8px;
  }
}

/* ==================== SCROLLBAR MOBILE ==================== */
@media screen and (max-width: 768px) {
  
  /* Scrollbar plus fine sur mobile */
  ::-webkit-scrollbar {
width: 8px;
height: 8px;
  }
  
  ::-webkit-scrollbar-track {
background: transparent;
  }
  
  ::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 4px;
border: 2px solid transparent;
  }
}

/* ==================== PRINT (BONUS) ==================== */
@media print {
  
  /* Masquer les éléments non essentiels lors de l'impression */
  .ribbon,
  .sidebar,
  .status-bar,
  .mobile-menu-btn,
  .toast,
  .easter-egg,
  button {
display: none !important;
  }
  
  .workspace {
margin: 0;
padding: 0;
  }
  
  .color-grid {
grid-template-columns: repeat(4, 1fr) !important;
  }
}

/* ==================== SÉLECTEUR DE COULEURS VISUEL ==================== */
.color-picker-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.color-wheel-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: var(--bg-primary);
  padding: 24px;
  border-radius: 12px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md);
}

.color-wheel {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  position: relative;
  cursor: crosshair;
  box-shadow: var(--shadow-lg);
  background: conic-gradient(
hsl(0, 100%, 50%),
hsl(30, 100%, 50%),
hsl(60, 100%, 50%),
hsl(90, 100%, 50%),
hsl(120, 100%, 50%),
hsl(150, 100%, 50%),
hsl(180, 100%, 50%),
hsl(210, 100%, 50%),
hsl(240, 100%, 50%),
hsl(270, 100%, 50%),
hsl(300, 100%, 50%),
hsl(330, 100%, 50%),
hsl(360, 100%, 50%)
  );
}

.color-wheel::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(
circle,
white 0%,
transparent 70%
  );
}

.color-wheel::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
circle,
transparent 0%,
transparent 30%,
black 100%
  );
}

.color-wheel-picker {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3), var(--shadow-md);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}

.color-preview-large {
  width: 100%;
  height: 100px;
  border-radius: 8px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18pt;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: white;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
}

.sliders-container {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md);
}

.slider-group {
  margin-bottom: 20px;
}

.slider-group:last-child {
  margin-bottom: 0;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

.slider-value {
  font-family: 'Courier New', monospace;
  color: var(--accent);
  font-size: 11pt;
}

.color-slider {
  width: 100%;
  height: 12px;
  border-radius: 6px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.color-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
}

.color-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.color-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--accent);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s;
}

.color-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* Sliders avec dégradés de couleurs */
.slider-hue {
  background: linear-gradient(to right, 
hsl(0, 100%, 50%),
hsl(60, 100%, 50%),
hsl(120, 100%, 50%),
hsl(180, 100%, 50%),
hsl(240, 100%, 50%),
hsl(300, 100%, 50%),
hsl(360, 100%, 50%)
  );
}

.slider-saturation {
  background: linear-gradient(to right, 
hsl(0, 0%, 50%),
hsl(0, 100%, 50%)
  );
}

.slider-lightness {
  background: linear-gradient(to right, 
hsl(0, 0%, 0%),
hsl(0, 0%, 50%),
hsl(0, 0%, 100%)
  );
}

.slider-red {
  background: linear-gradient(to right, 
rgb(0, 128, 128),
rgb(255, 128, 128)
  );
}

.slider-green {
  background: linear-gradient(to right, 
rgb(128, 0, 128),
rgb(128, 255, 128)
  );
}

.slider-blue {
  background: linear-gradient(to right, 
rgb(128, 128, 0),
rgb(128, 128, 255)
  );
}

.color-actions-picker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.preset-colors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.preset-color {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.preset-color:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.preset-color:active {
  transform: scale(0.95);
}

/* ==================== ACHIEVEMENTS / SUCCÈS ==================== */
.achievements-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.achievement-card {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.achievement-card.unlocked {
  border-color: var(--success);
  background: linear-gradient(135deg, var(--bg-primary), var(--accent-light));
}

.achievement-card.locked {
  opacity: 0.6;
  filter: grayscale(0.5);
}

.achievement-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.achievement-icon {
  font-size: 48pt;
  text-align: center;
  margin-bottom: 12px;
}

.achievement-card.locked .achievement-icon {
  filter: grayscale(1);
  opacity: 0.4;
}

.achievement-title {
  font-size: 12pt;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.achievement-description {
  font-size: 9pt;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}

.achievement-progress {
  margin-top: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
}

.achievement-progress-bar {
  height: 100%;
  background: var(--success);
  transition: width 0.5s ease;
  border-radius: 8px;
}

.achievement-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16pt;
  background: var(--success);
  color: white;
  box-shadow: var(--shadow-md);
}

.achievement-card.locked .achievement-badge {
  background: var(--text-muted);
  opacity: 0.3;
}

/* Responsive pour sélecteur de couleurs */
@media screen and (max-width: 768px) {
  .color-wheel {
width: 220px;
height: 220px;
  }
  
  .color-preview-large {
height: 80px;
font-size: 14pt;
  }
  
  .sliders-container {
padding: 16px;
  }
  
  .achievements-container {
grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 480px) {
  .color-wheel {
width: 180px;
height: 180px;
  }
  
  .preset-colors {
grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
gap: 6px;
  }
}

/* ==================== STAT CARDS (pour statistiques) ==================== */
.stat-card {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.stat-icon {
  font-size: 40pt;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 32pt;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 10pt;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media screen and (max-width: 768px) {
  .stat-card {
padding: 16px;
  }
  
  .stat-icon {
font-size: 32pt;
  }
  
  .stat-value {
font-size: 24pt;
  }
  
  .stat-label {
font-size: 9pt;
  }
}

/* ==================== SECTION DALTONISME / ACCESSIBILITÉ ==================== */

.colorblind-section {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.colorblind-info-box {
  background: linear-gradient(135deg, var(--accent-light), var(--bg-primary));
  border-left: 4px solid var(--accent);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.colorblind-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.colorblind-type-card {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.3s;
}

.colorblind-type-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.colorblind-type-title {
  font-weight: 700;
  font-size: 11pt;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.colorblind-type-stats {
  font-size: 9pt;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.colorblind-type-desc {
  font-size: 9pt;
  line-height: 1.6;
  color: var(--text-secondary);
}

.safe-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.safe-color-card {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.safe-color-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.safe-color-preview {
  width: 100%;
  height: 80px;
  border-radius: 6px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

.safe-color-name {
  font-size: 9pt;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.safe-color-hex {
  font-size: 8pt;
  font-family: 'Courier New', monospace;
  color: var(--text-muted);
}

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

.simulator-view {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.simulator-label {
  font-weight: 700;
  font-size: 10pt;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-align: center;
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: 6px;
}

.simulator-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.simulator-color {
  aspect-ratio: 1;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.comparison-card {
  text-align: center;
}

.comparison-label {
  font-weight: 700;
  font-size: 10pt;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: 6px;
}

.comparison-colors {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.comparison-color {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.advice-list {
  list-style: none;
  padding: 0;
}

.advice-item {
  background: var(--bg-secondary);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 4px solid var(--accent);
  transition: all 0.2s;
}

.advice-item:hover {
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

.advice-icon {
  font-size: 20pt;
  margin-right: 12px;
  display: inline-block;
  vertical-align: middle;
}

.advice-content {
  display: inline-block;
  vertical-align: middle;
  width: calc(100% - 50px);
}

.advice-title {
  font-weight: 700;
  font-size: 11pt;
  color: var(--accent);
  margin-bottom: 4px;
}

.advice-description {
  font-size: 9pt;
  line-height: 1.6;
  color: var(--text-secondary);
}

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

.problematic-pair {
  background: var(--bg-primary);
  border: 2px solid var(--danger);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.problematic-pair-title {
  font-weight: 700;
  font-size: 10pt;
  color: var(--danger);
  margin-bottom: 12px;
}

.color-pair {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}

.color-pair-item {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  border: 2px solid var(--border);
}

.replacement-suggestion {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.replacement-label {
  font-size: 9pt;
  color: var(--success);
  font-weight: 600;
  margin-bottom: 8px;
}

.simulator-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  justify-content: center;
}

.simulator-btn {
  padding: 10px 20px;
  border: 2px solid var(--border);
  background: var(--bg-primary);
  border-radius: 8px;
  font-size: 10pt;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.simulator-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.simulator-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Responsive pour daltonisme */
@media screen and (max-width: 768px) {
  .colorblind-types {
grid-template-columns: 1fr;
  }
  
  .simulator-container {
grid-template-columns: 1fr;
  }
  
  .comparison-grid {
grid-template-columns: 1fr;
  }
  
  .safe-palette-grid {
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .problematic-colors {
grid-template-columns: 1fr;
  }
  
  .simulator-palette {
grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .colorblind-section {
padding: 16px;
  }
  
  .safe-palette-grid {
grid-template-columns: repeat(2, 1fr);
gap: 8px;
  }
  
  .safe-color-preview {
height: 60px;
  }
  
  .simulator-palette {
grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================================
   V14.0 — ENHANCED GRADIENT GENERATOR STYLES
============================================================================ */

.gradient-main-preview {
  height: 200px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.gradient-main-preview:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.gradient-overlay-label {
  position: absolute;
  bottom: 12px;
  right: 16px;
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 9pt;
  opacity: 0;
  transition: opacity 0.3s;
}
.gradient-main-preview:hover .gradient-overlay-label {
  opacity: 1;
}

.gradient-controls-panel {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.gradient-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.gradient-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.gradient-section-title {
  font-size: 11pt;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gradient-type-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gradient-type-btn {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 10pt;
}
.gradient-type-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.gradient-type-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}
.gradient-type-icon {
  margin-right: 4px;
}

.gradient-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-tertiary), var(--accent));
  outline: none;
  margin-bottom: 12px;
}
.gradient-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.gradient-angle-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.gradient-angle-presets button {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14pt;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.gradient-angle-presets button:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.gradient-stop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.gradient-stop-color {
  width: 40px;
  height: 36px;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
}
.gradient-stop-hex {
  width: 90px;
  padding: 6px 8px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-family: monospace;
  font-size: 10pt;
  background: var(--bg-secondary);
  color: var(--text-primary);
}
.gradient-stop-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}
.gradient-stop-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 3px;
  background: var(--bg-tertiary);
  outline: none;
}
.gradient-stop-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.gradient-stop-val {
  font-size: 9pt;
  color: var(--text-muted);
  min-width: 30px;
  text-align: right;
}
.gradient-stop-remove {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  cursor: pointer;
  font-size: 12pt;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.gradient-stop-remove:hover {
  opacity: 0.8;
}

.gradient-add-stop-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 2px 10px;
  font-size: 9pt;
  cursor: pointer;
  margin-left: auto;
}

.gradient-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.gradient-action-btn {
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 10pt;
  text-align: center;
}
.gradient-action-btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.gradient-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.gradient-preset-card {
  height: 70px;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.gradient-preset-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}
.gradient-preset-name {
  font-size: 8pt;
  color: white;
  background: rgba(0,0,0,0.5);
  padding: 3px 8px;
  width: 100%;
  text-align: center;
}

.gradient-css-output {
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  font-family: monospace;
  font-size: 10pt;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.6;
  cursor: pointer;
}

/* ============================================================================
   V14.0 — ENHANCED CONTRAST ANALYZER STYLES
============================================================================ */

.contrast-ratio-display {
  text-align: center;
  padding: 16px 0 8px;
}
.contrast-ratio-number {
  font-size: 42pt;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}
.contrast-ratio-label {
  font-size: 12pt;
  font-weight: 600;
  margin-top: 4px;
}

/* Gauge */
.contrast-gauge-container {
  margin: 16px 0 24px;
}
.contrast-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 8pt;
  color: var(--text-muted);
  margin-bottom: 4px;
  padding: 0 2px;
}
.contrast-gauge-track {
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}
.contrast-gauge-zones {
  display: flex;
  height: 100%;
}
.contrast-gauge-zone {
  height: 100%;
}
.zone-fail { background: #dc3545; }
.zone-aa-large { background: #fd7e14; }
.zone-aa { background: #ffc107; }
.zone-aaa { background: #198754; }

.contrast-gauge-marker {
  position: absolute;
  top: -4px;
  transform: translateX(-50%);
  z-index: 2;
}
.contrast-gauge-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* WCAG Result Cards */
.wcag-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.wcag-result-card {
  padding: 16px;
  border-radius: 8px;
  border: 2px solid;
  text-align: center;
  transition: transform 0.2s;
}
.wcag-result-card:hover {
  transform: translateY(-2px);
}
.wcag-result-card.pass {
  border-color: #198754;
  background: rgba(25, 135, 84, 0.08);
}
.wcag-result-card.fail {
  border-color: #dc3545;
  background: rgba(220, 53, 69, 0.08);
}
.wcag-result-icon {
  font-size: 28pt;
  margin-bottom: 6px;
}
.wcag-result-card.pass .wcag-result-icon { color: #198754; }
.wcag-result-card.fail .wcag-result-icon { color: #dc3545; }
.wcag-result-title {
  font-weight: 700;
  font-size: 10pt;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.wcag-result-detail {
  font-size: 8pt;
  color: var(--text-muted);
}

/* Global Score Circle */
.contrast-global-score {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.contrast-global-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contrast-global-inner {
  width: 60px;
  height: 60px;
  background: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16pt;
  font-weight: 800;
  color: var(--text-primary);
}
.contrast-global-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contrast-global-text strong {
  font-size: 11pt;
  color: var(--text-primary);
}
.contrast-global-text span {
  font-size: 9pt;
  color: var(--text-muted);
}

/* Radar Section */
.contrast-radar-section {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.contrast-radar-container {
  display: flex;
  justify-content: center;
  padding: 12px 0;
}

/* Section Titles */
.contrast-section-title {
  color: var(--accent);
  font-size: 11pt;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Text Preview Panels */
.contrast-preview-panel {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.contrast-preview-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(128,128,128,0.15);
}
.contrast-preview-row:last-child {
  border-bottom: none;
}
.contrast-size-label {
  font-size: 8pt;
  min-width: 48px;
  opacity: 0.6;
  font-family: monospace;
}

/* UI Elements Demo */
.contrast-ui-elements {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contrast-ui-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contrast-ui-label {
  font-size: 9pt;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}
.contrast-ui-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.contrast-demo-btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 10pt;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.contrast-demo-btn:hover {
  opacity: 0.85;
}
.contrast-demo-btn.outline {
  border: 2px solid;
  background: transparent !important;
}
.contrast-demo-btn.ghost {
  border: none;
  background: transparent !important;
  text-decoration: underline;
}
.contrast-demo-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 9pt;
  font-weight: 600;
}
.contrast-demo-badge.outline {
  background: transparent !important;
}

/* Responsive adjustments for v14 features */
@media screen and (max-width: 768px) {
  .gradient-main-preview {
    height: 150px;
  }
  .gradient-presets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gradient-actions-grid {
    grid-template-columns: 1fr;
  }
  .wcag-results-grid {
    grid-template-columns: 1fr;
  }
  .contrast-ratio-number {
    font-size: 28pt;
  }
  .contrast-global-score {
    flex-direction: column;
    text-align: center;
  }
  .gradient-stop-row {
    flex-wrap: wrap;
  }
  .gradient-stop-slider-wrap {
    width: 100%;
  }
}