/* public/assets/css/support.css */

/* Importer la base commune des formulaires */
@import url('login-register.css');

/* Surcharger le conteneur pour la page de support pour le rendre plus large */
.support-form-container {
    max-width: 680px !important;
    text-align: left !important;
    /* MODIFICATION: Ajout de transitions pour l'effet de morphing */
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    min-height: 500px; /* Hauteur minimale pour éviter un "saut" au chargement */
}

/* MODIFICATION: Style du conteneur après succès */
.support-form-container.morphed {
    max-width: 500px !important;
    min-height: 250px;
    padding-top: 50px;
    padding-bottom: 50px;
}


.support-form-container h1 {
    text-align: center !important;
}

.support-form-container .form-intro {
    text-align: center;
    color: #a0a0a0;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Style pour l'astérisque rouge des champs obligatoires */
.required-star {
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px;
}

/* Note en bas du formulaire, maintenant entièrement en rouge */
.required-note {
    font-size: 0.8em;
    color: #dc3545;
    margin-top: 20px;
    margin-bottom: 15px;
}

/* Style pour les labels de select et textarea pour qu'ils ressemblent aux labels flottants */
.select-label, .textarea-label {
    display: block;
    margin-bottom: 2px;
    font-size: 0.8em;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    transform: translateY(-18px); /* Simule la position "flottée" */
    transition: color 0.2s ease-in-out;
}

.input-group.error .select-label,
.input-group.error .textarea-label {
    color: #dc3545;
}

/* Style pour le textarea pour qu'il corresponde aux inputs */
.input-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-bottom: 1px solid #ffffff;
    background-color: transparent;
    color: #ffffff;
    border-radius: 0;
    box-sizing: border-box;
    font-size: 1.1em;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s ease-in-out;
    resize: vertical;
    min-height: 120px;
}

.input-group.error textarea {
    border-bottom-color: #dc3545;
}

/* Message d'erreur sous le champ */
.input-error-text {
    color: #ff8a96;
    font-size: 0.8em;
    margin-top: 4px;
    display: block;
    min-height: 1em; /* Empêche le saut de layout */
}

/* --- STYLES POUR LE CHAMP TÉLÉPHONE COMPOSITE (inspiré de onboarding.css) --- */
.phone-input-container {
    display: flex;
    align-items: flex-end; /* Aligne par le bas */
    gap: 15px;
}

.phone-input-container .input-group {
    margin-bottom: 0;
}

.phone-prefix-select {
    flex: 0 0 100px; /* Largeur fixe pour le préfixe */
}

.phone-prefix-select select.country-select {
    padding-bottom: 9px; /* Ajustement pour aligner avec les inputs */
}

.phone-number-input {
    flex: 1;
}


/* --- STYLES : Zone de téléversement (inspiré de onboarding.css) --- */
.attachment-upload-area {
    border: 2px dashed #444;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #aaa;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.attachment-upload-area.active,
.attachment-upload-area:hover {
    background-color: #2a2a2a;
    border-color: #666;
}

.attachment-upload-area i {
    font-size: 2.5em;
    color: #666;
}

/* Section des prévisualisations */
#attachment-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.attachment-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #444;
    background-color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-preview .attachment-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.6);
    color: white;
    font-size: 10px;
    padding: 3px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-preview .remove-attachment {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.attachment-preview .remove-attachment:hover {
    background: #dc3545;
}

.support-form-container .btn-primary {
    width: 100%;
    margin-top: 20px;
}

/* --- MESSAGES DE FEEDBACK --- */
#form-feedback {
    display: none; /* Caché par défaut, géré par JS */
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95em;
    text-align: center;
}
#form-feedback.alert-success {
    background-color: #198754;
    color: #ffffff;
}
#form-feedback.alert-error {
    background-color: #dc3545;
    color: #ffffff;
}

/* --- MODIFICATION: STYLES POUR L'ANIMATION DE SUCCÈS --- */
#success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.success-icon {
    font-size: 4em;
    color: #198754;
    margin-bottom: 20px;
    animation: pop-in 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

#success-state h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2em;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

#success-state p {
    color: #a0a0a0;
    font-size: 1.1em;
    line-height: 1.5;
}

/* Animations */
.fade-out {
    animation: fade-out 0.4s ease-out forwards;
}

.fade-in {
    animation: fade-in 0.5s 0.3s ease-in forwards;
    opacity: 0;
}

@keyframes fade-out {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pop-in {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
