/**
 * Disney NFC Couples - Styles publics
 * Version: 2.0
 */

/* Variables globales */
:root {
    --dnfc-primary: #ff6b6b;
    --dnfc-secondary: #4ecdc4;
    --dnfc-accent: #ffe66d;
    --dnfc-dark: #2d3436;
    --dnfc-light: #f8f9fa;
    --dnfc-success: #00b894;
    --dnfc-error: #d63031;
    --dnfc-disney-blue: #1e3a8a;
    --dnfc-disney-pink: #ec4899;


.dnfc-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dnfc-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.dnfc-slide.active {
    opacity: 1;
}

.dnfc-slide img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.dnfc-slide-caption {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 40px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.dnfc-slide-caption h3 {
    font-size: 36px;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.dnfc-slide-caption p {
    font-size: 20px;
    font-style: italic;
    margin: 0;
    opacity: 0.9;
}

.dnfc-ecran-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-size: 48px;
    color: white;
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

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

/* ==========================================================================
   Interface admin frontend
   ========================================================================== */

.dnfc-frontend-admin {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.dnfc-frontend-admin h1 {
    color: var(--dnfc-disney-blue);
    margin-bottom: 30px;
}

.dnfc-frontend-admin .tablenav {
    margin-bottom: 20px;
}

.dnfc-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dnfc-filters select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}

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

@media (max-width: 768px) {
    .dnfc-scan-page {
        padding: 15px;
    }
    
    .dnfc-character-name {
        font-size: 28px;
    }
    
    .dnfc-character-image img {
        max-width: 250px;
    }
    
    .dnfc-upload-form {
        padding: 25px;
    }
    
    .dnfc-gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .dnfc-slide-caption h3 {
        font-size: 24px;
    }
    
    .dnfc-slide-caption {
        bottom: 30px;
        padding: 15px 25px;
    }
}

@media (max-width: 480px) {
    .dnfc-gallery {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    
    .dnfc-upload-form h3 {
        font-size: 24px;
    }
    
    .dnfc-submit-btn {
        font-size: 18px;
        padding: 12px 25px;
    }
}

/* ==========================================================================
   Animations et effets
   ========================================================================== */

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

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

.dnfc-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ==========================================================================
   États de chargement
   ========================================================================== */

.dnfc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

.dnfc-submit-btn.loading {
    position: relative;
    color: transparent;
}

.dnfc-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* ==========================================================================
   Lightbox pour galerie
   ========================================================================== */

.dnfc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dnfc-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.dnfc-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.dnfc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.dnfc-lightbox-close:hover {
    opacity: 0.7;
}

/* ==========================================================================
   Utilitaires
   ========================================================================== */

.dnfc-error {
    background: var(--dnfc-error);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
}

.dnfc-success {
    background: var(--dnfc-success);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
}

.dnfc-hidden {
    display: none !important;
}

.dnfc-text-center {
    text-align: center;
}

.dnfc-mt-20 {
    margin-top: 20px;
}

.dnfc-mb-20 {
    margin-bottom: 20px;
}

/* Masquer les métadonnées de page WordPress */
.dnfc-page .entry-meta,
.dnfc-page .entry-header time,
.dnfc-page .entry-header .author,
.dnfc-page .entry-header .posted-on,
.dnfc-page .entry-footer,
.dnfc-page .post-navigation,
.dnfc-page .comments-area {
    display: none !important;
}

/* Reset pour nos éléments */
.dnfc-scan-page *,
.dnfc-gallery *,
.dnfc-ecran-geant * {
    box-sizing: border-box;
}

/* ==========================================================================
   Page de scan NFC
   ========================================================================== */

.dnfc-scan-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.dnfc-intro {
    text-align: center;
    margin-bottom: 40px;
    font-size: 18px;
    color: var(--dnfc-dark);
    line-height: 1.6;
}

.dnfc-character-display {
    text-align: center;
    margin-bottom: 40px;
}

.dnfc-character-image {
    margin-bottom: 20px;
}

.dnfc-character-image img {
    max-width: 300px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: floatAnimation 3s ease-in-out infinite;
}

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

.dnfc-character-name {
    font-size: 36px;
    color: var(--dnfc-disney-blue);
    margin: 20px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.dnfc-partner-info {
    background: linear-gradient(135deg, var(--dnfc-accent) 0%, var(--dnfc-secondary) 100%);
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
}

.dnfc-mission {
    font-size: 20px;
    color: white;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.dnfc-partner-silhouette img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    filter: brightness(0) opacity(0.3);
    border: 5px solid white;
}

/* Formulaire d'upload */
.dnfc-upload-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.dnfc-upload-form h3 {
    text-align: center;
    color: var(--dnfc-disney-blue);
    margin-bottom: 30px;
    font-size: 28px;
}

.dnfc-form-group {
    margin-bottom: 25px;
}

.dnfc-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dnfc-dark);
    font-weight: 600;
}

.dnfc-form-group input[type="text"],
.dnfc-form-group input[type="email"],
.dnfc-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.dnfc-form-group input[type="text"]:focus,
.dnfc-form-group input[type="email"]:focus,
.dnfc-form-group textarea:focus {
    outline: none;
    border-color: var(--dnfc-disney-pink);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.dnfc-form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--dnfc-disney-pink);
    border-radius: 10px;
    background: var(--dnfc-light);
    cursor: pointer;
}

.dnfc-password-group {
    position: relative;
}

.dnfc-hint {
    background: var(--dnfc-accent);
    padding: 10px 15px;
    border-radius: 10px;
    margin-top: 10px;
    font-size: 14px;
    color: var(--dnfc-dark);
}

.dnfc-submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--dnfc-disney-pink) 0%, var(--dnfc-disney-blue) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dnfc-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.dnfc-submit-btn:active {
    transform: translateY(0);
}

#dnfc-upload-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
}

#dnfc-upload-result.success {
    background: var(--dnfc-success);
    color: white;
}

#dnfc-upload-result.error {
    background: var(--dnfc-error);
    color: white;
}

/* ==========================================================================
   Galerie publique
   ========================================================================== */

.dnfc-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.dnfc-gallery[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.dnfc-gallery[data-columns="4"] {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.dnfc-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dnfc-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dnfc-gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.dnfc-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.dnfc-gallery-item:hover .dnfc-gallery-overlay {
    transform: translateY(0);
}

.dnfc-gallery-characters {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.dnfc-gallery-message {
    font-style: italic;
    font-size: 14px;
    opacity: 0.9;
}

.dnfc-gallery-empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 24px;
    color: var(--dnfc-dark);
}

/* ==========================================================================
   Écran géant
   ========================================================================== */

.dnfc-ecran-geant {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: black;
}

/* Fonds visuels */
.dnfc-ecran-geant[data-background="dark"] {
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
}

.dnfc-ecran-geant[data-background="pastel"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dnfc-ecran-geant[data-background="disney"] {
    background: linear-gradient(45deg, #ff6b6b 0%, #4ecdc4 25%, #ffe66d 50%, #ff6b6b 75%, #4ecdc4 100%);
    background-size: 400% 400%;
    animation: disneyGradient 15s ease infinite;
}

@keyframes disneyGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}