/* ============================================
   CHASSE AU TRÉSOR - Styles CSS Centralisés
   @version 4.01   (versionnage automatique : tools/release.php)
   ============================================ */

/* ============================================
   1. POLICES GOOGLE FONTS
   ============================================ */
@import url('assets/fonts/fonts.css');   /* v4.03 : polices hébergées sur le site */

/* ============================================
   2. VARIABLES CSS
   ============================================ */
:root {
    /* Couleurs du thème "Chasse au Trésor" */
    --treasure-gold: #FFD700;
    --treasure-bronze: #CD7F32;
    --treasure-copper: #B87333;
    
    /* Variantes or */
    --or: #ffd700;
    --bronze: #cd7f32;
    
    /* Couleurs parchemin et encre */
    --parchment: #f9f3e6;
    --parchemin: #f9f3e6;
    --ink-brown: #3e2723;
    --ink: #3e2723;
    --encre: #3e2723;
    --encre-brune: #3e2723;
    --ink-dark: #2C1810;
    
    /* Couleurs supplémentaires */
    --sand-beige: #F4E4C1;
    --deep-ocean: #0A3D62;
    --ocean-blue: #1976d2;
    --pirate-red: #C23616;
    --jungle-green: #2D5016;
    
    /* États des boutons */
    --hover-gold: #ffed4e;
    --shadow-dark: rgba(0, 0, 0, 0.4);
}

/* ============================================
   3. RESET ET ÉLÉMENTS DE BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    color: var(--ink-brown);
}

/* ============================================
   4. TYPOGRAPHIE
   ============================================ */
h1 {
    font-family: 'Pirata One', cursive;
    font-size: 2.5rem;
    color: var(--ink-brown);
    margin: 0;
}

h2 {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.8rem;
    color: var(--ink-brown);
    margin-bottom: 1rem;
}

h3 {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.5rem;
    color: var(--ink-brown);
    margin-bottom: 0.8rem;
}

p {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.75;
}

/* ============================================
   5. CONTAINER PRINCIPAL
   ============================================ */
.container {
    max-width: 2100px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(249, 243, 230, 0.95) 0%, rgba(244, 228, 193, 0.95) 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 4px solid var(--bronze);
    position: relative;
    backdrop-filter: blur(10px);
    animation: fadeIn 1.2s ease-out;
}

/* Coins décoratifs du container */
.container::before,
.container::after {
    content: '✦';
    position: absolute;
    font-size: 2rem;
    color: var(--treasure-gold);
    opacity: 0.6;
}

.container::before {
    top: 15px;
    left: 15px;
}

.container::after {
    bottom: 15px;
    right: 15px;
}

/* ============================================
   6. HEADER
   ============================================ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink-brown);
}

/* Badge administrateur */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: linear-gradient(135deg, #C23616 0%, #8B0000 100%);
    color: white;
    border: 2px solid #8B0000;
    box-shadow: 0 2px 8px rgba(194, 54, 22, 0.4);
}

/* ============================================
   7. BOUTONS
   ============================================ */

/* Bouton principal (doré) */
.btn,
.btn-primary {
    font-family: 'Pirata One', cursive;
    font-size: 1.3rem;
    color: white;
    background: linear-gradient(135deg, var(--treasure-gold) 0%, var(--bronze) 100%);
    padding: 12px 30px;
    border-radius: 15px;
    border: 3px solid var(--bronze);
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover,
.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, var(--hover-gold) 0%, var(--treasure-gold) 100%);
}

/* Bouton secondaire */
.btn-secondary {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.2rem;
    color: white;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    padding: 10px 25px;
    border-radius: 12px;
    border: 3px solid #2E7D32;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

/* Bouton danger (rouge) */
.btn-danger {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.2rem;
    color: white;
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
    padding: 10px 25px;
    border-radius: 12px;
    border: 3px solid #c62828;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
}

/* Bouton retour */
.btn-back {
    display: inline-block;
    padding: 8px 20px;
    background: var(--deep-ocean);
    color: var(--treasure-gold);
    text-decoration: none;
    border-radius: 10px;
    font-family: 'Permanent Marker', cursive;
    font-size: 1.2rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    border: none;
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

/* Navigation bouton retour (centrage) */
.nav-back {
    text-align: center;
    margin-bottom: 20px;
}

/* ============================================
   8. FORMULAIRES
   ============================================ */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-family: 'Permanent Marker', cursive;
    font-size: 1.3rem;
    color: var(--ink-brown);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    border: 2px solid var(--bronze);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--treasure-gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.help-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ink-brown);
    opacity: 0.75;
    margin-top: 5px;
    font-style: italic;
}

/* Messages d'alerte */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.6;
}

.alert-success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border: 2px solid #17a2b8;
    color: #0c5460;
}

/* ============================================
   9. PIED DE PAGE
   ============================================ */
.global-footer,
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    background: transparent;
    border-top: 3px double var(--bronze);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-link {
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-brown);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.footer-link:hover {
    background: rgba(255, 215, 0, 0.2);
    border-radius: 8px;
}

.footer-link:hover::before {
    content: '⚓';
    position: absolute;
    left: -20px;
    color: var(--ocean-blue);
    opacity: 0;
    animation: anchor-swing 0.5s ease forwards;
}

.footer-separator {
    color: var(--bronze);
    opacity: 0.4;
    user-select: none;
}

.footer-copyright {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-brown);
    opacity: 0.6;
    margin-top: 15px;
}

.footer-version {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink-brown);
    opacity: 0.6;
    margin-top: 8px;
}

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

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

@keyframes anchor-swing {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   11. RESPONSIVE DESIGN
   ============================================ */

/* Tablettes */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 30px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
}

/* Smartphones */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 20px;
        border-width: 3px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-back {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }
}

/* Petits smartphones */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 15px;
    }
}

/* ============================================
   12. ACCESSIBILITÉ
   ============================================ */

/* Réduction de mouvement pour accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus visible pour navigation au clavier */
*:focus-visible {
    outline: 3px solid var(--treasure-gold);
    outline-offset: 3px;
}

/* ============================================
   13. UTILITAIRES
   ============================================ */
.text-center {
    text-align: center;
}

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

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

.mt-30 {
    margin-top: 30px;
}

.hidden {
    display: none;
}

/* Ajouts */

        .photos-section {
            margin-top: 2rem;
            padding: 1.5rem;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            border: 2px dashed var(--treasure-bronze);
        }