:root { --primary: #43b0f1; --bg: #121212; --surface: #1e1e1e; --text: #ffffff; }

/* Déclaration de la police locale */
@font-face {
    font-family: 'FredokaLocal'; /* Nom interne qu'on va utiliser */
    src: url('/assets/Fredoka.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap; /* Affiche le texte immédiatement même si la police charge */
}

body {
    /* On remplace la liste de polices système par la nôtre en premier */
    font-family: 'FredokaLocal', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    font-weight: 400; /* Poids normal pour le texte courant */
}
.container { width: 100%; max-width: 500px; padding: 20px; box-sizing: border-box; }
h1, h2 { text-align: center; color: var(--primary); }

/* Forms & Inputs */
input, button {
    width: 100%;
    padding: 15px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #333;
    background: var(--surface);
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
    
    /* MODIFICATION ICI : On met ta police locale en premier */
    font-family: 'FredokaLocal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Optionnel : Si tu veux que les boutons soient aussi un peu plus ronds/dodus */
    font-weight: 600; 
}button { background: var(--primary); color: #000; font-weight: bold; cursor: pointer; border: none; }
button:disabled { background: #444; cursor: not-allowed; }
button.secondary { background: #444; color: #fff; }

/* Screens */
.screen { display: none; }
.screen.active { display: block; }

/* Camera */
#video, #canvas { display: none; }
.camera-ui { text-align: center; margin-top: 20px; }
.snap-btn { width: 80px; height: 80px; border-radius: 50%; border: 4px solid #fff; font-size: 30px; background: #fff; color: #000; margin: 20px auto; display: flex; align-items: center; justify-content: center; }

/* Dashboard List */
.party-card { background: var(--surface); padding: 15px; margin-bottom: 10px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.party-info { flex: 1; }
.party-code { background: #333; padding: 3% 3%; margin: 2%; border-radius: 4px; font-size: 14px; color: var(--primary); text-align: center; }
.party-date { font-size: 12px; color: #aaa; margin-top: 4px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.gallery img { width: 100%; border-radius: 8px; object-fit: cover; aspect-ratio: 1; }

.hidden { display: none !important; }
.error { color: #ff5252; text-align: center; margin-bottom: 10px; }
.logout-btn { margin-top: 30px; background: #333; }

/* Mode Révélation */
.reveal-container {
    position: relative;
    width: 100%;
    height: 70vh; /* Hauteur fixe pour éviter les sauts */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Empêche le conteneur de rétrécir */
}

.reveal-img {
    position: absolute; /* Superposition parfaite */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    pointer-events: none;
}

.reveal-img.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    z-index: 2;
}

/* Animation d'entrée */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.reveal-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    width: 100%;
}

.reveal-counter {
    text-align: center;
    color: #aaa;
    font-size: 14px;
    margin-top: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-top: 20px;
}
.gallery-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}
