/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Empêcher l'auto-zoom iOS sur les champs de formulaire (déclenché quand font-size < 16px) */
@media screen and (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* Aperçu newsletter (Ghost + LinkedIn) : styles des cards Ghost dans /newsletter.
   Sorti de la vue newsletter/show.html.erb le 05/09/2026. */
  .ghost-preview {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #c9d1d9;
    max-width: 640px;
  }

  .ghost-preview p {
    margin: 0 0 1.5em;
  }

  .ghost-preview h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2em 0 0.8em;
    color: #f0f0f0;
  }

  .ghost-preview h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2em 0 0.4em;
    color: #f0f0f0;
  }
  .ghost-preview h3 a {
    color: inherit;
    text-decoration: none;
  }
  .ghost-preview h3 a:hover { text-decoration: underline; }

  .ghost-preview a {
    color: #e0e0e0;
    text-decoration: underline;
  }

  .ghost-preview hr {
    border: 0;
    border-top: 1px solid var(--color-line-strong);
    margin: 2.5em 0;
  }

  /* Ghost Bookmark Card */
  .ghost-preview .kg-bookmark-card {
    margin: 0 0 1.5em;
    padding: 0;
    border: 0;
  }

  .ghost-preview .kg-bookmark-container {
    display: flex;
    text-decoration: none !important;
    border: 1px solid var(--color-line-strong);
    border-radius: 5px;
    overflow: hidden;
    color: inherit;
    transition: border-color 0.15s ease;
  }
  .ghost-preview .kg-bookmark-container:hover { border-color: #a0aec0; }

  .ghost-preview .kg-bookmark-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    min-width: 0;
  }

  .ghost-preview .kg-bookmark-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #f0f0f0;
    margin-bottom: 6px;
  }

  .ghost-preview .kg-bookmark-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #738a94;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
  }

  .ghost-preview .kg-bookmark-metadata {
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
    color: #738a94;
  }

  .ghost-preview .kg-bookmark-publisher {
    color: #f0f0f0;
    font-weight: 500;
  }

  .ghost-preview .kg-bookmark-thumbnail {
    flex: 0 0 180px;
    position: relative;
  }

  .ghost-preview .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* Ghost Button Card */
  .ghost-preview .kg-button-card {
    margin: 1.5em 0;
    padding: 0;
  }
  .ghost-preview .kg-button-card.kg-align-center {
    text-align: center;
  }
  .ghost-preview .kg-btn {
    display: inline-block;
    padding: 10px 28px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 5px;
    transition: opacity 0.15s ease;
  }
  .ghost-preview .kg-btn:hover { opacity: 0.88; }
  .ghost-preview .kg-btn-accent {
    background-color: #ff5500;
    color: #fff !important;
  }

  /* Responsive: stack bookmark card on small screens */
  @media (max-width: 500px) {
    .ghost-preview .kg-bookmark-container { flex-direction: column-reverse; }
    .ghost-preview .kg-bookmark-thumbnail { flex: 0 0 auto; width: 100%; max-height: 200px; overflow: hidden; }
  }
