/* --- Variables --- */
:root {
    --bg: #f0f0f0;
    --text: #000;
    --card: #fff;
    --primary: #0066ff;
    --secondary: #ddd;
    --danger: #cc0000;
}

body.dark {
    --bg: #181818;
    --text: #f8f8f8;
    --card: #232323;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}

h1 {
    text-align: center;
    margin-top: 20px;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    background: var(--card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

textarea {
    width: 100%;
    height: 200px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: var(--bg);
    color: var(--text);
    box-sizing: border-box;
}

button, select {
    padding: 10px 18px;
    margin: 5px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    border: none;
}
.controls-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.controls-top button {
    min-width: 120px;
    flex: 1 1 auto;
}

#darkModeBtn {
    background: #444; /* couleur sombre par défaut */
    color: #fff;
}

body.dark #darkModeBtn {
    background: #ddd;
    color: #000;
}

.primary { background: var(--primary); color: white; }
.secondary { background: var(--secondary); color: black; }
.danger { background: var(--danger); color: white; }

.theme-btn { position: absolute; right: 20px; top: 20px; }

.editor { display: none; margin-top: 30px; }

.slideshow {
    display: none;
    text-align: center;
    position: relative;
}

.slide {
    font-size: 2rem;
    padding: 40px;
    margin-top: 20px;
    border-radius: 12px;
    background: var(--card);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.8s forwards;
    word-break: break-word;
}

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


.slideshow-controls {
    position: fixed;
    top: 60px; /* juste en dessous des boutons fullscreen */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 9999;
}


/* --- Fullscreen --- */
.fullscreen-active {
    position: fixed !important;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background: var(--bg);
    z-index: 9000;
    margin: 0 !important; padding: 0 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.fullscreen-slide {
    position: fixed !important;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    background: var(--bg) !important;
    color: var(--text) !important;
    padding: 20px !important;
    overflow: hidden !important;
    z-index: 9999 !important;
}



.fullscreen-controls {
    position: fixed;
    top: 10px; /* en haut */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10000;
}

.fullscreen-controls button { font-size: 1.5rem; padding: 15px 25px; }

/* Réduire les boutons sur smartphone */
@media (max-width: 500px) {
    .fullscreen-controls button {
        font-size: 1rem;
        padding: 8px 12px;
    }
}

