/* ============================================================
   Novalike SAV — Public CSS
   Styles formulaire Contact Form 7
   ============================================================ */

/* ── Champ token caché ───────────────────────────────────── */
input[name="sav-token"],
.wpcf7 span.wpcf7-form-control-wrap[data-name="sav-token"] {
    display: none !important;
}

/* ── Inputs, textarea, select CF7 ───────────────────────── */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 input[type="url"],
.wpcf7 input[type="date"],
.wpcf7 textarea,
.wpcf7 select {
    width: 100%;
    background-color: #004587;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

/* ── Placeholder ─────────────────────────────────────────── */
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
    color: rgba(255, 255, 255, 0.85);
}

.wpcf7 input::-webkit-input-placeholder,
.wpcf7 textarea::-webkit-input-placeholder { color: rgba(255, 255, 255, 0.85); }
.wpcf7 input::-moz-placeholder,
.wpcf7 textarea::-moz-placeholder          { color: rgba(255, 255, 255, 0.85); }
.wpcf7 input:-ms-input-placeholder,
.wpcf7 textarea:-ms-input-placeholder      { color: rgba(255, 255, 255, 0.85); }

/* ── Focus ───────────────────────────────────────────────── */
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="date"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
    background-color: #4aada6;
    box-shadow: 0 0 0 3px rgba(91, 191, 184, 0.35);
    outline: none;
}

/* ── Select — option texte visible ──────────────────────── */
.wpcf7 select option {
    background-color: #3d9b95;
    color: #ffffff;
}

.wpcf7 select option:first-child {
    color: rgba(255, 255, 255, 0.85);
}

/* ── Textarea ────────────────────────────────────────────── */
.wpcf7 textarea {
    min-height: 140px;
    resize: vertical;
}

/* ── Espacement entre champs ─────────────────────────────── */
.wpcf7 .wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 14px;
}

.wpcf7 p {
    margin-bottom: 14px;
}

/* ── Bouton submit ───────────────────────────────────────── */
.wpcf7 input[type="submit"] {
    background-color: #2e6da4;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

.wpcf7 input[type="submit"]:hover {
    background-color: #255a8e;
}

/* ── Messages validation CF7 ─────────────────────────────── */
.wpcf7 .wpcf7-not-valid-tip {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.wpcf7 .wpcf7-response-output {
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    margin-top: 12px;
    border: none;
}

.wpcf7 .wpcf7-mail-sent-ok {
    background-color: #d4edda;
    color: #155724;
}

.wpcf7 .wpcf7-validation-errors,
.wpcf7 .wpcf7-mail-sent-ng {
    background-color: #f8d7da;
    color: #721c24;
}

/* ── Champ invalide highlight ────────────────────────────── */
.wpcf7 .wpcf7-not-valid {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.4) !important;
}

/* ============================================================
   Thread conversation (mode réponse)
   ============================================================ */
.sav-thread {
    margin-bottom: 24px;
    border: 1px solid #e3e8ec;
    border-radius: 12px;
    background: #fafbfc;
    overflow: hidden;
}

.sav-thread-head {
    padding: 14px 18px;
    background: #004587;
    color: #fff;
}

.sav-thread-ticket {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.9;
    text-transform: uppercase;
}

.sav-thread-title {
    font-size: 16px;
    font-weight: 600;
    margin-top: 4px;
}

.sav-thread-list {
    padding: 16px;
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sav-thread-empty {
    text-align: center;
    color: #8a9299;
    font-style: italic;
    padding: 20px 0;
}

.sav-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.sav-msg-client {
    align-self: flex-start;
    background: #e8f4f3;
    color: #2c3e50;
    border-bottom-left-radius: 4px;
}

.sav-msg-admin {
    align-self: flex-end;
    background: #2e6da4;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.sav-msg-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
    margin-bottom: 4px;
    opacity: 0.85;
}

.sav-msg-author {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.sav-msg-date {
    font-weight: 400;
}

.sav-msg-body {
    white-space: pre-wrap;
}
