/* ==========================================================================
   WHM Frontend — Palette Kidlogis #FA83FF
   ========================================================================== */
@import url('kidlogis-vars.css');

/* ──────────────────────────────────────────
   LAYOUT CLIENT
────────────────────────────────────────── */

.whm-my-hostings,
.whm-domains-page,
.whm-tickets-page {
    max-width: 980px;
    margin: 0 auto;
}

.whm-header-section {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--k-border);
}

.whm-section-title    { font-size: 24px; font-weight: 700; color: #1f2937; margin: 0 0 4px; }
.whm-section-subtitle { color: #6b7280; font-size: 14px; margin: 0; }

/* ──────────────────────────────────────────
   EMPTY STATE
────────────────────────────────────────── */

.whm-empty-state {
    text-align: center;
    padding: 64px 24px;
    background: var(--k-grad);
    border-radius: 20px;
    color: white;
}
.whm-empty-icon { margin-bottom: 20px; opacity: .85; }
.whm-empty-state h3 { font-size: 20px; font-weight: 700; margin: 0 0 10px; color: white; }
.whm-empty-state p  { font-size: 15px; opacity: .88; margin-bottom: 24px; color: white; }

/* ──────────────────────────────────────────
   HOSTING / INSTANCE CARDS
────────────────────────────────────────── */

.whm-hosting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.whm-hosting-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: box-shadow .25s, border-color .25s, transform .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.whm-hosting-card:hover {
    box-shadow: 0 8px 28px var(--k-shadow);
    border-color: var(--k-border);
    transform: translateY(-2px);
}

.whm-card-status-active    { border-top: 3px solid var(--s-ok); }
.whm-card-status-pending   { border-top: 3px solid var(--s-warn); }
.whm-card-status-processing{ border-top: 3px solid var(--s-info); }
.whm-card-status-suspended { border-top: 3px solid var(--s-err); }
.whm-card-status-cancelled { border-top: 3px solid #9ca3af; }

.whm-card-header { padding: 20px 20px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.whm-card-title { flex: 1; }
.whm-card-title h3 { font-size: 16px; font-weight: 700; color: #1f2937; margin: 0 0 5px; }

.whm-server-name, .whm-server-location-client {
    display: flex; align-items: center; gap: 6px;
    color: #6b7280; font-size: 13px; margin: 4px 0 0;
}
.whm-server-name svg, .whm-server-location-client svg { color: var(--k); flex-shrink: 0; }

.whm-card-status {
    display: flex; align-items: center; gap: 5px;
    padding: 5px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 600;
    white-space: nowrap; flex-shrink: 0;
    text-transform: uppercase; letter-spacing: .3px;
}
.whm-card-status-active    .whm-card-status { background: #dcfce7; color: #166534; }
.whm-card-status-pending   .whm-card-status { background: #fef9c3; color: #92400e; }
.whm-card-status-processing .whm-card-status { background: #dbeafe; color: #1e40af; }
.whm-card-status-suspended .whm-card-status { background: #fee2e2; color: #991b1b; }
.whm-card-status-cancelled .whm-card-status { background: #f3f4f6; color: #6b7280; }

.whm-card-body { padding: 0 20px 16px; display: flex; flex-direction: column; }

.whm-info-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f3f4f6; gap: 8px; }
.whm-info-row:last-child { border-bottom: none; }
.whm-info-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #6b7280; font-weight: 500; flex-shrink: 0; }
.whm-info-label svg { color: var(--k-deep); }
.whm-info-value { font-size: 13px; color: #1f2937; font-weight: 500; text-align: right; word-break: break-all; }
.whm-info-value code { background: #f3f4f6; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-family: monospace; }

.whm-password-value { font-family: monospace; font-size: 13px; cursor: pointer; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 3px 10px; }
.whm-order-link { color: var(--k-deep); text-decoration: none; font-weight: 600; }
.whm-order-link:hover { color: var(--k-dark); }

.whm-card-footer { padding: 14px 20px; border-top: 1px solid #f3f4f6; background: #fafafa; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ──────────────────────────────────────────
   INSTANCES SAAS
────────────────────────────────────────── */

.whm-saas-type-bar {
    padding: 11px 20px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    border-bottom: 1px solid #f3f4f6;
}
.whm-saas-type-label { font-weight: 700; font-size: 14px; }
.whm-saas-type-desc  { font-size: 12px; color: #6b7280; }

.whm-password-info { display: flex; align-items: center; gap: 6px; color: var(--k-deep); font-size: 13px; font-style: italic; }

.whm-pending-notice, .whm-suspended-notice {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: 8px;
    font-size: 13px; width: 100%; box-sizing: border-box; line-height: 1.4;
}
.whm-pending-notice   { background: #fef9c3; color: #92400e; border: 1px solid #fde68a; }
.whm-suspended-notice { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.whm-suspended-notice a { color: #dc2626; font-weight: 600; }

/* ──────────────────────────────────────────
   BOUTONS
────────────────────────────────────────── */

.whm-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px; border-radius: 10px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; border: none;
    transition: all .2s; text-decoration: none;
    font-family: inherit; line-height: 1;
}
.whm-btn-primary { background: var(--k-grad); color: white; box-shadow: 0 3px 12px var(--k-shadow); }
.whm-btn-primary:hover { opacity: .88; color: white; transform: translateY(-1px); box-shadow: 0 5px 18px var(--k-shadow-md); }
.whm-btn-outline { background: white; color: var(--k-deep); border: 1.5px solid var(--k-border); }
.whm-btn-outline:hover { background: var(--k-bg-light); border-color: var(--k); color: var(--k-deep); }
.whm-btn-ghost { background: transparent; color: #6b7280; border: 1px solid #e5e7eb; }
.whm-btn-ghost:hover { background: #f9fafb; }
.whm-btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }

/* ──────────────────────────────────────────
   MODALS
────────────────────────────────────────── */

.whm-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.whm-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(3px); }
.whm-modal-content { position: relative; background: white; border-radius: 20px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.18); max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.whm-modal-large { max-width: 680px; }
.whm-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid #f3f4f6; background: var(--k-grad-lt); flex-shrink: 0; }
.whm-modal-header h2 { margin: 0; font-size: 18px; color: #1f2937; }
.whm-modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #9ca3af; padding: 4px 8px; border-radius: 6px; transition: background .15s; line-height: 1; }
.whm-modal-close:hover { background: #f3f4f6; color: #374151; }
.whm-modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.whm-modal-footer { padding: 16px 24px; border-top: 1px solid #f3f4f6; display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-shrink: 0; background: #fafafa; }
.whm-modal-notice { margin: 0 24px 16px; padding: 10px 16px; border-radius: 8px; font-size: 13px; flex-shrink: 0; }
.whm-notice-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.whm-notice-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ──────────────────────────────────────────
   FORMULAIRES
────────────────────────────────────────── */

.whm-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.whm-form-group:last-child { margin-bottom: 0; }
.whm-form-group label { font-size: 13px; font-weight: 600; color: #374151; }
.whm-input, .whm-select, .whm-textarea {
    width: 100%; padding: 9px 13px;
    border: 1.5px solid #e5e7eb; border-radius: 10px;
    font-size: 14px; color: #1f2937; font-family: inherit;
    transition: border-color .2s, box-shadow .2s; box-sizing: border-box; background: white;
}
.whm-input:focus, .whm-select:focus, .whm-textarea:focus { outline: none; border-color: var(--k); box-shadow: 0 0 0 3px rgba(250,131,255,.15); }
.whm-textarea { resize: vertical; min-height: 80px; }
.whm-info-box-sm { background: var(--k-bg-light); border: 1px solid var(--k-border); border-radius: 10px; padding: 12px 16px; font-size: 13px; color: var(--k-deep); line-height: 1.5; }
.required { color: var(--s-err); }

/* ──────────────────────────────────────────
   TICKETS — CHAT IA
────────────────────────────────────────── */

.whm-ai-chat-card { background: white; border-radius: 16px; border: 1px solid var(--k-border); box-shadow: 0 4px 20px var(--k-shadow); margin-bottom: 28px; overflow: hidden; }
.whm-ai-chat-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--k-grad-lt); border-bottom: 1px solid var(--k-border); }
.whm-ai-avatar { width: 48px; height: 48px; background: var(--k-grad); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; box-shadow: 0 3px 10px var(--k-shadow); }
.whm-ai-chat-header h3 { margin: 0; font-size: 16px; color: #1f2937; }
.whm-ai-status { font-size: 12px; color: var(--s-ok); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.whm-ai-dot { width: 7px; height: 7px; background: var(--s-ok); border-radius: 50%; display: inline-block; animation: whm-pulse 2s infinite; }
@keyframes whm-pulse { 0%,100%{ opacity:1 } 50%{ opacity:.4 } }

.whm-chat-messages { padding: 20px; min-height: 160px; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.whm-chat-msg  { display: flex; }
.whm-chat-ai   { justify-content: flex-start; }
.whm-chat-user { justify-content: flex-end; }
.whm-chat-bubble { max-width: 75%; padding: 10px 15px; border-radius: 18px; font-size: 14px; line-height: 1.5; }
.whm-chat-ai   .whm-chat-bubble { background: #f3f4f6; color: #1f2937; border-radius: 4px 18px 18px 18px; }
.whm-chat-user .whm-chat-bubble { background: var(--k-grad); color: white; border-radius: 18px 4px 18px 18px; }
.whm-chat-typing .whm-chat-bubble { color: #9ca3af; font-style: italic; }

.whm-chat-human-prompt { border-top: 1px solid var(--k-border); padding: 12px 20px; background: var(--k-bg-light); }
.whm-human-prompt-inner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--k-deep); font-size: 13px; }

.whm-chat-input-area { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid #f3f4f6; align-items: flex-end; }
.whm-chat-input-area textarea { flex: 1; border: 1.5px solid #e5e7eb; border-radius: 12px; padding: 10px 14px; font-size: 14px; resize: none; font-family: inherit; transition: border-color .2s; }
.whm-chat-input-area textarea:focus { outline: none; border-color: var(--k); box-shadow: 0 0 0 3px rgba(250,131,255,.15); }

/* Tickets list */
.whm-tickets-section { margin-top: 0; }
.whm-tickets-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.whm-tickets-header h3 { margin: 0; font-size: 18px; color: #1f2937; }
.whm-tickets-list { display: flex; flex-direction: column; gap: 10px; }

.whm-ticket-card { background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 20px; transition: box-shadow .2s, border-color .2s; }
.whm-ticket-card:hover { box-shadow: 0 4px 16px var(--k-shadow); border-color: var(--k-border); }
.whm-ticket-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.whm-ticket-info { flex: 1; }
.whm-ticket-id { font-size: 11px; color: #9ca3af; font-weight: 600; text-transform: uppercase; display: block; margin-bottom: 3px; }
.whm-ticket-info h4 { margin: 0; font-size: 15px; color: #1f2937; }
.whm-ticket-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.whm-ticket-footer { display: flex; align-items: center; gap: 14px; font-size: 12px; color: #6b7280; }
.whm-ticket-footer .whm-btn { margin-left: auto; }

.whm-ticket-status { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.whm-ticket-status-open        { background: #dcfce7; color: #166534; }
.whm-ticket-status-in-progress { background: #dbeafe; color: #1e40af; }
.whm-ticket-status-waiting     { background: #fef9c3; color: #92400e; }
.whm-ticket-status-closed      { background: #f3f4f6; color: #6b7280; }

.whm-ticket-priority { padding: 3px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; }
.whm-priority-low    { background: #f3f4f6; color: #9ca3af; }
.whm-priority-normal { background: var(--k-bg-light); color: var(--k-deep); }
.whm-priority-high   { background: #fef3c7; color: #d97706; }
.whm-priority-urgent { background: #fee2e2; color: #dc2626; }

.whm-empty-tickets { padding: 40px 20px; background: white; border-radius: 12px; border: 1px dashed #e5e7eb; text-align: center; }
.whm-empty-tickets .whm-empty-icon { color: #d1d5db; margin-bottom: 14px; }
.whm-ticket-message-item { padding: 12px 16px; border-radius: 10px; margin-bottom: 10px; }
.whm-ticket-message-user  { background: var(--k-bg-light); border-left: 3px solid var(--k); }
.whm-ticket-message-admin { background: #f0f9ff; border-left: 3px solid var(--s-info); }
.whm-ticket-message-meta  { font-size: 11px; color: #9ca3af; margin-bottom: 6px; }
.whm-ticket-message-body  { font-size: 14px; color: #374151; white-space: pre-line; }

/* ──────────────────────────────────────────
   PAGE DOMAINES
────────────────────────────────────────── */

/* Hero */
.whm-dom-hero {
    background: var(--k-grad);
    border-radius: 20px;
    padding: 36px 40px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    margin-bottom: 24px; color: white; overflow: hidden; position: relative;
}
.whm-dom-hero::before { content: ''; position: absolute; top: -50px; right: -50px; width: 220px; height: 220px; background: rgba(255,255,255,.07); border-radius: 50%; pointer-events: none; }
.whm-dom-hero-text { flex: 1; position: relative; }
.whm-dom-hero-text h2 { font-size: 22px; font-weight: 700; margin: 0 0 8px; color: white; }
.whm-dom-hero-text p  { font-size: 15px; opacity: .9; margin: 0 0 22px; color: white; line-height: 1.5; }
.whm-dom-hero-icon { opacity: .2; flex-shrink: 0; }

.whm-dom-cta-main {
    display: inline-flex; align-items: center; gap: 8px;
    background: white; color: var(--k-deeper, var(--k-deep));
    padding: 11px 22px; border-radius: 10px;
    font-size: 15px; font-weight: 700; text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,.18); transition: all .2s;
}
.whm-dom-cta-main:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.22); color: var(--k-deep); }

/* Card générique */
.whm-dom-card {
    background: white; border: 1px solid #e5e7eb;
    border-radius: 16px; overflow: hidden; margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.whm-dom-card-header { display: flex; align-items: center; gap: 16px; padding: 18px 24px; border-bottom: 1px solid #f3f4f6; background: var(--k-grad-lt); }
.whm-dom-card-icon { width: 48px; height: 48px; background: var(--k-grad); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; font-size: 20px; font-weight: 800; flex-shrink: 0; }
.whm-dom-card-header h3 { margin: 0 0 2px; font-size: 17px; font-weight: 700; color: #1f2937; }
.whm-dom-card-header p  { margin: 0; font-size: 13px; color: #6b7280; }
.whm-dom-card-body { padding: 24px; }

/* Features grid */
.whm-dom-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1px; background: #f3f4f6; }
.whm-dom-feature { background: white; padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; transition: background .15s; }
.whm-dom-feature:hover { background: var(--k-bg-light); }
.whm-dom-feature-icon { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--k-bg-light); color: var(--k-deep); }
.whm-dom-feature h4 { margin: 0 0 3px; font-size: 14px; font-weight: 600; color: #1f2937; }
.whm-dom-feature p  { margin: 0; font-size: 13px; color: #6b7280; line-height: 1.4; }

/* TLDs */
.whm-dom-tlds { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 20px 24px; }
.whm-dom-tld { border: 2px solid #f3f4f6; border-radius: 12px; padding: 16px 12px; text-align: center; transition: all .2s; position: relative; }
.whm-dom-tld:hover { border-color: var(--k-border); background: var(--k-bg-light); transform: translateY(-2px); box-shadow: 0 4px 12px var(--k-shadow); }
.whm-dom-tld-featured { border-color: var(--k); background: var(--k-bg-light); }
.whm-dom-tld-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--k-grad); color: white; font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 20px; white-space: nowrap; }
.whm-dom-tld-name { font-size: 22px; font-weight: 800; color: #1f2937; margin-bottom: 3px; }
.whm-dom-tld-featured .whm-dom-tld-name { color: var(--k-deep); }
.whm-dom-tld-desc { font-size: 11px; color: #9ca3af; margin-bottom: 10px; }
.whm-dom-tld-price { font-size: 18px; font-weight: 700; color: var(--k-deep); }
.whm-dom-tld-period { font-size: 11px; color: #9ca3af; font-weight: 400; }

/* Email pro section */
.whm-dom-email { display: flex; gap: 20px; align-items: flex-start; padding: 22px 24px; }
.whm-dom-email-icon { width: 52px; height: 52px; background: var(--k-grad); border-radius: 14px; display: flex; align-items: center; justify-content: center; color: white; flex-shrink: 0; }
.whm-dom-email-content { flex: 1; }
.whm-dom-email-content h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: #1f2937; }
.whm-dom-email-content p  { margin: 0 0 14px; font-size: 14px; color: #6b7280; }
.whm-dom-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.whm-dom-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; }
.whm-dom-check-dot { width: 18px; height: 18px; background: var(--k-bg-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--k-deep); font-size: 10px; font-weight: 700; }

/* DNS Info */
.whm-dom-dns { padding: 0 24px 24px; }
.whm-dom-dns-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.whm-dom-dns-step { background: #fafafa; border: 1px solid #f3f4f6; border-radius: 10px; padding: 16px; }
.whm-dom-dns-num { width: 26px; height: 26px; background: var(--k-grad); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.whm-dom-dns-step h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: #1f2937; }
.whm-dom-dns-step p  { margin: 0; font-size: 12px; color: #6b7280; line-height: 1.4; }

/* FAQ accordion */
.whm-dom-faq { padding: 8px 0; }
.whm-dom-faq-item { border-bottom: 1px solid #f9fafb; }
.whm-dom-faq-item:last-child { border-bottom: none; }
.whm-dom-faq-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; cursor: pointer; transition: background .15s; }
.whm-dom-faq-q:hover { background: var(--k-bg-light); }
.whm-dom-faq-q h4 { margin: 0; font-size: 14px; font-weight: 600; color: #1f2937; line-height: 1.4; }
.whm-dom-faq-toggle { width: 22px; height: 22px; background: var(--k-bg-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--k-deep); font-size: 16px; line-height: 1; transition: all .2s; font-weight: 300; }
.whm-dom-faq-item.open .whm-dom-faq-toggle { background: var(--k-grad); color: white; transform: rotate(45deg); }
.whm-dom-faq-a { display: none; padding: 0 24px 16px; font-size: 13px; color: #6b7280; line-height: 1.6; }
.whm-dom-faq-item.open .whm-dom-faq-a { display: block; }

/* Bottom CTA */
.whm-dom-bottom-cta {
    background: var(--k-grad); border-radius: 16px; padding: 28px 32px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; color: white;
    margin-top: 20px;
}
.whm-dom-bottom-cta h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: white; }
.whm-dom-bottom-cta p  { margin: 0; font-size: 14px; opacity: .88; color: white; }
.whm-dom-cta-white {
    display: inline-flex; align-items: center; gap: 8px;
    background: white; color: var(--k-deep); padding: 11px 22px;
    border-radius: 10px; font-size: 14px; font-weight: 700;
    text-decoration: none; white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,.15); flex-shrink: 0; transition: all .2s;
}
.whm-dom-cta-white:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.2); color: var(--k-deep); }

/* Loading */
.whm-loading { text-align: center; padding: 30px; color: #9ca3af; font-size: 14px; }
