/*
Theme Name: ALTA Child
Description: Child theme ALTA - protège le header/footer personnalisés des mises à jour Hello Elementor.
Author: MIOR Agency
Template: hello-elementor
Version: 1.2.0
*/

/* =========================================================
   ALTA — CONTACT FORM 7 GLOBAL DESIGN
   Compatible avec les formulaires Contact Form 7 existants.
========================================================= */

:root{
  --alta-blue:#004F9E;
  --alta-blue-dark:#083C73;
  --alta-orange:#F39200;
  --alta-text:#183B63;
  --alta-muted:#6B7A8C;
  --alta-border:#DDE6EF;
  --alta-soft:#F7FAFD;
  --alta-danger:#C62828;
  --alta-success:#1F7A4C;
}

/* Le wrapper CF7 garde la même police que le site */
body .wpcf7,
body .wpcf7 form,
body .wpcf7 input,
body .wpcf7 select,
body .wpcf7 textarea,
body .wpcf7 button{
  font-family:"Tajawal","Readex Pro",Arial,sans-serif !important;
  box-sizing:border-box;
}

body .wpcf7 form p{
  margin:0 0 14px !important;
}

body .wpcf7 label{
  display:block;
  color:#17395F !important;
  font-size:14px !important;
  line-height:1.55 !important;
  font-weight:800 !important;
}

body .wpcf7 .wpcf7-form-control-wrap{
  display:block;
  width:100%;
  margin-top:7px;
}

body .wpcf7 input[type="text"],
body .wpcf7 input[type="email"],
body .wpcf7 input[type="tel"],
body .wpcf7 input[type="url"],
body .wpcf7 input[type="number"],
body .wpcf7 input[type="date"],
body .wpcf7 input[type="search"],
body .wpcf7 select,
body .wpcf7 textarea{
  width:100% !important;
  min-height:52px !important;
  margin:0 !important;
  padding:12px 15px !important;
  background:#fff !important;
  color:#24364B !important;
  border:1px solid var(--alta-border) !important;
  border-radius:12px !important;
  font-size:14px !important;
  line-height:1.45 !important;
  outline:none !important;
  box-shadow:0 4px 14px rgba(0,79,158,.035) !important;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease !important;
}

body .wpcf7 textarea{
  min-height:125px !important;
  max-height:260px !important;
  resize:vertical;
}

body .wpcf7 input::placeholder,
body .wpcf7 textarea::placeholder{
  color:#98A6B5 !important;
  opacity:1;
}

body .wpcf7 input[type="text"]:focus,
body .wpcf7 input[type="email"]:focus,
body .wpcf7 input[type="tel"]:focus,
body .wpcf7 input[type="url"]:focus,
body .wpcf7 input[type="number"]:focus,
body .wpcf7 input[type="date"]:focus,
body .wpcf7 input[type="search"]:focus,
body .wpcf7 select:focus,
body .wpcf7 textarea:focus{
  border-color:var(--alta-blue) !important;
  background:#fff !important;
  box-shadow:0 0 0 4px rgba(0,79,158,.08) !important;
}

/* SELECT */
body .wpcf7 select{
  appearance:auto;
  cursor:pointer;
}

/* Upload fichier */
body .wpcf7 input[type="file"]{
  width:100% !important;
  padding:10px !important;
  background:var(--alta-soft) !important;
  border:1px dashed rgba(0,79,158,.28) !important;
  border-radius:12px !important;
  color:var(--alta-text) !important;
  font-size:13px !important;
}

body .wpcf7 input[type="file"]::file-selector-button{
  margin-inline-end:10px;
  padding:9px 13px;
  border:0;
  border-radius:9px;
  background:var(--alta-blue);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

/* Checkbox / radio */
body .wpcf7 .wpcf7-list-item{
  margin:4px 0 4px 14px !important;
}

body .wpcf7 input[type="checkbox"],
body .wpcf7 input[type="radio"]{
  accent-color:var(--alta-blue);
  width:17px;
  height:17px;
  vertical-align:middle;
  margin-inline-end:6px;
}

/* Bouton principal ALTA */
body .wpcf7 input[type="submit"],
body .wpcf7 button[type="submit"]{
  min-height:50px !important;
  padding:12px 25px !important;
  border:0 !important;
  border-radius:999px !important;
  background:var(--alta-orange) !important;
  color:#fff !important;
  font-size:14px !important;
  line-height:1.2 !important;
  font-weight:900 !important;
  cursor:pointer !important;
  box-shadow:0 10px 24px rgba(243,146,0,.20) !important;
  transition:transform .2s ease, background .2s ease, box-shadow .2s ease !important;
}

body .wpcf7 input[type="submit"]:hover,
body .wpcf7 button[type="submit"]:hover{
  background:#DC8200 !important;
  transform:translateY(-2px);
  box-shadow:0 14px 30px rgba(243,146,0,.27) !important;
}

body .wpcf7 input[type="submit"]:disabled,
body .wpcf7 button[type="submit"]:disabled{
  opacity:.65;
  cursor:not-allowed !important;
  transform:none !important;
}

/* Validation */
body .wpcf7 .wpcf7-not-valid{
  border-color:#D94B4B !important;
  box-shadow:0 0 0 3px rgba(217,75,75,.08) !important;
}

body .wpcf7 .wpcf7-not-valid-tip{
  display:block;
  margin-top:5px;
  color:var(--alta-danger) !important;
  font-size:12px !important;
  line-height:1.45;
  font-weight:700;
}

body .wpcf7 .wpcf7-response-output{
  margin:14px 0 0 !important;
  padding:12px 15px !important;
  border:1px solid rgba(0,79,158,.16) !important;
  border-radius:12px !important;
  background:#F7FBFF !important;
  color:var(--alta-text) !important;
  font-size:13px !important;
  line-height:1.65 !important;
}

body .wpcf7 form.sent .wpcf7-response-output{
  border-color:rgba(31,122,76,.25) !important;
  background:#F2FBF6 !important;
  color:var(--alta-success) !important;
}

body .wpcf7 form.invalid .wpcf7-response-output,
body .wpcf7 form.unaccepted .wpcf7-response-output,
body .wpcf7 form.payment-required .wpcf7-response-output{
  border-color:rgba(198,40,40,.22) !important;
  background:#FFF6F6 !important;
  color:var(--alta-danger) !important;
}

body .wpcf7 .wpcf7-spinner{
  margin:0 10px !important;
  background-color:var(--alta-blue) !important;
}

/* =========================================================
   ALTA — FORMULAIRES EN CARTE
   Les pages ALTA historiques utilisent .alta-form-box / .alta-form-wrap
========================================================= */

.alta-form-box,
.alta-form-wrap{
  background:#fff;
  border:1px solid rgba(0,79,158,.10);
  border-radius:18px;
  box-shadow:0 18px 45px rgba(0,79,158,.07);
}

.alta-form-box .wpcf7 form,
.alta-form-wrap .wpcf7 form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 14px;
}

.alta-form-box .wpcf7 form > p,
.alta-form-wrap .wpcf7 form > p{
  margin:0 !important;
  min-width:0;
}

/* Les zones longues prennent toute la largeur */
.alta-form-box .wpcf7 form > p:has(textarea),
.alta-form-wrap .wpcf7 form > p:has(textarea),
.alta-form-box .wpcf7 form > p:has(input[type="file"]),
.alta-form-wrap .wpcf7 form > p:has(input[type="file"]),
.alta-form-box .wpcf7 form > p:has(.wpcf7-acceptance),
.alta-form-wrap .wpcf7 form > p:has(.wpcf7-acceptance),
.alta-form-box .wpcf7 form > p:has(input[type="submit"]),
.alta-form-wrap .wpcf7 form > p:has(input[type="submit"]),
.alta-form-box .wpcf7 .wpcf7-response-output,
.alta-form-wrap .wpcf7 .wpcf7-response-output{
  grid-column:1 / -1;
}

.alta-form-box .wpcf7 input[type="submit"],
.alta-form-wrap .wpcf7 input[type="submit"]{
  width:100% !important;
}

/* Arabe RTL / FR-EN LTR */
html[dir="rtl"] body .wpcf7,
body.rtl .wpcf7{
  direction:rtl;
  text-align:right;
}

html[dir="ltr"] body .wpcf7{
  direction:ltr;
  text-align:left;
}

@media(max-width:680px){
  .alta-form-box .wpcf7 form,
  .alta-form-wrap .wpcf7 form{
    grid-template-columns:1fr;
    gap:11px;
  }

  .alta-form-box .wpcf7 form > p,
  .alta-form-wrap .wpcf7 form > p{
    grid-column:1 / -1;
  }

  body .wpcf7 input[type="submit"],
  body .wpcf7 button[type="submit"]{
    width:100% !important;
  }
}
