/*
 * Talents Chrétiens — Submit page: WordPress integration additions.
 * Loaded after tc-submit.css (the verbatim design styles). Only covers states the static
 * mock-up did not need (server errors, loading, logged-in account, closed days, uploads)
 * and isolates the page from ListingPro / Bootstrap global styles.
 */

/*
 * ── Isolation from parent-theme globals on this template ──
 * Scoped to body.tc-template, the class tc_core_body_class() actually adds. These rules
 * previously named a class no page carries, so none of them applied — including the
 * [hidden] override below, which is why ticking "j'ai déjà un compte" left the name row
 * on screen.
 */
body.tc-template { margin: 0; }
body.tc-template a:focus,
body.tc-template button:focus { outline: none; }
body.tc-template a:focus-visible,
body.tc-template button:focus-visible,
body.tc-template .hd-toggle:focus-visible,
body.tc-template .upload-zone:focus-visible { outline: 2px solid var(--gold-dk); outline-offset: 2px; }
body.tc-template label { font-weight: inherit; margin-bottom: 0; max-width: none; display: revert; }
body.tc-template .field-label { display: block; }
body.tc-template input[type="checkbox"],
body.tc-template input[type="radio"] { margin: 0; }
.tb-logo img { display: block; height: auto; }

/* ── Opening hours: inputs stay in the DOM so values survive toggling ── */
.hours-row .hours-closed { display: none; }
.hours-row:not(.is-open) .hours-times input,
.hours-row:not(.is-open) .hours-times .hours-sep { display: none; }
.hours-row:not(.is-open) .hours-closed { display: inline; }
.hours-row .field-error input { border-color: var(--red); }
.hours-row .error-message { flex-basis: 100%; }

/* ── Upload zones ── */
.upload-zone.has-file { border-style: solid; border-color: var(--green); background: var(--green-bg); }
.upload-zone.has-file .uz-sub { color: var(--green); font-weight: 600; word-break: break-all; }
.upload-current { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--soft); }
.upload-current img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* ── Trade autocomplete: empty state ── */
.tc-trade-empty { padding: 11px 13px; font-size: 12px; color: #697681; }

/* ── Account step: already logged in ── */
.tc-account-connected { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 8px; padding: 14px 16px; font-size: 13px; }
.tc-account-connected .tc-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--navy-80); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.tc-account-connected small { display: block; color: var(--soft); font-size: 12px; }
.tc-account-login { font-size: 12px; color: var(--soft); margin-top: 12px; }
.tc-account-login a { color: var(--gold-dk); font-weight: 600; }

/* ── Server-side / network errors ── */
.tc-global-error { display: none; background: #FFF5F5; border: 1px solid #FEB2B2; color: #9B2C2C; border-radius: 7px; padding: 11px 13px; margin: 0 0 16px; font-size: 12.5px; font-weight: 600; }
.tc-global-error.visible { display: block; }
.tc-global-error a { color: inherit; text-decoration: underline; }

/* ── Submit button loading state (prevents double submission) ── */
.btn-submit[disabled] { opacity: .7; cursor: wait; transform: none !important; box-shadow: none !important; }
.btn-submit.is-loading svg { animation: tc-spin 1s linear infinite; }
@keyframes tc-spin { to { transform: rotate(360deg); } }

/* ── Confirmation: secondary link to the dashboard ── */
.tc-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.confirm-cta.confirm-cta-secondary { background: transparent; border: 1.5px solid var(--gold); }

/* ── Edit mode notice ── */
.tc-edit-notice { background: var(--gold-lt); border-radius: 7px; padding: 10px 13px; margin-bottom: 16px; font-size: 12.5px; color: var(--navy-80); }

/* ── Access notices (not allowed to edit, etc.) ── */
.tc-notice-page { max-width: 560px; margin: 60px auto; background: #fff; border-radius: 12px; padding: 32px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.tc-notice-page h1 { font-size: 20px; margin-bottom: 10px; color: var(--navy-80); }
.tc-notice-page p { color: var(--soft); font-size: 14px; margin-bottom: 18px; }

/* Honeypot field (anti-spam) */
.tc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Author styles (e.g. .field-row{display:grid}) must not override the hidden attribute. */
body.tc-template [hidden] { display: none !important; }

/* Global plugin markup printed in wp_footer that has no purpose on this page (CubeWP alerts). */
body.tc-template .cwp-alert { display: none !important; }

/* Read-only confirmation of the category assigned from the selected trade (not selectable). */
.tc-trade-category-auto { margin-top: 8px; font-size: 12px; color: var(--soft); }
.tc-trade-category-auto strong { color: var(--navy-80); font-weight: 600; }

/* ---------------------------------------------------------------------------
 * Médias : aperçus avant envoi, compteur 0 / 6, retrait d'une photo existante.
 * ------------------------------------------------------------------------- */
.tc-prev { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 9px; }
.tc-prev-one {
	display: flex; align-items: center; gap: 9px;
	padding: 7px 11px 7px 7px;
	border: 1px solid rgba(11, 19, 43, .12);
	border-radius: 9px;
	background: #fff;
	font-size: 12px; color: var(--soft, #3D4F63);
	max-width: 100%;
}
.tc-prev-one img {
	width: 44px; height: 44px; object-fit: cover;
	border-radius: 6px; display: block; flex: 0 0 44px;
}
.tc-prev-one span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-prev-error {
	flex: 1 0 100%;
	font-size: 12.5px; color: #C53030; line-height: 1.5;
}

.tc-activity-counter {
	float: right;
	font-size: 12px; font-weight: 700;
	color: var(--soft, #3D4F63);
	background: rgba(232, 237, 242, .8);
	padding: 2px 9px; border-radius: 20px;
}
.tc-activity-counter.is-full { color: var(--gold-dk, #A8893C); background: var(--gold-lt, #F4EEDF); }

.tc-activity-current,
.tc-activity-preview {
	display: flex; flex-wrap: wrap; gap: 10px; margin-top: 11px;
}
.tc-activity-item {
	position: relative; display: block; cursor: pointer;
	border: 1px solid rgba(11, 19, 43, .12); border-radius: 10px;
	padding: 6px; background: #fff; text-align: center;
	transition: border-color .18s, opacity .18s;
}
.tc-activity-item img {
	width: 86px; height: 66px; object-fit: cover;
	border-radius: 6px; display: block;
}
.tc-activity-item input { position: absolute; top: 9px; left: 9px; margin: 0; }
.tc-activity-remove {
	display: block; margin-top: 5px;
	font-size: 10.5px; font-weight: 600; color: var(--soft, #3D4F63);
}
.tc-activity-item.is-removed { opacity: .45; border-color: #C53030; border-style: dashed; }
.tc-activity-item.is-removed .tc-activity-remove { color: #C53030; }

@media (max-width: 600px) {
	.tc-activity-item img { width: 72px; height: 56px; }
}

/* ─────────────────────────────────────────────────────────────────────────────
 * Zone d'intervention — multi-select of towns, departments and regions.
 * Rules taken from the client's own design block (TC V7.5, 30/09/2026).
 * ──────────────────────────────────────────────────────────────────────────── */
.geo-autocomplete{position:relative}
/*
 * Fixed, not absolute, and placed by script.
 *
 * The form cards use overflow:hidden for their rounded corners, which cropped the
 * suggestions to whatever fitted inside the card — on a phone that left about 7% of
 * the list showing and not one suggestion reachable (client, 02/10/2026). Taking the
 * list out of the flow is the only reliable escape; the script sets left/top/width
 * from the field and flips it above when there is no room below.
 */
.geo-results{position:fixed;z-index:1200;background:#fff;border:1px solid var(--border);border-radius:9px;box-shadow:0 16px 38px rgba(8,24,42,.20);display:none;max-height:260px;overflow:auto;-webkit-overflow-scrolling:touch}
.geo-results.open{display:block}
.geo-result{display:flex;justify-content:space-between;gap:12px;width:100%;text-align:left;border:0;background:#fff;padding:10px 11px;cursor:pointer;border-bottom:1px solid rgba(0,0,0,.04);font-family:"Urbanist",sans-serif;color:var(--navy-80)}
@media(max-width:900px){
  .geo-result{padding:13px 13px;min-height:46px;align-items:center;border-bottom-color:rgba(0,0,0,.08)}
  .geo-result strong{font-size:13.5px}
  .geo-result span{font-size:11px}
}
.geo-result:last-child{border-bottom:0}
.geo-result:hover,.geo-result:focus-visible{background:var(--gold-xlt);outline:none}
.geo-result[disabled]{cursor:default;opacity:.55}
.geo-result[disabled]:hover{background:#fff}
.geo-result strong{font-size:12px}
.geo-result span{font-size:10px;color:var(--soft);white-space:nowrap}
.area-tags{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
.area-tags:empty{margin-top:0}
.area-tag{display:inline-flex;align-items:center;gap:7px;background:var(--gold-xlt);border:1px solid rgba(198,167,86,.34);color:var(--navy-80);border-radius:20px;padding:6px 9px;font-size:11px;font-weight:700}
.area-tag small{font-size:9px;color:var(--soft);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.area-remove{border:0;background:transparent;color:var(--soft);cursor:pointer;font-size:15px;line-height:1;padding:0}
.area-remove:hover,.area-remove:focus-visible{color:var(--navy-80)}
.public-info{display:flex;align-items:flex-start;gap:8px;padding:10px 11px;background:#f7f8f9;border-radius:6px;font-size:11px;color:var(--soft);line-height:1.45;margin-top:10px}

/* ─────────────────────────────────────────────────────────────────────────────
 * Per-photo notices. A rejected image is reported on its own line and never
 * marks the field as invalid — the photos are optional and must not block a save.
 * ──────────────────────────────────────────────────────────────────────────── */
.tc-file-notice{margin-top:9px;display:flex;flex-direction:column;gap:5px}
.tc-file-notice-row{display:flex;gap:7px;align-items:flex-start;padding:8px 10px;border:1px solid rgba(190,120,60,.28);background:#fff8f1;border-radius:7px;font-size:11px;line-height:1.45;color:#8a4f1d}
.tc-file-notice-row::before{content:'!';flex:0 0 auto;width:15px;height:15px;border-radius:50%;background:#e0893f;color:#fff;font-size:9px;font-weight:800;display:flex;align-items:center;justify-content:center;margin-top:1px}
.tc-prev-one{position:relative}
.tc-prev-remove{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;border:1px solid rgba(255,255,255,.55);background:rgba(11,19,43,.72);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:14px;line-height:1;padding:0}
.tc-prev-remove:hover,.tc-prev-remove:focus-visible{background:rgba(11,19,43,.9)}
.confirm-photo-warning{margin:14px auto 0;max-width:520px;padding:11px 13px;border:1px solid rgba(190,120,60,.3);background:#fff8f1;border-radius:8px;font-size:12px;line-height:1.5;color:#8a4f1d;text-align:left}

/* ─────────────────────────────────────────────────────────────────────────────
 * Visuals: quality guidance and worked examples.
 * Rules taken from the client's reference file (TC V7, 01/10/2026).
 * ──────────────────────────────────────────────────────────────────────────── */
.recommended-label{display:inline-flex;align-items:center;margin-left:6px;padding:2px 7px;border-radius:999px;background:var(--gold-xlt);border:1px solid rgba(198,167,86,.3);color:var(--gold-dk);font-size:9px;font-weight:800;letter-spacing:.02em;vertical-align:middle}
.media-quality-hint{margin:0 0 8px}
.media-recommendation{display:flex;gap:11px;align-items:flex-start;padding:13px 14px;margin-bottom:20px;border:1px solid rgba(198,167,86,.28);border-radius:10px;background:linear-gradient(135deg,#fffdf8 0%,var(--gold-xlt) 100%);color:var(--navy-80)}
.media-recommendation-icon{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid rgba(198,167,86,.35);color:var(--gold-dk);flex:0 0 auto;font-size:13px}
.media-recommendation strong{display:block;font-size:12px;margin-bottom:2px}
.media-recommendation span{display:block;font-size:11px;line-height:1.55;color:var(--soft)}
.media-mini-note{font-size:10.5px;color:var(--soft);line-height:1.5;margin-top:7px}
.media-divider{height:1px;background:var(--border);margin:22px 0}

/* The worked example that sits above an upload zone. */
.visual-example-inline{display:flex;align-items:center;gap:11px;margin:8px 0 10px;padding:9px 10px;border:1px solid var(--border);border-radius:10px;background:#fff}
.visual-example-thumb{flex:0 0 auto;width:72px;height:82px;border-radius:9px;overflow:hidden;background:#eef1f4;border:1px solid var(--border);display:flex;align-items:center;justify-content:center}
.visual-example-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.visual-example-thumb.logo-sample{width:118px;height:72px;background:#fff;padding:9px}
/* The cover example is a real photograph, so it fills its frame edge to edge. */
.visual-example-thumb.cover-sample{width:118px;height:72px}
.fake-logo{width:100%;height:100%;border:1px solid rgba(11,19,43,.12);border-radius:7px;display:flex;align-items:center;justify-content:center;gap:7px;background:#fafbfc}
.fake-logo-mark{width:29px;height:29px;border-radius:8px;background:var(--navy-80);color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;letter-spacing:.03em}
.fake-logo-text{display:flex;flex-direction:column;line-height:1.05}
.fake-logo-text strong{font-size:10px;color:var(--navy-80)}
.fake-logo-text span{font-size:7px;color:var(--soft);margin-top:3px;letter-spacing:.04em;text-transform:uppercase}
.visual-example-copy{min-width:0}
.visual-example-copy strong{display:block;font-size:10.5px;color:var(--gold-dk);margin-bottom:2px}
.visual-example-copy span{display:block;font-size:10.5px;color:var(--soft);line-height:1.4}

.media-upload-zone{position:relative}
.logo-zone{max-width:440px}
.media-logo-row{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Photos de vos réalisations. */
.portfolio-heading-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:10px}
.portfolio-count{flex:0 0 auto;min-width:56px;text-align:center;padding:5px 8px;border-radius:999px;background:var(--bg);color:var(--navy-60);font-size:10px;font-weight:800}
.portfolio-count.is-full{background:var(--gold-xlt);color:var(--gold-dk)}
.portfolio-dropzone{padding:26px 18px}
.portfolio-dropzone .uz-btn{pointer-events:none}
.media-examples{margin:14px 0 16px}
.media-examples-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-end;margin-bottom:9px}
.media-examples-head strong{font-size:12px;color:var(--navy-80)}
.media-examples-head span{font-size:10px;color:var(--soft)}
.media-examples-grid{display:grid;grid-template-columns:1.35fr .9fr .9fr;grid-template-rows:150px;gap:8px}
.media-example-card{position:relative;overflow:hidden;border-radius:10px;background:#dde3e8;border:1px solid var(--border)}
.media-example-card img{width:100%;height:100%;display:block;object-fit:cover}
.media-example-card::after{content:'';position:absolute;inset:auto 0 0 0;height:44%;background:linear-gradient(to top,rgba(11,19,43,.62),rgba(11,19,43,0));pointer-events:none}
.media-example-label{position:absolute;left:9px;bottom:8px;z-index:1;color:#fff;font-size:10px;font-weight:700;line-height:1.25;text-shadow:0 1px 3px rgba(0,0,0,.35)}
.media-examples-note{font-size:10.5px;color:var(--soft);line-height:1.5;margin-top:8px}

/* Presentation and photo side by side, as the reference shows them. */
.director-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(200px,.8fr);gap:18px;align-items:start}

@media(max-width:760px){
  .media-examples-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px;padding-bottom:4px}
  .media-example-card{flex:0 0 78%;height:210px;scroll-snap-align:start}
  .media-examples-head{display:block}
  .media-examples-head span{display:block;margin-top:3px}
  .visual-example-inline{align-items:flex-start}
  .visual-example-thumb.logo-sample,.visual-example-thumb.cover-sample{width:104px}
  .recommended-label{display:inline-flex;margin:5px 0 0 0}
  .portfolio-heading-row{display:block}
  .portfolio-count{display:inline-block;margin-top:8px}
  .director-grid,.media-logo-row{grid-template-columns:1fr}
}

/* ─────────────────────────────────────────────────────────────────────────────
 * Address & location. The derived fields are read-only and say so; the status
 * line is the visible proof that the lookup ran. (Reference file, 01/10/2026.)
 * ──────────────────────────────────────────────────────────────────────────── */
.readonly-field{background:#f5f6f7!important;color:#56616c!important;cursor:not-allowed}
.location-status{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--soft);margin-top:7px;min-height:17px;line-height:1.4}
.location-status.ok{color:#2f6d4f}
.location-status.ok::before{content:'✓';font-weight:800}
.location-status.err{color:#a53a3a}
.location-status.err::before{content:'!';font-weight:800}
.location-manual{margin-top:4px}
.location-manual-btn{border:0;background:transparent;padding:0;font-family:"Urbanist",sans-serif;font-size:11px;color:var(--soft);text-decoration:underline;cursor:pointer}
.location-manual-btn:hover,.location-manual-btn:focus-visible{color:var(--navy-80)}

/* The engagements ceiling, inline instead of a native browser dialog (client, 01/10/2026). */
.tc-commitment-notice{margin-top:9px}
