/* v2.1 — Style personnalisable, pensé pour France Gastronomie / Bricks. */
.lcf-wrap {
  --lcf-navy: #164679;
  --lcf-blue: #245b96;
  --lcf-gold: #b99142;
  --lcf-text: #25364b;
  --lcf-muted: #66778b;
  --lcf-line: #e1e6eb;
  font-family: inherit; color: var(--lcf-text); width: 100%; max-width: 1020px;
  margin: 0 auto; max-width: min(100%, var(--lcf-width, 1020px)); background: #fff; border: 1px solid #e4e8ec;
  border-radius: 13px; overflow: hidden; box-shadow: 0 10px 35px rgba(22,70,121,.055);
  box-sizing: border-box;
}
.lcf-wrap * { box-sizing: border-box; }
.lcf-hero {
  padding: 19px 32px 21px;
  background: var(--lcf-hero-bg, linear-gradient(110deg,#113c6b 0%,#1b5289 100%));
  border-top: 3px solid #c9a34e; color: #fff;
}
.lcf-hero__eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #f0dca9; line-height: 1.5; margin-bottom: 8px;
}
.lcf-hero__eyebrow span { color: #ddb965; padding: 0 5px; }
.lcf-hero__main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; }
.lcf-wrap .lcf-hero h2 {
  font-size: clamp(24px,2.8vw,31px); font-weight: 720; letter-spacing: -.028em;
  line-height: 1.18; color: #fff; margin: 0; max-width: 100%;
}
.lcf-hero p { margin: 0; color: #e1eaf3; font-size: 13px; line-height: 1.4; white-space: nowrap; }
.lcf-form { padding: 20px 32px 28px; }
.lcf-form__intro { color: var(--lcf-muted); font-size: 11px; text-align: right; margin: 0 0 2px; }
.lcf-star { color: #9f6719; font-weight: 800; }
.lcf-section { border: 0; border-top: 1px solid var(--lcf-line); padding: 17px 0 19px; margin: 15px 0 0; min-width: 0; }
.lcf-form__intro + .lcf-section { border-top: 0; margin-top: 0; padding-top: 7px; }
.lcf-section legend {
  float: left; width: 100%; padding: 0; display: flex; align-items: center; gap: 10px;
  color: var(--lcf-navy); font-size: 17px; line-height: 1.35; font-weight: 750;
  margin: 0 0 15px;
}
.lcf-section legend small { font-size: 12px; font-weight: 450; color: #7b8996; }
.lcf-number {
  display: inline-flex; align-items: center; justify-content: center; min-width: 29px; height: 29px;
  background: #f9f3e7; border: 1px solid #e4d6b6; color: #8e6b2d;
  border-radius: 7px; font-size: 11px; font-weight: 800; letter-spacing: .02em;
}
.lcf-section::after { display: block; content: ''; clear: both; }
.lcf-fields { display: grid; grid-template-columns: minmax(0,1fr); gap: 13px 17px; min-width: 0; clear: both; }
.lcf-fields--two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.lcf-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0!important; font-size: 13px!important; }
.lcf-field--full { grid-column: 1/-1; }
.lcf-label { color: #354559; font-size: 12px; font-weight: 650; line-height: 1.45; }
.lcf-wrap .lcf-field input:not([type=checkbox]), .lcf-wrap .lcf-field textarea {
  appearance: none; width: 100%; min-width: 0; border: 1px solid #d5dde5;
  border-radius: 7px; color: var(--lcf-text); background: #fff;
  box-shadow: none; font: inherit; font-size: 13px; line-height: 1.45;
  min-height: 42px; padding: 10px 12px; outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.lcf-wrap .lcf-field textarea { resize: vertical; min-height: 70px; }
.lcf-wrap .lcf-field input:not([type=checkbox]):focus, .lcf-wrap .lcf-field textarea:focus {
  border-color: var(--lcf-blue); box-shadow: 0 0 0 3px rgba(36,91,150,.13);
}
.lcf-identity { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(200px,.78fr); gap: 21px; clear: both; }
.lcf-photo-box { background: #f7f9fb; border: 1px solid #e3e8ec; border-radius: 9px; padding: 13px; align-self: start; }
.lcf-photo-box__title { color: #354559; font-weight: 700; font-size: 12px; margin-bottom: 8px; }
.lcf-photo-drop { display: block; cursor: pointer; width: 100%; height: 175px; overflow: hidden; position: relative; border: 1.5px dashed #b8c8d5; border-radius: 8px; background: #fff; transition: border-color .2s, background .2s; }
.lcf-photo-drop:hover, .lcf-photo-drop:focus-within { border-color: var(--lcf-gold); background: #fffdf9; }
.lcf-photo-drop img { width: 100%; height: 100%; object-fit: contain; }
.lcf-photo-drop__placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; text-align: center; padding: 10px; color: #66819b; }
.lcf-photo-drop__placeholder svg { width: 29px; height: 29px; }
.lcf-photo-drop__placeholder strong { color: var(--lcf-navy); font-size: 13px; }
.lcf-photo-drop__placeholder small { color: #72869b; font-size: 11px; line-height: 1.4; }
.lcf-file-input { margin: 9px 0 0; max-width: 100%; width: 100%; font-size: 11px; color: #51647a; }
.lcf-file-input::file-selector-button { border: 1px solid #d4dce4; border-radius: 5px; padding: 5px 7px; background: #fff; color: var(--lcf-navy); cursor: pointer; margin-right: 5px; }
.lcf-photo-name { color: #748396; font-size: 10px; line-height: 1.45; margin: 6px 0 0; word-break: break-word; }
.lcf-hint { color: #77899a; font-size: 11px; margin: 9px 0 0; }
.lcf-retired[hidden], .lcf-section[hidden] { display: none!important; }
.lcf-checkline { display: flex!important; flex-direction: row!important; align-items: flex-start; gap: 9px; cursor: pointer; color: #384a5b; font-size: 12px!important; font-weight: 450!important; line-height: 1.5; }
.lcf-checkline input[type=checkbox] { appearance: auto!important; accent-color: var(--lcf-blue); width: 16px!important; min-width: 16px!important; height: 16px!important; margin: 1px 0 0!important; cursor: pointer; }
.lcf-privacy { display: flex; flex-direction: column; gap: 9px; background: #f8fafb; border: 1px solid #e3e8ed; border-radius: 9px; padding: 15px 18px; margin-top: 17px; }
.lcf-privacy strong { color: var(--lcf-navy); font-size: 12px; }
.lcf-privacy p { margin: 0; color: #617389; font-size: 11px; line-height: 1.55; }
.lcf-privacy a { color: var(--lcf-blue); text-decoration: underline; text-underline-offset: 2px; font-weight: 650; }
.lcf-privacy a:hover { color: #113c6b; }
.lcf-submit-area { display: flex; justify-content: space-between; align-items: center; gap: 17px; border-top: 1px solid var(--lcf-line); margin-top: 0; padding-top: 16px; }
.lcf-submit-area p { color: #68798b; font-size: 11px; line-height: 1.5; max-width: none; margin: 0; white-space: nowrap; flex: 1 1 auto; }
.lcf-wrap .lcf-submit { background: var(--lcf-navy); color: #fff; border: 1px solid var(--lcf-navy); border-radius: 6px; min-height: 43px; padding: 10px 18px; display: inline-flex; gap: 20px; justify-content: center; align-items: center; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background .2s; }
.lcf-wrap .lcf-submit:hover { background: #0d335a; }
.lcf-wrap .lcf-submit:focus-visible { outline: 3px solid var(--lcf-gold); outline-offset: 3px; }
.lcf-wrap .lcf-submit:disabled { opacity: .65; cursor: wait; }
.lcf-message { padding: 14px 18px; margin: 20px 32px 0; border-radius: 8px; line-height: 1.5; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.lcf-message--success { background: #edf8f2; color: #23583d; border: 1px solid #c7e2d3; }
.lcf-message--error { background: #fff4ee; color: #703519; border: 1px solid #eccdbb; }
.lcf-message ul { margin: 5px 0 0 18px; padding: 0; }
.lcf-message li { margin: 3px 0; }
.lcf-message p { margin: 2px 0 0; }
.lcf-wrap:has(.lcf-message--success) { padding-bottom: 20px; }
.lcf-honeypot { position: absolute!important; left: -9999px!important; width: 1px!important; height: 1px!important; overflow: hidden!important; }
.lcf-photo-drop [hidden] { display: none!important; }
@media(max-width:860px) {
  .lcf-hero { padding: 18px 24px 19px; }
  .lcf-hero__main { align-items: flex-start; flex-direction: column; gap: 5px; }
  .lcf-hero p { white-space: normal; }
  .lcf-form { padding: 18px 24px 24px; }
  .lcf-message { margin: 16px 24px 0; }
  .lcf-identity { grid-template-columns: minmax(0,1.3fr) minmax(190px,.8fr); gap: 17px; }
}
@media(max-width:620px) {
  .lcf-wrap { border-radius: 9px; }
  .lcf-hero { padding: 17px 18px; }
  .lcf-hero__eyebrow { font-size: 9px; line-height: 1.6; letter-spacing: .07em; }
  .lcf-wrap .lcf-hero h2 { font-size: 24px; }
  .lcf-form { padding: 16px 17px 20px; }
  .lcf-fields--two, .lcf-identity { grid-template-columns: minmax(0,1fr); }
  .lcf-identity { gap: 15px; }
  .lcf-photo-box { max-width: 340px; width: 100%; }
  .lcf-photo-drop { height: 155px; }
  .lcf-section { margin-top: 12px; padding: 15px 0 17px; }
  .lcf-section legend { font-size: 16px; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
  .lcf-privacy { padding: 13px 14px; }
  .lcf-submit-area { flex-direction: column; align-items: stretch; }
  .lcf-submit-area p { white-space: normal; }
  .lcf-wrap .lcf-submit { width: 100%; }
  .lcf-message { margin: 14px 17px 0; padding: 13px; }
}

.lcf-security-status { margin: 7px 0 0; color: #883f18; font-size: 12px; line-height: 1.4; }
.lcf-security-status:empty { display: none; }

.lcf-turnstile { margin: 14px 0 4px; min-height: 65px; }

/* Modificateurs facultatifs du shortcode. */
.lcf-wrap--compact .lcf-form { padding-top: 12px; padding-bottom: 16px; }
.lcf-wrap--compact .lcf-section { padding-top: 11px; padding-bottom: 12px; margin-top: 9px; }
.lcf-wrap--compact .lcf-section legend { margin-bottom: 10px; }
.lcf-wrap--compact .lcf-fields { gap: 9px 14px; }
.lcf-wrap--compact .lcf-privacy { padding: 10px 14px; }
.lcf-wrap--no-header .lcf-message { margin-top: 18px; }
.lcf-wrap--no-header .lcf-form { padding-top: 18px; }


/* v1.7 – Page avec shortcode : retirer uniquement les titres WordPress générés. */
body.lcf-form-host h1.bricks-default-page-title,
body.lcf-form-host .brxe-post-title,
body.lcf-form-host h1.entry-title,
body.lcf-form-host h1.wp-block-post-title,
body:has(.lcf-wrap) h1.bricks-default-page-title,
body:has(.lcf-wrap) .brxe-post-title,
body:has(.lcf-wrap) h1.entry-title,
body:has(.lcf-wrap) h1.wp-block-post-title { display: none !important; }

/* v1.7 – Cible photo : dragover, hover, clavier et erreurs. */
.lcf-photo-drop { outline-offset: 4px; }
.lcf-photo-drop:focus-visible { outline: 3px solid var(--lcf-blue); }
.lcf-photo-drop.is-dragover,
.lcf-photo-drop.is-dragover:hover {
    border: 2px dashed var(--lcf-blue);
    background: #eaf3fb;
    box-shadow: 0 0 0 4px rgba(36,91,150,.12) inset;
}
.lcf-photo-drop.is-dragover .lcf-photo-drop__placeholder strong { color: #174878; }
.lcf-photo-drop.is-invalid { border-color: #b43b30; background: #fff7f5; }
.lcf-photo-error { font-size: 11px; line-height: 1.45; color: #a12e22; margin: 7px 0 0; }
.lcf-photo-error[hidden] { display: none !important; }

/* Neutralise la mise en surbrillance jaune de l'autoremplissage dans Safari
   sans changer les valeurs ni la validation des champs. */
.lcf-wrap .lcf-field input:not([type=checkbox]):-webkit-autofill,
.lcf-wrap .lcf-field input:not([type=checkbox]):-webkit-autofill:hover,
.lcf-wrap .lcf-field input:not([type=checkbox]):-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--lcf-text);
  caret-color: var(--lcf-text);
}

/* v2.6 — message d'envoi chaleureux et retour automatique à l'accueil. */
.lcf-success-panel { margin: 32px auto 36px; padding: 24px 32px 30px; max-width: 650px; text-align: center; transition: opacity .6s ease, transform .6s ease; }
.lcf-success-panel__icon { margin: 0 auto 19px; width: 68px; height: 68px; border-radius: 50%; background: #eef6f1; border: 2px solid #9ccdb0; color: #35815a; font-size: 38px; line-height: 62px; font-weight: 700; }
.lcf-wrap .lcf-success-panel h2 { color: var(--lcf-navy); font-size: clamp(23px,3vw,30px); line-height: 1.25; margin: 0 0 15px; }
.lcf-success-panel p { color: #50627a; font-size: 15px; line-height: 1.6; margin: 6px 0; }
.lcf-success-panel__reference { font-size: 12px!important; color: #758397!important; margin-top: 17px!important; }
.lcf-success-panel__countdown { margin-top: 20px!important; font-size: 13px!important; color: #69798d!important; }
.lcf-success-panel__progress { margin: 13px auto 23px; height: 4px; width: min(100%,310px); border-radius: 6px; overflow: hidden; background: #e1e8ee; }
.lcf-success-panel__progress span { display: block; width: 100%; height: 100%; background: var(--lcf-gold); transform-origin: left; animation: lcf-success-countdown 10s linear forwards; }
@keyframes lcf-success-countdown { to { transform: scaleX(0); } }
.lcf-success-panel__home { display: inline-block; color: var(--lcf-navy)!important; text-underline-offset: 3px; font-size: 13px; font-weight: 650; }
.lcf-success-panel.is-leaving { opacity: 0; transform: translateY(-9px); }
@media (max-width:620px) { .lcf-success-panel { margin: 10px auto 25px; padding: 25px 17px; } }
@media (prefers-reduced-motion: reduce) { .lcf-success-panel { transition: none; } .lcf-success-panel__progress span { animation: none; } }


/* v2.8 — Sélecteurs de date de naissance : jour, mois et année.
 * Le calendrier Safari reste disponible comme repli en l'absence de JavaScript.
 */
.lcf-wrap .lcf-date-native--enhanced { display: none !important; }
.lcf-birthdate-picker { display: grid; grid-template-columns: minmax(65px,.9fr) minmax(110px,1.5fr) minmax(80px,1fr); gap: 8px; width:100%; }
.lcf-wrap .lcf-birthdate-picker select {
  display:block; min-width:0; width:100%; height:44px; min-height:44px; margin:0;
  appearance:none; -webkit-appearance:none; color:var(--lcf-text); font:inherit;
  font-size:13px; font-weight:600; line-height:1.35;
  padding:10px 24px 10px 10px; border:1px solid #cdd8e5; border-radius:8px;
  background-color:#fff;
  background-image: linear-gradient(45deg,transparent 50%,#6684a3 50%),linear-gradient(135deg,#6684a3 50%,transparent 50%);
  background-position:calc(100% - 15px) 20px,calc(100% - 10px) 20px;
  background-size:5px 5px,5px 5px; background-repeat:no-repeat;
  cursor:pointer; transition: border-color .18s,box-shadow .18s,background-color .18s;
}
.lcf-wrap .lcf-birthdate-picker select:invalid { color:#798a9b; font-weight:450; }
.lcf-wrap .lcf-birthdate-picker select:hover { border-color:#84a2bf; background-color:#f9fbfe; }
.lcf-wrap .lcf-birthdate-picker select:focus-visible {
  outline:none; border-color:var(--lcf-blue); box-shadow:0 0 0 3px rgba(36,91,150,.16);
}
.lcf-wrap .lcf-birthdate-picker select option { color:var(--lcf-text); background:#fff; }
/* Choix de retraite et cases légales : zones tactiles faciles à identifier. */
.lcf-wrap .lcf-retirement-choice {
  padding:11px 13px; border:1px solid #d9e2eb; border-radius:10px;
  background:#f9fbfd; transition: border-color .2s,background-color .2s,box-shadow .2s;
  font-weight:620!important; align-items:center;
}
.lcf-wrap .lcf-retirement-choice:hover { background:#f3f7fc; border-color:#9cb6cf; }
.lcf-wrap .lcf-retirement-choice:has(input:checked) {
  border-color:#7ea7ca; background:#edf5fc; color:#174878;
}
.lcf-wrap .lcf-retirement-choice:focus-within { outline:2px solid var(--lcf-gold); outline-offset:2px; }
.lcf-wrap .lcf-privacy .lcf-checkline { padding:7px 9px; border-radius:7px; transition:background-color .2s; }
.lcf-wrap .lcf-privacy .lcf-checkline:hover { background:#eef4f8; }
.lcf-wrap .lcf-privacy .lcf-checkline:focus-within { outline:2px solid var(--lcf-gold); outline-offset:1px; }
/* L'intégralité de la carte photo devient cliquable. La saisie native reste accessible. */
.lcf-wrap .lcf-photo-drop { border-radius:11px; transition:border-color .2s,background-color .2s,box-shadow .2s,transform .2s; }
.lcf-wrap .lcf-photo-drop:hover { border-color:var(--lcf-blue); box-shadow:0 0 0 4px rgba(36,91,150,.09) inset; }
.lcf-wrap .lcf-photo-drop.has-file::after {
  content:'Changer la photo'; position:absolute;right:9px;bottom:9px;
  background:rgba(17,60,107,.93);color:#fff;border-radius:20px;
  padding:6px 12px;font-size:11px;line-height:1.35;font-weight:650;pointer-events:none;
}
@media(max-width:620px) {
 .lcf-birthdate-picker { gap:7px; grid-template-columns:minmax(58px,.85fr) minmax(104px,1.45fr) minmax(77px,1fr); }
 .lcf-wrap .lcf-birthdate-picker select { font-size:13px; padding-left:9px; padding-right:22px; }
}

/* File selection: one intuitive drop target, not two overlapping pickers. */
.lcf-wrap .lcf-file-input--enhanced { position:absolute!important; width:1px!important; height:1px!important; margin:0!important; padding:0!important; opacity:0!important; overflow:hidden!important; clip-path:inset(50%); pointer-events:none!important; }
.lcf-wrap .lcf-photo-name[hidden] { display:none!important; }
.lcf-wrap .lcf-photo-name:not([hidden]) { margin-top:10px; padding:8px 10px; border-radius:7px; background:#edf4fb; color:#1a4777; font-weight:600; font-size:11px; }
