/**
 * corrections.css — firstrentacar.me
 * Fichier à inclure APRÈS les CSS existants du site.
 * Ne modifie AUCUN style existant — ajoute uniquement les éléments manquants.
 * ================================================================
 */

/* ================================================================
   1. BANNIÈRE COOKIES RGPD
   — Utilise les variables CSS du site (var(--thm-*)) si disponibles,
     avec fallback sur les couleurs détectées visuellement.
   ================================================================ */

#frc-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;

  /* Couleur du footer/header du site — récupérée depuis .main-footer */
  background-color: var(--thm-black, #1c1c1c);
  color: #ffffff;

  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;

  /* Bordure supérieure avec la couleur accent du site — récupérée depuis .thm-btn */
  border-top: 3px solid var(--thm-primary, #e8a020);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);

  font-size: 0.88rem;
  line-height: 1.5;
  font-family: inherit; /* hérite exactement la police du site */

  /* Animation d'entrée */
  transform: translateY(100%);
  animation: frcSlideUp 0.4s 1s ease forwards;
}

@keyframes frcSlideUp {
  to { transform: translateY(0); }
}

#frc-cookie-banner p {
  flex: 1;
  margin: 0;
  min-width: 200px;
  color: rgba(255, 255, 255, 0.88);
}

#frc-cookie-banner a {
  /* Même couleur que les liens du site */
  color: var(--thm-primary, #e8a020);
  text-decoration: underline;
}

#frc-cookie-banner a:hover {
  opacity: 0.8;
}

.frc-cookie-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Bouton "Accepter" — reprend exactement le style .thm-btn du site */
.frc-btn-accept {
  display: inline-block;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.25s, opacity 0.25s;

  /* Couleur du bouton principal du site */
  background-color: var(--thm-primary, #e8a020);
  color: var(--thm-black, #1c1c1c);
}

.frc-btn-accept:hover {
  opacity: 0.88;
}

/* Bouton "Refuser" — style secondaire discret */
.frc-btn-decline {
  display: inline-block;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.frc-btn-decline:hover {
  border-color: rgba(255, 255, 255, 0.7);
  color: #ffffff;
}

/* ================================================================
   2. CONSENTEMENT RGPD SUR LES FORMULAIRES
   — S'intègre dans le flux des formulaires existants
   ================================================================ */

.frc-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.frc-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  /* Couleur accent du site sur la checkbox */
  accent-color: var(--thm-primary, #e8a020);
}

.frc-consent label {
  font-size: 0.85rem;
  /* Reprend la couleur de texte secondaire du site */
  color: var(--thm-gray, #777777);
  line-height: 1.55;
  cursor: pointer;
}

.frc-consent label a {
  color: var(--thm-primary, #e8a020);
  text-decoration: underline;
}

/* État erreur — quand le consentement n'est pas coché */
.frc-consent.frc-error {
  outline: 2px solid #e74c3c;
  outline-offset: 4px;
  border-radius: 4px;
  padding: 4px;
}

/* ================================================================
   3. MESSAGE DE CONFIRMATION APRÈS SOUMISSION
   — Style discret qui s'intègre sous les boutons existants
   ================================================================ */

.frc-toast {
  display: none;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-family: inherit;
  line-height: 1.5;

  background-color: var(--thm-black, #1c1c1c);
  color: #ffffff;
  border-left: 4px solid #27ae60;
}

.frc-toast.frc-visible {
  display: block;
  animation: frcFadeIn 0.3s ease;
}

@keyframes frcFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   4. RESPONSIVE
   ================================================================ */

@media (max-width: 600px) {
  #frc-cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .frc-cookie-btns {
    width: 100%;
  }

  .frc-btn-accept,
  .frc-btn-decline {
    flex: 1;
    text-align: center;
  }
}
