html, body {
    overflow-x: visible;
    min-width: fit-content;
}

body {
  background-color: #15334f;
  font-family: Arial, Helvetica, sans-serif;
  color: white;
}

.logo {
  width: 300px;
  margin: 10px 30px 10px 10px;
}

div {
  padding-top: 0px;
  padding-bottom: 0px;
  margin-top: 0px;
  margin-bottom: -10px;
}

a {
    text-decoration: none;
}

h1 {
  margin-top: 0px;
  margin-bottom: 0px;
}

h2 {
  margin-top: 5px;
  margin-bottom: 15px;
}

h3 {
  font: 20px Arial;
  color: #10263a;
  font-weight: bold;
}

table {
  margin-top: 0px;
  margin-bottom: 0px;
}

input {
	font: 20px Arial;
}

.texteAccueil{
  margin-top: 0px;
  margin-bottom: 0px;
  color: #ed3b44;
  font: 18px Arial;
  font-weight: bold;
}

/* Classe appliquée au contenu principal quand une popup est ouverte */
.blur-effect {
    filter: blur(5px);
    pointer-events: none; /* Empêche de cliquer sur les éléments floutés */
    user-select: none;    /* Empêche de sélectionner le texte derrière */
    transition: filter 0.3s ease;
}

/* On s'assure que le conteneur a une transition même quand il n'est pas flouté */
#main-content {
    transition: filter 0.3s ease;
    display: block;
    width: 100%;
    overflow: visible;
    padding-bottom: 15px;
}

#main-content {
    transition: filter 0.3s ease;
    display: block;
    width: 100%;
}

#user-bar {
    text-align: right; 
    padding: 10px;
}

/*//////////////
// RECAP RESA //
//////////////*/
.recap-container {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 10px auto 25px auto;
    max-width: 95%;
    border-left: 5px solid #f6c158;
    height: auto;
    min-height: min-content;
    display: block; 
    overflow: hidden;
}

.recap-container h3 {
    color: white; 
    margin-bottom: 10px; 
    margin-top: 0px;
}

.recap-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}

.recap-card {
    background-color: #ffffff;
    color: #10263a;
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 200px;
    min-height: 50px; 
    height: auto;
    margin-bottom: 10px;
}

.recap-date {
    background-color: #f6c158;
    color: #10263a;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 0.9em;
}

.recap-info {
    font-size: 0.85em;
    line-height: 1.2;
}

.recap-info b {
    color: #15334f;
    font-size: 1.1em;
}

/*////////////
// PLANNING //
////////////*/
.planning_complet {
    margin-top : 50px;
    margin-bottom : 50px;
    width: 100%;
    display: block;
}

.planning {
    border-collapse: collapse;
	margin : 20px 0px 20px 50px;
    box-shadow: 0 0 5px white;
    text-align: center;
    color: #10263a;
    max-width: 95%;
    min-width: 1000px;
    table-layout: fixed;
    display: table;
}

.planning th {
    background-color: #f6c158;
    color: #10263a;
    padding-top: 5px;
	padding-left: 10px ;
	padding-bottom: 5px ;
	padding-right: 10px ;
    font-size: 18px;
    width: 220px;
    min-width: 220px;
    white-space: nowrap;
}

.planning td {
    padding-top: 0px;
	padding-left: 0px ;
	padding-bottom: 0px ;
	padding-right: 0px ;
    height: 70px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Colonne sans créneau */
.planning th.col-empty, 
.planning td.col-empty {
    min-width: 60px;  /* On réduit fortement */
    width: 60px;
    background-color: #9E9E9E;
    color: #616161;
    font-size: 12px;
    overflow: hidden;
}

.planning tr {
    border-bottom: 1px solid #dddddd;
    background-color: #285e91;
}

.planning tr:nth-child(2n+1) {
    background-color: #f3f3f3;
    border-bottom: 5px solid #dddddd;
}

.planning tr:last-of-type {
    border-bottom: 5px solid #f6c158;
}

.creneauPlanning {
    padding-top: 5px;
    padding-bottom: 2px;
    margin-top: 0px;
    margin-bottom: 0px;
    font-weight: bold;
}

.logoSalle {
    width: 70px;
    float: left;
}


/*///////////
// POP-UPS //
////////////*/

.popupLogin,
.popupResa {
    display: none; 
    position: fixed; 
    z-index: 1000; /* Assure que la popupLogine est au-dessus de tout le reste */
    left: 0 !important;
    top: 0 !important;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); /* Fond noir semi-transparent (effet de grisé) */
    align-items: center;
    justify-content: center;
}

/* Le conteneur du formulaire */
.is-visible {
    display: flex !important;
}

/* Le conteneur du formulaire */
.popupLogin-content, 
.popupResa-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Pourcentage sur mobile */
    max-width: 450px; /* Taille maximale sur bureau */
    border-radius: 8px;
    position: relative;
    font-weight: bold;
    color: #10263a;
    animation: zoomIn 0.3s ease;
    margin: 0;
}

@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

/* Bouton de fermeture (la croix) */
.close-button,
.close-buttonResa {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus,
.close-buttonResa:hover,
.close-buttonResa:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Styles pour les champs du formulaire (optionnel) */
.popupLogin-content form input[type="text"],
.popupLogin-content form input[type="password"],
.popupLogin-content form button,
.popupResa-content form input[type="text"],
.popupResa-content form input[type="password"],
.popupResa-content form button
{
    width: 100%;
    padding: 10px;
    margin: 5px 0 15px 0;
    display: inline-block;
    border: 1px solid #ccc;
    box-sizing: border-box; /* IMPORTANT pour que padding n'augmente pas la taille totale */
}

.popupResa-content form button
{
    
    margin: 15px 0 15px 0;
}

button,
input[type="submit"],
.btn-style
{
    /* Design général */
    border: none;
    padding: 12px 25px;
    margin: 10px 0;
    border-radius: 8px; /* Coins arrondis doux */
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    
    /* Transition : rend les changements d'état (hover) fluides */
    transition: background-color 0.3s ease, transform 0.15s ease, box-shadow 0.3s ease;
}


/* Bouton d'action principal (dans la popupLogine) */
.popupLogin-content form button,
.popupLogin-content form input[type="submit"],
.popupResa-content form button,
.popupResa-content form input[type="submit"]
{
    background-color: #f6c158; /* Jaune / Orange Vif (Couleur Padel/Balle) */
    color: #10263a; /* Texte Bleu Foncé, lisible */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Ombre légère pour donner du relief */
}

/* Effet au survol (hover) */
.popupLogin-content form button:hover,
.popupLogin-content form input[type="submit"]:hover,
.popupResa-content form button:hover,
.popupResa-content form input[type="submit"]:hover
{
    background-color: #ffda79; /* Couleur légèrement plus claire au survol */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2); /* Ombre accentuée */
    transform: translateY(-1px); /* Léger soulèvement */
}

/* Effet au clic (active) */
.popupLogin-content form button:active,
.popupLogin-content form input[type="submit"]:active,
.popupResa-content form button:active,
.popupResa-content form input[type="submit"]:active
{
    transform: translateY(0); /* Retour à la position normale */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Ombre plus petite (effet enfoncé) */
}


/* Bouton dans le corps de la page (ex: Profil / Connexion) */
#open-popupLogin-button,
.btn-style {
    background-color: #10263a; /* Bleu foncé (Couleur de votre background) */
    color: white;
    border: 2px solid #f6c158; /* Bordure contrastée */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    text-align: center;
    
    /* Assurez-vous que le bouton du menu n'occupe pas toute la largeur */
    width: auto; 
    display: inline-block;
}

/* Effet au survol du bouton "Profil" */
#open-popupLogin-button:hover,
.btn-style:hover {
    background-color: #285e91; /* Bleu légèrement plus clair */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

/* Styles pour le message dynamique (succès/erreur) */
#message-resa {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
}

#message-login {
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}

/* Style de l'élément cliquable "Disponible" dans le planning */
.open-popupResa-button {
    cursor: pointer; 
}

.identification {
  padding-top: 20px;
  padding-bottom: 10px;
  padding-left: 20px;
  padding-right: 20px;
}

/* Style pour les noms cliquables dans le planning */
.open-popupModif-button { 
    text-decoration: none;
    transition: 0.3s;
}

.open-popupModif-button:hover,
.open-popupResa-button:hover {
    font-weight: bold;   
}

.deconnect:hover
{
  background-color: #ed3b44;
}

/* Cache les labels et inputs mais garde l'élément dans le code */
.hidden-auth label, 
.hidden-auth input[type="text"], 
.hidden-auth legend {
    display: none;
}

.hidden-auth {
    border: none; /* Enlève le cadre du fieldset pour faire propre */
    padding: 0;
    margin: 0;
}

#submit_button_resa {
    transition: background 0.3s;
}

/*//////////////
// USER/ADMIN //
//////////////*/
.profile-container {
    max-width: 1200px;
    margin: 20px 20px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    float: left;
    color: #15334f;  
    font: 18px Arial;

}

.div-btn {
    text-align: right; 
    padding: 0px 0px 20px 20px;
    margin: -10px auto;
}

#global-message {
    margin: -20px 0px 15px 0px;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* On définit 2 colonnes égales */
    grid-auto-rows: min-content;           /* Les lignes créées auront la même hauteur */
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}

/* La classe pour la grande carte */
.card-tall {
    grid-row: span 2; /* S'étale sur 2 lignes */
}

.card-left {
    grid-column: 1;
}

.card-right-tall {
    grid-column: 2;
    grid-row: span 2; /* S'étale sur 2 lignes */
}

.card-large {
    grid-column: span 2; /* Le tableau des rôles prend toute la largeur */
}

.card-small {
    grid-column: span 1; /* Les petits formulaires restent côte à côte */
}

.profile-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    border-left: 5px solid #ccc; /* Bordure par défaut */
    text-align: right;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    /* Ombre discrète au repos */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    /* Transition fluide : indispensable pour ne pas que ce soit brutal */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.profile-card:hover {
    /* La carte se soulève de 2 pixels */
    transform: translateY(-2px);
    /* L'ombre devient plus grande et plus floue */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/*.profile-card:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}*/

.profile-card h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eeeeee; /* Ligne fine et discrète */
    display: flex;
    align-items: center;
    gap: 10px;
    color: #285e91;
    text-transform: uppercase;
    text-align: left; 
}

/* Thème Bleu : Gestion / Info */
.card-blue {
    border-left-color: #0072c6;
    background-color: #fcfdff;
}
.card-blue h3 { 
    color: #0072c6; 
    border-bottom: 2px solid #0072c6;
}

/* Thème Vert : Création / Ajout */
.card-green {
    border-left-color: #28a745;
    background-color: #fafffb;
}
.card-green h3 { 
    color: #28a745; 
    border-bottom: 2px solid #28a745; 
}

/* Thème Orange : Sécurité / Reset */
.card-orange {
    border-left-color: #fd7e14;
    background-color: #fffaf5;
}
.card-orange h3 { 
    color: #fd7e14; 
    border-bottom: 2px solid #fd7e14; 
}

/* Thème Rouge : Actions critiques (Suppression) */
.card-red {
    border-left-color: #dc3545;
    background-color: #fff9f9;
}
.card-red h3 { 
    color: #dc3545; 
    border-bottom: 2px solid #dc3545; 
}

/* On crée un conteneur autour du formulaire pour le centrer */
.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;      /* Prend tout l'espace disponible sous le titre */
    justify-content: center; /* Centre verticalement le contenu interne */
    align-items: stretch;
    width: 100%;
    padding-bottom: 15px;
}

/* On crée un conteneur autour du formulaire pour le centrer */
.card-body form {
    width: 100%;
    display: block;    
}

.status-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: none; /* Caché par défaut */
}

/* Optionnel : assombrir le bouton pendant le chargement */
.btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.info {
    width:90%; 
    padding:20px; 
    margin-bottom:10px; 
    border-radius:5px;
    resize : none;
}

.list {
    background:white; 
    color:black; 
    text-transform:none; 
    margin-bottom:10px;
}

/* Styles pour les champs du formulaire (optionnel) */
.profile-card form input[type="password"],
.profile-card form input[type="email"]
{
    width: 55%;
    padding: 6px;
    display: inline-block;
    border: 1px solid #ccc;
    box-sizing: border-box; /* IMPORTANT pour que padding n'augmente pas la taille totale */
}

@media (max-width: 900px) {
    .profile-grid {
        grid-template-columns: 1fr; /* On repasse sur une seule colonne */
    }
    .card-tall {
        grid-row: span 1; /* On annule l'étalement vertical sur mobile */
    }
}

/*///////////////////////
// TABLEAU ROLES ADMIN //
///////////////////////*/
/* Style du tableau moderne */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden; /* Pour que les arrondis fonctionnent */
    text-align: center !important;
}

.admin-table th {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    padding: 12px 15px;
    border-bottom: 2px solid #0072c6;
}

.admin-table td {
    padding: 6px 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* Alternance de couleur (Zèbre) */
.admin-table tbody tr:nth-child(even) {
    background-color: #fcfcfc; /* Gris très léger pour les lignes paires */
}

.admin-table tbody tr:nth-child(odd) {
    background-color: #ffffff; /* Blanc pour les lignes impaires */
}

/* Effet au survol plus marqué pour compenser la finesse des lignes */
.admin-table tr:hover {
    background-color: #f1f7fd !important; /* !important pour écraser le zèbre au survol */
}


/* Badge pour l'affichage du rôle actuel */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* Style des cases à cocher plus larges pour le tactile */
.admin-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Conteneur pour une ligne de formulaire */
.form-group {
    display: flex;
    justify-content: space-between; /* Pousse le label à gauche et l'input à droite */
    align-items: center;            /* Aligne verticalement au milieu */
    text-align: left;
    margin-bottom: 6px;            /* Espace entre les lignes */
    padding: 4px 0;
}

.form-group label {
    font-weight: bold;
    color: #444;
}

.icon-label {
    font-size: 1.5rem; /* Icône légèrement plus grande que le texte */
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto;
    min-width: 25px;    
}

.input-container {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;                       /* Espace entre les select (H : M) */
    margin-bottom: 0px;            /* Espace entre les lignes */
}

/* On uniformise la taille des selects pour qu'ils soient bien alignés à droite */
.form-group select, 
.form-group input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    min-width: 120px;               /* Largeur minimale pour l'alignement */
}

/* Cas particulier pour les petits selects d'heure */
.form-group select.time-select {
    min-width: 65px;
}

.profile-card form {
    max-width: 500px;
    margin: 0 auto; /* Centre le formulaire dans la carte */
}


/*////////////////////////
///////// SELECT /////////
////////////////////////*/
select {
    padding: 8px;
    background-color: #fff;
    min-width: 120px;               /* Largeur minimale pour l'alignement */
    font-size: 16px;
    font-family: inherit;
    color: #444;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    
    /* Transition fluide pour la bordure, le fond et l'ombre */
    transition: all 0.2s ease-in-out;
    outline: none;
}

/* 1. Animation au survol (Hover) */
select:hover {
    border-color: #9ca3af; /* Le gris devient un peu plus foncé */
    background-color: #f9fafb; /* Un très léger gris au fond */
}

/* 2. Animation au clic (Focus) */
select:focus {
    border-color: #15334f; 
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    /* Petite remontée visuelle (optionnel) */
    transform: translateY(-1px);
}

/* 3. On remet à plat au clic actif */
select:active {
    transform: translateY(0px);
}