/* ============================================================
   ARTERE e-Commerce — Page Contact
   Composants spécifiques (s'appuie sur styles.css)
   ============================================================ */

/* ---------- HERO Contact — illustration en fond plein cadre, sans bordure ---------- */
.contact-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      100deg,
      #f4f4f5 0%,
      #f4f4f5 48%,
      rgba(245, 245, 246, 0.96) 56%,
      rgba(250, 250, 251, 0.5) 66%,
      rgba(255, 255, 255, 0) 76%
    ),
    url("../contact-hero.png") no-repeat right center / auto 90%,
    #ffffff;
}
.contact-hero .hero-grid {
  grid-template-columns: 1fr;
  align-items: center;
  min-height: clamp(440px, 42vw, 600px);
  padding-top: 56px;
  padding-bottom: 64px;
  position: relative;
  z-index: 2;
}
.contact-hero .hero-copy {
  max-width: 540px;
  position: relative;
  z-index: 2;
}
.contact-hero h1 {
  font-size: clamp(2rem, 2.95vw, 2.85rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0.5rem 0 0;
  max-width: 14ch;
}
.contact-hero .lead {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 44ch;
}
@media (max-width: 980px) {
  .contact-hero {
    background:
      linear-gradient(
        180deg,
        #f5f5f6 0%,
        rgba(247, 247, 248, 0.55) 30%,
        rgba(255, 255, 255, 0) 56%
      ),
      url("../contact-hero.png") no-repeat center bottom / min(580px, 98%) auto,
      #ffffff;
  }
  .contact-hero .hero-grid {
    text-align: center;
    min-height: 0;
    padding-bottom: min(60vw, 360px);
  }
  .contact-hero .hero-copy {
    max-width: none;
    margin: 0 auto;
  }
}

/* ============================================================
   SÉLECTEUR DE PROFIL + FORMULAIRE ADAPTATIF
   ============================================================ */
.contact-engine {
  position: relative;
  z-index: 5;
  margin-top: -58px;
}

/* --- Sélecteur (2 cartes -> bascule) --- */
.profile-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.profile-card {
  position: relative;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}
.profile-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #dcdcdf;
}
.profile-card .pc-ic {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}
.profile-card .pc-ic svg {
  width: 30px;
  height: 30px;
}
.profile-card .pc-txt h3 {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.profile-card .pc-txt p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}
.profile-card .pc-check {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  color: #fff;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
.profile-card .pc-check svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
/* état sélectionné */
.profile-card.is-active {
  border-color: var(--brand);
  background: linear-gradient(180deg, #fff, #fff7f6);
  box-shadow: 0 18px 44px rgba(225, 36, 28, 0.16);
}
.profile-card.is-active .pc-ic {
  background: var(--brand);
  color: #fff;
}
.profile-card.is-active .pc-check {
  background: var(--brand);
  border-color: var(--brand);
  transform: scale(1.05);
}
.profile-card.is-active .pc-check svg {
  opacity: 1;
}

/* --- Bloc formulaire + contact direct --- */
.contact-main {
  display: grid;
  grid-template-columns: 1.42fr 0.88fr;
  gap: 48px;
  margin-top: 46px;
  align-items: start;
}
.write-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.write-head h2 {
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.write-head .ctx-pill {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 5px 11px;
  border-radius: 999px;
}
.write-rule {
  width: 54px;
  height: 3px;
  border-radius: 3px;
  background: var(--brand);
  margin: 0.85rem 0 0;
}
.write-sub {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 1rem;
  max-width: 52ch;
}

/* formulaire */
.contact-form {
  margin-top: 26px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field.full {
  grid-column: 1/-1;
}
.field label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}
.field label .opt {
  color: var(--muted-2);
  font-weight: 500;
}
.field label .req {
  color: var(--brand);
  font-weight: 700;
}
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: 0.96rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.78em 0.9em;
  width: 100%;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}
.field textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.5;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(225, 36, 28, 0.12);
}
.field select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236C6F76' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85em center;
  background-size: 18px;
  padding-right: 2.6em;
}

/* dépôt de CV (profil candidat) */
.field-file label.drop {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 0.95em 1em;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    background 0.18s ease;
}
.field-file label.drop:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}
.field-file label.drop svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}
.field-file .drop .fname {
  color: var(--ink);
  font-weight: 600;
}
.field-file input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: 24px;
  font-size: 1rem;
  padding: 1.05em 1.4em;
}
.form-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.84rem;
}
.form-note svg {
  width: 16px;
  height: 16px;
  color: var(--muted-2);
  flex: 0 0 auto;
}

/* animation de bascule des champs */
.contact-form.swapping .form-grid {
  opacity: 0;
  transform: translateY(8px);
}
.form-grid {
  transition:
    opacity 0.26s ease,
    transform 0.26s ease;
}

/* --- Contact direct (colonne droite) --- */
.contact-direct {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
}
.contact-direct h2 {
  font-size: clamp(1.4rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.contact-direct .write-rule {
  margin-bottom: 8px;
}
.cd-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 26px;
}
.cd-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.cd-item .cd-ic {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--brand);
  display: grid;
  place-items: center;
}
.cd-item .cd-ic svg {
  width: 24px;
  height: 24px;
}
.cd-item .cd-txt h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
}
.cd-item .cd-txt p,
.cd-item .cd-txt a {
  display: block;
  color: var(--muted);
  font-size: 0.96rem;
  margin-top: 3px;
  line-height: 1.45;
}
.cd-item .cd-txt a:hover {
  color: var(--brand);
}
.cd-socials {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.cd-socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}
.cd-socials a:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.cd-socials svg {
  width: 18px;
  height: 18px;
}

/* ---------- Pourquoi nous contacter ---------- */
.reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.reason {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px 24px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.reason:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #dcdcdf;
}
.reason .badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  color: var(--brand);
  flex: 0 0 auto;
}
.reason .badge svg {
  width: 26px;
  height: 26px;
}
.reason h3 {
  font-size: 1.06rem;
  font-weight: 700;
}
.reason p {
  color: var(--muted);
  margin-top: 0.35rem;
  font-size: 0.93rem;
}

/* ---------- Nos expertises à votre service (cartes-liens) ---------- */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.exp-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px 48px 26px 24px;
  color: inherit;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.exp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #dcdcdf;
}
.exp-card .badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  color: var(--brand);
  flex: 0 0 auto;
}
.exp-card .badge svg {
  width: 26px;
  height: 26px;
}
.exp-card h3 {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
}
.exp-card p {
  color: var(--muted);
  margin-top: 0.35rem;
  font-size: 0.92rem;
}
.exp-card .chevron {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand);
  width: 22px;
  height: 22px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .contact-main {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .reasons {
    grid-template-columns: 1fr;
  }
  .exp-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .profile-select {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .contact-engine {
    margin-top: -40px;
  }
}
