/* Importation des polices */
@font-face {
    font-family: 'Cambria';
    src: url('Fonts/Cambria Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Constantina';
    src: url('Fonts/Constantia Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Styles généraux */
html, body {
    height: 100%;
    font-family: 'Cambria', sans-serif;
    background-color: #1e1e1e;
    color: #F8EEE1;
    display: flex;
    flex-direction: column;
    background-image: url('Ressources/Background/Screen3_Blur.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat; 
}

main {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

/* Conteneur principal */
.container {
    width: 80%;
    max-width: 100%;
    padding: 20px;
}

/* Section Hero */
.hero {
    text-align: center;
    padding: 200px 20px;
}

.hero-logo img {
    width: 50%;
    max-width: 80%;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 30px;    
}

/* Bouton stylisé */
.styled-button {
    display: inline-block;
    padding: 15px 30px;
    background-image: url('Ressources/ButtonBlue.png');
    background-size: cover;
    color: #F8EEE1;
    font-family: 'Constantina', sans-serif;
    font-weight: bold;
    font-size: 1.2rem;
    position: relative;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.styled-button::before,
.styled-button::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 100%;
    background-size: cover;
}

.styled-button::before {
    left: -6px;
    background-image: url('Ressources/left-border.png');
}

.styled-button::after {
    right: -6px;
    background-image: url('Ressources/left-border.png');
    transform: translateY(-50%) rotate(180deg);
}

.styled-button:hover {
    text-decoration: none;
    filter: brightness(1.1);
}

/* Lien stylisé */
.styled-link {
    font-size: 1rem;
    color: #F8EEE1;
    text-decoration: underline;
}

.styled-link:hover {
    color: #ddd;
}

/* Styles pour les composants React */
.schedule-container {
    background-color: #1e1e1e;
    padding: 20px;
    width: 100%;
    border-radius: 10px;
}

/* Tableau des horaires */
.table {
    color: #fff;
}

.table thead {
    background-color: #343a40;
}

.table tbody tr:nth-child(even) {
    background-color: #2a2a2a;
}

/* Cellules sélectionnables */
.selectable-slot {
    cursor: pointer;
}

.selectable-slot:hover {
    background-color: #3a3a3a;
}

/* Cases à cocher stylisées */
.checkbox-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    border: 1px solid #6c757d;
    border-radius: 3px;
    position: relative;
}

.checkbox-icon.unavailable {
    background-color: #6c757d;
}

.checkbox-icon.available-if-necessary {
    background-color: #ffc107;
    border-color: #ffc107;
}

.checkbox-icon.available {
    background-color: #28a745;
    border-color: #28a745;
}

/* Icône de coche */
.checkbox-icon::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 6px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none;
}

.checkbox-icon.available::after,
.checkbox-icon.available-if-necessary::after {
    display: block;
}

/* Ajustements pour la version mobile */
@media (max-width: 768px) {
    .schedule-container h2 {
        font-size: 1.5rem;
    }

    .schedule-container p {
        font-size: 0.9rem;
    }
}

/* Légende des cases à cocher */
.legend-checkbox {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #6c757d;
    margin-right: 5px;
}

.legend-checkbox.unavailable {
    background-color: #6c757d;
}

.legend-checkbox.available-if-necessary {
    background-color: #ffc107;
    border-color: #ffc107;
}

.legend-checkbox.available {
    background-color: #28a745;
    border-color: #28a745;
}

/* Responsivité */
@media only screen and (max-width: 768px) {
    .hero-logo img {
        width: 100%;
        max-width: max-content;
    }
    
    .hero h1 {
        font-size: 0.8rem;
    }
    
    .container {
        width: 100%;
        padding: 0px;
    }

    .styled-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media only screen and (max-width: 480px) {

    .styled-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Fond noir et texte blanc pour tous les input */
input.form-control {
    background-color: #000000a9; 
    color: #fff;
    border: 1px solid #fff; 
}

input.form-control::placeholder {
    color: #ccc; 
    opacity: 1; 
}

input.form-control:focus {
    background-color: #000000a9; /* Maintient le fond noir quand l'input est focus */
    color: #fff; /* Maintient le texte blanc */
    border-color: #fff; /* Bordure blanche quand l'input est focus */
}

input.form-control:placeholder-shown {
    background-color: #000; /* Assure que le fond reste noir même avec le placeholder */
}
