/* ============================================================
   front-pages.css
   ============================================================
   1. GLOBAL — règles communes à toutes les pages du front-office
   2. ATTRACTIONS & BILLETTERIE — grille de cartes
   3. FORUM
   4. COMMUNAUTÉS (+ tchat)
   5. PROFIL
   6. RÉSERVATION D'ATTRACTION
   ============================================================ */


/* ============================================================
   1. GLOBAL
   ============================================================ */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #E9F2FC;
    color: #333;
}

main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: #1E3256;
}

p {
    line-height: 1.6;
    color: #444;
}

/* Bloc d'introduction centré en haut de page (titre + texte), réutilisable sur toutes les pages du front-office */
.page-intro {
    text-align: center;
    margin: 30px 0;
}

.page-intro p {
    color: #555;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 10px auto 0;
}

/* Formulaires */
form {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

form div {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 220px;
}

label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #444;
}

input, select, textarea {
    display: block;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    border-color: #1E3256;
    outline: none;
}

button {
    background-color: #1E3256;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
}

button:hover {
    background-color: #15233d;
}

button:disabled {
    background-color: #6c757d;
}

/* Classe de bouton unifiée pour tout le site */
.btn-funfair {
    display: inline-block;
    background-color: #1E3256;
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
}

.btn-funfair:hover {
    background-color: #15233d;
    color: #ffffff;
}

.btn-funfair:disabled {
    background-color: #6c757d;
}

/* Variante pour les actions destructrices (ex: quitter une communauté) */
.btn-action-danger {
    display: inline-block;
    background-color: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
}

.btn-action-danger:hover {
    background-color: #dc3545;
    color: #ffffff;
}

/* Messages d'alerte, réutilisés sur plusieurs pages */
.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #badbcc;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c2c7;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #ffe69c;
}


/* ============================================================
   2. ATTRACTIONS & BILLETTERIE — grille de cartes
   ============================================================ */

section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

article {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

article h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

article p {
    margin: 8px 0;
    color: #555;
    font-size: 0.95rem;
}

/* Conteneur du bas de carte (statut + bouton) */
article div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

/* Badge de statut */
article span {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    background-color: #d1e7dd;
    color: #0f5132;
    font-weight: 500;
}

.badge-promo {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    background-color: #d1e7dd;
    color: #0f5132;
    font-weight: 500;
    margin-bottom: 10px;
}

.ticket-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1E3256;
    margin: 15px 0 10px 0;
}

/* Formulaire compact à l'intérieur de la carte */
.form-achat {
    background: transparent;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.form-achat .field-group {
    display: flex;
    flex-direction: column;
}


/* ============================================================
   3. FORUM
   ============================================================ */

.forum-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
}

.forum-message-box {
    background: #f9f9f9;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.forum-sujet-item {
    margin-bottom: 12px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.forum-form-group {
    margin-bottom: -10px;
}

.forum-form-group input[type="text"],
.forum-form-group textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.forum-container button[type="submit"] {
    display: block;
    margin-top: -10px;
    margin-bottom: -10px;
}


/* ============================================================
   4. COMMUNAUTÉS (+ tchat)
   ============================================================ */

.communautes-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
}

.communautes-card {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
}

.communautes-card h4 {
    margin-bottom: 15px;
}

/* Conteneur de la liste en lignes (style forum) */
.communautes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chaque ligne de communauté */
.communautes-item {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.communautes-info {
    flex: 1;
}

.communaute-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.communaute-creator {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.communaute-desc {
    color: #444;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Boutons alignés à droite */
.communautes-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.communaute-action-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    background: transparent;
}

.section-title {
    margin-bottom: 15px;
}

.no-communautes {
    color: #666;
}

/* Tchat d'une communauté */
.chat-messages {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.chat-empty {
    text-align: center;
    color: #666;
}

.chat-message {
    margin-bottom: 15px;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.chat-message-time {
    color: #888;
    font-size: 0.8rem;
}

.chat-message-body {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 10px;
    margin-top: 4px;
}

.chat-form {
    display: flex;
    gap: 10px;
    align-items: stretch;
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.chat-form input {
    flex: 1;
}

.form-group-communaute {
    margin-bottom: 15px;
}

.form-group-communaute input[type="text"],
.form-group-communaute textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.alert-success-communaute {
    background-color: #d1e7dd;
    color: #0f5132;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-danger-communaute {
    background-color: #f8d7da;
    color: #842029;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}


/* ============================================================
   5. PROFIL
   ============================================================ */

.entete-profil {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 50px;
}

.bloc-section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}

.element-liste {
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

th {
    background-color: #eee;
}

.texte-centre {
    text-align: center;
}

.element-avis {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.avis-liste {
    margin-top: 10px;
    margin-bottom: 15px;
}

.avis-item {
    border-bottom: 1px solid #eee;
    padding: 8px 0;
}

.vote-resultats {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.vote-resultats li {
    border-bottom: 1px solid #eee;
    padding: 6px 0;
}

.conteneur-deconnexion {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
}


/* ============================================================
   6. RÉSERVATION D'ATTRACTION
   ============================================================ */

.reservation-page {
    max-width: 600px;
    margin: 30px auto;
    padding: 0 20px;
}

.reservation-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
}

.reservation-title {
    color: #1E3256;
    font-weight: bold;
    margin-bottom: 10px;
}

.reservation-capacite {
    color: #6c757d;
    margin-bottom: 20px;
}

.form-reservation {
    display: block;
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.form-group-reservation {
    margin-bottom: 18px;
}
