/* QR T-Shirts Public Styles */

/* Variables CSS pour cohérence */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
    --success-color: #00a32a;
    --error-color: #dc3232;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-radius: 12px;
    --shadow-light: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-medium: 0 10px 30px rgba(0,0,0,0.2);
    --shadow-heavy: 0 20px 40px rgba(0,0,0,0.3);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.qr-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-gradient);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container principal */
.qr-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: qr-fadeIn 0.8s ease-out;
}

@keyframes qr-fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Carte principale */
.qr-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 50px;
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}

/* Barre décorative en haut */
.qr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary-gradient);
    border-radius: 24px 24px 0 0;
}

/* En-tête */
.qr-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.qr-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.qr-subtitle {
    color: var(--text-secondary);
    font-size: 1.2em;
    font-weight: 500;
}

/* Photo */
.qr-photo-container {
    text-align: center;
    margin: 40px 0;
    animation: qr-slideUp 0.6s ease-out 0.2s both;
}

@keyframes qr-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #fff;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* Contenu */
.qr-content {
    margin: 40px 0;
    animation: qr-slideUp 0.6s ease-out 0.4s both;
}

.qr-text {
    font-size: 1.2em;
    line-height: 1.8;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Humeur */
.qr-mood {
    display: inline-flex;
    align-items: center;
    background: var(--primary-gradient);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.95em;
    font-weight: 600;
    margin: 15px 0;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease;
}

.qr-mood:hover {
    transform: translateY(-2px);
}

.qr-mood::before {
    content: '✨';
    margin-right: 8px;
    font-size: 1.1em;
}

/* Liens */
.qr-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
    animation: qr-slideUp 0.6s ease-out 0.6s both;
}

.qr-link {
    display: inline-flex;
    align-items: center;
    padding: 16px 28px;
    background: #fff;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 1em;
    position: relative;
    overflow: hidden;
}

.qr-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.qr-link:hover::before {
    left: 100%;
}

.qr-link:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border-color: var(--primary-gradient);
}

.qr-link:active {
    transform: translateY(-2px) scale(0.98);
}

/* Styles spécifiques aux types de liens */
.qr-link.youtube {
    background: linear-gradient(135deg, #FF0000, #FF6B6B);
    color: white;
}

.qr-link.social {
    background: linear-gradient(135deg, #1877f2, #42a5f5);
    color: white;
}

.qr-link.website {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Icônes des liens */
.qr-link-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* État vide */
.qr-empty-state {
    text-align: center;
    padding: 80px 30px;
    color: var(--text-secondary);
    animation: qr-slideUp 0.6s ease-out 0.3s both;
}

.qr-empty-state h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.5em;
}

.qr-empty-state p {
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Bouton d'édition flottant */
.qr-edit-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 18px 24px;
    border-radius: 60px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-edit-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.qr-edit-button:active {
    transform: translateY(-1px) scale(1.02);
}

/* Formulaire d'édition modal */
.qr-edit-form {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.qr-edit-form.active {
    opacity: 1;
    visibility: visible;
}

.qr-form-container {
    background: white;
    padding: 50px;
    border-radius: 24px;
    box-shadow: var(--shadow-heavy);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qr-edit-form.active .qr-form-container {
    transform: scale(1) translateY(0);
}

.qr-form-title {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 40px;
    font-size: 2.2em;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Groupes de formulaire */
.qr-form-group {
    margin-bottom: 30px;
    position: relative;
}

.qr-form-label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1em;
}

.qr-form-input,
.qr-form-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
}

.qr-form-input:focus,
.qr-form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fafbfc;
}

.qr-form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.qr-form-input[type="file"] {
    padding: 12px 16px;
    cursor: pointer;
}

.qr-form-input[type="file"]::-webkit-file-upload-button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 12px;
    font-weight: 600;
}

/* Boutons du formulaire */
.qr-form-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.qr-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.qr-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.qr-btn:hover::before {
    left: 100%;
}

.qr-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-light);
}

.qr-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.qr-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.qr-btn-secondary {
    background: #f8f9fa;
    color: var(--text-primary);
    border: 2px solid #e9ecef;
}

.qr-btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Indicateur de chargement */
.qr-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: qr-spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes qr-spin {
    to { transform: rotate(360deg); }
}

/* Messages de retour */
.qr-message {
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qr-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.qr-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.qr-message.info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Animations d'entrée */
.qr-animate-in {
    animation: qr-slideInUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes qr-slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .qr-container {
        padding: 15px;
    }
    
    .qr-card {
        padding: 30px 25px;
        border-radius: 20px;
    }
    
    .qr-title {
        font-size: 2rem;
    }
    
    .qr-photo {
        width: 180px;
        height: 180px;
    }
    
    .qr-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .qr-link {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .qr-edit-button {
        bottom: 20px;
        right: 20px;
        padding: 16px 20px;
        font-size: 15px;
    }
    
    .qr-form-container {
        padding: 30px 25px;
        margin: 10px;
        border-radius: 20px;
    }
    
    .qr-form-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .qr-btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .qr-card {
        padding: 25px 20px;
    }
    
    .qr-form-container {
        padding: 25px 20px;
    }
    
    .qr-title {
        font-size: 1.8rem;
    }
    
    .qr-text {
        font-size: 1.1em;
    }
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f8f9fa;
        --text-secondary: #adb5bd;
    }
    
    .qr-card {
        background: rgba(30, 32, 34, 0.95);
        color: var(--text-primary);
    }
    
    .qr-form-container {
        background: #1a1c1e;
        color: var(--text-primary);
    }
    
    .qr-form-input,
    .qr-form-textarea {
        background: #25282b;
        border-color: #404448;
        color: var(--text-primary);
    }
    
    .qr-form-input:focus,
    .qr-form-textarea:focus {
        background: #2a2d31;
    }
    
    .qr-btn-secondary {
        background: #25282b;
        color: var(--text-primary);
        border-color: #404448;
    }
}

/* Animations supplémentaires */
.qr-pulse {
    animation: qr-pulse 2s infinite;
}

@keyframes qr-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Amélioration de l'accessibilité */
.qr-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible pour l'accessibilité clavier */
.qr-link:focus,
.qr-btn:focus,
.qr-edit-button:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Transitions fluides pour tous les éléments interactifs */
* {
    transition-property: transform, box-shadow, background-color, border-color, opacity;
    transition-duration: 0.3s;
    transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}