/**
 * Styles frontend pour IFT Newsletter
 */

/* Styles communs */
.ift-newsletter-container {
    max-width: 100%;
    margin: auto;
  }
  
  .ift-newsletter-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
  }
  
  .ift-newsletter-subtitle {
    font-size: 16px;
    margin-bottom: 20px;
    color: #666;
  }
  
  /* Ajouter des styles pour la description */
  .ift-newsletter-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #000;
  }
  
  .ift-newsletter-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
  }
  
  .ift-newsletter-image {
    flex: 1;
    min-width: 200px;
  }
  
  .ift-newsletter-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
  }
  
  .ift-newsletter-form-wrapper {
    flex: 1;
    min-width: 250px;
  }
  
  .ift-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .ift-newsletter-name-fields {
    display: flex;
    gap: 10px;
  }
  
  .ift-newsletter-field {
    width: 100%;
  }
  
  .ift-newsletter-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
  }
  
  .ift-newsletter-input:focus {
    border-color: #3c96d2;
    box-shadow: 0 0 0 2px rgba(60, 150, 210, 0.2);
    outline: none;
  }
  
  .ift-newsletter-button {
   background: #3558a2;
   border: 0;
   color: white;
   padding: 7px 20px;
   margin: 0;
  }
  
  .ift-newsletter-button:hover {
    background-color: #2a7eb8;
  }
  
  .ift-newsletter-button:active {
    background-color: #1a6ba0;
  }
  
  .ift-newsletter-spinner {
    display: none;
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    right: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ift-spin 1s linear infinite;
  }
  
  .ift-newsletter-button.loading .ift-newsletter-button-text {
    opacity: 0.7;
  }
  
  .ift-newsletter-button.loading .ift-newsletter-spinner {
    display: block;
  }
  
  .ift-newsletter-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
  }
  
  .ift-newsletter-message.success {
    background-color: #e7f7ed;
    color: #1e7e34;
    border: 1px solid #d4edda;
    display: block;
  }
  
  .ift-newsletter-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
  }
  
  /* Animation */
  @keyframes ift-spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  /* Styles spécifiques standard */
  .ift-newsletter-standard {
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }
  
  /* Nouveau style pour le déclencheur de newsletter */
  .ift-newsletter-trigger-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    cursor: pointer;
    width: 100%;
  }
  
  .ift-newsletter-line {
    height: 1px;
    background-color: #000;
    flex-grow: 1;
  }
  
  .ift-newsletter-trigger-text {
   font-size: 19px;
   font-family: "Arcon";
   font-weight: 900;
   position: relative;
   background: #fff;
   display: inline-block;
   padding: 0 20px;
  }
  
  .ift-newsletter-subscribe-icon {
    position: relative;
    width: 70px;
    height: 70px;
    background-color: #ffd700;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    transition: transform 0.3s ease;
  }
  
  .ift-newsletter-subscribe-text {
    margin-bottom: 2px;
  }
  
  .ift-newsletter-arrow-icon {
    width: 16px;
    height: 16px;
  }
  
  .ift-newsletter-trigger-container:hover .ift-newsletter-subscribe-icon {
    transform: scale(1.1);
  }
  
  /* Styles spécifiques popup */
  .ift-newsletter-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
  }
  
  .ift-newsletter-popup.active {
    display: block;
  }
  
  /* Ajout des animations de fermeture */
  @keyframes ift-fade-out {
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
    }
  }
  
  @keyframes ift-slide-out {
    from {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
    to {
      opacity: 0;
      transform: translate(-50%, -40%);
    }
  }
  
  /* Classe pour l'animation de fermeture */
  .ift-newsletter-popup.closing .ift-newsletter-popup-overlay {
    animation: ift-fade-out 0.3s ease-out forwards;
  }
  
  .ift-newsletter-popup.closing .ift-newsletter-popup-content {
    animation: ift-slide-out 0.4s ease-out forwards;
  }
  
  .ift-newsletter-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: ift-fade-in 0.3s ease-out;
  }
  
  .ift-newsletter-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    width: auto; /* Augmenté pour correspondre à l'image */
    background-color: white;
    border-radius: 0;
    padding: 0; /* Supprimé le padding pour correspondre à l'image */
    animation: ift-slide-in 0.4s ease-out;
     /* Pour s'assurer que le contenu ne déborde pas */
    display: flex; /* Ajouté pour le layout côte à côte */
  }
  
  .ift-newsletter-popup-close {
    position: absolute;
    right: -15px;
    background: var(--second-color);
    color: black;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    top: -20px;
    z-index: 22;
    opacity: 1;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
  }
  
  .ift-newsletter-popup-close:hover {
    color: #333;
  }
  
  /* Nouveaux styles pour correspondre à l'image */
  .ift-newsletter-popup .ift-newsletter-container {
    padding: 40px 20px;
    width: 50%;
  }
  
  .ift-newsletter-popup .ift-newsletter-image {
    width: 50%;
    flex: none;
    min-width: auto;
  }
  
  .ift-newsletter-popup .ift-newsletter-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }
  
  .ift-newsletter-popup .ift-newsletter-content {
    flex-direction: row;
    gap: 0;
  }
  
  .ift-newsletter-popup .ift-newsletter-title {
    font-family: "Arcon";
    font-weight: 600;
    font-size: 20px;
    text-transform: uppercase;
    color: #000;
  }
  
  .ift-newsletter-popup .ift-newsletter-subtitle {
    font-family: "Arcon";
    font-weight: 500;
    font-size: 30px;
    color: #000;
  }
  
  .ift-newsletter-popup .ift-newsletter-description {
    margin-bottom: 15px;
  }
  
  .ift-newsletter-popup .ift-newsletter-form-wrapper {
    width: 100%;
  }
  
  .ift-newsletter-popup .ift-newsletter-button {
    background-color: #3a5998; /* Bleu comme dans l'image */
    border-radius: 0;
    text-transform: uppercase;
    font-weight: normal;
  }
  
  .ift-newsletter-popup .ift-newsletter-input {
    border: none;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    padding: 10px 0;
    background-color: transparent;
  }
  
  @keyframes ift-fade-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  @keyframes ift-slide-in {
    from {
      opacity: 0;
      transform: translate(-50%, -60%);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .ift-newsletter-popup .ift-newsletter-content {
      flex-direction: column;
    }
  
    .ift-newsletter-popup .ift-newsletter-container,
    .ift-newsletter-popup .ift-newsletter-image {
      width: 100%;
    }
  
    .ift-newsletter-name-fields {
      flex-direction: column;
    }
  
    .ift-newsletter-popup-content {
      width: 90%;
      flex-direction: column;
    }
  
    .ift-newsletter-trigger-container {
      flex-wrap: wrap;
    }
  
    .ift-newsletter-line {
      width: 100%;
      margin: 10px 0;
    }
  }
  