/* Témoignages : cartes partagées par index.php (section #temoignages) et
   temoignages.php. Rendu : temoignageCarte() dans partials/_temoignages.php.

   Tokens redéclarés localement : css/idx.css n'est chargé que par index.php,
   les var(--primary) et consorts n'existent donc pas sur temoignages.php.
   Mêmes valeurs que idx.css pour que le rendu reste cohérent avec l'accueil. */
.tem-wrap,
.tem-grid {
    --tem-primary: #0A8CCB;
    --tem-primary-dark: #0177B6;
    --tem-primary-soft: #e8f4fb;
    --tem-text: #262626;
    --tem-text-soft: #666;
    --tem-muted: #8e8e8e;
    --tem-border: #dbdbdb;
    --tem-radius: 12px;
}

/* ---------- Grille et carte ---------- */
.tem-grid {
    display: grid;
    /* auto-fit et non auto-fill : avec deux cartes sur 1080px, auto-fill
       gardait une troisième colonne vide. */
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 24px;
    max-width: 1080px;
    margin: 0 auto;
}
/* Un seul témoignage : colonne centrée à largeur de lecture, plutôt qu'une
   carte calée à gauche ou étirée sur 1080px. */
.tem-grid.tem-grid-solo {
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
}

.tem-card {
    border: 1px solid var(--tem-border);
    border-radius: var(--tem-radius);
    padding: 28px 26px;
    margin: 0;
    background: #fff;
    color: var(--tem-text);
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: start;
    box-sizing: border-box;
    min-width: 0;
}
.tem-card * { box-sizing: border-box; }

.tem-card blockquote {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 1.08rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.65;
    color: var(--tem-text);
    background: none;
    quotes: "\201C" "\201D";
}
html[lang="fr"] .tem-card blockquote { quotes: "\00AB\202F" "\202F\00BB"; }
.tem-card blockquote::before { content: open-quote; color: var(--tem-primary); font-size: 1.5em; line-height: 0; vertical-align: -0.3em; margin-inline-end: 2px; }
.tem-card blockquote::after  { content: close-quote; color: var(--tem-primary); font-size: 1.5em; line-height: 0; vertical-align: -0.3em; margin-inline-start: 2px; }

/* ---------- Audio ---------- */
.tem-audio {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--tem-primary-soft);
    border-radius: 10px;
    padding: 12px 14px;
}
.tem-audio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--tem-primary-dark);
}
.tem-audio audio {
    display: block;
    width: 100%;
    height: 40px;
}

/* ---------- Transcription ---------- */
.tem-transcription summary {
    cursor: pointer;
    color: var(--tem-primary-dark);
    font-weight: 600;
    font-size: 0.92rem;
}
.tem-transcription summary:hover { text-decoration: underline; }
.tem-transcription summary:focus-visible { outline: 2px solid var(--tem-primary); outline-offset: 3px; border-radius: 4px; }
.tem-transcription > div {
    margin-top: 12px;
    padding-inline-start: 14px;
    border-inline-start: 3px solid var(--tem-border);
    color: var(--tem-text-soft);
    font-size: 0.95rem;
    line-height: 1.65;
}
.tem-transcription p { margin: 0 0 12px; }
.tem-transcription p:last-child { margin-bottom: 0; }

/* ---------- Auteur ---------- */
.tem-auteur { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.tem-auteur img,
.tem-auteur .tem-initiale {
    width: 48px; height: 48px; flex: 0 0 48px;
    border-radius: 50%; object-fit: cover;
}
.tem-auteur .tem-initiale {
    display: flex; align-items: center; justify-content: center;
    background: var(--tem-primary-soft); color: var(--tem-primary);
    font-weight: 600; font-size: 1.05rem;
}
.tem-auteur .tem-nom { font-weight: 600; line-height: 1.35; }
.tem-auteur .tem-role { font-size: 0.9rem; color: var(--tem-muted); line-height: 1.35; }
.tem-auteur .tem-source {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 4px;
    font-size: 0.88rem; font-weight: 600;
    color: var(--tem-primary-dark); text-decoration: none;
}
.tem-auteur .tem-source:hover { text-decoration: underline; }

/* ---------- Section de l'accueil ---------- */
.temoignages { background: #fff; padding: 60px 5%; }
.temoignages .tem-plus { text-align: center; margin-top: 28px; }
.temoignages .tem-plus a { color: var(--primary, #0A8CCB); font-weight: 600; text-decoration: none; }
.temoignages .tem-plus a:hover { text-decoration: underline; }

/* ---------- Page temoignages.php ---------- */
.tem-wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 20px 72px;
    color: var(--tem-text);
    box-sizing: border-box;
}
.tem-wrap * { box-sizing: border-box; }

.tem-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.tem-head h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 16px; }
.tem-head p { font-size: 1.05rem; line-height: 1.6; color: var(--tem-text-soft); margin: 0; }

.tem-vide {
    border: 1px dashed var(--tem-border);
    border-radius: var(--tem-radius);
    padding: 40px 28px;
    text-align: center;
    color: var(--tem-text-soft);
    line-height: 1.6;
}

.tem-cta {
    margin-top: 56px;
    border-top: 1px solid var(--tem-border);
    padding-top: 40px;
    text-align: center;
}
.tem-cta h2 { font-size: 1.35rem; margin: 0 0 12px; }
.tem-cta p { color: var(--tem-text-soft); line-height: 1.6; margin: 0 auto 24px; max-width: 560px; }
.tem-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tem-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px; border-radius: 10px;
    text-decoration: none; font-weight: 600;
}
.tem-btn-plein { background: var(--tem-primary); color: #fff; }
.tem-btn-plein:hover { background: var(--tem-primary-dark); color: #fff; }
.tem-btn-vide { background: #fff; color: var(--tem-primary); border: 1px solid var(--tem-primary); }
.tem-btn-vide:hover { background: var(--tem-primary-soft); color: var(--tem-primary-dark); }
button.tem-btn { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.tem-cta .tem-deja { margin: 20px auto 0; font-size: 0.95rem; }
.tem-cta .tem-deja a { color: var(--tem-primary-dark); font-weight: 600; }

@media (max-width: 600px) {
    .tem-wrap { padding: 32px 16px 56px; }
    .tem-head h1 { font-size: 1.6rem; }
    .tem-grid { grid-template-columns: 1fr; }
    .tem-card { padding: 24px 20px; }
    .temoignages { padding: 40px 16px; }
}
