/* Variables indépendantes pour les fiches techniques */
.fiche-page {
    --fiche-brand: #ff6233;
    --fiche-bg: var(--v3-bg, #fbfaf9);
    --fiche-surface: var(--v3-surface, #ffffff);
    --fiche-surface-soft: #f7f4f1;
    --fiche-text: var(--v3-text, #262c2c);
    --fiche-muted: var(--v3-text-mut, #69727c);
    --fiche-border: var(--v3-border, #ece4dd);
    --fiche-shadow: 0 8px 22px rgba(25, 30, 38, 0.04);

    font-family: var(--v3-font-text, 'Lora', Georgia, serif);
    line-height: 1.7;
    background: var(--fiche-bg);
    color: var(--fiche-text);
}

.fiche-page *,
.fiche-page *::before,
.fiche-page *::after {
    box-sizing: border-box;
}

.fiche-shell {
    width: min(960px, calc(100% - 2rem));
    margin: 0 auto;
}

.fiche-shell--wide {
    width: min(1080px, calc(100% - 2rem));
}

/* --- LIENS DANS LE TEXTE --- */
.fiche-editorial a {
    color: var(--fiche-brand); /* Couleur orange de ta marque */
    text-decoration: none; /* Supprime le soulignement natif moche */
    font-weight: 600; /* Un peu plus gras pour bien le voir */
    transition: all 0.2s ease;
}

.fiche-editorial a:hover {
    text-decoration: underline;
    text-underline-offset: 4px; /* Décale le soulignement vers le bas pour un look très propre */
}

/* --- HERO --- */
.fiche-hero {
    position: relative;
    min-height: clamp(350px, 40vw, 500px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: linear-gradient(180deg, #f2ebe5 0%, #efe8e1 100%);
}

.fiche-hero.has-image .fiche-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fiche-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.fiche-hero__inner {
    position: relative;
    z-index: 2;
    padding: 4rem 0 3rem;
}

.fiche-breadcrumb {
    font-family: var(--v3-font-ui, sans-serif);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.fiche-breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.fiche-breadcrumb a:hover {
    text-decoration: underline;
}

.fiche-breadcrumb__sep {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.fiche-hero__kicker {
    display: inline-block;
    background: var(--fiche-brand);
    color: #fff;
    font-family: var(--v3-font-ui, sans-serif);
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 99px;
    margin-bottom: 1rem;
}

.fiche-hero__title {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.15;
    margin: 0 0 1rem 0;
}

.fiche-hero__subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 750px;
    margin: 0;
}

/* --- LAYOUT & CARDS --- */
.fiche-flow {
    padding: 3rem 0;
    display: grid;
    gap: 2rem;
}

.fiche-intro-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 800px) {
    .fiche-intro-layout {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
    .fiche-intro-layout.is-single {
        grid-template-columns: 1fr;
    }
}

.fiche-card {
    background: var(--fiche-surface);
    border: 1px solid var(--fiche-border);
    border-radius: 16px;
    padding: 2.2rem;
    box-shadow: var(--fiche-shadow);
}

.fiche-eyebrow {
    font-family: var(--v3-font-ui, sans-serif);
    color: var(--fiche-brand);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: bold;
    margin: 0 0 0.5rem 0;
}

.fiche-section-title {
    font-family: var(--v3-font-ui, sans-serif);
    font-size: 1.5rem;
    margin: 0 0 1.5rem 0;
    color: var(--fiche-text);
}

/* --- EDITORIAL --- */
.fiche-editorial {
    font-size: 1.05rem;
    line-height: 1.75;
}

.fiche-editorial h3 {
    font-family: var(--v3-font-ui, sans-serif);
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
    color: var(--fiche-text);
}

.fiche-editorial p {
    margin: 0 0 1.25rem 0;
}

.fiche-editorial ul {
    margin: 0 0 1.5rem 1.6rem;
    padding: 0;
}

.fiche-editorial li {
    margin-bottom: 0.5rem;
}

.fiche-editorial strong {
    color: var(--fiche-brand);
}

/* --- TAGS (Hashtags) --- */
.fiche-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1.5rem 0;
}

.fiche-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    background: rgba(255, 98, 51, 0.1);
    color: var(--fiche-brand);
    font-family: var(--v3-font-ui, sans-serif);
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 99px;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.fiche-tag:hover {
    background: var(--fiche-brand);
    color: #ffffff;
}

/* --- VIDÉO --- */
.fiche-video-wrapper {
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.fiche-video-wrapper video {
    display: block;
    width: 100%;
    height: auto;
}

.fiche-caption {
    font-family: var(--v3-font-ui, sans-serif);
    font-size: 0.85rem;
    color: var(--fiche-muted);
    margin-top: 0.8rem;
    text-align: center;
}

/* --- SECTIONS ETAPES --- */
.fiche-content-sections {
    display: grid;
    gap: 2rem;
}

.fiche-step-title {
    font-family: var(--v3-font-ui, sans-serif);
    font-size: 1.4rem;
    color: var(--fiche-brand);
    margin: 0 0 1.6rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--fiche-surface-soft);
}

.fiche-step-body {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

/* --- GESTION DES ORIENTATIONS D'IMAGES --- */
@media (min-width: 800px) {
    .fiche-step-body.has-media {
        flex-direction: row;
        align-items: flex-start;
    }

    .fiche-step-body .fiche-editorial {
        flex: 1 1 0%;
    }

    /* Paysage / Par défaut */
    .fiche-step-body.layout-paysage .fiche-media-gallery {
        flex: 0 0 40%;
        max-width: 450px;
    }

    /* Portrait */
    .fiche-step-body.layout-portrait .fiche-media-gallery {
        flex: 0 0 30%;
        max-width: 320px;
    }

    /* Pleine largeur */
    .fiche-step-body.layout-pleine-largeur {
        flex-direction: column;
    }
    .fiche-step-body.layout-pleine-largeur .fiche-media-gallery {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
    }
}

/* Grille pour les images (gère le cas multi-images) */
.fiche-media-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.fiche-media-gallery.is-multi {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: start;
}

.fiche-inline-media {
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fiche-inline-media img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* Limitation de sécurité pour les images Paysage/Portrait */
.fiche-media-gallery.is-single .fiche-inline-media img {
    max-height: 600px;
    object-fit: contain;
}

/* COMPORTEMENT PLEINE LARGEUR */
.layout-pleine-largeur .fiche-media-gallery.is-single .fiche-inline-media img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    object-position: center;
}

.fiche-inline-media figcaption {
    font-family: var(--v3-font-ui, sans-serif);
    font-size: 0.85rem;
    color: var(--fiche-muted);
    margin-top: 0.8rem;
    text-align: center;
}

/* --- MISE EN PRATIQUE --- */
.fiche-practice {
    background: linear-gradient(135deg, var(--fiche-surface-soft) 0%, var(--fiche-surface) 100%);
    border-color: rgba(255, 98, 51, 0.2);
}

.fiche-practice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fiche-practice-list li {
    font-family: var(--v3-font-ui, sans-serif);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.fiche-practice-list i {
    color: var(--fiche-brand);
}

.fiche-practice-list a {
    color: var(--fiche-text);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.fiche-practice-list a:hover {
    color: var(--fiche-brand);
    text-decoration: underline;
}

/* --- AUTEUR --- */
.fiche-author {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.fiche-author__avatar-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.fiche-author__avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fiche-author__role {
    margin: 0;
    color: var(--fiche-muted);
    font-size: 0.9rem;
}

.fiche-author__socials {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.fiche-author__socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--fiche-surface-soft);
    color: var(--fiche-text);
    text-decoration: none;
    transition: all 0.2s ease;
}

.fiche-author__socials a:hover {
    background: var(--fiche-brand);
    color: #fff;
    transform: translateY(-2px);
}

/* --- UTILITAIRES --- */
.fiche-text-center {
    text-align: center;
}

.fiche-muted {
    color: var(--fiche-muted);
    font-size: 0.9rem;
}

/* --- COMMENTAIRES ET FORMULAIRE --- */
.fiche-comments {
    margin-top: 2rem;
}

.fiche-comments-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.fiche-comment {
    padding: 1.2rem;
    border-bottom: 1px solid var(--fiche-surface-soft);
}

.fiche-comment:last-child {
    border-bottom: none;
}

.fiche-comment__meta {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.chronique-comments__pseudo {
    color: var(--fiche-text);
    font-size: 1.05rem;
}

.chronique-comments__date {
    color: var(--fiche-muted);
    font-size: 0.8rem;
}

.fiche-comment__reply {
    background: none;
    border: none;
    color: var(--fiche-brand);
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.fiche-comment__replies {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(255, 98, 51, 0.2);
}

.fiche-comment__reply-item {
    background: var(--fiche-surface-soft);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* --- BOUTONS (Général) --- */
.fiche-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    font-family: var(--v3-font-ui, sans-serif);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    text-decoration: none !important; /* Force la suppression du soulignement */
}

.fiche-btn--primary {
    background: var(--fiche-brand);
    color: #fff !important;
    border: 1px solid var(--fiche-brand);
}
.fiche-btn--primary:hover {
    opacity: 0.9;
}

.fiche-btn--outline {
    background: transparent;
    color: var(--fiche-brand) !important;
    border: 1px solid var(--fiche-brand);
}
.fiche-btn--outline:hover {
    background: var(--fiche-brand);
    color: #fff !important;
}

.fiche-btn--ghost {
    background: transparent;
    color: var(--fiche-muted) !important;
    border: 1px solid transparent;
    margin: 0;
}
.fiche-btn--ghost:hover {
    background: var(--fiche-surface-soft);
    color: var(--fiche-text) !important;
}

/* --- BARRE D'ACTIONS (PDF) --- */
.fiche-actions-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--fiche-surface-soft);
}
@media (max-width: 600px) {
    .fiche-actions-bar { flex-direction: column; }
    .fiche-actions-bar .fiche-btn { width: 100%; margin: 0; }
}

/* --- FORMULAIRE --- */
.fiche-comment-form__grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.fiche-comment-form__full {
    grid-column: 1 / -1;
}

.fiche-label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-family: var(--v3-font-ui, sans-serif);
    font-size: 1rem;
}

.fiche-input {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--fiche-border);
    border-radius: 8px;
    background: var(--fiche-surface);
    color: var(--fiche-text);
    font-family: var(--v3-font-text, serif);
    font-size: 1rem;
}

.fiche-input:focus {
    outline: none;
    border-color: var(--fiche-brand);
}

.fiche-input--textarea {
    min-height: 120px;
    resize: vertical;
}

.fiche-comment-form__note {
    color: var(--fiche-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.fiche-comment-form__reply {
    background: var(--fiche-surface-soft);
    padding: 0.8rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.fiche-link-btn {
    background: none;
    border: none;
    color: var(--fiche-text);
    cursor: pointer;
    text-decoration: underline;
    font-size: 1rem;
}

/* --- DARK MODE (Hérite du système global) --- */
html[data-theme="dark"] .fiche-page,
html.theme-dark .fiche-page {
    --fiche-bg: #11161c;
    --fiche-surface: #141b22;
    --fiche-surface-soft: #1a232d;
    --fiche-text: #f2f5f7;
    --fiche-muted: #9aa7b4;
    --fiche-border: #263240;
}
