* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #0f0f0f;
    color: #eee;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

.diaporama-page:not(.hidden) {
    display: flex;
}

h5 {
    margin-top: 10px;
}

#licence {
    width: 550px;
    max-width: 95%;
    margin-top: 20px;
}

.header-diapo {
    width: 100%;
    text-align: center;
}

.header-diapo h3 {
    margin: 10px auto;
    text-align: center;
}

#white {
    color: white;
    font-size: 1.1rem;
}

/* ==================== MENU PRINCIPAL ==================== */
.menu {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 20px;
}
h1 {
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: #ff0;
    text-align: center;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1200px;
}
.card {
    background: #1f1f1f;
    border-radius: 15px;
    padding: 35px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.card:hover {
    transform: translateY(-10px);
    background: #2a2a2a;
    box-shadow: 0 15px 30px rgba(0, 204, 255, 0.2);
}
.card h2 {
    margin: 15px 0;
    color: #00ccff;
}

/* ==================== PAGE DIAPORAMA ==================== */
.diaporama-page {
    display: none;
    flex-direction: column;
    height: 100dvh; /* Plein écran réel sur mobile */
    background: #111;
}

.header-diapo {
    background: #1f1f1f;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}
.header-diapo button {
    padding: 10px 18px;
    font-size: 1rem;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.header-diapo button:hover {
    background: #555;
}
.header-diapo .return {
    background: #c00;
}
.header-diapo .return:hover {
    background: #ff0000;
}

.slider-container {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* change en 'cover' si tu veux remplir tout l'écran */
    opacity: 0;
    transition: opacity 0.8s ease;
    background: #000;
}
.slider img.active {
    opacity: 1;
}

.info {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 1.05em;
    z-index: 20;
}

.controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    gap: 15px;
    z-index: 20;
    min-width: 290px;
}

button {
    padding: 12px 22px;
    font-size: 1.05rem;
    cursor: pointer;
    background: #444;
    color: white;
    border: none;
    border-radius: 50px;
}
button:hover {
    background: #333;

}
.return {
    background: #c00;
    margin-bottom: 90px;
    margin-left: 20px;
    transition:
        background 0.2s,
        transform 0.1s;
}
.return:hover {
    background: #ff0;
    margin-bottom: 90px;
    margin-left: 20px;
    color: black;
    transform: scale(1.05);
}
select {
    padding: 10px 14px;
    font-size: 1rem;
    background: #00008f;
    color: white;
    border: 1px solid #d1d1ff;
    border-radius: 8px;
    margin: 0 auto;
    margin-top: 6px;
}

@media (max-width: 600px) {

    #licence {
        width: 550px;
        max-width: 95%;
        margin-top: 10px;
    }

    h5 {
        text-align: center;
    }
}