/* Assure que le form a bien l'id #gt-ticket-form */
#gt-ticket-form {
    max-width: 650px;
    margin: 30px auto;
    padding: 30px;              /* espace interne autour du contenu */
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    font-family: inherit;
    box-sizing: border-box;     /* IMPORTANT pour que padding soit inclus */
}

/* Appliquer box-sizing à tous les éléments à l'intérieur du formulaire
   évite que width:100% + padding provoque un débordement */
#gt-ticket-form, 
#gt-ticket-form * {
    box-sizing: border-box;
}

/* Labels */
#gt-ticket-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

/* Champs de saisie (cohérence sur tous) */
#gt-ticket-form input[type="text"],
#gt-ticket-form input[type="number"],
#gt-ticket-form input[type="date"],
#gt-ticket-form input[type="datetime-local"],
#gt-ticket-form input[type="tel"],
#gt-ticket-form input[type="email"],
#gt-ticket-form textarea,
#gt-ticket-form select,
#gt-ticket-form input[type="file"] {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;        /* padding left/right généreux pour ne pas coller */
    border-radius: 10px;
    border: 1px solid #d1d7dd;
    background: #f5f7fa;
    margin-bottom: 15px;
    font-size: 16px;
    appearance: none;          /* neutralise l'apparence native */
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Select : on ajoute un padding-right supplémentaire pour la flèche */
#gt-ticket-form select {
    padding-right: 44px;       /* laisse de la place pour la flèche native/custom */
    background-image: linear-gradient(45deg, transparent 50%, #777 50%),
                      linear-gradient(135deg, #777 50%, transparent 50%),
                      linear-gradient(to right, rgba(0,0,0,0.02), rgba(0,0,0,0.02));
    background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px), 100% 0;
    background-size: 6px 6px, 6px 6px, 1px 100%;
    background-repeat: no-repeat;
}

/* Forcer la hauteur minimale si un thème réduit la taille */
#gt-ticket-form input[type="text"],
#gt-ticket-form select,
#gt-ticket-form textarea {
    min-height: 48px;
    line-height: 1.25;
}

/* Focus */
#gt-ticket-form input:focus,
#gt-ticket-form textarea:focus,
#gt-ticket-form select:focus {
    border-color: #5A85FF;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(90,133,255,0.18);
    outline: none;
}

/* Input file : amélioration visuelle (si tu veux remplacer plus tard par un "fake" file input, on peut) */
#gt-ticket-form input[type="file"] {
    padding: 10px 12px;
    min-height: auto;
}

/* Bouton */
#gt-ticket-form input[type="submit"] {
    background: #5A85FF;
    color: #fff;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
}

/* Si le thème applique des floats ou positionnements, s'assurer d'un gap intérieur */
#gt-ticket-form .gt-row { /* optionnel : si tu utilises des lignes flex */
    display: flex;
    gap: 16px;
}

.gt-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.gt-ticket-card {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    padding: 15px 20px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 8%);
}

.gt-ticket-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.gt-ticket-type,
.gt-ticket-status,
.gt-ticket-public {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

/* Types colorés */
.gt-type-plainte { background:#d9534f; }
.gt-type-réclamation { background:#f0ad4e; }
.gt-type-reclamation { background:#f0ad4e; } /* fallback */
.gt-type-suggestion { background:#5bc0de; }

/* Statuts */
.gt-status-nouveau { background:#0275d8; }
.gt-status-en_cours { background:#5cb85c; }
.gt-status-clos { background:#6c757d; }

/* Public badge */
.gt-ticket-public {
    background:#28a745;
}

/* Titre */
.gt-ticket-title {
    margin: 0;
    font-size: 18px;
    color:#333;
}

/* Meta infos */
.gt-ticket-meta {
    font-size: 13px;
    opacity: 0.7;
    display: flex;
    gap: 15px;
    margin: 5px 0 10px 0;
}

/* Aperçu */
.gt-ticket-preview {
    font-size: 14px;
    color:#444;
    margin-bottom:15px;
}

/* Footer */
.gt-ticket-footer {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

/* Petit correctif responsive */
@media (max-width: 480px) {
    #gt-ticket-form { padding: 18px; }
    #gt-ticket-form select,
    #gt-ticket-form input,
    #gt-ticket-form textarea { padding: 10px 12px; font-size:15px; }
}

.gt-detail-ticket {
    max-width: 900px;
    margin: 40px auto;
}

.gt-detail-header {
    margin-bottom: 30px;
}

.gt-detail-meta {
    display: flex;
    gap: 10px;
}

.gt-detail-type {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    background: #eee;
}

.gt-detail-type-plainte {
    background: #ffe5e5;
    color: #b00000;
}

.gt-detail-type-reclamation {
    background: #fff4cc;
    color: #9a6b00;
}

.gt-detail-type-suggestion {
    background: #e5f4ff;
    color: #0066aa;
}

.gt-detail-status {
    font-size: 12px;
    color: #666;
}

.gt-detail-title {
    margin: 10px 0;
}

.gt-detail-sub {
    color: #777;
    font-size: 14px;
}

.gt-detail-message {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.gt-detail-reply {
    background: #fff;
    border: 1px solid #eee;
}

.gt-detail-avatar {
    font-size: 28px;
}

.gt-detail-message-author {
    font-weight: bold;
    margin-bottom: 5px;
}

.gt-detail-message-date {
    font-weight: normal;
    font-size: 12px;
    color: #888;
    margin-left: 10px;
}

.gt-detail-message-content {
    line-height: 1.6;
}

.gt-detail-attachments img {
    max-width: 120px;
    margin: 5px;
    border-radius: 6px;
}

.gt-detail-empty {
    color: #777;
    font-style: italic;
}

.gt-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.gt-page {
    padding: 6px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    border-radius: 4px;
}

.gt-page.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}