/* Habillage du site WDI : couleurs, logo et menu de l'ancien thème Yii2
   (web/themes/v3/css/styles.css), posés sur le Bootstrap 5 de vendors.css.
   Feuille autonome : sass n'est pas toujours installé (cf. CLAUDE.md). */

:root {
  --wdi-green: #57cfb0;
  --wdi-blue: #2ab5d3;
  --wdi-footer: #596668;
}

body {
  font-family: "Inter", Helvetica, Arial, sans-serif;
  font-size: 14px;
  background: #fff;
}

p {
  font-size: 14px;
  line-height: 25px;
}

/* En-tête : dégradé vert-bleu et logo */
.c-header {
  background: var(--wdi-blue);
  background: linear-gradient(-45deg, var(--wdi-green), var(--wdi-blue));
}
.c-header .navbar { padding: 0; }
.c-header .navbar-brand { padding: 0; margin: 0; }
.c-header .navbar-logo {
  display: block;
  width: 236px;
  height: 25px;
  text-indent: -20000px;
  overflow: hidden;
  background: url(../images/web-design-inspiration.png) no-repeat;
  margin: 20px 80px 20px 0;
}
@media (max-width: 450px) {
  .c-header .navbar-logo {
    width: 150px;
    height: 16px;
    background-size: 150px 16px;
    margin: 25px 10px 24px 0;
  }
}
.c-header .navbar-toggler { border-color: rgba(255, 255, 255, 0.5); }

.c-header .c-nav-btn > a,
.c-header .c-nav-btn > button {
  display: inline-block;
  font-size: 18px;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 10px 30px 8px;
  margin-top: 4px;
  border-radius: 2px;
  text-decoration: none;
}
.c-header .c-nav-btn > a:hover,
.c-header .c-nav-btn > button:hover { background: rgba(255, 255, 255, 0.15); }
.c-header .c-nav-btn i { font-size: 12px; }
.c-header .c-nav-btn.white > a,
.c-header .c-nav-btn.white > button {
  background: rgba(255, 255, 255, 0.3);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}
.c-header .c-nav-btn.white > button:hover { background: rgba(255, 255, 255, 0.4); }
.c-header .c-nav-btn.login > button { padding-left: 12px; padding-right: 15px; }
.c-header .c-nav-btn.signup > button {
  margin-left: 8px;
  padding-left: 18px;
  padding-right: 18px;
  background: #fff;
  color: var(--wdi-blue);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}
.c-header .c-nav-btn.signup > button:hover { background: #f1fbfd; }
@media (max-width: 991.98px) {
  .c-header .c-nav-btn.signup > button { margin: 8px 0 0; }
}
@media (min-width: 992px) {
  .c-header .c-nav-btn.login { margin-left: 30px; }
}

/* Menu « Inspirations » déplié par wdi.js */
.c-navbar-expand {
  height: 0;
  overflow: hidden;
  transition: height 200ms ease;
}
.c-navbar-expand.on { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.c-navbar-expand-categories { padding: 30px 0; }
.c-navbar-expand h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 100;
  margin-bottom: 20px;
}
.c-navbar-expand h3 strong { font-weight: 400; }
/* Écart fixé par gap : certaines listes sont générées sans espace entre les <li> (bulles collées). */
.c-navbar-expand ul { display: flex; flex-wrap: wrap; gap: 0 6px; padding: 0; margin: 0; }
.c-navbar-expand ul li { list-style-type: none; }
.c-navbar-expand ul li a,
.c-navbar-expand ul li .lc {
  padding: 5px 20px;
  background: #fff;
  margin: 0 0 6px;
  display: inline-block;
  border-radius: 100px;
  color: #222;
  text-decoration: none;
  cursor: pointer;
}
.c-navbar-expand ul li a:hover,
.c-navbar-expand ul li .lc:hover { color: var(--wdi-blue); }
.c-navbar-expand p { color: #eee; }
.c-navbar-expand p a { color: #fff; text-decoration: underline; }
.c-filter-promo {
  font-size: 18px;
  margin-top: 45px;
}

.color-pastille {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 1px solid #bbb;
  margin-right: 5px;
  vertical-align: -3px;
  border-radius: 10px;
}
.color-pastille-red { background-color: #ff0000; }
.color-pastille-orange { background-color: #ffa500; }
.color-pastille-purple { background-color: #7f007f; }
.color-pastille-magenta { background-color: #ff00ff; }
.color-pastille-yellow { background-color: #ffff00; }
.color-pastille-green { background-color: #008000; }
.color-pastille-blue { background-color: #0000ff; }
.color-pastille-grey { background-color: #808080; }
.color-pastille-white { background-color: #ffffff; }
.color-pastille-black { background-color: #000000; }
.color-pastille-cyan { background-color: #00ffff; }

/* Fil d'Ariane */
.section-breadcrumb .breadcrumb {
  margin: 15px 0;
  font-size: 13px;
}
.section-breadcrumb .breadcrumb li { display: inline; }
.section-breadcrumb a { color: var(--wdi-blue); text-decoration: none; }

/* Pied de page */
footer {
  margin-top: 50px;
  padding: 100px 0;
  background: var(--wdi-footer);
  color: #eee;
}
footer a { color: #e8eff0; text-decoration: none; }
footer a:hover { color: #fff; }
.horlinks { padding-left: 0; }
.horlinks li { list-style-type: none; display: inline; margin: 0 20px 0 0; }
.social { padding-left: 0; }
.social li { display: inline-block; margin-left: 10px; font-size: 20px; }
.language-widget a { text-decoration: underline; }

/* --- Galerie (gallery.ejs) ----------------------------------------------- */

.c-top { padding: 40px 0 30px; }
.c-top h1 { font-size: 28px; font-weight: 700; }
.c-top .lead { font-size: 16px; line-height: 1.6; }
.c-top-promo { color: #666; }

/* Bandeau promotionnel sous l'intro (_top_adbar.php du Yii2) */
.c-topbar {
  background: #222;
  color: #eee;
  text-align: center;
  font-size: 14px;
  padding: 10px 5px;
  font-weight: bold;
  margin-bottom: 40px;
}
.c-topbar a {
  color: var(--wdi-green);
  border: 1px solid var(--wdi-green);
  padding: 5px 10px;
  margin-left: 10px;
  text-decoration: none;
}

.c-gallery-title { font-size: 20px; margin-bottom: 20px; }
.c-intro { margin-bottom: 30px; }

/* Le titre d'une vignette est un <a> (pages 2 et suivantes) ou un <button> masqué aux
   robots (page 1) : même rendu dans les deux cas. */
.c-design-meta h3 > a,
.c-design-meta h3 > button.dc {
  padding: 0;
  border: 0;
  background: none;
  color: #222;
  font: inherit;
  text-align: left;
  text-decoration: none;
}
/* Pas de couleur au survol : le titre porte le .stretched-link de toute la vignette, et les
   boutons du survol, posés au-dessus, lui faisaient perdre son :hover (bleu → noir). */

/* Vignette : bordure fine et ombre portée sous l'image, valeurs du thème Yii2
   (section.c-gallery .c-element .divimg). */
.c-designs-single img {
  border: 1px solid #ddd;
  box-shadow: 0 15px 10px -15px rgba(0, 0, 0, 0.3);
}

/* Encarts publicitaires : une ligne entière de la grille */
.c-ads-middle {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--twm-gap);
}

/* Pagination (WPager du Yii2) */
.c-paginate-prevnext { margin-bottom: 20px; }
.c-paginate .btn { margin: 0 2px; }
.c-paginate .c-bt-more {
  background: var(--wdi-blue);
  color: #fff;
  border-radius: 100px;
  padding: 10px 40px;
}
.c-paginate .c-bt-more:hover { background: var(--wdi-green); color: #fff; }
.c-paginate .bt-paginate-active { background: #eee; font-weight: 700; }
.c-paginate .bt-paginate-disable { visibility: hidden; }

.c-updated,
.c-seotext {
  border: 1px solid #efefef;
  padding: 30px;
  font-size: 13px;
  margin: 30px 0;
}
.c-updated { text-align: center; }

.c-home-mission { margin-top: 60px; }
.c-home-mission h2 { font-size: 22px; margin-top: 40px; }
.c-home-mission h3 { font-size: 18px; margin-top: 20px; }

/* --- Survol des vignettes (gallery.ejs) -----------------------------------
   Voile sombre sur l'image avec « Visit website » / « Learn more », et les boutons
   favoris / liste. Seuls les boutons captent le clic (pointer-events) : ailleurs, le
   clic traverse jusqu'au .stretched-link du titre et ouvre la fiche. Pas de survol
   sur les écrans tactiles : un tap ouvre directement la fiche. */
.c-design-image { position: relative; }
.c-design-hover {
  position: absolute;
  inset: 0;
  z-index: 2; /* au-dessus du ::after du .stretched-link (z-index 1) */
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 12px;
  background: rgba(20, 30, 35, 0.78);
  opacity: 0;
  transition: opacity 200ms ease-in-out;
  pointer-events: none;
}
@media (hover: hover) {
  .c-design-hover { display: flex; }
  .c-designs-single:hover .c-design-hover,
  .c-designs-single:focus-within .c-design-hover { opacity: 1; }
  .c-designs-single:hover .c-design-hover button,
  .c-designs-single:hover .c-design-hover a,
  .c-designs-single:focus-within .c-design-hover button,
  .c-designs-single:focus-within .c-design-hover a { pointer-events: auto; }
}
.c-design-hover-main { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.c-design-hover-main .btn { border-radius: 100px; font-size: 13px; font-weight: 600; padding: 11px 26px; }
.c-design-hover-account { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; }
.c-design-hover-account button,
.c-design-hover-account .js-list-remove {
  padding: 8px 14px; /* zone de clic plus large que le texte */
  border: 0;
  border-radius: 100px;
  background: none;
  color: #fff;
  font-size: 13px;
}
.c-design-hover-account button:hover { background: rgba(255, 255, 255, 0.12); }
.c-design-hover-account button:hover { color: var(--wdi-green); }

/* Le voile suit la taille de la vignette (réglable de 180 à 600 px) : c'est lui le
   conteneur des requêtes ci-dessous, en largeur ET en hauteur. Sous ~360 px, les boutons
   de compte passent en icônes (libellé gardé pour les lecteurs d'écran, infobulle par
   `title`) ; sous ~260 px, « Learn more » disparaît : le clic sur la vignette ouvre déjà
   la fiche. */
.c-design-hover { container-type: size; }
@container (max-width: 360px) or (max-height: 220px) {
  .c-design-hover-main { gap: 8px; }
  .c-design-hover-main .btn { font-size: 12px; padding: 8px 16px; }
  .c-design-hover-account { gap: 8px; margin-top: -14px; }
  .c-design-hover-account button,
  .c-design-hover-account .js-list-remove {
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.12);
    font-size: 15px;
  }
  .c-design-hover-account span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
@container (max-width: 260px) or (max-height: 150px) {
  .c-design-hover-main .c-hover-more { display: none; }
  .c-design-hover-main .btn { padding: 7px 14px; }
  .c-design-hover-account { margin-top: -18px; }
  .c-design-hover-account button,
  .c-design-hover-account .js-list-remove { width: 32px; height: 32px; font-size: 14px; }
}

/* Popup d'invitation à s'inscrire */
#signup-modal .dc { cursor: pointer; color: var(--wdi-blue); }
.c-btn-wdi { background: var(--wdi-blue); color: #fff; border-radius: 100px; padding: 8px 24px; }
.c-btn-wdi:hover { background: var(--wdi-green); color: #fff; }

/* --- Fiche design (design.ejs) -------------------------------------------- */

.c-section-singledesign { padding: 20px 0 40px; }
.c-single h1 { font-size: 28px; font-weight: 700; margin-bottom: 20px; }
.c-ads-top { margin-bottom: 20px; }
.c-single-img { margin-bottom: 40px; }
.c-single-img img {
  border: 1px solid #ddd;
  box-shadow: 0 15px 10px -15px rgba(0, 0, 0, 0.3);
}
.item-details { list-style: none; padding: 0; line-height: 2; }
.item-details li > span { font-weight: 600; }
.item-details a { color: var(--wdi-blue); text-decoration: none; }
.item-details a:hover { text-decoration: underline; }
.c-single-actions { margin-top: 30px; }
.c-single-account { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 20px; }
.c-single-account button {
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 100px;
  background: #fff;
  color: #333;
  font-size: 13px;
}
.c-single-account button:hover { border-color: var(--wdi-blue); color: var(--wdi-blue); }

/* --- Thèmes WordPress ------------------------------------------------------ */
.c-theme-card { color: #222; text-decoration: none; }
.c-theme-card img { border: 1px solid #ddd; box-shadow: 0 15px 10px -15px rgba(0, 0, 0, 0.3); }
.c-theme-card:hover h3 { color: var(--wdi-blue); }

/* --- Derniers articles du blog (accueil) ---------------------------------- */
.c-latest-articles { margin-top: 50px; }
.c-latest-articles h2 { font-size: 22px; margin-bottom: 20px; }
.c-latest-articles__item { margin-bottom: 30px; }
.c-latest-articles__item a { color: #222; text-decoration: none; }
.c-latest-articles__item a:hover h3 { color: var(--wdi-blue); }
.c-latest-articles__item h3 { font-size: 16px; margin-top: 10px; }
.c-latest-articles__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 1px solid #ddd; }
.c-latest-articles__img--placeholder { background: #eef3f4; }

/* Menu du membre connecté */
.c-dropdown-user { min-width: 200px; border-radius: 10px; padding: 6px; }
.c-dropdown-user .dropdown-item { border-radius: 6px; font-size: 14px; padding: 8px 12px; }
.c-dropdown-user form { margin: 0; }

/* Favori actif : cœur plein, à la couleur de WDI */
.js-account.is-favorite i { color: var(--wdi-green); }
.c-empty { text-align: center; padding: 60px 20px; color: #5d6b70; }
.c-empty p { font-size: 16px; max-width: 520px; margin: 0 auto 20px; }

.c-list-owner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.c-list-owner-actions a:not(.btn) { color: var(--wdi-blue); text-decoration: none; }

/* Fenêtre « Ajouter à une liste » */
.c-lists-dialog .form-check { padding: 8px 0 8px 1.8em; border-bottom: 1px solid #eef2f3; }
.c-lists-dialog .form-check-label small { color: #5d6b70; margin-left: 6px; }
.c-lists-dialog .c-lists-empty { color: #5d6b70; font-size: 14px; }

/* Filter-tool : bulles à cocher (filters-box du thème Yii2), couleurs en pastilles,
   compteur de résultats en direct. La case reste dans le flux du clavier (focus visible). */
.c-filter-group legend { font-size: 20px; margin-bottom: 4px; }
.c-filter-select { margin-bottom: 14px; font-size: 13px; color: #999; }
.c-filter-select button { padding: 0; border: 0; background: none; color: var(--wdi-blue); }
.c-filter-select button:hover { text-decoration: underline; }
.c-filter-chips { display: flex; flex-wrap: wrap; gap: 8px 6px; }
.c-filter-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.c-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px #d0cec3;
  color: #666;
  font-size: 13px;
  line-height: 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.c-filter-chip::before {
  content: "";
  flex: none;
  width: 15px;
  height: 15px;
  border: 1px solid #c8c6bd;
  border-radius: 50%;
  background: #fff center / 9px no-repeat;
}
.c-filter-chip .color-pastille { margin-right: 0; vertical-align: 0; }
.c-filter-chip:hover { color: #000; box-shadow: 0 1px 3px #9d9b8e; }
.c-filter-input:checked + .c-filter-chip { color: #000; background: #eaf7fa; box-shadow: 0 1px 2px #9d9b8e; }
.c-filter-input:checked + .c-filter-chip::before {
  border-color: var(--wdi-blue);
  background-color: var(--wdi-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
}
.c-filter-input:focus-visible + .c-filter-chip { outline: 2px solid var(--wdi-blue); outline-offset: 2px; }
.c-filter-results {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 40px;
  padding: 24px 32px;
  background: #ededed;
}
.c-filter-results p { margin: 0; font-size: 22px; }
.c-filter-results button[hidden] { display: none; }

/* Articles populaires du pied de page : à distance du contenu de la page. */
.c-popular-posts { margin-top: 60px; margin-bottom: 24px; }

/* Page À propos */
.c-about { padding: 10px 0 40px; }
.c-about .lead { font-size: 22px; margin-bottom: 24px; }
.c-about h2 { font-size: 22px; margin: 36px 0 12px; }
.c-about p { font-size: 17px; line-height: 1.7; }
