/* ============================================
   HERO SECTION TAKUZU
   ============================================ */
.hero-takuzu {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    text-align: center;
}
  /* hide until it works*/
section.hero-takuzu {
    display: none;
}

.hero-takuzu h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hero-takuzu p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

.demo-game {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    margin: 0 auto 1.5rem;
    max-width: 400px;
}

.demo-placeholder {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-demo {
    background: white;
    color: #667eea;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-demo:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ============================================
   GRILLES DU JOUR (FEATURED)
   ============================================ */
.daily-takuzu {
    margin-bottom: 3rem;
    padding:3vw;
}

.daily-takuzu h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #2d3748;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.takuzu-card.featured {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.takuzu-card.featured .badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.takuzu-card.featured .btn-play {
    background: white;
    color: #f5576c;
}

/* ============================================
   FILTRES
   ============================================ */
.takuzu-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* ============================================
   GRID PRINCIPALE
   ============================================ */
.takuzu-grid {
    margin-bottom: 3rem;
}

.responsive-grid-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ============================================
   CARDS TAKUZU
   ============================================ */
.takuzu-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.takuzu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ============================================
   PREVIEW DE LA GRILLE
   ============================================ */
.card-preview {
    background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    position: relative;
}

.takuzu-preview {
    display: inline-block;
    background: white;
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-row {
    display: flex;
    gap: 2px;
}

.preview-cell {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.preview-cell.cell-zero {
    background: #3b82f6;
    color: white;
}

.preview-cell.cell-one {
    background: #ef4444;
    color: white;
}

.preview-cell.cell-empty {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
}

/* Ajuster taille pour grandes grilles */
.takuzu-preview[data-size="8"] .preview-cell,
.takuzu-preview[data-size="10"] .preview-cell {
    width: 20px;
    height: 20px;
    font-size: 12px;
}

/* ============================================
   CARD INFO
   ============================================ */
.card-info {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.difficulty-badge {
    background: #fef3c7;
    color: #92400e;
}

.size-badge {
    background: #dbeafe;
    color: #1e40af;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.card-title a:hover {
    color: #667eea;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.btn-play {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-play:hover {
    background: #5568d3;
    transform: scale(1.02);
}

.btn-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    min-width: 48px;
}

.btn-pdf:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

/* ============================================
   VARIATIONS PAR DIFFICULTÉ
   ============================================ */
.takuzu-card.difficulty-easy .card-preview {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.takuzu-card.difficulty-medium .card-preview {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.takuzu-card.difficulty-hard .card-preview {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
}

/* ============================================
   SEO CONTENT
   ============================================ */
.seo-content-wrapper {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.seo-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.seo-section summary {
    padding: 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.25rem;
    color: #2d3748;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seo-section summary:hover {
    background: #f7fafc;
}

.seo-section summary::marker {
    content: '? ';
}

.seo-section[open] summary::marker {
    content: 'c ';
}

.seo-content {
    padding: 0 1.25rem 1.25rem;
    line-height: 1.7;
    color: #4a5568;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero-takuzu {
        padding: 2rem 1rem;
    }
    
    .hero-takuzu h2 {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .responsive-grid-row {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .takuzu-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .card-preview {
        min-height: 140px;
        padding: 1rem;
    }
    
    .preview-cell {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .takuzu-preview[data-size="6"] .preview-cell {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    
    .card-info {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .btn-play {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

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

.takuzu-card {
    animation: fadeInUp 0.5s ease-out;
}

.takuzu-card:nth-child(1) { animation-delay: 0.05s; }
.takuzu-card:nth-child(2) { animation-delay: 0.1s; }
.takuzu-card:nth-child(3) { animation-delay: 0.15s; }
.takuzu-card:nth-child(4) { animation-delay: 0.2s; }

/* ============================================
   UTILITY: Cacher élément d'origine
   ============================================ */
/*.post-thumbnail.iconic {
    display: none !important;
}

.post-meta .post-date,
.post-byline {
    display: none !important;   
}*/ 
/* CSS Document */

/* ============================================
   ANIMATIONS ET TRANSITIONS POUR FILTRES
   ============================================ */

/* Animation de disparition */
.fade-out {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Animation d'apparition */
.fade-in {
    animation: fadeInUp 0.3s ease-out;
}

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

/* ============================================
   MESSAGE "AUCUN RÉSULTAT"
   ============================================ */

.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    display: none;
}

.no-results-content {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 3rem 2rem;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.no-results-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.no-results-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: #2d3748;
    font-weight: 700;
}

.no-results-content p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-reset-filter {
    background: #667eea;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-reset-filter:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-reset-filter:active {
    transform: translateY(0);
}

/* ============================================
   BADGES DE COMPTAGE (OPTIONNEL)
   ============================================ */

.filter-count {
    display: inline-block;
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    vertical-align: middle;
    min-width: 24px;
    text-align: center;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* ============================================
   LOADING DEMO GAME
   ============================================ */

.demo-loading {
    text-align: center;
    padding: 3rem 2rem;
    color: white;
}

.demo-loading p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

.demo-loading small {
    opacity: 0.7;
    font-size: 0.85rem;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   AMÉLIORATIONS DES FILTRES
   ============================================ */

.takuzu-filters {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Cacher la scrollbar sur desktop tout en gardant le scroll */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f7fafc;
}

.takuzu-filters::-webkit-scrollbar {
    height: 6px;
}

.takuzu-filters::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}

.takuzu-filters::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.takuzu-filters::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Effet de pulsation sur le bouton actif */
.filter-btn.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0);
    }
}

/* Désactiver l'animation pulse sur mobile */
@media (max-width: 768px) {
    .filter-btn.active {
        animation: none;
    }
}

/* ============================================
   TRANSITIONS FLUIDES POUR GRID
   ============================================ */

.responsive-grid-row {
    transition: all 0.3s ease;
}

.takuzu-card {
    will-change: opacity, transform;
    backface-visibility: hidden;
}

/* État de chargement initial */
.takuzu-card.loading {
    opacity: 0;
    transform: translateY(20px);
}

/* ============================================
   MICRO-INTERACTIONS
   ============================================ */

/* Feedback visuel au clic sur les filtres */
.filter-btn:active {
    transform: scale(0.95);
}

/* Effet de survol amélioré */
.filter-btn {
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn.active::before {
    background: rgba(255, 255, 255, 0.1);
}

/* ============================================
   INDICATEUR DE FILTRE ACTIF (MOBILE)
   ============================================ */

@media (max-width: 768px) {
    .takuzu-filters::after {
        content: 'Faites glisser pour plus de filtres ?';
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: #a0aec0;
        margin-top: 0.5rem;
        animation: fadeOut 3s forwards;
    }
    
    @keyframes fadeOut {
        0%, 80% { opacity: 1; }
        100% { opacity: 0; }
    }
    
    .takuzu-filters.scrolled::after {
        display: none;
    }
}
/* CORRECTION GRILLE FILTRAGE */
.takuzu-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 1.5rem !important;
}

.responsive-grid-row {
    display: contents !important;
}
/* ============================================
   ACCESSIBILITÉ
   ============================================ */

/* Focus visible pour navigation au clavier */
.filter-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.btn-reset-filter:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Mode sombre (si vous l'implémentez) */
@media (prefers-color-scheme: dark) {
    .no-results-content {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #4a5568;
    }
    
    .no-results-content h3 {
        color: #f7fafc;
    }
    
    .no-results-content p {
        color: #cbd5e1;
    }
}

/* ============================================
   PRINT STYLES (masquer filtres à l'impression)
   ============================================ */

@media print {
    .takuzu-filters,
    .hero-takuzu,
    .no-results-message {
        display: none !important;
    }
}

/* ============================================
   PERFORMANCES - UTILISER GPU ACCELERATION
   ============================================ */

.takuzu-card,
.filter-btn {
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   ÉTATS DE CHARGEMENT (SKELETON LOADING)
   ============================================ */

.takuzu-card.skeleton {
    pointer-events: none;
}

.takuzu-card.skeleton .card-preview,
.takuzu-card.skeleton .card-title,
.takuzu-card.skeleton .card-meta {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   INDICATEUR "NOUVEAU" (optionnel)
   ============================================ */

.takuzu-card.new::before {
    content: 'NOUVEAU';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f56565;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    z-index: 10;
    animation: wiggle 1s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}
