/**
 * pl-support-sr.css -- Styles du formulaire Support Request (SR)
 * Toutes les classes prefixees .pl-sr-* pour eviter les conflits avec le legacy BO
 * Phase 3 -- Support Agent
 */

/* Container principal du formulaire */
.pl-sr-container {
    max-width: 720px;
    margin: 20px auto;
    padding: 24px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #333;
}

.pl-sr-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #3498db;
}

.pl-sr-title .fa {
    color: #3498db;
    margin-right: 6px;
}

/* Champs */
.pl-sr-field {
    margin-bottom: 16px;
}

.pl-sr-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #444;
}

.pl-sr-input,
.pl-sr-select,
.pl-sr-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fafafa;
    transition: border-color 0.2s;
}

.pl-sr-input:focus,
.pl-sr-select:focus,
.pl-sr-textarea:focus {
    border-color: #3498db;
    outline: none;
    background: #fff;
}

.pl-sr-textarea {
    resize: vertical;
    min-height: 100px;
}

.pl-sr-hint {
    font-size: 12px;
    color: #777;
    font-weight: normal;
}

.pl-sr-required {
    color: #c53030;
}

.pl-sr-charcount {
    font-size: 12px;
    color: #777;
    text-align: right;
    margin-top: 2px;
}

/* Champs lecture seule (ancres secondaires pre-remplies) */
.pl-sr-field-readonly label {
    color: #666;
    font-weight: normal;
}

.pl-sr-readonly-val {
    display: inline-block;
    padding: 4px 8px;
    background: #ecf0f1;
    border-radius: 3px;
    font-size: 13px;
    color: #555;
}

/* Radios urgence */
.pl-sr-radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pl-sr-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.pl-sr-radio input[type="radio"] {
    cursor: pointer;
    width: auto;
}

/* Boutons */
.pl-sr-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pl-sr-btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background 0.15s;
}

.pl-sr-btn-primary {
    background: #3498db;
    color: #fff;
}

.pl-sr-btn-primary:hover {
    background: #2176ae;
}

.pl-sr-btn-primary:disabled {
    background: #95c5e8;
    cursor: not-allowed;
}

.pl-sr-btn-secondary {
    background: #ecf0f1;
    color: #444;
    border: 1px solid #ccc;
}

.pl-sr-btn-secondary:hover {
    background: #dde3e6;
}

/* Feedback AJAX */
.pl-sr-feedback {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.pl-sr-feedback--success {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    color: #1b5e20;
}

.pl-sr-feedback--error {
    background: #fdecea;
    border: 1px solid #e53935;
    color: #b71c1c;
}

.pl-sr-feedback--info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    color: #0d47a1;
}

/* ============================================================
 * Bouton flottant universel (footer global du BO)
 * ============================================================ */
#pl-sr-float-btn {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 9000;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.22);
    transition: background 0.15s, box-shadow 0.15s;
    font-family: Arial, Helvetica, sans-serif;
}

#pl-sr-float-btn:hover {
    background: #2176ae;
    box-shadow: 0 5px 14px rgba(0,0,0,0.28);
}

#pl-sr-float-btn .fa {
    margin-right: 5px;
}

/* Bouton contextuel sur les fiches */
button[data-pl-sr-button]:not(#pl-sr-float-btn) {
    display: inline-block;
    margin: 8px 0;
    padding: 7px 14px;
    background: #f0f7ff;
    border: 1px solid #3498db;
    border-radius: 4px;
    color: #2176ae;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

button[data-pl-sr-button]:not(#pl-sr-float-btn):hover {
    background: #d6eaf8;
}

/* [support-agent] Champs figes quand la SR vient du widget contextuel */
.pl-sr-input.pl-sr-locked,
.pl-sr-select:disabled {
    background: #eef0f2;
    color: #555;
    cursor: not-allowed;
    border-color: #d0d4d8;
}
.pl-sr-lock-note {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
}
.pl-sr-lock-note .fa { margin-right: 4px; }

/* Toggle "donner une plage horaire" */
.pl-sr-checkbox {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}
.pl-sr-checkbox input { margin-right: 6px; vertical-align: middle; }

/* Hint mis en avant (heure de l'incident : aide au diagnostic) */
.pl-sr-hint-strong {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    background: #fff8e6;
    border-left: 3px solid #f0ad4e;
    border-radius: 3px;
    font-size: 12.5px;
    color: #6a5320;
    line-height: 1.45;
}
