/* Styles généraux */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f3f4f6;
    color: #1f2937;
    line-height: 1.6;
}

.container {
    width: 90%;    
    margin: 0 auto;

    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background-color: #f9fafb;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}



/* Titre principal */
h1 {    
    font-size: 24px;
    text-align: center;
    margin: 20px 0;
    font-size: 36px;
    font-weight: bold;
    color: #111827;
}


/* Boutons */
a, button {
    display: inline-block;
    background-color: #2563eb;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease-in-out;
}

a:hover, button:hover {
    background-color: #1d4ed8;
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Grille des vidéos */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.video-card {
    background-color: #c1c1c1;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    text-align: center;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}


/* Contenu des cartes */
.video-card-content {
    padding: 10px;
}

.video-card h2 {
    font-size: 20px;
    color: #1f2937;
    margin-bottom: 10px;
}

.video-card p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

.video-card strong {
    display: block;
    font-size: 14px;
    color: #4b5563;
    margin-top: 5px;

}

/* Image centrée et redimensionnée */
.video-card-image {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #7c7c7c;
    height: 250px; /* Hauteur fixe pour uniformité */
}

.video-card-image img {
    max-width: 95%;
    max-height: 95%;
    border-radius:5px;
    object-fit: contain;
}

/* Titre et lieu */
.title-location {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 0 10px;
}

/* Titre et lieu */
.video-card-content h2 {
    font-size: 24px; /* Augmenter la taille du titre */
    color: #1f2937;
    margin: 0;
    text-transform: uppercase; /* Titre en majuscules */
}

.video-card-content .location {
    font-size: 14px;
    font-weight: bold;
    color: #4b5563;
    text-transform: uppercase; /* Lieu en majuscules */
    margin-top: 5px; /* Espace entre le titre et le lieu */
    display: block; /* Forcer à rester en dessous du titre */
}

/* Contenu des cartes */
.video-card-content {
    padding: 5px;
}

.video-card p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

.video-card strong {
    display: inline;
    font-size: 14px;
    color: #374151;
    margin-right: 5px;
}

.video-card .support {
    font-size: 14px;
    font-weight: bold;
    color: #1f2937;
    text-transform: uppercase;
}

/* Formulaire */
form {
    background-color: #ffffff;
    padding: 10px;
    gap: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
    max-width: 600px;
}

form label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #374151;
    margin-bottom: 8px;
}

form input, form textarea, form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    color: #1f2937;
    background-color: #f9fafb;
    transition: all 0.3s ease-in-out;

    max-width: 100%; /* L’input ne dépassera jamais la largeur du conteneur */
    box-sizing: border-box; /* Inclut padding et border dans la largeur totale */
     
}

form input:focus, form textarea:focus, form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.5);
    outline: none;
}

form button {
    width: 100%;
    background-color: #10b981;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

form button:hover {
    background-color: #059669;
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Boutons dans le formulaire */
.button-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

button {
    flex: 1;
    background-color: #10b981;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

/* Bouton Annuler */
.cancel-button {
    font-size: 18px; /* Augmenter la taille de la police */
    padding: 10px 20px;
    color: #ffffff;
    background-color: #f44336; /* Couleur rouge pour le bouton */
    text-decoration: none; /* Retirer la décoration de texte (souligné) */
    border-radius: 5px;
    display: inline-block;
    margin-top: 20px;
    text-align: center;
    transition: background-color 0.3s;
}

.cancel-button:hover {
    background-color: #d32f2f; /* Couleur rouge foncé au survol */
}

button:hover {
    background-color: #059669;
    transform: translateY(-3px);
}

.cancel-button {
    background-color: #ef4444;
    color: #ffffff;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cancel-button:hover {
    background-color: #dc2626;
    transform: translateY(-3px);
}

/* Boutons d'action */
.action-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}



/* Formulaire */

.form-group {
    display: flex;
    flex-direction: column-reverse; /* Inverse l'ordre des éléments */
    align-items: flex-start; /* Aligne les éléments à gauche */
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.save-button {   
    margin-top:20px;
    margin-right:10px;
    background-color: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.save-button:hover {
    background-color: #059669;
}

.cancel-button {   
    background-color: #ef4444;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}

.cancel-button:hover {
    background-color: #dc2626;
}

/* Image actuelle dans le formulaire */
form img {
    display: block;
    margin-top: 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
}

/* Formulaire de recherche */
.search-form {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Champ de recherche */
.search-form input {
    flex-grow: 1;
    width: 100%; /* S'adapte au conteneur */
    max-width: 400px; /* Limite la largeur maximale */
    padding: 10px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
}


.search-button {
    padding: 10px 20px;
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.search-button:hover {
    background-color: #2563eb;
}
/* Bouton Tous */
.all-button {
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #10b981;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
    display: inline-block;
}

.all-button:hover {
    background-color: #059669;
}

/* Navigation : recherche et tous */
.navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
}

/* Bouton Ajouter une vidéo */
.add-button {
    display: inline-block;
    margin: 20px auto; /* Centrage vertical et horizontal */
    padding: 10px 20px;
    background-color: #3b82f6;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
    transition: background-color 0.3s;
}

.add-button:hover {
    background-color: #2563eb;
}

/* Centrer le bouton */
.add-button {
    display: block;
    text-align: center;
    margin: 20px auto;
}

input[type="password"] {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
}

button {
    padding: 10px 15px;
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2563eb;
}

.error {
    color: red;
    margin-bottom: 15px;
}

/* Bouton de déconnexion */
.logout-button {
    padding: 5px 15px;
    margin-left: 30px;
    justify-content: end;
    background-color: #e11d48;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.logout-button:hover {
    background-color: #9f1239;
}
/* Bouton de suppression */
.delete-button {
    background-color: #e11d48;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-button:hover {
    background-color: #9f1239;
}

/* Style de base pour aligner le select et le bouton horizontalement */
.filter-form {
    display: flex;
    justify-content: flex-start; /* Aligne tout à gauche */    
    width: 85%; /* Réduit la largeur pour petits écrans */
    max-width: 90%; /* S'assure qu'il ne dépasse pas */
    margin: 0 auto; /* Centre horizontalement */
}

.form-group {
    display: flex;
    align-items: center; /* Aligne verticalement */
    gap: 5px; /* Espace entre le select et le bouton */
}

form select{
    text-align: center;
}

.navigation {
    flex-direction: column; /* Empiler les éléments */
    gap: 5px;
    margin:0;
}
.search-form {
    width: 85%; /* S'étend à toute la largeur du conteneur */
    flex-direction: column; /* Empile les éléments */
    gap: 10px;
}
.search-form input {
    width: 90%; /* Réduit la largeur pour petits écrans */
    max-width: 90%; /* S'assure qu'il ne dépasse pas */
    margin: 0 auto; /* Centre horizontalement */
}
.search-button{
    width: 100%; /* Prend toute la largeur disponible */
    text-align: center;
}

.all-button {
    width: auto; /* Garde une taille adaptée au contenu */
    max-width: 90%; /* Évite qu'il dépasse trop sur mobile */
    text-align: center;
    margin: 0 auto; /* Centre le bouton */
}
.all-button {
    width: auto; /* Garde une taille adaptée au contenu */
    max-width: 90%; /* Évite qu'il dépasse trop sur mobile */
    text-align: center;
    margin: 0 auto; /* Centre le bouton */
}

.filter-form select{
    width: 20%; /* Réduit la largeur pour petits écrans */
    max-width: 20%; /* S'assure qu'il ne dépasse pas */
    margin: 0 auto; /* Centre horizontalement */
}

.filter-form button {
    align-self: flex-end; /* Aligne le bouton à droite en mode colonne */
    font-size:14px;
}
button.description-button{
    font-size: 14px;
}

.video-item {
    transition: border 0.3s ease;
}
.back-to-top-button {
    display: flex; /* Utilise Flexbox */
    justify-content: center; /* Centre horizontalement */
    align-items: center; /* Centre verticalement */
    margin-left: 30px;
    border-radius: 5px;
    width: 40px; /* Largeur du conteneur */
    height: 25px; /* Hauteur du conteneur */
    background-color: #007bff; /* (optionnel) Ajout d'une couleur de fond */
}

.fleche {
    width: 25px; /* Ajuste la taille de la flèche */
    height: 25px;
    object-fit: contain; /* Conserve les proportions de l'image */
}

.edit-button {
    display: flex; /* Utilise Flexbox */
    justify-content: center; /* Centre horizontalement */
    align-items: center; /* Centre verticalement */   
    border-radius: 5px;
    width: 40px; /* Largeur du conteneur */
    height: 25px; /* Hauteur du conteneur */
    background-color: #17c828c8; /* (optionnel) Ajout d'une couleur de fond */
    transition: background-color 0.3s;
}

.edit-icon {
    width: 25px; /* Ajuste la taille de la flèche */
    height: 25px;
    object-fit: contain; /* Conserve les proportions de l'image */
}

.edit-button:hover {
    background-color: #0da81dc8;
}

@media (max-width: 400px) {
    .container {
      width: 90%; /* Pour les écrans très petits */
      padding: 10px;
      overflow-x: hidden; /* Empêche tout défilement */
      overflow-y: auto;    /* Permet le défilement vertical */
    }
  }
