/* ============================================================
   Groupe Coste — Facturation : styles front (widget [gcf_app])
   Charte : noir & blanc. Fond blanc, texte noir ; titres et
   boutons sur fond noir, texte blanc. Montserrat + Open Sans.
   @package Groupe_Coste_Facturation
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Open+Sans:wght@400;500;600;700&display=swap');

/* ── Jetons & base ───────────────────────────────────────── */
.gcf-app {
	--gcf-ink:    #111111;   /* texte principal      */
	--gcf-black:  #111111;   /* fonds noirs          */
	--gcf-black-h:#000000;   /* noir survol          */
	--gcf-muted:  #666666;   /* texte secondaire     */
	--gcf-line:   #e3e3e3;   /* bordures             */
	--gcf-bg:     #ffffff;
	--gcf-card:   #ffffff;
	--gcf-radius: 12px;
	--gcf-shadow: 0 12px 34px rgba(0, 0, 0, .08);

	font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--gcf-ink);
	line-height: 1.6;
	max-width: 1120px;
	margin: 0 auto;
	box-sizing: border-box;
}
.gcf-app *,
.gcf-app *::before,
.gcf-app *::after { box-sizing: border-box; }

.gcf-app h1, .gcf-app h2, .gcf-app h3 {
	font-family: 'Montserrat', sans-serif;
	color: var(--gcf-ink);
	line-height: 1.3;
	margin: 0 0 .4em;
}

/* Titre « barre » : fond noir, texte blanc. */
.gcf-app .gcf-bar {
	display: inline-block;
	background: var(--gcf-black);
	color: #fff;
	padding: 8px 14px;
	border-radius: 8px;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
}

/* Titre hero : surlignage noir ligne à ligne. */
.gcf-app .gcf-hl {
	background: var(--gcf-black);
	color: #fff;
	padding: .08em .26em;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* ── Mise en page landing ────────────────────────────────── */
.gcf-grid {
	display: grid;
	grid-template-columns: 1.05fr .95fr;
	gap: 40px;
	align-items: center;
	padding: 16px;
}
@media (max-width: 860px) {
	.gcf-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ── Présentation ────────────────────────────────────────── */
.gcf-eyebrow {
	display: inline-block;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	background: var(--gcf-black);
	color: #fff;
	padding: 5px 11px;
	border-radius: 999px;
	margin-bottom: 16px;
}
.gcf-hero h1 { font-size: clamp(27px, 3.8vw, 40px); font-weight: 800; line-height: 1.45; }
.gcf-hero p.gcf-lead { font-size: 18px; color: var(--gcf-muted); margin: 18px 0 24px; }

.gcf-benefits { list-style: none; margin: 0 0 26px; padding: 0; }
.gcf-benefits li { position: relative; padding: 8px 0 8px 34px; font-weight: 500; }
.gcf-benefits li::before {
	content: '';
	position: absolute;
	left: 0; top: 12px;
	width: 20px; height: 20px;
	border-radius: 50%;
	background: var(--gcf-black);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/70% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/70% no-repeat;
}
.gcf-benefits strong { color: var(--gcf-ink); }

.gcf-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.gcf-badge {
	font-size: 13px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1.5px solid var(--gcf-ink);
	background: #fff;
	color: var(--gcf-ink);
}
.gcf-badge.is-accent { background: var(--gcf-black); color: #fff; border-color: var(--gcf-black); }

/* ── Carte ───────────────────────────────────────────────── */
.gcf-card {
	background: var(--gcf-card);
	border: 1px solid var(--gcf-line);
	border-radius: var(--gcf-radius);
	box-shadow: var(--gcf-shadow);
	padding: 28px;
}
.gcf-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	background: #f4f4f4;
	border-radius: 10px;
	padding: 5px;
	margin-bottom: 22px;
}
.gcf-tab {
	border: 0;
	background: transparent;
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 14px;
	color: var(--gcf-muted);
	padding: 10px;
	border-radius: 7px;
	cursor: pointer;
	transition: all .2s ease;
}
.gcf-tab.is-active { background: var(--gcf-black); color: #fff; }
.gcf-panel { display: none; }
.gcf-panel.is-active { display: block; animation: gcf-fade .25s ease; }
@keyframes gcf-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.gcf-panel > p { color: var(--gcf-muted); margin-top: 0; }

/* ── Champs ──────────────────────────────────────────────── */
.gcf-field { margin-bottom: 16px; }
.gcf-field label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
	color: var(--gcf-ink);
}
.gcf-field input[type="text"],
.gcf-field input[type="email"],
.gcf-field input[type="password"],
.gcf-field input[type="tel"],
.gcf-field select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--gcf-line);
	border-radius: 9px;
	font-size: 15px;
	font-family: inherit;
	color: var(--gcf-ink);
	background: #fff;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.gcf-field input:focus,
.gcf-field select:focus {
	outline: none;
	border-color: var(--gcf-ink);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .12);
}
.gcf-hint { font-size: 12.5px; color: var(--gcf-muted); margin: 6px 0 0; }

.gcf-check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 13px;
	color: var(--gcf-muted);
	margin-bottom: 18px;
}
.gcf-check input { margin-top: 3px; }
.gcf-check a { color: var(--gcf-ink); }

/* ── Boutons ─────────────────────────────────────────────── */
.gcf-btn {
	display: inline-block;
	width: 100%;
	border: 1.5px solid var(--gcf-black);
	border-radius: 9px;
	padding: 13px 18px;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	transition: transform .12s ease, background .2s ease, color .2s ease;
	text-align: center;
	text-decoration: none;
}
.gcf-btn-primary { background: var(--gcf-black); color: #fff; }
.gcf-btn-primary:hover { background: var(--gcf-black-h); transform: translateY(-1px); }
.gcf-btn-ghost {
	background: #fff;
	color: var(--gcf-ink);
	width: auto;
	padding: 10px 16px;
}
.gcf-btn-ghost:hover { background: var(--gcf-black); color: #fff; }

/* ── Alertes ─────────────────────────────────────────────── */
.gcf-alert {
	padding: 12px 15px;
	border-radius: 9px;
	font-size: 14px;
	margin-bottom: 18px;
	border: 1px solid var(--gcf-ink);
}
.gcf-alert-error   { background: #fff; color: var(--gcf-ink); border-left: 5px solid #111; }
.gcf-alert-success { background: #111; color: #fff; }

/* ── Espace connecté ─────────────────────────────────────── */
.gcf-home { padding: 8px 16px 16px; }
.gcf-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.gcf-hello { font-size: 24px; font-weight: 800; }

.gcf-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px;
}
.gcf-form-grid .gcf-col-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .gcf-form-grid { grid-template-columns: 1fr; } }

/* Ligne SIREN : champ + bouton de récupération. */
.gcf-inline { display: flex; gap: 8px; align-items: stretch; }
.gcf-inline input { flex: 1; }
.gcf-inline .gcf-btn { width: auto; white-space: nowrap; padding: 0 16px; }

/* Choix du régime. */
.gcf-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.gcf-segment label {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	border: 1.5px solid var(--gcf-line);
	border-radius: 9px; padding: 12px; cursor: pointer;
	font-weight: 600; font-size: 14px;
	transition: all .2s ease;
}
.gcf-segment input { position: absolute; opacity: 0; }
.gcf-segment input:checked + label,
.gcf-segment label.is-checked { background: var(--gcf-black); color: #fff; border-color: var(--gcf-black); }

/* Uploader de logo. */
.gcf-logo-up { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.gcf-logo-prev {
	width: 84px; height: 84px; border-radius: 10px;
	border: 1px dashed var(--gcf-line);
	display: flex; align-items: center; justify-content: center;
	overflow: hidden; background: #fafafa; flex: none;
	color: var(--gcf-muted); font-size: 11px; text-align: center;
}
.gcf-logo-prev img { max-width: 100%; max-height: 100%; }

.gcf-callout {
	margin-top: 22px;
	padding: 20px;
	border-radius: 11px;
	background: #fafafa;
	border: 1px solid var(--gcf-line);
}

/* ── Pied ────────────────────────────────────────────────── */
.gcf-foot {
	text-align: center;
	font-size: 12px;
	color: var(--gcf-muted);
	padding: 22px 0 6px;
}
.gcf-foot a { color: var(--gcf-ink); }

/* ── Présentation : blocs & étapes ───────────────────────── */
.gcf-block-title {
	font-family: 'Montserrat', sans-serif;
	font-weight: 800;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .05em;
	margin: 22px 0 12px;
	color: var(--gcf-ink);
}
.gcf-steps { list-style: none; counter-reset: gcf; margin: 0 0 8px; padding: 0; }
.gcf-steps li {
	position: relative;
	padding: 7px 0 7px 44px;
	margin-bottom: 4px;
	font-weight: 500;
}
.gcf-steps li strong { font-weight: 700; }
.gcf-steps li::before {
	counter-increment: gcf;
	content: counter(gcf);
	position: absolute;
	left: 0; top: 6px;
	width: 28px; height: 28px;
	background: var(--gcf-black);
	color: #fff;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13px;
}

/* ── Navigation de l'espace connecté ─────────────────────── */
.gcf-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.gcf-nav a {
	font-family: 'Montserrat', sans-serif;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	color: var(--gcf-ink);
	padding: 9px 16px;
	border-radius: 999px;
	border: 1.5px solid var(--gcf-line);
	transition: all .2s ease;
}
.gcf-nav a:hover { border-color: var(--gcf-ink); }
.gcf-nav a.is-active { background: var(--gcf-black); color: #fff; border-color: var(--gcf-black); }

/* ── Barre d'outils d'une section ────────────────────────── */
.gcf-toolbar {
	display: flex; justify-content: space-between; align-items: center;
	gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.gcf-toolbar h2 { margin: 0; }

/* ── Boutons compacts ────────────────────────────────────── */
.gcf-btn-sm { width: auto; padding: 7px 12px; font-size: 13px; border-radius: 7px; }

/* ── Liste (clients / factures) ──────────────────────────── */
.gcf-tablewrap { overflow-x: auto; }
.gcf-list { width: 100%; border-collapse: collapse; }
.gcf-list th, .gcf-list td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--gcf-line); font-size: 14px; }
.gcf-list th {
	font-family: 'Montserrat', sans-serif; font-size: 12px;
	text-transform: uppercase; letter-spacing: .04em; color: var(--gcf-muted); font-weight: 700;
}
.gcf-list .gcf-cname { font-weight: 700; }
.gcf-list .gcf-actions { text-align: right; white-space: nowrap; }
.gcf-list .gcf-actions .gcf-btn { margin-left: 6px; }

.gcf-empty {
	padding: 34px; text-align: center; color: var(--gcf-muted);
	border: 1px dashed var(--gcf-line); border-radius: 11px;
}

/* ── Modale ──────────────────────────────────────────────── */
.gcf-modal {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(0, 0, 0, .55);
	display: none; align-items: flex-start; justify-content: center;
	padding: 40px 16px; overflow: auto;
}
.gcf-modal.is-open { display: flex; }
.gcf-modal-box {
	background: #fff; border-radius: 14px; width: 100%; max-width: 580px;
	padding: 26px; box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
.gcf-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.gcf-modal-head h3 { margin: 0; }
.gcf-modal-close {
	border: 0; background: transparent; font-size: 26px; line-height: 1;
	cursor: pointer; color: var(--gcf-muted); padding: 0 4px;
}
.gcf-modal-close:hover { color: var(--gcf-ink); }

/* ── Statuts de facture ──────────────────────────────────── */
.gcf-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--gcf-line); white-space: nowrap; }
.gcf-status-draft { color: var(--gcf-muted); }
.gcf-status-issued { border-color: var(--gcf-ink); color: var(--gcf-ink); }
.gcf-status-paid { background: var(--gcf-black); color: #fff; border-color: var(--gcf-black); }
.gcf-status-cancelled { color: var(--gcf-muted); text-decoration: line-through; }

/* ── Éditeur de facture ──────────────────────────────────── */
.gcf-editor-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.gcf-back { text-decoration: none; color: var(--gcf-muted); font-weight: 600; font-family: 'Montserrat', sans-serif; }
.gcf-back:hover { color: var(--gcf-ink); }

.gcf-client-row { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.gcf-client-row .gcf-field { flex: 1; margin-bottom: 0; }

.gcf-franchise-note {
	background: #f4f4f4; border-radius: 8px; padding: 10px 12px;
	font-size: 13px; color: var(--gcf-muted); margin-bottom: 16px;
}

.gcf-lines { width: 100%; border-collapse: collapse; margin-bottom: 12px; min-width: 520px; }
.gcf-lines th, .gcf-lines td { padding: 8px 6px; border-bottom: 1px solid var(--gcf-line); font-size: 14px; text-align: left; vertical-align: middle; }
.gcf-lines th { font-family: 'Montserrat', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--gcf-muted); font-weight: 700; }
.gcf-lines input, .gcf-lines select { width: 100%; padding: 8px; border: 1px solid var(--gcf-line); border-radius: 7px; font-size: 14px; font-family: inherit; background: #fff; }
.gcf-lines .gcf-l-ht { white-space: nowrap; font-weight: 700; text-align: right; }
.gcf-col-num { width: 96px; } .gcf-col-vat { width: 110px; } .gcf-col-act { width: 38px; }
.gcf-l-del { border: 0; background: transparent; font-size: 22px; color: var(--gcf-muted); cursor: pointer; line-height: 1; width: auto; padding: 0 4px; }
.gcf-l-del:hover { color: var(--gcf-ink); }

.gcf-totals { margin-left: auto; max-width: 320px; margin-top: 10px; }
.gcf-totals .gcf-trow { display: flex; justify-content: space-between; padding: 6px 0; }
.gcf-totals .gcf-ttc { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 18px; border-top: 2px solid var(--gcf-ink); margin-top: 6px; padding-top: 10px; }

.gcf-editor-alert:not(:empty), .gcf-modal-alert:not(:empty) { margin-bottom: 14px; }

.gcf-editor-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.gcf-editor-actions .gcf-btn { width: auto; }

/* ── Document facture (affichage émis + source du PDF) ───── */
.gcf-doc { color: #111; font-size: 14px; }
.gcf-doc-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.gcf-doc-seller { max-width: 60%; line-height: 1.5; }
.gcf-doc-logo { max-height: 72px; max-width: 220px; margin-bottom: 10px; display: block; }
.gcf-doc-title { text-align: right; }
.gcf-doc-title h1 { font-family: 'Montserrat', sans-serif; font-size: 26px; margin: 0 0 6px; letter-spacing: .04em; }
.gcf-doc-num { font-weight: 700; }
.gcf-doc-meta { color: #444; font-size: 13px; margin-top: 6px; }
.gcf-doc-parties { margin-bottom: 22px; }
.gcf-doc-block { font-size: 13px; line-height: 1.5; }
.gcf-doc-block h3 { font-family: 'Montserrat', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 6px; color: #666; }
.gcf-doc-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.gcf-doc-table th, .gcf-doc-table td { padding: 9px 8px; border-bottom: 1px solid #e3e3e3; text-align: left; font-size: 13px; vertical-align: top; }
.gcf-doc-table th { background: #111; color: #fff; font-family: 'Montserrat', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.gcf-doc-table th.gcf-num, .gcf-doc-table td.gcf-num { text-align: right; white-space: nowrap; }
.gcf-doc-totals { margin-left: auto; max-width: 300px; }
.gcf-doc-totals .gcf-trow { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.gcf-doc-totals .gcf-ttc { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 17px; border-top: 2px solid #111; margin-top: 5px; padding-top: 9px; }
.gcf-doc-legal { margin-top: 22px; font-size: 12px; color: #555; line-height: 1.6; border-top: 1px solid #e3e3e3; padding-top: 14px; }
.gcf-doc-legal strong { color: #111; }

@media print {
	body * { visibility: hidden !important; }
	.gcf-doc, .gcf-doc * { visibility: visible !important; }
	.gcf-doc { position: absolute; left: 0; top: 0; width: 100%; }
}

/* ── Zone de texte (message d'envoi) ─────────────────────── */
.gcf-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--gcf-line);
	border-radius: 9px;
	font-size: 15px;
	font-family: inherit;
	color: var(--gcf-ink);
	background: #fff;
	min-height: 130px;
	resize: vertical;
	line-height: 1.5;
}
.gcf-field textarea:focus {
	outline: none;
	border-color: var(--gcf-ink);
	box-shadow: 0 0 0 3px rgba(0, 0, 0, .12);
}
