/* ==========================================================================
   §1  CARDS CLIENT
   Markup : widget/client-test.php
   Variables dynamiques posées en inline sur .cc-header uniquement :
     --cc-accent, --cc-accent-text, --cc-tint, --cc-avatar-tint
   ========================================================================== */

/* ─── 1.0 Variables ─────────────────────────────────────────── */
.cc-card {
    --cc-theme:        var(--fimobile-theme-color, #094bac);
    --cc-r:            var(--fimobile-rounded, 15px);
    --cc-r-sm:         calc(var(--cc-r) - 5px);   /* 10px */
    --cc-r-xs:         calc(var(--cc-r) - 7px);   /*  8px */

    --cc-accent:       var(--cc-theme);
    --cc-accent-text:  #fff;
    --cc-tint:         color-mix(in srgb, var(--cc-theme) 5%, transparent);
    --cc-avatar-tint:  color-mix(in srgb, var(--cc-theme) 10%, transparent);

    --cc-soft:         color-mix(in srgb, var(--cc-theme) 8%, #fff);
    --cc-soft-border:  color-mix(in srgb, var(--cc-theme) 25%, #fff);
}

/* ─── 1.1 Carte ─────────────────────────────────────────────── */
.card.cc-card {
    border:        0;
    box-shadow:    0 4px 14px rgba(15, 23, 42, .08);
    transition:    background .25s, box-shadow .25s;
}

/* Blacklist : carte entière en rouge léger */
.card.cc-card[data-blacklist="1"] {
    background: #fef2f2;
    border:     1px solid #fecaca;
    box-shadow: 0 4px 14px rgba(220, 38, 38, .15);
}
.cc-card[data-blacklist="1"] .cc-section        { border-bottom-color: #fee2e2; }
.cc-card[data-blacklist="1"] .cc-custom-item    { background: #fff5f5; }
.cc-card[data-blacklist="1"] .cc-custom-item:hover { background: #ffe4e4; }
.cc-card[data-blacklist="1"] .cc-comment        { background: #fff5f5; border-left-color: #fca5a5; }
.cc-card[data-blacklist="1"] .cc-pet            { background: #fff5f5; border-color: #fecaca; }
.cc-card[data-blacklist="1"] .cc-pet:hover      { background: #ffe4e4; border-color: #fca5a5; color: #991b1b; }
.cc-card[data-blacklist="1"] .cc-contact-icon   { background: #fff5f5; }
.cc-card[data-blacklist="1"] .cc-emergency      { background: #fff5f5; border-color: #fca5a5; }
.cc-card[data-blacklist="1"] .cc-tag            { background: #fee2e2; color: #991b1b; }

/* ─── 1.2 Header ────────────────────────────────────────────── */
.cc-card .cc-header {
    position:      relative;
    padding:       1rem 1rem .9rem 1.15rem;
    background:    linear-gradient(135deg, var(--cc-tint) 0%, #f8fafc 70%);
    border-bottom: 1px solid #e2e8f0;
    color:         #0f172a;
    overflow:      hidden;
    transition:    background .25s;
}

/* Bandeau latéral */
.cc-card .cc-header::before {
    content:    '';
    position:   absolute;
    top: 0; bottom: 0; left: 0;
    width:      4px;
    background: #cbd5e1;
    transition: width .25s, background .25s;
}
.cc-card .cc-header.has-accent::before {
    width:      6px;
    background: var(--cc-accent);
}

/* Halo décoratif */
.cc-card .cc-header::after {
    content:        '';
    position:       absolute;
    top: -50px; right: -50px;
    width: 150px; height: 150px;
    border-radius:  50%;
    background:     var(--cc-avatar-tint);
    opacity:        .6;
    pointer-events: none;
    transition:     opacity .25s;
}
.cc-card .cc-header.has-accent::after { opacity: 1; }

.cc-card .cc-header-inner { position: relative; z-index: 1; }

.cc-card .cc-row-top {
    display:     flex;
    align-items: center;
    gap:         .75rem;
}

/* Avatar */
.cc-card .cc-avatar {
    flex:            none;
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           48px;
    height:          48px;
    background:      var(--cc-soft);
    border:          2px solid var(--cc-soft-border);
    border-radius:   50%;
    color:           var(--cc-theme);
    font-size:       1.05rem;
    font-weight:     700;
    letter-spacing:  .5px;
    transition:      all .25s;
}
.cc-card .cc-header.has-accent .cc-avatar {
    background:   var(--cc-accent);
    border-color: var(--cc-accent);
    color:        var(--cc-accent-text);
    box-shadow:   0 4px 12px -4px var(--cc-accent);
}

/* Identité */
.cc-card .cc-identity { flex: 1; min-width: 0; }

.cc-card .cc-name {
    display:     flex;
    align-items: center;
    flex-wrap:   wrap;
    gap:         .35rem;
    color:       #0f172a;
    font-size:   1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.cc-card .cc-badge {
    padding:        .2rem .5rem;
    border-radius:  999px;
    background:     #e2e8f0;
    color:          #475569;
    font-size:      .7rem;
    font-weight:    600;
    letter-spacing: .03em;
}
.cc-card .cc-badge.vip {
    padding:    .1rem .5rem;
    background: linear-gradient(135deg, #fbbf2438, #f59e0b4f);
    font-size:  .85rem;
}

.cc-card .cc-company {
    display:     flex;
    align-items: center;
    gap:         .3rem;
    margin-top:  2px;
    color:       #64748b;
    font-size:   .8rem;
}

/* Boutons d'action du header */
.cc-card .cc-actions {
    flex: none;
    display: flex;
    gap: .4rem;
}
.cc-card .cc-actions .btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:           34px;
    height:          34px;
    padding:         0;
    background:      #f1f5f9;
    border:          0;
    border-radius:   var(--cc-r-sm);
    color:           #475569;
    transition:      all .2s;
}
.cc-card .cc-actions .btn:hover {
    background: var(--cc-soft);
    color:      var(--cc-theme);
}
.cc-card .cc-header.has-accent .cc-actions .btn:hover {
    background: var(--cc-avatar-tint);
    color:      var(--cc-accent);
}

/* ─── 1.3 Bandeau blacklist ─────────────────────────────────── */
.cc-card .cc-blacklist {
    display:       flex;
    align-items:   center;
    gap:           .5rem;
    padding:       .7rem 1rem;
    background:    linear-gradient(135deg, #fef2f2, #fee2e2);
    border-bottom: 1px solid #fecaca;
    color:         #991b1b;
    font-size:     .82rem;
    font-weight:   600;
}
.cc-card .cc-blacklist .mdi { color: #dc2626; font-size: 1.2rem; }

/* ─── 1.4 Sections ──────────────────────────────────────────── */
.cc-card .cc-section {
    padding:       .85rem 1rem;
    border-bottom: 1px solid #eef2f7;
}
.cc-card .cc-section:last-child { border-bottom: 0; }

.cc-card .cc-section-title {
    display:        flex;
    align-items:    center;
    gap:            .35rem;
    margin-bottom:  .6rem;
    color:          #94a3b8;
    font-size:      .68rem;
    font-weight:    700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.cc-card .cc-section-title .mdi { font-size: 1rem; }

.cc-card .cc-section-link {
    display:         inline-flex;
    align-items:     center;
    color:           #94a3b8;
    text-decoration: none;
    transition:      color .15s, transform .15s;
}
.cc-card .cc-section-link:hover {
    color:     var(--cc-theme);
    transform: translate(1px, -1px);
}

/* ─── 1.5 Note / commentaire ────────────────────────────────── */
.cc-card .cc-comment,
.cc-card .cc-keys-comment {
    padding:       .6rem .75rem;
    background:    #f8fafc;
    border-left:   3px solid #cbd5e1;
    border-radius: 0 var(--cc-r-xs) var(--cc-r-xs) 0;
    color:         #475569;
    font-size:     .82rem;
    font-style:    italic;
    line-height:   1.4;
}
.cc-card .cc-keys-comment .mdi {
    margin-right: .2rem;
    color:        #94a3b8;
    font-size:    .85rem;
}

/* ─── 1.6 Contact ───────────────────────────────────────────── */
.cc-card .cc-contact {
    display:        flex;
    flex-direction: column;
    gap:            .55rem;
}
.cc-card .cc-contact-row {
    display:     flex;
    align-items: center;
    gap:         .6rem;
}
.cc-card .cc-contact-icon {
    flex:            none;
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           30px;
    height:          30px;
    background:      var(--cc-soft);
    border-radius:   var(--cc-r-xs);
    color:           var(--cc-theme);
    font-size:       1rem;
}
.cc-card .cc-contact-icon.mail { background: #ecfdf5; color: #059669; }

.cc-card .cc-contact-body  { flex: 1; min-width: 0; }
.cc-card .cc-contact-label {
    color:          #94a3b8;
    font-size:      .65rem;
    font-weight:    600;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.cc-card .cc-contact-value {
    overflow:      hidden;
    color:         #1e293b;
    font-size:     .9rem;
    font-weight:   600;
    text-overflow: ellipsis;
    white-space:   nowrap;
}
.cc-card .cc-contact-value a       { color: inherit; text-decoration: none; }
.cc-card .cc-contact-value a:hover { color: var(--cc-theme); }

.cc-card .cc-mini-actions { flex: none; display: flex; gap: .3rem; }
.cc-card .cc-mini-actions a {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    width:           28px;
    height:          28px;
    padding:         0;
    background:      #f1f5f9;
    border-radius:   var(--cc-r-xs);
    color:           #475569;
    font-size:       .9rem;
    transition:      all .15s;
}
.cc-card .cc-mini-actions a:hover       { background: #e2e8f0; color: #0f172a; }
.cc-card .cc-mini-actions a.is-whatsapp { color: #16a34a; }

/* ─── 1.7 Localisation ──────────────────────────────────────── */
.cc-card .cc-address        { color: #334155; font-size: .88rem; line-height: 1.4; }
.cc-card .cc-address strong { color: #0f172a; }

.cc-card .cc-address-actions {
    display:    flex;
    flex-wrap:  wrap;
    gap:        .4rem;
    margin-top: .6rem;
}
.cc-card .cc-address-actions .btn {
    padding:       .28rem .7rem;
    border-radius: 999px;
    font-size:     .75rem;
    font-weight:   600;
}
.cc-card .cc-distance {
    display:     inline-flex;
    align-items: center;
    gap:         .3rem;
    margin-left: auto;
    color:       #64748b;
    font-size:   .75rem;
}

/* ─── 1.8 Animaux ───────────────────────────────────────────── */
.cc-card .cc-pets { display: flex; flex-wrap: wrap; gap: .6rem; }

.cc-card .cc-pet {
    display:         flex;
    align-items:     center;
    gap:             .5rem;
    padding:         .4rem .7rem;
    background:      #f8fafc;
    border:          1px solid #e2e8f0;
    border-radius:   var(--cc-r);
    color:           #334155;
    font-size:       .82rem;
    font-weight:     600;
    text-decoration: none;
    cursor:          pointer;
    transition:      all .15s;
}
.cc-card .cc-pet:hover {
    background:   var(--cc-soft);
    border-color: var(--cc-soft-border);
    color:        var(--cc-theme);
    transform:    translateY(-1px);
}
.cc-card .cc-pet-avatar {
    flex:            none;
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           50px;
    height:          50px;
    background:      #e0e7ff;
    border-radius:   50%;
    color:           #4338ca;
    font-size:       .95rem;
    overflow:        hidden;
}
.cc-card .cc-pet-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ─── 1.9 Urgence ───────────────────────────────────────────── */
.cc-card .cc-emergency {
    display:       flex;
    align-items:   center;
    gap:           .6rem;
    padding:       .6rem .75rem;
    background:    #fff7ed;
    border:        1px solid #fed7aa;
    border-radius: var(--cc-r-sm);
}
.cc-card .cc-emergency-icon {
    flex:            none;
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           32px;
    height:          32px;
    background:      #fed7aa;
    border-radius:   50%;
    color:           #c2410c;
    font-size:       1rem;
}
.cc-card .cc-emergency-body  { flex: 1; min-width: 0; }
.cc-card .cc-emergency-name  { color: #7c2d12; font-size: .82rem; font-weight: 600; }
.cc-card .cc-emergency-phone { color: #c2410c; font-size: .85rem; font-weight: 700; }
.cc-card .cc-emergency-phone a { color: inherit; text-decoration: none; }

/* ─── 1.10 Divers : tags + champs personnalisés ─────────────── */
.cc-card .cc-tags { display: flex; flex-wrap: wrap; gap: .4rem; }

.cc-card .cc-tag {
    display:       inline-flex;
    align-items:   center;
    gap:           .3rem;
    padding:       .3rem .65rem;
    background:    #f1f5f9;
    border-radius: 999px;
    color:         #475569;
    font-size:     .75rem;
    font-weight:   600;
}
.cc-card .cc-tag.vip    { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.cc-card .cc-tag.remise { background: #dbeafe; color: #1e40af; }
.cc-card .cc-tag.avis   { background: #ede9fe; color: #5b21b6; }

.cc-card .cc-custom-list {
    display:        flex;
    flex-direction: column;
    gap:            .5rem;
    margin-top:     .6rem;
}
.cc-card .cc-tags + .cc-custom-list { margin-top: .6rem; }

.cc-card .cc-custom-item {
    padding:       .55rem .75rem;
    background:    #f8fafc;
    border-left:   3px solid #cbd5e1;
    border-radius: 0 var(--cc-r-xs) var(--cc-r-xs) 0;
    transition:    all .15s;
}
.cc-card .cc-custom-item:hover {
    background:        #f1f5f9;
    border-left-color: var(--cc-theme);
}
.cc-card .cc-custom-label {
    color:          #64748b;
    font-size:      .65rem;
    font-weight:    600;
    letter-spacing: .02em;
    line-height:    1.4;
}
.cc-card .cc-custom-value {
    margin-top:  .2rem;
    color:       #0f172a;
    font-size:   .9rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Labels courts : label et valeur sur la même ligne */
.cc-card .cc-custom-item.is-short {
    display:     flex;
    align-items: baseline;
    flex-wrap:   wrap;
    gap:         .6rem;
}
.cc-card .cc-custom-item.is-short .cc-custom-label { flex: none; }
.cc-card .cc-custom-item.is-short .cc-custom-value { flex: 1; min-width: 0; margin-top: 0; }

/* ─── 1.11 Clés ─────────────────────────────────────────────── */
.cc-card .cc-keys { display: flex; flex-direction: column; gap: .5rem; }

.cc-card .cc-keys-status {
    display:       flex;
    align-items:   center;
    gap:           .5rem;
    padding:       .5rem .7rem;
    background:    #fef2f2;
    border:        1px solid #fecaca;
    border-radius: var(--cc-r-sm);
    color:         #991b1b;
    font-size:     .85rem;
}
.cc-card .cc-keys-status.is-ok {
    background:   #ecfdf5;
    border-color: #a7f3d0;
    color:        #047857;
}
.cc-card .cc-keys-status .mdi { font-size: 1.1rem; }

.cc-card .cc-keys-badge {
    margin-left:   auto;
    padding:       .15rem .55rem;
    background:    rgba(255, 255, 255, .7);
    border-radius: 999px;
    font-size:     .72rem;
    font-weight:   700;
}
.cc-card .cc-keys-line {
    display:     flex;
    align-items: center;
    gap:         .4rem;
    color:       #334155;
    font-size:   .82rem;
}
.cc-card .cc-keys-modes { display: flex; flex-wrap: wrap; gap: .4rem; }
.cc-card .cc-keys-mode {
    display:       inline-flex;
    align-items:   center;
    gap:           .3rem;
    padding:       .25rem .6rem;
    background:    var(--cc-soft);
    border-radius: 999px;
    color:         var(--cc-theme);
    font-size:     .75rem;
    font-weight:   600;
}
.cc-card .cc-keys-mode .mdi { font-size: .9rem; }

/* ─── 1.12 Maison ───────────────────────────────────────────── */
.cc-card .cc-maison        { display: flex; flex-direction: column; gap: .6rem; }
.cc-card .cc-maison-filled { display: flex; flex-direction: column; gap: .4rem; }

.cc-card .cc-maison-item {
    padding:       .45rem .65rem;
    background:    #f8fafc;
    border-left:   3px solid #10b981;
    border-radius: 0 var(--cc-r-xs) var(--cc-r-xs) 0;
}
.cc-card .cc-maison-item-label {
    color:          #059669;
    font-size:      .65rem;
    font-weight:    700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.cc-card .cc-maison-item-value {
    margin-top:  .15rem;
    color:       #334155;
    font-size:   .82rem;
    line-height: 1.35;
}

/* ─── 1.13 Alerte champs manquants ───────────────────────────────────────────── */
.fc-alert-card {
    background: #fff8e6;
    border: 1px solid #ffd980;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.fc-alert-card .fa-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 14px;
}

.fc-alert-card .fa-ico {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    background: #ffd980;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a6100;
    font-size: 20px;
}

.fc-alert-card .fa-txt b {
    display: block;
    color: #8a6100;
}

.fc-alert-card .fa-body {
    padding: 10px 14px 14px 64px;
    border-top: 1px dashed #ffe7a3;
}

.fc-alert-card .fa-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 13px;
}

.fc-alert-card .fa-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6a4b00;
}

.fc-alert-card .fa-list i {
    color: #b58700;
}