/* =========================================================
   Elec Distribution — composants sur mesure
   Complète les réglages Elementor pour les blocs que le
   constructeur ne sait pas dessiner seul.
   Charte : marine #0C2D5C · bleu #0061E3 · orange #F5A623
   ========================================================= */

/* ---------- Boutons ---------- */

/* Hello Elementor met les boutons en capitales : la charte ne le fait pas. */
.elementor-widget-button .elementor-button,
.elementor-widget-form .elementor-button,
.elementor-button { text-transform: none; }

/* ---------- Paragraphes des blocs de texte ---------- */

/* Elementor laisse au dernier paragraphe la marge basse du thème : les blocs
   se retrouvent décentrés et les bandes trop hautes. On garde l'espace entre
   deux paragraphes, on supprime celui du début et de la fin. */
.elementor-widget-text-editor p:first-child { margin-top: 0; }
.elementor-widget-text-editor p:last-child { margin-bottom: 0; }

/* Dans les colonnes du pied de page, l'interligne suffit à aérer les liens. */
.elementor-location-footer .elementor-widget-text-editor p { margin: 0; }

/* ---------- En-tête ---------- */

/* Sur téléphone, seuls le logo et le menu restent : le bouton repasse
   dans le hero, juste en dessous. */
@media (max-width: 767px) {
  .elementor-location-header .elementor-widget-button { display: none; }
}

/* ---------- Pied de page ---------- */

.elementor-location-footer a { color: inherit; text-decoration: none; }
.elementor-location-footer a:hover { color: var(--ed-orange); }

/* ---------- Barre figée ---------- */

/* Une fois décollée du haut de page, la barre se resserre et pose une ombre
   pour se détacher du contenu qui passe dessous. */
.elementor-location-header .elementor-sticky--effects {
  --padding-top: 13px;
  --padding-bottom: 13px;
  box-shadow: 0 8px 28px rgba(6, 20, 40, 0.34);
  transition: box-shadow .25s ease, padding .25s ease;
  backdrop-filter: saturate(140%);
}
.elementor-location-header .elementor-sticky--effects .elementor-widget-image img {
  width: 158px;
  transition: width .25s ease;
}

/* ---------- Ancrages ---------- */

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* La barre figée recouvre le haut de l'écran : les ancres s'arrêtent dessous. */
[id] { scroll-margin-top: 104px; }
@media (max-width: 767px) { [id] { scroll-margin-top: 86px; } }

/* ---------- Titre du hero ---------- */

.ed-titre-hero em { font-style: normal; color: var(--ed-orange); }

/* ---------- Photo du hero ---------- */

.ed-photo-hero img {
  height: 520px;
  object-fit: cover;
  object-position: 50% 42%;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Carte d'analyse posée sur la photo */
.ed-visuel-hero { position: relative; padding-bottom: 62px; }
.ed-carte-analyse {
  position: absolute;
  left: -58px;
  bottom: 0;
  width: 342px;
  max-width: calc(100% - 24px);
  z-index: 2;
}

/* ---------- Blocs chiffrés (analyse, facture, recalcul) ---------- */

.ed-bloc {
  background: var(--ed-blanc);
  color: var(--ed-marine);
  border-radius: 13px;
  padding: 22px 24px;
  box-shadow: 0 24px 48px rgba(6, 20, 40, 0.34);
}
.ed-bloc--plat { box-shadow: none; border-radius: 14px; padding: 30px 32px; }

.ed-bloc .ed-etiquette {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ed-texte-clair);
  margin: 0 0 16px;
}

.ed-bloc .ed-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  margin: 0;
  border-bottom: 1px solid var(--ed-trait);
}
.ed-bloc .ed-entete strong {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.ed-bloc .ed-entete span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ed-texte-clair);
}

.ed-bloc dl { margin: 18px 0 0; }
.ed-bloc .ed-ligne {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 0;
}
.ed-bloc .ed-ligne dt { font-size: 14px; color: var(--ed-texte); margin: 0; }
.ed-bloc .ed-ligne dd {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin: 0;
  color: var(--ed-marine);
}
.ed-bloc--plat .ed-ligne dt,
.ed-bloc--plat .ed-ligne dd { font-size: 15px; }

.ed-bloc .ed-total {
  margin-top: 11px;
  padding-top: 15px;
  border-top: 1px solid var(--ed-trait);
}
.ed-bloc .ed-total dt { font-weight: 600; color: var(--ed-marine); }
.ed-bloc .ed-total dd {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ed-bleu);
}
.ed-bloc--plat .ed-total dd { font-size: 20px; color: var(--ed-marine); }

/* Variante « recalcul » sur fond marine */
.ed-bloc--recalcul {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ed-blanc);
  border: 1px solid var(--ed-orange);
  box-shadow: none;
}
.ed-bloc--recalcul .ed-entete { border-bottom-color: rgba(255, 255, 255, 0.18); }
.ed-bloc--recalcul .ed-entete span { color: var(--ed-orange); }
.ed-bloc--recalcul .ed-ligne dt { color: rgba(255, 255, 255, 0.74); }
.ed-bloc--recalcul .ed-ligne dd { color: var(--ed-blanc); }
.ed-bloc--recalcul .ed-total { border-top-color: rgba(255, 255, 255, 0.18); }
.ed-bloc--recalcul .ed-total dt { color: var(--ed-blanc); }
.ed-bloc--recalcul .ed-total dd { font-size: 26px; color: var(--ed-orange); }

/* ---------- Ligne « mêmes kWh » ---------- */

.ed-fleche p {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.80);
}
.ed-fleche p::before {
  content: "";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  background-color: var(--ed-orange);
  -webkit-mask: var(--ed-fleche-bas) center / contain no-repeat;
  mask: var(--ed-fleche-bas) center / contain no-repeat;
}
:root {
  --ed-fleche-bas: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m5 12 7 7 7-7'/%3E%3C/svg%3E");
}

/* ---------- Liste à filets (pour qui) ---------- */

.ed-filet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.ed-filet .ed-nom {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: clamp(18px, 1.5vw, 21px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ed-orange);
}
.ed-filet .ed-detail {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
  text-align: right;
}

/* Variante sur fond clair (page apporteur) */
.ed-filet--clair .ed-nom { color: var(--ed-marine); }
.ed-filet--clair .ed-detail { color: var(--ed-texte-clair); }

/* ---------- Atouts du hero ---------- */

.ed-atouts .elementor-icon-list-item { align-items: flex-start; }
.ed-atouts .elementor-icon-list-icon { margin-top: 3px; }
.ed-atouts .elementor-icon-list-text { line-height: 1.5; }

/* ---------- Contact direct ---------- */

.ed-contact-direct a {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: clamp(19px, 1.9vw, 25px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ed-blanc);
  word-break: break-word;
  text-decoration: none;
}
.ed-contact-direct a:hover { color: var(--ed-orange); }

/* ---------- Bloc 25 % (page apporteur) ---------- */

.ed-chiffre {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--ed-orange);
  border-radius: 16px;
  padding: 38px 34px;
  text-align: center;
}
.ed-chiffre b {
  display: block;
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: clamp(62px, 6vw, 82px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--ed-orange);
  margin-bottom: 10px;
}
.ed-chiffre p { font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); margin: 0; }
.ed-chiffre small {
  display: block;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------- Pages de texte (mentions, confidentialité) ---------- */

.ed-texte h2 {
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: clamp(21px, 1.9vw, 24px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ed-marine);
  margin: 40px 0 14px;
}
.ed-texte h2:first-child { margin-top: 0; }
.ed-texte p { font-size: 16.5px; line-height: 1.7; color: var(--ed-texte); margin: 0 0 14px; }
.ed-texte a { color: var(--ed-bleu); text-decoration: underline; }
.ed-texte ul { margin: 0 0 14px; padding-left: 20px; color: var(--ed-texte); }
.ed-texte li { font-size: 16.5px; line-height: 1.7; margin-bottom: 6px; }

.ed-avertissement {
  padding: 22px 26px;
  background: var(--ed-blanc);
  border: 1px solid var(--ed-trait);
  border-radius: 12px;
}
.ed-avertissement span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ed-orange);
  margin-bottom: 8px;
}
.ed-avertissement p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--ed-texte); }

.ed-tableau div {
  display: flex;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--ed-trait-ivoire);
}
.ed-tableau div:last-child { border-bottom: 1px solid var(--ed-trait-ivoire); }
.ed-tableau dt { flex: 0 0 250px; font-size: 16px; color: var(--ed-texte-clair); margin: 0; }
.ed-tableau dd { margin: 0; font-size: 16px; font-weight: 500; color: var(--ed-marine); }

/* ---------- Formulaire ---------- */

.ed-formulaire {
  background: var(--ed-blanc);
  border-radius: 16px;
  padding: clamp(24px, 3vw, 38px) clamp(22px, 3vw, 40px);
}
.ed-formulaire .elementor-field-group > label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ed-marine);
  margin-bottom: 8px;
}
.ed-formulaire .elementor-field-textual {
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--ed-champ);
  border-radius: 9px;
  background: var(--ed-creme);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ed-marine);
}
.ed-formulaire textarea.elementor-field-textual { min-height: 96px; resize: vertical; }
.ed-formulaire .elementor-field-textual:focus {
  outline: none;
  border-color: var(--ed-bleu);
  box-shadow: 0 0 0 3px rgba(0, 97, 227, 0.14);
}
.ed-formulaire .elementor-field-textual::placeholder { color: #9AA6B8; opacity: 1; }

/* ---------- Dépôt de fichier ----------
   Le navigateur écrit « Choose File / No file chosen » dans sa propre langue,
   que la page soit en français ou non : impossible de le traduire. On masque
   donc le contrôle natif et on redessine la zone de dépôt par-dessus. */

.ed-formulaire .elementor-field-type-upload { position: relative; }

.ed-formulaire .elementor-field-type-upload input[type="file"] {
  width: 100%;
  min-height: 82px;
  padding: 20px 24px 20px 64px;
  border: 1px dashed #B9C6D8;
  border-radius: 11px;
  background: #F4F8FF var(--ed-icone-depot) no-repeat 22px center / 26px 26px;
  color: transparent;          /* masque « No file chosen » */
  cursor: pointer;
}
.ed-formulaire .elementor-field-type-upload input[type="file"]:hover { border-color: var(--ed-bleu); }
.ed-formulaire .elementor-field-type-upload input[type="file"]:focus-visible {
  outline: 3px solid var(--ed-orange);
  outline-offset: 3px;
}
/* le bouton natif disparaît, sous ses deux noms selon le navigateur */
.ed-formulaire .elementor-field-type-upload input[type="file"]::file-selector-button,
.ed-formulaire .elementor-field-type-upload input[type="file"]::-webkit-file-upload-button {
  display: none;
}

:root {
  --ed-icone-depot: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230061E3' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4'/%3E%3Cpath d='m7.5 8.5 4.5-4.5 4.5 4.5'/%3E%3Cpath d='M4 15v3.5A1.5 1.5 0 0 0 5.5 20h13a1.5 1.5 0 0 0 1.5-1.5V15'/%3E%3C/svg%3E");
}

/* nos deux lignes, posées sur le champ, transparentes au clic */
.ed-formulaire .elementor-field-type-upload::before,
.ed-formulaire .elementor-field-type-upload::after {
  position: absolute;
  left: 64px;
  right: 24px;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ed-formulaire .elementor-field-type-upload::before {
  content: "Déposer un fichier ou photographier la facture";
  bottom: 42px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ed-marine);
}
.ed-formulaire .elementor-field-type-upload::after {
  content: "PDF, JPG ou PNG — 10 Mo maximum";
  bottom: 22px;
  font-size: 13px;
  color: #6B7A90;
}
/* une fois un fichier choisi, site.js pose son nom sur le groupe */
.ed-formulaire .elementor-field-type-upload[data-fichier]::before { content: attr(data-fichier); }
.ed-formulaire .elementor-field-type-upload[data-fichier]::after { content: "Cliquez pour changer de fichier"; }
.ed-formulaire .elementor-field-type-upload[data-fichier] input[type="file"] {
  border-style: solid;
  border-color: var(--ed-bleu);
}

/* Case à cocher de consentement */
.ed-formulaire .elementor-field-type-acceptance .elementor-field-option label {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ed-texte);
}
.ed-formulaire .elementor-field-type-acceptance a { color: var(--ed-bleu); text-decoration: underline; }
.ed-formulaire .elementor-field-type-acceptance input[type="checkbox"] {
  width: 19px;
  height: 19px;
  margin-right: 10px;
  accent-color: var(--ed-bleu);
}

/* Champ HTML de bas de formulaire */
.ed-formulaire .elementor-field-type-html p {
  font-size: 13px;
  color: var(--ed-texte-clair);
  text-align: center;
  margin: 0;
}

.ed-formulaire .elementor-message { font-size: 15px; }

/* ---------- FAQ ---------- */

.ed-faq .e-n-accordion-item:last-child { border-bottom: 1px solid var(--ed-trait-ivoire); }
.ed-faq .e-n-accordion-item-title { padding-left: 0; padding-right: 0; }
.ed-faq summary { cursor: pointer; }
.ed-faq .e-n-accordion-item-title-text { text-wrap: balance; }

/* ---------- Adaptations mobiles ---------- */

@media (max-width: 1024px) {
  .ed-carte-analyse { left: 0; }
}

@media (max-width: 767px) {
  .ed-photo-hero img { height: 380px; }
  .ed-visuel-hero { padding-bottom: 0; }
  .ed-carte-analyse { position: static; width: 100%; max-width: 100%; margin-top: 18px; }
  .ed-filet { flex-direction: column; align-items: flex-start; gap: 4px; }
  .ed-filet .ed-detail { text-align: left; }
  .ed-tableau div { flex-direction: column; gap: 4px; }
  .ed-tableau dt { flex: none; }
}
