/* =====================================================
   AFC MALAFOSSE — Formulaire Avis Clients
   Override du module CG Avis Client (Joomla 4/5)
   À placer APRÈS le style.css du module
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

/* ---- Variables ---- */
:root {
  --afc-blue:       #1a4f8a;
  --afc-blue-hov:   #2567b0;
  --afc-blue-pale:  #e8f0fb;
  --afc-gold:       #f0a500;
  --afc-bg:         #f5f7fa;
  --afc-text:       #1c2a3a;
  --afc-muted:      #6b7c93;
  --afc-border:     #d0dbe9;
  --afc-radius:     10px;
}



div.form-content {
  display: none;

}



/* ================================================
   CONTENEUR DU FORMULAIRE
   ================================================ */
div.cgavisclient-form {
  font-family: 'DM Sans', sans-serif;
  background: #ffffff;
  border: 1px solid var(--afc-border);
  border-radius: 16px;
  box-shadow: 0 6px 28px rgba(26, 79, 138, 0.10);
  padding: 2.25rem 2rem 2rem;
  max-width: 800px;
  margin: 1.5rem auto;
  position: relative;
  overflow: hidden;
}

/* Barre colorée décorative en haut */
div.cgavisclient-form::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--afc-blue) 55%, var(--afc-gold) 100%);
}

/* Titre du formulaire */
div.cgavisclient-form h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--afc-blue);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--afc-blue-pale);
}

/* ================================================
   GROUPES DE CHAMPS
   ================================================ */
div.cgavisclient-form .form-horizontal .control-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
  border: none;
}

/* ================================================
   LABELS
   ================================================ */
div.cgavisclient-form .form-horizontal .control-label {
  width: 15%;
  min-width: 130px;
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--afc-muted);
  padding-top: .2rem;
  text-align: right;
}

/* ================================================
   WRAPPER DES INPUTS
   ================================================ */
div.cgavisclient-form .form-horizontal .controls {
  flex: 1;
  margin: 0;
}

/* ================================================
   INPUTS, SELECT, TEXTAREA
   ================================================ */
div.cgavisclient-form input,
div.cgavisclient-form select,
div.cgavisclient-form textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem;
  color: var(--afc-text);
  background-color: var(--afc-bg) !important;
  border: 1.5px solid var(--afc-border) !important;
  border-radius: var(--afc-radius) !important;
  box-shadow: none !important;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease !important;
  padding: .55rem .9rem !important;
  width: 100% !important;
  box-sizing: border-box;
  outline: none;
}

div.cgavisclient-form input {
  height: 44px !important;
}

div.cgavisclient-form select {
  height: 44px !important;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231a4f8a' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right .9rem center !important;
  padding-right: 2.5rem !important;
  cursor: pointer;
}

div.cgavisclient-form textarea {
  height: auto !important;
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

/* États hover et focus */
div.cgavisclient-form input:hover,
div.cgavisclient-form select:hover,
div.cgavisclient-form textarea:hover {
  border-color: var(--afc-blue-hov) !important;
  background-color: #fff !important;
}

div.cgavisclient-form input:focus,
div.cgavisclient-form select:focus,
div.cgavisclient-form textarea:focus {
  border-color: var(--afc-blue) !important;
  background-color: #fff !important;
  box-shadow: 0 0 0 4px rgba(26, 79, 138, .12) !important;
}

/* ================================================
   ÉTOILES DE NOTATION
   ================================================ */
div.cgavisclient-form div.stars {
  display: flex;
  flex-direction: row-reverse;
  gap: 2px;
  margin-top: .15rem;
}

div.cgavisclient-form label.star {
  padding: 4px 6px;
  font-size: 2rem;
  color: #ccc;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease;
  float: none;
}

div.cgavisclient-form label.star:before {
  content: '★';
  color: inherit;
}

div.cgavisclient-form label.star:hover {
  transform: scale(1.25) rotate(-10deg);
  color: var(--afc-gold);
}

div.cgavisclient-form input.star:checked ~ label.star:before {
  color: var(--afc-gold);
}

div.cgavisclient-form input.star:checked ~ label.star {
  color: var(--afc-gold);
}

/* ================================================
   BOUTON "ACTIVER/DÉSACTIVER L'ÉDITEUR"
   ================================================ */
#cgavisclient-toggle {
  border-top: 1px solid var(--afc-blue-pale);
  padding-top: 1rem;
  margin-bottom: 1.25rem;
}

#cgavisclient-toggle a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 1rem;
  background: var(--afc-blue-pale);
  color: var(--afc-blue);
  border: 1px solid var(--afc-border);
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-decoration: none;
  width: auto;
  transition: background .18s, color .18s;
}

#cgavisclient-toggle a:hover {
  background: var(--afc-blue);
  color: #fff;
  text-decoration: none;
}

/* ================================================
   BOUTON D'ENVOI (via .btn ou input[type=submit])
   ================================================ */
div.cgavisclient-form .btn,
div.cgavisclient-form button[type="submit"],
div.cgavisclient-form input[type="submit"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 50px !important;
  width: auto !important;
  padding: 0 2rem !important;
  background: var(--afc-blue) !important;
  color: #fff !important;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem !important;
  font-weight: 600;
  letter-spacing: .03em;
  border: none !important;
  border-radius: var(--afc-radius) !important;
  box-shadow: none !important;
  cursor: pointer;
  margin-top: .5rem;
  transition: background .2s ease, box-shadow .2s ease, transform .15s ease !important;
  text-decoration: none;
  -webkit-appearance: none;
}

div.cgavisclient-form .btn:hover,
div.cgavisclient-form button[type="submit"]:hover,
div.cgavisclient-form input[type="submit"]:hover {
  background: var(--afc-blue-hov) !important;
  box-shadow: 0 6px 20px rgba(26, 79, 138, .28) !important;
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none;
}

div.cgavisclient-form .btn:active,
div.cgavisclient-form input[type="submit"]:active {
  transform: translateY(0) !important;
  box-shadow: none !important;
}

/* ================================================
   TEXTE LIBRE AU-DESSUS DU FORMULAIRE
   ================================================ */
div.cgavisclient-freetext {
  background: var(--afc-blue-pale);
  border-left: 4px solid var(--afc-blue);
  border-radius: 0 8px 8px 0;
  padding: .75rem 1rem;
  margin: 0 0 1.25rem;
  font-size: .9rem;
  color: var(--afc-blue);
}

/* ================================================
   PAGE DE REMERCIEMENT
   ================================================ */
div.cgavisclient-thankyou {
  font-family: 'DM Sans', sans-serif;
  padding: 2rem;
}

div.cgavisclient-thankyou-title {
  font-size: 2.5rem;
  color: var(--afc-blue);
  font-weight: 600;
  margin: 2rem 0 1.5rem;
}

div.cgavisclient-thankyou-content {
  font-size: 1.2rem;
  color: var(--afc-muted);
}

/* ================================================
   PAGE D'ERREUR
   ================================================ */
div.cgavisclient-error {
  font-family: 'DM Sans', sans-serif;
}

div.cgavisclient-error-title {
  font-size: 2rem;
  color: #c0392b;
}

div.cgavisclient-error-content {
  font-size: 1.1rem;
  color: var(--afc-muted);
}

/* ================================================
   RESPONSIVE MOBILE
   ================================================ */
@media (max-width: 640px) {
  div.cgavisclient-form {
    padding: 1.75rem 1rem 1.5rem;
    border-radius: 12px;
  }

  div.cgavisclient-form .form-horizontal .control-group {
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
  }

  div.cgavisclient-form .form-horizontal .control-label {
    width: 100%;
    min-width: unset;
    text-align: left;
  }

  div.cgavisclient-form .btn,
  div.cgavisclient-form input[type="submit"] {
    width: 100% !important;
  }
}

/* ================================================
   module défilant marges
   ================================================ */

.cg_avis_scroll .cg_one {
    background: rgb(248 248 248);
    box-shadow: 0 5px 6px -6px #777;
    padding: 20px;
    margin: 10px;
}


.cg_avisclient .cg_tcontent1 {
  display: block;
  width: 98%;
}
.cg_avisclient .cg_tcontent, .cg_tcontent1 {
  font-style: italic;
  padding: 23px 10px 14px 10px;
  color: #333333;
}


.cg_avisclient .cg_info1 {
  font-size: 1.2em;
  margin-left: 2em;
  display: block;
  width: 90%;
  margin-top: 2px;
}


.cg_avis_scroll .cg_tcontent, .cg_avis_scroll .cg_tcontent1, .cg_avis_scroll .cg_tcontent2 {
    font-style: italic;
    padding: 10px 0 10px 0;
    color: var(--bs-primary);
    font-size: 12px;
}
.cg_avis_scroll ul.cg-scroll-items-0, .cg_avis_scroll ul.cg-scroll-items-1 {
    padding: 0 0 .2rem 0;
    margin: 0;
    list-style-type: none;
    font-size: 11px;
}