html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../IMG/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
    color: white;
    padding: 40px 20px;
}

.hero-section h1 {
    font-size: 40px;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 18px;
    margin-bottom: 30px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-width: 1200px;
    flex: 1;
}

/* Styles pour les cartes de tickets */
/* Container pour la grille de tickets */
.tickets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Modification de la carte ticket pour s'adapter à la grille */
.ticket-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    height: fit-content; /* Hauteur adaptative */
    display: flex;
    flex-direction: column;
}

.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.15);
}

/* Ajustements pour la grille */
.ticket-body {
    padding: 20px;
    flex-grow: 1; /* Permet à la carte de prendre toute la hauteur disponible */
    display: flex;
    flex-direction: column;
}

.ticket-title {
    font-size: 16px; /* Réduit légèrement la taille */
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.3;
    /* Limiter à 2 lignes maximum */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}



.ticket-dates {
    display: flex;
    justify-content: space-between;
    font-size: 11px; /* Réduit la taille */
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: auto; /* Pousse les dates vers le bas */
    flex-direction: column;
    gap: 5px;
}

/* Responsive pour la grille */
@media (max-width: 1200px) {
    .tickets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tickets-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .ticket-title {
        font-size: 15px;
    }

    .ticket-dates {
        font-size: 10px;
    }
}


.ticket-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 40px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,249,250,0.95));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pagination a, .pagination span {
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Boutons normaux */
.pagination a {
    background: white;
    color: #6c5ce7;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pagination a:hover {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border-color: #6c5ce7;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.25);
}

/* Page courante */
.pagination .current {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    border: 2px solid #6c5ce7;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
    transform: scale(1.1);
}

/* Boutons Précédent/Suivant */
.pagination a[href*="page"]:first-child,
.pagination a[href*="page"]:last-child {
    padding: 0 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: 2px solid transparent;
    font-weight: 700;
    min-width: auto;
}

.pagination a[href*="page"]:first-child:hover,
.pagination a[href*="page"]:last-child:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Animation au survol */
.pagination a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.pagination a:hover::before {
    left: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .pagination {
        padding: 15px;
        gap: 3px;
    }

    .pagination a, .pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .pagination a[href*="page"]:first-child,
    .pagination a[href*="page"]:last-child {
        padding: 0 12px;
    }
}

/* Style pour le texte d'info pagination */
.pagination-info {
    text-align: center;
    margin-top: 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(162, 155, 254, 0.1));
    border-radius: 25px;
    color: #6c5ce7;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(108, 92, 231, 0.2);
    background-color: white;
}


/* Affichage détaillé du ticket */
.ticket-detail {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
}

.ticket-header {
    background: linear-gradient(135deg, #7c4dff, #651fff);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.back-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.ticket-info {
    display: flex;
    gap: 15px;
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.ticket-status, .ticket-category {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    background: white;
    border: 1px solid #e9ecef;
    color: black;
}

.ticket-content {
    padding: 25px;
}

.ticket-content h3 {
    color: #333;
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.ticket-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    line-height: 1.7;
    color: #555;
    border-left: 4px solid #7c4dff;
}

.ticket-meta {
    color: #666;
    font-size: 14px;
    display: flex;
    gap: 25px;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
}

.ticket-responses {
    padding: 25px;
    border-top: 1px solid #e9ecef;
    background: #fafbfc;
}

.ticket-responses h3 {
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #7c4dff;
    font-size: 18px;
    font-weight: 600;
}

.no-responses {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    font-size: 16px;
}

.response-form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #e9ecef;
}

.response-form h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.response-form textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    resize: vertical;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.3s;
}

.response-form textarea:focus {
    outline: none;
    border-color: #7c4dff;
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.1);
}

.response-form button {
    background: #7c4dff;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.response-form button:hover {
    background: #651fff;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-detail {
        margin: 10px;
        border-radius: 8px;
    }

    .ticket-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .ticket-header h2 {
        font-size: 20px;
    }

    .ticket-content, .ticket-responses, .response-form {
        padding: 20px;
    }

    .ticket-info {
        flex-direction: column;
        padding: 15px 20px;
    }

    .ticket-meta {
        flex-direction: column;
        gap: 10px;
    }
}


.ticket-detail-header {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 30px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ticket-detail-body {
    padding: 30px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #6c5ce7;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.info-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.info-label {
    font-weight: bold;
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.info-value {
    color: #333;
    font-size: 16px;
}

.description-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #6c5ce7;
}

/* Réponses */
.responses-section {
    margin-top: 30px;
}

.response-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #ddd;
}

.response-item.staff {
    background: #e8f5e8;
    border-left-color: #28a745;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.response-author {
    font-weight: bold;
    color: #333;
}

.response-author.staff {
    color: #28a745;
}

.response-date {
    color: #666;
    font-size: 14px;
}

.response-content {
    color: #555;
    line-height: 1.6;
}

/* States pour les statuts */
.status-ouvert {
    background: rgba(40, 167, 69, 0.2) !important;
    color: #28a745 !important;
}

.status-en_cours {
    background: rgba(255, 193, 7, 0.2) !important;
    color: #ffc107 !important;
}

.status-ferme {
    background: rgba(220, 53, 69, 0.2) !important;
    color: #dc3545 !important;
}

.status-resolu {
    background: rgba(23, 162, 184, 0.2) !important;
    color: #17a2b8 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .ticket-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .ticket-meta {
        flex-direction: column;
        gap: 10px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .ticket-dates {
        flex-direction: column;
        gap: 5px;
    }
}

/* Login styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
}

.steam-login-btn {
    display: inline-block;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.steam-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(108, 92, 231, 0.3);
}

.no-tickets {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-tickets-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* Uniformisation des images dans les tickets */
.ticket-description img,
.response-content img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 10px 0;
    display: block;
}

/* Pour les petites images, les centrer */
.ticket-description img[width],
.response-content img[width] {
    margin: 10px auto;
}

/* Container pour les images multiples */
.ticket-description,
.response-content {
    text-align: left;
}

.ticket-description p:has(img),
.response-content p:has(img) {
    text-align: center;
}

/* Galerie d'images si plusieurs images côte à côte */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.image-gallery img {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

/* Modal pour agrandir les images */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-modal img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.image-modal .close:hover {
    color: #ccc;
}

/* Responsive pour les images */
@media (max-width: 768px) {
    .ticket-description img,
    .response-content img {
        max-height: 250px;
    }

    .image-gallery img {
        min-width: 150px;
        max-width: 200px;
        height: 150px;
    }
}

/* Section de recherche */
.search-section {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,249,250,0.95));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-header {
    text-align: center;
    margin-bottom: 25px;
}

.search-header h3 {
    color: #6c5ce7;
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 700;
}

.search-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field label {
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.search-field input,
.search-field select {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
    transform: translateY(-1px);
}

.search-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.search-btn,
.clear-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    min-width: 140px;
}

.search-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

.clear-btn {
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
    color: white;
    box-shadow: 0 4px 15px rgba(253, 121, 168, 0.3);
}

.clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(253, 121, 168, 0.4);
}

/* Résultats de recherche */
.search-results-info {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(162, 155, 254, 0.1));
    border-radius: 15px;
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-label {
    font-weight: 600;
    color: #6c5ce7;
    font-size: 14px;
}

.filter-tag {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.2);
}

.results-count {
    text-align: center;
    font-weight: 600;
    color: #6c5ce7;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .search-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .search-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .search-actions {
        flex-direction: column;
        align-items: center;
    }

    .search-btn,
    .clear-btn {
        width: 100%;
        max-width: 200px;
    }

    .filter-tags {
        justify-content: center;
    }
}
