/* ===== EssishopTuto — Hub & Détail ===== */

[v-cloak] { display: none !important; }

/* ================================================================
   HUB — Page liste
   ================================================================ */

.esh-tuto-hub {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

/* Hero */
.esh-tuto-hero {
    background: linear-gradient(135deg, #04235B 0%, #0a3a7e 100%);
    color: #fff;
    border-radius: 12px;
    padding: 40px 32px;
    margin-bottom: 24px;
}
.esh-tuto-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}
.esh-tuto-hero p {
    font-size: 1rem;
    opacity: 0.85;
    margin: 0;
}

/* Filtres */
.esh-tuto-filters {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* --- Filtres par tuiles (facettes Thématique / Produit) --- */
.esh-filter-block {
    margin-bottom: 14px;
}
.esh-filter-block:last-of-type {
    margin-bottom: 4px;
}
.esh-filter-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #757575;
    margin-bottom: 8px;
}
.esh-filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
/* Les filtres réutilisent le composant q-chip (esh-hero-tag esh-tag-light) :
   même typo, même border-radius et même rendu que les tags des cards. */
.esh-filter-grid .q-chip {
    margin: 0;
}
.esh-filter-chip {
    transition: box-shadow 0.15s, filter 0.15s, opacity 0.15s;
}
.esh-filter-chip:hover {
    filter: brightness(0.95);
}
/* Sélectionné : chip remplie en bleu */
.esh-filter-chip.is-selected {
    background-color: #4d8fd6 !important;
    color: #fff !important;
}
/* Désactivé : pas de co-occurrence avec la sélection de l'autre ligne */
.esh-filter-chip.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Tag cliquable sur la page détail : renvoie vers le hub filtré */
.esh-tag-link {
    text-decoration: none;
    cursor: pointer;
}
.esh-tag-link .q-chip {
    cursor: pointer;
}
.esh-filter-actions {
    margin-top: 10px;
    text-align: right;
}
.esh-tuto-results-count {
    font-size: 0.875rem;
    color: #757575;
    margin-top: 8px;
}

/* Card link wrapper */
.esh-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
.esh-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Cards */
.esh-tuto-card {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.esh-tuto-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(4,35,91,0.12);
}

/* Card image */
.esh-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    border-bottom: 1px solid #eee;
    position: relative;
}
.esh-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* YouTube thumbnail (no preview image) */
.esh-card-img-yt {
    cursor: pointer;
}

/* Placeholder */
.esh-card-img-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eee;
}
.esh-card-img-placeholder .esh-play-btn {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transition: transform 0.25s ease;
}
.esh-tuto-card:hover .esh-play-btn {
    transform: scale(1.1);
}

/* Card title */
.esh-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: #212121;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card excerpt */
.esh-tuto-card .card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #757575;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Card footer & CTA */
.esh-card-footer {
    margin-top: auto;
    padding: 0 16px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.esh-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #04235B;
    border-bottom: 1.5px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.2s ease, gap 0.2s ease;
}
.esh-tuto-card:hover .esh-card-cta {
    border-color: #04235B;
    gap: 10px;
}

/* Tags */
.esh-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Fade in animation */
.esh-fade-in {
    animation: eshFadeInUp 0.4s ease both;
}
@keyframes eshFadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pagination */
.esh-tuto-pagination {
    padding: 32px 0 48px;
}

/* Empty state */
.esh-tuto-empty {
    text-align: center;
    padding: 80px 20px;
    color: #9e9e9e;
}
.esh-tuto-empty .q-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* ================================================================
   DÉTAIL — Page tuto complète
   ================================================================ */

/* Hero header */
.esh-detail-hero {
    background: linear-gradient(135deg, #04235B 0%, #0a3a7e 100%);
    color: #fff;
    padding: 0;
    margin: 16px auto 0;
    max-width: 1200px;
    border-radius: 12px;
}
.esh-detail-hero-inner {
    padding: 20px 24px 24px;
}
.esh-detail-hero .esh-breadcrumb {
    padding: 0 0 12px;
}
.esh-detail-hero .esh-breadcrumb,
.esh-detail-hero .esh-breadcrumb a,
.esh-detail-hero .esh-breadcrumb span {
    color: rgba(255,255,255,0.8);
}
.esh-detail-hero .esh-breadcrumb a:hover {
    color: #fff;
}
.esh-hero-tag {
    font-size: 0.7rem !important;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.esh-detail-hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 10px 0 0;
    letter-spacing: -0.3px;
}

/* Meta info (vidéo indicator) */
.esh-detail-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Cover image (when no video) */
.esh-detail-card-cover {

    overflow: hidden;
}
.esh-detail-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Page load animation */
.esh-detail-page-anim {
    animation: eshDetailFadeIn 0.35s ease both;
}
@keyframes eshDetailFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content area */
.esh-detail-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 0 48px;
}

/* Article card */
.esh-detail-card {
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    overflow: hidden;
}
.esh-detail-card-video {
    background: #111;
}
.esh-detail-card-video .esh-video-wrap {
    border-radius: 0;
}
.esh-detail-card .q-card__section {
    padding: 24px 28px;
}
.esh-detail-card .esh-tuto-html-content > *:first-child {
    margin-top: 0;
}
.esh-detail-card .esh-tuto-html-content > *:last-child {
    margin-bottom: 0;
}
.esh-detail-card .esh-tuto-html-content {
    overflow-wrap: break-word;
    word-break: break-word;
}
.esh-detail-card .esh-tuto-html-content img {
    max-width: 100%;
    height: auto;
}
.esh-detail-card .esh-tuto-html-content iframe {
    max-width: 100%;
}
.esh-detail-card .esh-tuto-html-content pre {
    overflow-x: auto;
    max-width: 100%;
}
.esh-detail-card .esh-tuto-html-content p:empty,
.esh-detail-card .esh-tuto-html-content br:last-child {
    display: none;
}
/* Neutraliser les styles inline de contenu collé */
.esh-detail-card .esh-tuto-html-content * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.esh-detail-card .esh-tuto-html-content [style*="height"] {
    height: auto !important;
}
.esh-detail-card .esh-tuto-html-content [style*="width"]:not(iframe) {
    width: auto !important;
}
.esh-detail-card .esh-tuto-html-content [style*="position: fixed"],
.esh-detail-card .esh-tuto-html-content .mc-modal {
    display: none !important;
}
.esh-detail-card .esh-tuto-html-content [style*="flex: 0 0 75%"],
.esh-detail-card .esh-tuto-html-content [style*="flex: 0 0 25%"] {
    flex: none !important;
    max-width: 100% !important;
    width: auto !important;
}
.esh-detail-card .esh-tuto-html-content [style*="flex: 1 1 100%"] {
    height: auto !important;
    flex: none !important;
}

/* ================================================================
   SHARED — Vidéo, Contenu HTML, Sidebar, Breadcrumb
   ================================================================ */

/* Video responsive */
.esh-video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
}
/* Wrapper inséré par tarteaucitron : doit occuper toute la zone responsive */
.esh-video-wrap .youtube_player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}
.esh-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* Breadcrumb */
.esh-breadcrumb {
    font-size: 0.85rem;
    padding: 12px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.esh-breadcrumb a {
    color: #04235B;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.esh-breadcrumb a span {
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}
.esh-breadcrumb a:hover span {
    border-bottom-color: currentColor;
}

/* Contenu HTML du tuto */
.esh-tuto-html-content {
    line-height: 1.85;
    font-size: 1rem;
    color: #37474f;
}
.esh-tuto-html-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}
.esh-tuto-html-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 32px 0 14px;
    color: #04235B;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8eaf6;
}
.esh-tuto-html-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 24px 0 10px;
    color: #0a3a7e;
}
.esh-tuto-html-content ul,
.esh-tuto-html-content ol {
    padding-left: 24px;
    margin: 14px 0;
}
.esh-tuto-html-content li {
    margin-bottom: 6px;
}
.esh-tuto-html-content p {
    margin-bottom: 14px;
}
.esh-tuto-html-content blockquote {
    border-left: 4px solid #04235B;
    margin: 20px 0;
    padding: 12px 20px;
    background: #f5f7fa;
    border-radius: 0 8px 8px 0;
    color: #546e7a;
    font-style: italic;
}
.esh-tuto-html-content a {
    color: #04235B;
    font-weight: 500;
}
.esh-tuto-html-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.esh-tuto-html-content th,
.esh-tuto-html-content td {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    text-align: left;
}
.esh-tuto-html-content th {
    background: #f5f7fa;
    font-weight: 600;
}

/* ---- Sidebar ---- */
.esh-sidebar-sticky {
    position: sticky;
    top: 100px;
}
.esh-sidebar-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e8eaf0;
}
.esh-sidebar-card-header {
    background: #f5f7fa;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #37474f;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e8eaf0;
}
.esh-sidebar-card-body {
    padding: 12px;
}

/* Product links */
.esh-product-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #37474f;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.esh-product-link:hover {
    background: #f5f7fa;
}
.esh-product-link-info {
    display: flex;
    align-items: center;
    font-weight: 500;
}
.esh-product-link + .esh-product-link {
    border-top: 1px solid #f0f0f0;
}

/* ================================================================
   ONGLET PRODUIT — Tuto dans la fiche produit
   ================================================================ */

.esh-product-tuto-item {
    padding: 8px 0;
}
.esh-product-tuto-img {
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}
.esh-product-tuto-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}
.esh-product-tuto-title {
    font-size: 1rem !important;
    font-weight: 700;
    color: #212121;
    margin-bottom: 6px;
    line-height: 1.35;
}
.esh-product-tuto-excerpt {
    font-size: 0.85rem;
    color: #757575;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.esh-product-tuto-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: #04235B;
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 6px;
    transition: background 0.2s, gap 0.2s;
}
.esh-product-tuto-link:hover {
    background: #0a3a7e;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 959px) {
    .esh-detail-hero-title {
        font-size: 1.3rem;
    }
    .esh-detail-content {
        padding: 24px 16px 32px;
    }
    .esh-sidebar-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .esh-tuto-hero {
        padding: 28px 20px;
        border-radius: 0;
        margin: 0 -16px 20px;
    }
    .esh-tuto-hero h1 {
        font-size: 1.35rem;
    }
    .esh-detail-hero {
        margin: 8px 8px 0;
        border-radius: 8px;
    }
    .esh-detail-hero-inner {
        padding: 16px 16px 20px;
    }
    .esh-detail-hero-title {
        font-size: 1.2rem;
    }
    .esh-tuto-html-content {
        font-size: 0.93rem;
    }
    .esh-detail-card .q-card__section {
        padding: 20px 16px;
    }
    .esh-tuto-html-content h2 {
        font-size: 1.15rem;
    }
    .esh-card-title {
        font-size: 0.93rem;
    }
}

/* Durée de manipulation — picto sablier + texte */
.esh-duree {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #546e7a;
    font-weight: 500;
}
.esh-duree .q-icon,
.esh-duree .material-symbols-outlined {
    font-size: 1.05em;
    line-height: 1;
}

/* Variante hero (sur fond bleu) */
.esh-detail-meta .esh-duree,
.esh-detail-hero-meta .esh-duree {
    color: #fff;
}

/* Variante card du hub (footer) */
.esh-card-footer .esh-duree {
    color: #6b7a87;
}

/* Vignette produit dans la sidebar tuto */
.esh-product-link-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    background: #f5f7fa;
    border: 1px solid #e6e9ee;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Hero meta row : durée à gauche, tags à sa droite */
.esh-detail-hero-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

/* Card meta : durée à gauche, tags à sa droite (au-dessus du titre) */
.esh-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 28px;
}
/* Annule la marge par défaut du q-chip Quasar pour que `gap` pilote seul l'espacement */
.esh-card-meta .q-chip {
    margin: 0;
}
/* Plus d'air entre la durée et les tags */
.esh-card-meta .esh-duree {
    margin-right: 8px;
}

/* Tags clairs : fond bleu pâle / texte primary (cards hub + onglet produit) */
.esh-tag-light {
    background-color: #e0e0e0 !important;
    color: rgba(0, 0, 0, .87) !important;
}

/* Tag taxonomie "Produits" : bleu clair / texte blanc (fonds clairs) */
.esh-tag-product {
    background-color: #4d8fd6 !important;
    color: #fff !important;
}

/* Variante "Produits" sur fond bleu (hero page détail) : bleu plus clair pour rester lisible */
.esh-tag-product-on-blue {
    background-color: #4d8fd6 !important;
    color: #fff !important;
}

/* Tags sur fond bleu (hero page détail) : fond blanc / texte primary */
.esh-tag-on-blue {
    color: #04235B !important;
}
