/* Styles généraux */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #005a87;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* En-tête */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #005a87;
    color: white;
    padding: 0.5rem 2rem;
    width: 100%;
    margin-bottom: 0;
    flex-shrink: 0;
}

header .logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1); /* Rend le logo blanc */
}

header h1 {
    font-size: 2.2rem;
    font-weight: bold;
}

#horloge {
    font-size: 2.5rem;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    display: flex;
    align-items: center;
    height: 100%;
    margin: -0.5rem 0;
    padding: 0.5rem 20px;
}

/* Section principale */
main {
    background-color: #f0f8ff;
    padding: 0.5rem 2rem 1rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

main h2 {
    color: #005a87;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2rem;
}

/* Layout des bassins */
.bassins {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.bassin {
    flex: 1;
    min-width: 30%;
    margin: 0 0.5% 15px 0.5%;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

@media (max-width: 768px) {
    .bassins {
        flex-direction: column;
    }
    
    .bassin {
        flex: none;
        width: 100%;
        margin: 0 0 15px 0;
    }
}

/* Styles pour bassins fermés - Vous pouvez choisir entre deux styles en ajoutant/supprimant la classe .ferme-style-ribbon */
/* Style par défaut: animation de pulse */
@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* Style de base commun */
.bassin.ferme {
    position: relative;
    background-color: #ffffff;
    border: 2px solid #ff3b30;
    overflow: hidden;
    animation: pulseRed 2s infinite;
}

.bassin.ferme h3 {
    color: #333;
}

.bassin.ferme h3::after {
    content: "";
}

.bassin.ferme .temperature-container {
    display: none;
}

/* Style 1: Style ruban (plus moderne) - Par défaut */
.bassin.ferme::before {
    content: "FERMÉ";
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ff3b30;
    color: white;
    padding: 5px 15px;
    font-weight: bold;
    transform: rotate(45deg) translateX(15px) translateY(-15px);
    transform-origin: top right;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    letter-spacing: 1px;
    z-index: 10;
}

.bassin.ferme::after {
    content: "Ce bassin est fermé au public";
    display: block;
    padding: 30px 10px;
    color: #555;
    font-style: italic;
    font-weight: bold;
    font-size: 130%;
    text-align: center;
    margin-top: 10px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="rgba(255,59,48,0.3)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"></line></svg>');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 50px;
    padding-top: 60px;
}

/* Style 2: Style icône d'avertissement (alternative) - Ajoutez .ferme-style-warning à .bassin */
.bassin.ferme.ferme-style-warning {
    border: none;
    background-color: rgba(255, 59, 48, 0.1);
}

.bassin.ferme.ferme-style-warning::before {
    content: "⚠️";
    font-size: 40px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -80%);
    background: none;
    color: #ff3b30;
    padding: 0;
    box-shadow: none;
    z-index: 10;
}

.bassin.ferme.ferme-style-warning::after {
    content: "BASSIN FERMÉ\A Pour maintenance";
    white-space: pre;
    background-image: none;
    padding: 10px;
    padding-top: 60px;
    font-style: normal;
    font-weight: bold;
    color: #ff3b30;
}

.bassin.ferme.ferme-style-warning h3 {
    color: #ff3b30;
    margin-bottom: 60px;
}

/* Style 3: Style barre diagonale (alternative) - Ajoutez .ferme-style-diagonal à .bassin */
.bassin.ferme.ferme-style-diagonal {
    position: relative;
    border: 2px solid #ff3b30;
    background-color: white;
}

.bassin.ferme.ferme-style-diagonal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 59, 48, 0.1),
        rgba(255, 59, 48, 0.1) 10px,
        rgba(255, 59, 48, 0.2) 10px,
        rgba(255, 59, 48, 0.2) 20px
    );
    z-index: 1;
    transform: none;
    padding: 0;
    box-shadow: none;
}

.bassin.ferme.ferme-style-diagonal::after {
    content: "BASSIN NON DISPONIBLE";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ff3b30;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 2;
    width: auto;
    margin: 0;
}

.bassin.ferme.ferme-style-diagonal h3 {
    position: relative;
    z-index: 2;
    background-color: white;
    display: inline-block;
    padding: 0 10px;
    margin-bottom: 150px;
}

.bassin h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.5rem;
}

/* Mise en page pour les deux températures côte à côte dans le bassin sportif */
.temperature-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 10px;
}

.temperature-container .temperature {
    text-align: center;
    padding: 5px;
    border-radius: 6px;
    flex: 1;
    margin: 0 5px;
}

.temperature-container .temperature.interieur {
    background: linear-gradient(135deg, #1e87f8, #3e37ff);
    color: white;
}

/* Style pour tous les bassins */
.temperature {
    padding: 10px;
    border-radius: 6px;
    margin: 0 auto;
    max-width: 200px;
}

/* Style commun pour la température de l'eau dans tous les bassins */
#bassin1 .temperature:not(.interieur),
#bassin2 .temperature:not(.interieur),
#bassin3 .temperature:not(.interieur) {
    background: linear-gradient(135deg, #1e87f8, #3e37ff);
    color: white;
}

/* Style commun pour la température de l'air */
.temperature.interieur,
#bassin1 .temperature.interieur,
#bassin2 .temperature.interieur,
#bassin3 .temperature.interieur {
    background: linear-gradient(135deg, #00b09b, #96c93d);
    color: white;
}

/* Style spécifique pour s'assurer que l'air du bien-être a le bon fond */
#bassin2 .temperature.interieur {
    background: linear-gradient(135deg, #00b09b, #96c93d) !important;
    color: white !important;
}

.temp-label {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.temp-value {
    font-size: 3em;
    font-weight: 700;
}

.status-ferme {
    color: white;
    font-weight: bold;
    font-size: 1.2em;
}

/* État fermé pour les températures */
.bassin.ferme .temperature:not(.interieur) {
    background: #ffcdd2;
    color: #b71c1c;
}

.bassin.ferme .temperature:not(.interieur) .temp-label {
    color: #b71c1c;
}

/* Suppression du style de la section air-temperature qui n'est plus utilisée */
.air-temperature {
    display: none;
}

/* Section de la publicité */
.publicite-section {
    margin-top: 10px;
    width: 100%;
    background-color: #f0f8ff;
    flex: 1;
    overflow: hidden;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
}

.publicite-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    gap: 10px;
}

.publicite-item {
    background-color: transparent;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
    flex: 1;
}

.publicite-item:hover {
    transform: scale(1.01);
    z-index: 2;
}

.publicite-item.petit {
    flex: 4;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 0;
    background-color: #ffffff;
}

.publicite-item.grand {
    flex: 7;
    min-width: 500px;
    height: 100%;
    max-height: calc(100vh - 250px);
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galerie-images {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
    min-height: 100px;
    max-height: calc(100vh - 250px);
}

.image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.slider-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    max-height: calc(100vh - 250px);
}

.slider-image.active {
    opacity: 1;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 5px 0;
    border-radius: 10px;
    margin: 0 20%;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: #005a87;
}

.galerie-videos {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    min-height: 100px;
    max-height: calc(100vh - 250px);
}

.galerie-videos video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: calc(100vh - 250px);
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .publicite-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .publicite-item.petit,
    .publicite-item.grand {
        width: 100%;
        margin: 0;
    }
}

/* Styles du bandeau défilant supprimés */

@media (max-width: 768px) {
    .marquee-content {
        animation: marquee 15s linear infinite;
    }
}

/* Bouton de test pour les administrateurs */
.admin-test-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #38c7ff, #2cb5e8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(56, 199, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    user-select: none;
}

.admin-test-button:hover {
    background: linear-gradient(135deg, #2cb5e8, #1a9bd1);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(56, 199, 255, 0.4);
}

.admin-test-button:active {
    transform: scale(0.95);
}

/* Animation de rotation lors du chargement */
.admin-test-button.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
} 