/* ============================================================
   Presta'Tour — Annuaire des prestataires — styles dédiés
   ============================================================ */

/* ------------------------------------------------------------
   Palette clair/sombre du fichier
   Même pattern que agenda.css / fiche-shared.css : valeurs claires
   inchangées, contreparties sombres puisées dans l'échelle
   --bs-gray-* de Bootstrap 5.3 (cf. tokens.css).
   L'identité ocre/doré de Presta'Tour (--presta-gold, l'ocre des
   badges, le liseré beige des réalisations) est conservée telle
   quelle dans les deux thèmes : elle reste lisible sur fond
   sombre, seul l'orange brûlé des domaines doit être éclairci.
   ------------------------------------------------------------ */
:root {
    --presta-surface:         #ffffff;   /* fond de carte, de select, de vignette projet */
    --presta-surface-soft:    #f8f6f2;   /* fond de vignette logo */
    --presta-surface-panel:   #f9f8f5;   /* fond des blocs réalisation / ouvrage */
    --presta-surface-beige:   #f1ede4;   /* fond des fallbacks d'initiales et placeholders */
    --presta-surface-hover:   #f5f4f0;   /* survol de bouton */
    --presta-premium-bg:      #fdf8f2;   /* fond de la carte PREMIUM */
    --presta-premium-border:  #e0d6c8;   /* sa bordure */
    --presta-border:          #e8e6e0;   /* bordure de carte et de vignette */
    --presta-border-beige:    #e8e0d0;   /* bordure des fallbacks beiges */
    --presta-border-mid:      #d0cec8;   /* bordure de select / bouton */
    --presta-text:            #1a1a18;   /* texte fort : noms, titres */
    --presta-text-muted:      #5f5e5a;   /* texte secondaire : descriptifs */
    --presta-text-soft:       #888780;   /* texte tertiaire : méta */
    --presta-text-disabled:   #aaa9a4;   /* site web absent */
    --presta-gold:            #c8933c;   /* accent PREMIUM (lisible dans les 2 thèmes) */
    --presta-accent-line:     #e0d6c8;   /* liseré beige des blocs réalisation (idem) */
    --presta-cats:            #c0421a;   /* domaines d'intervention, lien site */
    --presta-cats-border:     #e8d8cc;   /* bordure du lien site */
    --presta-cats-hover:      #fff5f0;   /* son survol */
}
[data-bs-theme="dark"] {
    --presta-surface:         var(--bs-gray-900);
    --presta-surface-soft:    var(--bs-gray-800);
    --presta-surface-panel:   var(--bs-gray-800);
    --presta-surface-beige:   var(--bs-gray-800);
    --presta-surface-hover:   var(--bs-gray-800);
    --presta-premium-bg:      var(--bs-gray-800);
    --presta-premium-border:  var(--bs-gray-700);
    --presta-border:          var(--bs-gray-800);
    --presta-border-beige:    var(--bs-gray-700);
    --presta-border-mid:      var(--bs-gray-700);
    --presta-text:            var(--bs-white);
    --presta-text-muted:      #babac0;   /* même gris de texte secondaire que --text-accent-mid */
    --presta-text-soft:       var(--bs-gray-400);
    --presta-text-disabled:   var(--bs-gray-500);
    /* L'orange brûlé #c0421a tombe à ~2.4:1 sur le fond sombre : éclairci. */
    --presta-cats:            #e8875f;
    --presta-cats-border:     var(--bs-gray-700);
    --presta-cats-hover:      rgba(192, 66, 26, .18);
}

/* Filtres select */
#presta-filtres select {
    font-size: 13px;
    padding: 6px 10px;
    border: 1px solid var(--presta-border-mid);
    border-radius: 8px;
    background: var(--presta-surface);
    color: var(--presta-text);
    cursor: pointer;
}

/* ---- Carte de base ---------------------------------------- */
.presta-card {
    background: var(--presta-surface);
    border: 1px solid var(--presta-border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* Variante PREMIUM */
.presta-card--premium {
    background: var(--presta-premium-bg);
    border-color: var(--presta-premium-border);
    border-left: 3px solid var(--presta-gold);
    border-radius: 0 12px 12px 0;
    padding-left: 13px;
}

/* ---- Logo (gauche) ---------------------------------------- */
.presta-card__logo {
    flex-shrink: 0;
    width: 90px;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}
.presta-card__logo-img {
    width: 90px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--presta-border);
    background: var(--presta-surface-soft);
    display: block;
}
.presta-card__logo-fallback {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--presta-surface-beige);
    border: 1px solid var(--presta-border-beige);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #a08050;
    letter-spacing: 0.04em;
}

/* ---- Corps de la carte ------------------------------------ */
.presta-card__body {
    flex: 1;
    min-width: 0;
}

/* ---- Badges ----------------------------------------------- */
.presta-card__tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.presta-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.presta-tag--premium { background: #f5e8ce; color: #7a5210; }
.presta-tag--expert  { background: #eaeffd; color: #1d3a8a; }

/* ---- Nom -------------------------------------------------- */
.presta-card__title {
    font-size: 14px;
    font-weight: 500;
    color: var(--presta-text);
    margin-bottom: 4px;
    line-height: 1.35;
}
.presta-card__title a {
    color: inherit;
    text-decoration: none;
}
.presta-card__title a:hover {
    color: var(--presta-gold);
    text-decoration: underline;
}

/* ---- Domaines --------------------------------------------- */
.presta-card__cats {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--presta-cats);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Description (2 lignes max) --------------------------- */
.presta-card__desc {
    font-size: 12px;
    color: var(--presta-text-muted);
    line-height: 1.55;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Pied ------------------------------------------------- */
.presta-card__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.presta-card__site {
    font-size: 11px;
    color: var(--presta-cats);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    border: 1px solid var(--presta-cats-border);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}
.presta-card__site:hover { background: var(--presta-cats-hover); }
.presta-card__site--none {
    color: var(--presta-text-disabled);
    border-color: var(--presta-border);
    cursor: default;
}
.presta-card__site--none:hover { background: transparent; }

.presta-card__btn {
    margin-left: auto;
    font-size: 11px;
    padding: 5px 12px;
    border: 1px solid var(--presta-border-mid);
    border-radius: 8px;
    background: transparent;
    color: var(--presta-text-muted);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.presta-card__btn:hover { background: var(--presta-surface-hover); }

/* ---- Mur abonnement --------------------------------------- */
.presta-wall {
    background: #fff8f0;
    border: 1px solid #f0d8b8;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #7a4a10;
    text-align: center;
}

/* ---- Fiche : réalisations / projets ----------------------------- */
.presta-projets {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.presta-projet {
    padding: 12px 14px;
    background: var(--presta-surface-panel);
    border-radius: 8px;
    border-left: 3px solid var(--presta-accent-line);
}

/* Variante deux colonnes (logo + contenu) */
.presta-projet--row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.presta-projet__thumb {
    flex-shrink: 0;
    width: 80px;
}
.presta-projet__thumb-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--presta-border);
    background: var(--presta-surface);
    display: block;
}
.presta-projet__thumb-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    background: var(--presta-surface-beige);
    border: 1px solid var(--presta-border-beige);
    display: flex;
    align-items: center;
    justify-content: center;
}
.presta-projet__body {
    flex: 1;
    min-width: 0;
}

.presta-projet__titre {
    font-size: 14px;
    font-weight: 500;
    color: var(--presta-text);
    margin-bottom: 4px;
}
.presta-projet__texte {
    margin-top: 4px;
    margin-bottom: 6px;
}
.presta-projet__meta {
    font-size: 11px;
    color: var(--presta-text-soft);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .03em;
}
