/*
Theme Name: Spacious Child
Template: spacious
*/

body {
    font-size: 16px; /* ou 15px, 14px… selon ce que tu avais */
    font-weight: 400; /* 300 = fin, 400 = normal, 600 = semi-gras, 700 = gras */
}


a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}
/* Forcer style bouton en-tête (Spacious) */
/* Bouton du header */
.header-highlight-link:hover,
.header-highlight-link:focus,
.tg-header-button-wrap.button-one a:hover {
  background-color: #FF7B54 !important;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

/* Autres boutons comme "Envoyer l’avis" */
.bouton-profil:hover,
input[type="submit"].bouton-profil:hover {
  background-color: #FF7B54 !important;
  color: #fff !important;
  text-decoration: none !important;
}

a, a:visited, a:hover, a:focus, a:active {
  text-decoration: none !important;
}

.fiche-cadre-principal.fiche-cadre-autres-romans {
    width: 100vw;
    max-width: none;
    margin-left: -20px;
    margin-right: -20px;
    box-sizing: border-box;
}

.vignettes-container-dashboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.vignette-roman-dashboard {
    flex: 0 0 calc(33.333% - 14px);
    max-width: calc(33.333% - 14px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid #eee;
    background: #fafafa;
    box-sizing: border-box;
    min-height: 130px;
}

.infos-roman-dashboard {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.infos-roman-dashboard div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modif-roman-dashboard {
    margin-left: 20px;
}

.btn-header-second {
    background-color: #e07b5a;
    color: white;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    margin-left: 15px;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-header-second:hover {
    background-color: #c6674a;
    color: white;
}


.main-navigation > div > ul.menu > li.menu-item > a {
  font-size: 15px !important;
  padding: 5px 8px !important;
}

/* --- MOBILE FIXES pour single lecture --- */
@media (max-width: 900px) {


  /* Profil auteur sous les étoiles */
  .fiche-notes-profil-row {
    display: flex;
    flex-direction: column; /* passe en colonne */
    gap: 0.8em;
    margin-top: 1em;
  }

  .fiche-notes-profil-row .fiche-auteur-ligne {
    order: 2; /* forcer après les étoiles */
  }

  .fiche-notes-profil-row .fiche-notes {
    order: 1; /* étoiles en premier */
  }
}

/* Décalage normal partout */
#scroll-up {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 999999 !important;
}

/* Décalage adapté quand sidebar communauté affichée */
body.page-communaute #scroll-up {
  right: calc(72px + 20px) !important;
}


@media (max-width: 768px) {
  .fiche-t4-full iframe,
  .fiche-t4-full embed,
  .fiche-t4-full object {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
  }

  /* Optionnel : limite la hauteur comme la vidéo */
  .fiche-t4-full iframe {
    max-height: 220px !important;
  }
}

@media (max-width: 900px) {
  .fiche-t1-cover {
    margin: 0 -15px; /* retire les marges intérieures du cadre */
    text-align: center; /* centre l'image si pas 100% */
  }

  .fiche-t1-cover img {
    width: 100% !important;   /* occupe toute la largeur */
    max-width: 100% !important;
    height: auto !important;
    display: inline-block; /* reste centré */
    margin: 0 auto;        /* centrage horizontal */
    border-radius: 0 !important; /* supprime les arrondis si tu veux un flush total */
  }
}
@media (max-width: 900px) {
  .fiche-tableau .fiche-t1-cover {
    margin: 0 auto;       /* centre le bloc dans le tableau */
    float: none;          /* supprime tout flottant éventuel */
  }
}

/* MOBILE ONLY : réduire l'espace avant les catégories */
@media (max-width: 900px){

  /* Le bloc Extrait & Vidéos (et, au besoin, tout .fiche-tableau) */
  .fiche-t4-full,
  .fiche-tableau.fiche-cadre-secondaire {
    margin-bottom: 12px !important;   /* était trop grand */
    padding-bottom: 10px !important;   /* évite le “vide” interne */
  }

  /* Si la grille interne crée du vide en bas */
  .fiche-t4-full > *:last-child,
  .fiche-tableau.fiche-cadre-secondaire > *:last-child {
    margin-bottom: 0 !important;
  }

  /* Le conteneur des catégories */
  .fiche-t1-row-full,
  .fiche-tags-wrapper {
    margin-top: 8px !important;        /* petit espace propre */
    padding-top: 0 !important;
  }
}

/* MOBILE: make the main text span the full width evenly */
@media (max-width: 900px){

  /* kill asymmetric padding kept from the 2-column layout */
  .fiche-t1-main{
    padding-right: 0 !important;
    padding-left:  0 !important;
    margin-right:  0 !important;
    margin-left:   0 !important;
    width: 100% !important;
  }

  /* ensure inner titles/paragraphs don't reintroduce lateral offsets */
  .fiche-t1-main h1,
  .fiche-t1-main h2,
  .fiche-t1-main h3,
  .fiche-t1-main p{
    margin-left:  0 !important;
    margin-right: 0 !important;
  }

  /* keep a balanced small gutter coming from the card itself */
  .fiche-cadre-principal,
  .fiche-cadre-secondaire{
    padding-left:  16px !important;
    padding-right: 16px !important;
  }

  /* safety: prevent flex children from forcing extra width */
  .fiche-t1-col{ min-width: 0; }
}

/* --- MOBILE : centrage vertical des tags dans la cellule grise --- */
@media (max-width: 900px){
  /* la cellule grise qui contient les tags */
  .fiche-t1-row-full .fiche-tags-wrapper.cadre-gris{
    display: flex !important;           /* on bascule en flex */
    align-items: center !important;      /* centrage vertical du contenu */
    gap: 10px;
    min-height: 64px;                    /* hauteur mini pour voir l'effet */
    height: auto !important;             /* pas de hauteur figée */
    padding-top: 10px !important;        /* padding symétrique */
    padding-bottom: 10px !important;
  }

  /* on neutralise les marges par défaut de l'élément interne (ul/div de tags) */
  .fiche-t1-row-full .fiche-tags-wrapper.cadre-gris > *{
    margin: 0 !important;
  }
}
/* --- MOBILE : espace après le bloc Liens d’achat --- */
@media (max-width: 900px){
  .fiche-t2-infos .liens-achat {
    margin-bottom: 1.5em !important; /* espace sous le bloc complet */
    display: block;
  }
}

@media (max-width: 900px) {


  /* La rangée des deux cartes passe pleine largeur */
  .auteur-contact-bio-row {
    width: 100%;
    flex-direction: column;
    gap: 18px;
  }

  /* Cartes 100% en mobile (pas de max-width bloquant) */
  .auteur-contact-card,
  .auteur-bio-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
}

@media (max-width: 900px) {
  /* Carte profil : largeur fluide comme la carte Informations */
  .auteur-header {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 40px auto !important; /* ✅ plus d'espace sous la carte */
    padding: 32px 20px !important;       /* ✅ plus de respiration interne */
    border-radius: 18px;
    box-sizing: border-box;
  }


@media (max-width: 900px) {
  .auteur-header .auteur-nom {
    margin-top: 28px !important; /* ✅ plus d’espace sous l’avatar */
    font-size: 1.5em;
  }
}

  /* Stats plus lisibles */
  .auteur-stats {
    width: 100%;
    gap: 12px;
    margin: 18px 0 0 0;
    justify-content: space-between;
  }

  .auteur-stats > div {
    flex: 1;
    padding: 14px;
    min-width: auto;
  }
}


/* Conteneur de la liste */
.taxonomy-lecture_category .romans-recents-wrapper,
.tax-lecture_category .romans-recents-wrapper {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Grille des vignettes : 3 colonnes desktop */
.taxonomy-lecture_category .romans-recents-wrapper .autres-romans,
.tax-lecture_category .romans-recents-wrapper .autres-romans {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Sécurité anti-débordement */
.taxonomy-lecture_category .autres-romans .vignette,
.tax-lecture_category .autres-romans .vignette {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.taxonomy-lecture_category .vignette .fiche-couverture {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}
.taxonomy-lecture_category .vignette .vignette-img-bloc,
.taxonomy-lecture_category .vignette .vignette-img-bg {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* colonne droite */
/* Catégories (tax-lecture_category) : forcer la colonne sous le contenu en ≤1100px */
@media (max-width: 1100px) {
  /* 1) Le conteneur parent passe en colonne */
  body.tax-lecture_category .lecture-tag-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
  }

  /* 2) Neutralise d'éventuels floats/largeurs hérités */
  body.tax-lecture_category .lecture-tag-wrapper > * {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
  }

  /* 3) Ordre : liste des romans d'abord, sidebar ensuite */
  body.tax-lecture_category .lecture-tag-wrapper > .liste-romans-par-tags {
    order: 1 !important;
  }
  body.tax-lecture_category .lecture-tag-wrapper > aside.widget-area {
    order: 2 !important;
    margin-top: 20px !important;
  }
}

