/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://example.com/
 Description:  Thème enfant pour Hello Elementor
 Author:       Blue Pixel
 Template:     hello-elementor
 Version:      1.0.0
 Text Domain:  hello-elementor-child
*/

/* =========
   ACF Front – Style général
   Ajuste les variables pour changer le thème en 2s
   ========= */
:root{
  --bp-primary: #6b46c1;    /* violet / à adapter */
  --bp-primary-600:#5531b5;
  --bp-primary-100:#f3eefe;
  --bp-bg:#ffffff;
  --bp-muted:#f6f7fb;
  --bp-border:#e6e8ee;
  --bp-text:#1f2937;
  --bp-text-muted:#6b7280;
  --bp-success:#10b981;
  --bp-danger:#ef4444;
}

.acf-form {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1.25rem;
  background: var(--bp-bg);
}

/* Titres & labels */
.acf-form h1, .acf-form h2, .acf-form h3 { color: var(--bp-text); }
.acf-form .acf-label label{
  font-weight: 600;
  color: var(--bp-text);
}
.acf-form .acf-label .description{
  color: var(--bp-text-muted);
}

/* Champs */
.acf-form input[type="text"],
.acf-form input[type="number"],
.acf-form input[type="email"],
.acf-form input[type="url"],
.acf-form input[type="tel"],
.acf-form input[type="date"],
.acf-form input[type="time"],
.acf-form input[type="file"],
.acf-form select,
.acf-form textarea {
  width: 100%;
  border: 1px solid var(--bp-border);
  background: #fff;
  border-radius: 10px;
  padding: .7rem .85rem;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.acf-form textarea { min-height: 120px; }
.acf-form input:focus,
.acf-form select:focus,
.acf-form textarea:focus {
  outline: none;
  border-color: var(--bp-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bp-primary) 25%, transparent);
}

/* Regroupement visuel des champs */
.acf-fields{
  gap: 16px;
  display: grid;
}
.acf-field{
  padding: 12px 0;
  border-bottom: 1px dashed var(--bp-border);
}
.acf-field:last-child{ border-bottom: 0; }

/* =========
   ACCORDÉONS – mise en évidence
   ========= */
.acf-accordion{
  border: 1px solid var(--bp-border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  margin: 22px 0;
}
.acf-accordion .acf-accordion-title{
  position: relative;
  background: var(--bp-primary-100);
  padding: 14px 52px 14px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--bp-border);
}
.acf-accordion .acf-accordion-title label{
  margin: 0;
  font-weight: 700;
  color: var(--bp-primary);
  letter-spacing: .2px;
}
.acf-accordion .acf-accordion-title::after{
  content: "▾";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform .2s ease;
  font-size: 18px;
  color: var(--bp-primary);
}
.acf-accordion.-open .acf-accordion-title::after{
  transform: translateY(-50%) rotate(180deg);
}
.acf-accordion .acf-accordion-content{
  background: #fff;
  padding: 16px;
}

/* =========
   REPEATER – tableau + CTA
   ========= */
.acf-repeater .acf-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--bp-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.acf-repeater .acf-table th{
  background: var(--bp-muted);
  color: var(--bp-text);
  font-weight: 600;
  padding: 12px 10px;
  border-bottom: 1px solid var(--bp-border);
  text-align: left;
  white-space: nowrap;
}
.acf-repeater .acf-table td{
  padding: 10px;
  border-bottom: 1px solid var(--bp-border);
  vertical-align: middle;
}
.acf-repeater .acf-table tr:nth-child(even) td{
  background: #fafbff;
}
.acf-repeater .acf-row-handle{
  width: 44px;
  text-align: center;
}

/* Boutons add/remove ligne */
.acf-repeater .acf-actions{
  padding: 14px 0 4px;
}
.acf-repeater .acf-actions .acf-button,
.acf-repeater .acf-actions a.button{
  display: inline-flex;
  align-items: center;
  gap: .5ch;
  background: var(--bp-primary);
  border: 1px solid var(--bp-primary);
  color: #fff !important;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .02s ease, background .2s, border-color .2s;
}
.acf-repeater .acf-actions .acf-button:hover,
.acf-repeater .acf-actions a.button:hover{
  background: var(--bp-primary-600);
  border-color: var(--bp-primary-600);
}
.acf-repeater .acf-actions .acf-button:active,
.acf-repeater .acf-actions a.button:active{
  transform: translateY(1px);
}

/* Icônes plus/moins dans la 1re colonne (si visibles) */
.acf-row-handle .acf-icon{
  border-radius: 8px;
  border: 1px solid var(--bp-border);
  background: #fff;
  transition: background .2s, border-color .2s, color .2s;
}
.acf-row-handle .acf-icon.-minus{ color: var(--bp-danger); }
.acf-row-handle .acf-icon:hover{
  background: var(--bp-muted);
  border-color: var(--bp-primary);
}

/* =========
   Bouton de soumission
   ========= */
.acf-form .acf-form-submit input[type="submit"],
.acf-form input.acf-button[type="submit"],
.acf-form .button.button-primary{
  background: var(--bp-primary);
  border: 1px solid var(--bp-primary);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .02s ease;
}
.acf-form .acf-form-submit input[type="submit"]:hover{
  background: var(--bp-primary-600);
  border-color: var(--bp-primary-600);
}
.acf-form .acf-form-submit input[type="submit"]:active{
  transform: translateY(1px);
}

/* Notice succès (après submit) */
.acf-form .notice-success{
  background: color-mix(in srgb, var(--bp-success) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--bp-success) 40%, #fff);
  color: #065f46;
  border-radius: 10px;
}

/* =========
   Petites finitions
   ========= */
.acf-form .description { font-size: .9rem; }
.acf-form .acf-error-message{
  background: color-mix(in srgb, var(--bp-danger) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--bp-danger) 40%, #fff);
  color: #991b1b;
  padding: 8px 10px;
  border-radius: 8px;
}
.acf-form .acf-input-prepend, .acf-form .acf-input-append{
  background: var(--bp-muted);
  border-color: var(--bp-border);
  color: var(--bp-text-muted);
}

/* Responsive */
@media (max-width: 900px){
  .acf-repeater .acf-table,
  .acf-repeater .acf-table thead{ display:block; }
  .acf-repeater .acf-table tr{ display:block; border-bottom:1px solid var(--bp-border); }
  .acf-repeater .acf-table th{ display:none; }
  .acf-repeater .acf-table td{
    display:flex; gap:.5rem; align-items:center; justify-content:space-between;
  }
  .acf-repeater .acf-table td:before{
    content: attr(data-colname);
    font-weight:600; color: var(--bp-text-muted);
  }
}
