/* ============================================
   Amigo Turf - Styles CSS
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   Header
   ============================================ */

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    text-align: center;
}

h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.nav-links {
    margin-top: 15px;
}

.nav-links a {
    color: #667eea;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* ============================================
   Stats Cards
   ============================================ */

.stats {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 150px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
    text-align: center;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* ============================================
   Controls
   ============================================ */

.controls {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.control-group {
    flex: 1;
    min-width: 200px;
}

label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

select:hover {
    border-color: #667eea;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ============================================
   Tirages Grid
   ============================================ */

.tirages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.tirage-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.tirage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.tirage-numero {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
}

.tirage-date {
    color: #999;
    font-size: 0.9em;
}

.numeros-section {
    margin-bottom: 15px;
}

.section-title {
    font-size: 0.85em;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.numeros-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.numero {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1em;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.numero-bleu {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.numero-jaune {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ============================================
   Upload Section (Analyzer Page)
   ============================================ */

.upload-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.upload-title {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.upload-subtitle {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
    position: relative;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f0ff;
}

.upload-area.dragover {
    border-color: #28a745;
    background: #e8f5e9;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.upload-text {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-hint {
    color: #999;
    font-size: 0.9em;
}

.upload-preview {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 68, 68, 0.9);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.05);
}

.separator {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.separator span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 20px;
    font-weight: 600;
    font-size: 1.1em;
    position: relative;
    z-index: 1;
}

.separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e0e0e0 20%, #e0e0e0 80%, transparent);
}

.extraction-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.extraction-success {
    border-left: 4px solid #28a745;
    background: #e8f5e9;
}

.extraction-error {
    border-left: 4px solid #dc3545;
    background: #ffe8e8;
}

.extraction-numbers {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.extracted-num {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

.confidence-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-top: 10px;
}

.confidence-high {
    background: #28a745;
    color: white;
}

.confidence-medium {
    background: #ffc107;
    color: #333;
}

.confidence-low {
    background: #dc3545;
    color: white;
}

#extractBtnLoading {
    display: inline-block;
}

#extractBtnLoading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ============================================
   Input Section (grille manuelle)
   ============================================ */

.input-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.input-title {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.number-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    background: white;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.number-btn:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

.number-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.selected-numbers {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.selected-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.selected-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.selected-num {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ============================================
   Buttons
   ============================================ */

.actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-refresh {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ============================================
   Results Section
   ============================================ */

.results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.result-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.result-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.best-match {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.match-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.match-numero {
    font-weight: 600;
    color: #333;
}

.match-date {
    color: #999;
    font-size: 0.9em;
}

.match-score {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    margin: 15px 0;
}

.numbers-comparison {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.comp-num {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.comp-num.match {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.comp-num.no-match {
    background: #e0e0e0;
    color: #999;
}

/* ============================================
   Stats Grid
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-item .stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.stat-item .stat-label {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

/* ============================================
   Frequency Table
   ============================================ */

.freq-table {
    width: 100%;
    border-collapse: collapse;
}

.freq-table th,
.freq-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.freq-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.freq-bar {
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

/* ============================================
   Tirages List (Results)
   ============================================ */

.tirages-list {
    max-height: 400px;
    overflow-y: auto;
}

.tirage-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid transparent;
}

.tirage-item.match-7 { border-left-color: #28a745; }
.tirage-item.match-6 { border-left-color: #17a2b8; }
.tirage-item.match-5 { border-left-color: #ffc107; }
.tirage-item.match-4 { border-left-color: #fd7e14; }
.tirage-item.match-3 { border-left-color: #dc3545; }

/* ============================================
   Suggestions Page
   ============================================ */

.refresh-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    text-align: center;
}

.grilles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.grille-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    border-top: 4px solid;
}

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

.grille-header {
    margin-bottom: 20px;
}

.grille-nom {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 5px;
}

.grille-description {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 5px;
}

.grille-strategie {
    color: #999;
    font-size: 0.85em;
    font-style: italic;
}

.numeros-display {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.numero-badge {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1em;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-analyze {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-copy {
    padding: 12px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-copy:hover {
    background: #e0e0e0;
}

.stats-panel {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.stats-title {
    font-size: 1.3em;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
}

.stats-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.category {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.category-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.category-numbers {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.small-badge {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
}

/* ============================================
   Loading & Error States
   ============================================ */

.loading {
    text-align: center;
    padding: 50px;
    color: white;
    font-size: 1.2em;
}

.error {
    background: #ff4444;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

.hidden {
    display: none;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
    }
    
    .tirages-grid,
    .grilles-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .results {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-categories {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   AJOUTS POUR LA NOUVELLE UX MOBILE FIRST
   À ajouter à la fin de ton style.css existant
   ============================================ */

/* ============================================
   SCAN SECTION (Mobile First)
   ============================================ */

   .scan-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.scan-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Boutons caméra (gros boutons tactiles) */
.camera-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.camera-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 25px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.camera-btn:active {
    transform: scale(0.95);
}

.camera-btn .icon {
    font-size: 2.5em;
}

.camera-btn .label {
    font-size: 0.9em;
}

/* Preview de l'image */
.image-preview {
    display: none;
    position: relative;
    margin-bottom: 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.image-preview.active {
    display: block;
}

.image-preview img {
    width: 100%;
    display: block;
}

.remove-image {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: rgba(220, 53, 69, 0.95);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Bouton d'extraction */
.extract-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.extract-btn:not(:disabled):active {
    transform: scale(0.98);
}

.extract-btn .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.extract-btn.loading .spinner {
    display: block;
}

.extract-btn.loading .text {
    display: none;
}

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

/* Résultat extraction */
.extraction-result {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    animation: slideIn 0.3s ease;
}

.extraction-result.active {
    display: block;
}

.extraction-result.success {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
}

.extraction-result.error {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.result-title {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

/* ============================================
   SECTION MANUELLE (Optimisée Mobile)
   ============================================ */

.manual-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.manual-title {
    font-size: 1.1em;
    font-weight: 700;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
}

/* Compteur avec numéros sélectionnés */
.selection-counter {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    color: white;
    text-align: center;
}

.counter-text {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 40px;
    align-items: center;
}

.selected-num {
    width: 35px;
    height: 35px;
    background: white;
    color: #f5576c;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Grille optimisée pour mobile - STYLE CERCLE COMME LES RÉSULTATS */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.number-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;  /* ← CERCLE comme les résultats */
    background: white;
    font-size: 1.2em;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.number-btn:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

.number-btn:active {
    transform: scale(0.95);
}

.number-btn.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Boutons d'action */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
}

.reset-btn {
    padding: 15px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

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

.analyze-btn {
    padding: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    transition: all 0.3s;
}

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

.analyze-btn:not(:disabled):active {
    transform: scale(0.98);
}

/* ============================================
   Responsive Mobile
   ============================================ */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .scan-section,
    .manual-section {
        padding: 20px;
    }
    
    .scan-title,
    .manual-title {
        font-size: 1.1em;
    }
    
    .camera-btn {
        padding: 20px 15px;
    }
    
    .camera-btn .icon {
        font-size: 2em;
    }
    
    .numbers-grid {
        gap: 8px;
    }
    
    .number-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }
}

@media (max-width: 400px) {
    .numbers-grid {
        gap: 6px;
    }
    
    .number-btn {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }
    
    .selected-num {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
    }
}

/* ============================================
   Animation pulse (pour auto-fill)
   ============================================ */

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
    }
}