/*
 * 4POP Connect – Espace client
 * Charte 4POP : orange #FCA311, bleu nuit #14213D, Sora (texte), Montserrat (titres).
 * Polices hébergées dans le plugin (pas d'appel à Google Fonts).
 */

@font-face { font-family: "Sora"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/sora-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/sora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }

.c4p {
	--c4p-orange: #FCA311;
	--c4p-orange-soft: #FFF4DE;
	--c4p-navy: #14213D;
	--c4p-text: #222222;
	--c4p-muted: #666666;
	--c4p-line: #E6E6E6;
	--c4p-bg: #F4F4F4;
	--c4p-green: #2E8B57;
	--c4p-green-soft: #E7F4EC;
	--c4p-radius: 15px;
	--c4p-font: "Sora", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--c4p-title: "Montserrat", var(--c4p-font);

	font-family: var(--c4p-font);
	font-size: 16px;
	line-height: 1.55;
	color: var(--c4p-text);
	-webkit-font-smoothing: antialiased;
}
.c4p *, .c4p *::before, .c4p *::after { box-sizing: border-box; }
.c4p a { color: var(--c4p-navy); }
.c4p img { max-width: 100%; height: auto; }

/* Gabarit autonome */
html body.c4p-body { margin: 0; background: #F4F4F4; }
.c4p-skip { position: absolute; left: -9999px; }
.c4p-skip:focus { left: 12px; top: 12px; z-index: 10; background: #fff; padding: 8px 12px; border-radius: 8px; }

/* Bandeau */
.c4p-bar { background: var(--c4p-navy); color: #fff; }
.c4p-bar__inner { max-width: 760px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.c4p-bar__brand { display: flex; align-items: center; gap: 12px; color: #fff !important; text-decoration: none; }
.c4p-bar__brand img { height: 34px; width: auto; display: block; }
.c4p-bar__brand span { font-size: 14px; font-weight: 600; opacity: .9; border-left: 1px solid rgba(255,255,255,.3); padding-left: 12px; }
.c4p-bar__logout { margin: 0; }
.c4p-bar__logout button { white-space: nowrap; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; font: inherit; font-size: 14px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.c4p-bar__logout button:hover { border-color: var(--c4p-orange); color: var(--c4p-orange); }

.c4p-main { max-width: 760px; margin: 0 auto; padding: 20px 16px 8px; }

/* Cartes */
.c4p-card { background: #fff; border-radius: var(--c4p-radius); padding: 22px 20px; margin: 0 0 16px; box-shadow: 0 1px 2px rgba(20,33,61,.06), 0 4px 16px rgba(20,33,61,.04); }
.c4p-card--narrow { max-width: 480px; margin-left: auto; margin-right: auto; }

.c4p h1, .c4p h2, .c4p h3 { font-family: var(--c4p-title); color: #000; line-height: 1.25; margin: 0 0 10px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.c4p-hello { margin: 4px 0 18px; }
.c4p-hello h1 { font-size: 28px; }
.c4p-hello p { margin: 0; color: var(--c4p-muted); }
.c4p-page-title { font-size: 24px; }
.c4p-section-title { font-size: 19px; }
.c4p-small { font-size: 14px; color: var(--c4p-muted); }
.c4p-empty { color: var(--c4p-muted); margin: 0; }

/* Boutons */
.c4p-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 18px; padding: 13px 22px; background: var(--c4p-orange); border: 2px solid var(--c4p-orange); color: var(--c4p-navy) !important; font: 600 16px/1.2 var(--c4p-font); text-decoration: none; border-radius: var(--c4p-radius); cursor: pointer; transition: filter .15s; }
.c4p-button:hover { filter: brightness(.95); }
.c4p-button:focus-visible, .c4p a:focus-visible, .c4p button:focus-visible, .c4p summary:focus-visible { outline: 3px solid var(--c4p-navy); outline-offset: 2px; }
.c4p-button--outline { background: #fff; }
.c4p-button .c4p-icon { width: 20px; height: 20px; }

/* Pastilles de statut */
.c4p-badge { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--c4p-bg); color: var(--c4p-text); }
.c4p-badge--active { background: var(--c4p-orange-soft); color: #8A5600; }
.c4p-badge--done { background: var(--c4p-green-soft); color: #1F6B41; }
.c4p-badge--waiting { background: #EAF0FB; color: var(--c4p-navy); }

/* Projet */
.c4p-project__top { margin-bottom: 8px; min-height: 4px; }
.c4p-project__title { font-size: 21px; }
.c4p-progress-wrap { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; }
.c4p-progress { flex: 1; height: 10px; background: #EFEFEF; border-radius: 999px; overflow: hidden; }
.c4p-progress span { display: block; height: 100%; background: var(--c4p-orange); border-radius: 999px; min-width: 10px; }
.c4p-progress__label { font-size: 14px; font-weight: 600; color: var(--c4p-navy); white-space: nowrap; }

.c4p-facts { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 14px 0 0; }
.c4p-facts div { background: var(--c4p-bg); border-radius: 10px; padding: 10px 14px; }
.c4p-facts dt { font-size: 13px; color: var(--c4p-muted); }
.c4p-facts dd { margin: 2px 0 0; font-weight: 600; }

.c4p-message { margin-top: 16px; padding: 14px 16px; background: var(--c4p-orange-soft); border-left: 4px solid var(--c4p-orange); border-radius: 0 10px 10px 0; }
.c4p-message p { margin: 0; }
.c4p-message .c4p-message__from { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #8A5600; margin-bottom: 4px; }

.c4p-next { margin: 14px 0 0; }

/* À faire */
.c4p-todo__list { list-style: none; margin: 0; padding: 0; }
.c4p-todo__item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--c4p-line); }
.c4p-todo__item:first-child { border-top: 0; padding-top: 4px; }
.c4p-todo__item strong { display: block; }
.c4p-todo__icon { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--c4p-orange-soft); color: var(--c4p-navy); display: flex; align-items: center; justify-content: center; }
.c4p-todo__icon .c4p-icon { width: 18px; height: 18px; }
.c4p-todo__hint { margin: 10px 0 0; }
.c4p-details { margin-top: 6px; font-size: 14px; }
.c4p-details summary { cursor: pointer; color: var(--c4p-navy); font-weight: 600; }
.c4p-details p { margin: 6px 0 0; color: var(--c4p-text); }

/* Raccourcis */
.c4p-shortcuts { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0 0 16px; }
.c4p-shortcut { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; background: #fff; border-radius: var(--c4p-radius); padding: 14px 16px; text-decoration: none; color: var(--c4p-text) !important; border: 2px solid transparent; box-shadow: 0 1px 2px rgba(20,33,61,.06); transition: border-color .15s; }
.c4p-shortcut:hover { border-color: var(--c4p-orange); }
.c4p-shortcut__icon { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 12px; background: var(--c4p-navy); color: var(--c4p-orange); display: flex; align-items: center; justify-content: center; }
.c4p-shortcut__label { font-weight: 600; }
.c4p-shortcut__hint { font-size: 13px; color: var(--c4p-muted); }

/* Frise des étapes */
.c4p-timeline { list-style: none; margin: 8px 0 0; padding: 0; position: relative; }
.c4p-step { position: relative; display: flex; gap: 14px; padding-bottom: 20px; }
.c4p-step:last-child { padding-bottom: 0; }
.c4p-step::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 0; width: 2px; background: var(--c4p-line); }
.c4p-step:last-child::before { display: none; }
.c4p-step--done::before { background: var(--c4p-orange); }
.c4p-step__dot { position: relative; z-index: 1; flex: 0 0 28px; height: 28px; border-radius: 50%; border: 2px solid #CFCFCF; background: #fff; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.c4p-step--done .c4p-step__dot { background: var(--c4p-orange); border-color: var(--c4p-orange); color: var(--c4p-navy); }
.c4p-step--done .c4p-step__dot .c4p-icon { width: 16px; height: 16px; stroke-width: 2.6; }
.c4p-step--active .c4p-step__dot { border-color: var(--c4p-orange); box-shadow: 0 0 0 5px var(--c4p-orange-soft); }
.c4p-step--active .c4p-step__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c4p-orange); }
.c4p-step__body { flex: 1; min-width: 0; }
.c4p-step__title { font-size: 17px; margin: 2px 0 2px; }
.c4p-step--todo .c4p-step__title { color: var(--c4p-muted); }
.c4p-step__meta { margin: 0; font-size: 14px; color: var(--c4p-muted); }
.c4p-step__status { font-weight: 600; }
.c4p-step__comment { margin: 8px 0 0; font-size: 14px; color: var(--c4p-text); }
.c4p-step--current .c4p-step__body { background: var(--c4p-orange-soft); border-radius: 12px; padding: 12px 14px; margin-top: -4px; }
.c4p-step--current .c4p-step__comment { font-size: 15px; }
.c4p-step__flag { margin: 0 0 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #8A5600; }

/* Retour */
.c4p-back { margin: 0 0 12px; }
.c4p-back a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; font-size: 15px; }
.c4p-back .c4p-icon { width: 18px; height: 18px; }

/* Aperçu admin */
.c4p-preview { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: center; background: var(--c4p-navy); color: #fff; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.c4p-preview a { color: var(--c4p-orange); font-weight: 600; }

/* Connexion */
.c4p-form label { display: block; font-weight: 600; margin: 16px 0 6px; }
.c4p-form input[type=email] { width: 100%; padding: 12px 14px; font: inherit; font-size: 17px; border: 1px solid #CCC; border-radius: 10px; }
.c4p-form input[type=email]:focus { outline: 3px solid var(--c4p-orange); outline-offset: 0; border-color: var(--c4p-orange); }
.c4p-notice { padding: 12px 16px; border-radius: 10px; margin: 16px 0; }
.c4p-notice--success { background: var(--c4p-green-soft); border-left: 4px solid var(--c4p-green); }
.c4p-notice--error { background: #FDECEC; border-left: 4px solid #D63638; }
.c4p-notice--info { background: var(--c4p-orange-soft); border-left: 4px solid var(--c4p-orange); }
.c4p-hp { position: absolute; left: -9999px; }

/* Pied de page */
.c4p-foot { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; text-align: center; color: var(--c4p-muted); font-size: 15px; }
.c4p-foot p { margin: 4px 0; }
.c4p-foot a { color: var(--c4p-navy); }

.c4p-icon { display: block; flex-shrink: 0; }

/* Petits écrans : le nom de l'espace est masqué dans le bandeau */
@media (max-width: 420px) {
	.c4p-bar__brand span { display: none; }
}

/* Écrans plus larges */
@media (min-width: 640px) {
	.c4p { font-size: 17px; }
	.c4p-main { padding-top: 32px; }
	.c4p-card { padding: 28px; }
	.c4p-hello h1 { font-size: 33px; }
	.c4p-facts { grid-template-columns: repeat(2, 1fr); }
	.c4p-shortcuts { grid-template-columns: repeat(2, 1fr); }
	.c4p-shortcut { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 4px; padding: 18px; align-items: start; align-content: start; }
	.c4p-shortcut__icon { grid-row: auto; margin-bottom: 8px; }
	.c4p-button { width: auto; }
	.c4p-card--narrow .c4p-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.c4p * { transition: none !important; }
}

/* ------------------------------------------------------------------
 * Lot 4 : éléments à fournir, documents, factures
 * ------------------------------------------------------------------ */
.c4p-center { text-align: center; }
.c4p-group-title { font-size: 17px; color: var(--c4p-muted) !important; margin: 24px 4px 10px !important; }
.c4p-subtitle { font-weight: 600; font-size: 15px; margin: 18px 0 6px; }
.c4p-badge--late { background: #FDECEC; color: #A12C2E; }

.c4p-advice { margin-top: 14px; padding: 12px 14px; background: var(--c4p-bg); border-radius: 10px; }
.c4p-advice p { margin: 0; }
.c4p-advice .c4p-advice__title { font-size: 13px; font-weight: 600; color: var(--c4p-muted); margin-bottom: 4px; }
.c4p-element--done .c4p-project__title { color: var(--c4p-muted); }

/* Liste de fichiers */
.c4p-files { list-style: none; margin: 0; padding: 0; }
.c4p-file { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--c4p-line); }
.c4p-file:first-child { border-top: 0; }
.c4p-file__icon { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--c4p-bg); color: var(--c4p-navy); display: flex; align-items: center; justify-content: center; }
.c4p-file__icon .c4p-icon { width: 18px; height: 18px; }
.c4p-file__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.c4p-file__name { font-weight: 600; overflow-wrap: anywhere; }
.c4p-file__action { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 2px solid var(--c4p-orange); border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--c4p-navy) !important; }
.c4p-file__action:hover { background: var(--c4p-orange-soft); }
.c4p-file__action .c4p-icon { width: 16px; height: 16px; }
@media (max-width: 420px) { .c4p-file__action span { position: absolute; left: -9999px; } .c4p-file__action { padding: 8px; } }

/* Dépôt */
.c4p-upload { margin-top: 18px; }
.c4p-upload__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.c4p-upload__pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 14px; border: 2px dashed #CFCFCF; border-radius: var(--c4p-radius); text-align: center; cursor: pointer; color: var(--c4p-navy); transition: border-color .15s, background .15s; }
.c4p-upload__pick:hover, .c4p-upload--chosen .c4p-upload__pick { border-color: var(--c4p-orange); background: #FFFBF3; }
.c4p-upload:has(.c4p-upload__input:focus-visible) .c4p-upload__pick { outline: 3px solid var(--c4p-navy); outline-offset: 2px; }
.c4p-upload__pick .c4p-icon { width: 28px; height: 28px; color: var(--c4p-orange); }
.c4p-upload__label { font-weight: 600; }
.c4p-upload__names { overflow-wrap: anywhere; }
.c4p-upload__error { margin: 10px 0 0; color: #A12C2E; font-size: 14px; font-weight: 600; }
.c4p-upload .c4p-button { margin-top: 12px; }
.c4p-upload .c4p-button:disabled, .c4p-upload--off .c4p-upload__pick { opacity: .55; cursor: not-allowed; }

.c4p-todo__action { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--c4p-orange); color: var(--c4p-navy) !important; }
.c4p-todo__action .c4p-icon { width: 16px; height: 16px; }

/* Factures */
.c4p-invoices { list-style: none; margin: 0; padding: 0; }
.c4p-invoice { padding: 14px 0; border-top: 1px solid var(--c4p-line); }
.c4p-invoice:first-child { border-top: 0; padding-top: 0; }
.c4p-invoice__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.c4p-invoice__number { font-weight: 600; font-family: var(--c4p-title); }
.c4p-invoice__meta { margin-top: 4px; display: flex; flex-direction: column; }
.c4p-invoice__amount { font-size: 19px; font-weight: 700; color: var(--c4p-navy); }
.c4p-invoice__amount abbr { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--c4p-muted); }
.c4p-button--small { margin-top: 10px; padding: 9px 16px; font-size: 15px; }

/* ------------------------------------------------------------------
 * Lot 5 : tickets (Signaler un problème)
 * ------------------------------------------------------------------ */
.c4p-form input[type=text], .c4p-form textarea, .c4p-form select { width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; border: 1px solid #CCC; border-radius: 10px; background: #fff; color: var(--c4p-text); }
.c4p-form textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.c4p-form input[type=text]:focus, .c4p-form textarea:focus, .c4p-form select:focus { outline: 3px solid var(--c4p-orange); outline-offset: 0; border-color: var(--c4p-orange); }
.c4p-form :disabled { opacity: .6; cursor: not-allowed; }

.c4p-newticket { padding: 0; }
.c4p-newticket__summary { display: flex; align-items: center; gap: 12px; padding: 18px 20px; cursor: pointer; list-style: none; font-family: var(--c4p-title); font-weight: 600; font-size: 19px; color: #000; }
.c4p-newticket__summary::-webkit-details-marker { display: none; }
.c4p-newticket__summary::after { content: "+"; margin-left: auto; font-size: 26px; line-height: 1; color: var(--c4p-orange); }
.c4p-newticket[open] .c4p-newticket__summary::after { content: "–"; }
.c4p-newticket__summary .c4p-shortcut__icon { width: 40px; height: 40px; }
.c4p-newticket form { padding: 0 20px 22px; }
.c4p-ticketform { margin-top: 0; }

.c4p-choices { border: 0; margin: 0; padding: 0; }
.c4p-choices legend { font-weight: 600; margin: 0 0 8px; padding: 0; }
.c4p-choice { display: flex !important; gap: 10px; align-items: flex-start; margin: 0 0 8px !important; padding: 12px 14px; border: 2px solid var(--c4p-line); border-radius: 12px; cursor: pointer; font-weight: 400 !important; transition: border-color .15s, background .15s; }
.c4p-choice:hover { border-color: var(--c4p-orange); }
.c4p-choice:has(input:checked) { border-color: var(--c4p-orange); background: #FFFBF3; }
.c4p-choice--urgent:has(input:checked) { border-color: #D63638; background: #FDF3F3; }
.c4p-choice input { margin-top: 4px; accent-color: var(--c4p-orange); }
.c4p-choice__body { display: flex; flex-direction: column; }
.c4p-ticketform .c4p-upload__pick { margin-top: 16px; }

.c4p-ticket .c4p-project__top { display: flex; gap: 6px; flex-wrap: wrap; }
.c4p-ticket__meta { margin: -4px 0 0; }
.c4p-ticket__wait { margin: 14px 0 0; color: var(--c4p-muted); }
.c4p-ticket .c4p-details { margin-top: 14px; }
.c4p-ticket--done .c4p-project__title { color: var(--c4p-muted); }
.c4p-precision { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c4p-line); }
.c4p-precision label:first-of-type { margin-top: 0; }

@media (min-width: 640px) {
	.c4p-choices { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 10px; }
	.c4p-choices legend { grid-column: 1 / -1; }
	.c4p-newticket__summary { padding: 22px 28px; }
	.c4p-newticket form { padding: 0 28px 28px; }
}
.c4p-form label.c4p-upload__pick { display: flex; margin: 16px 0 0; font-weight: 400; }

/* Fil de discussion d'un ticket */
.c4p-thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 0; }
.c4p-msg { max-width: 92%; padding: 12px 14px; border-radius: 12px; background: var(--c4p-bg); }
.c4p-msg--team { align-self: flex-end; background: var(--c4p-orange-soft); border-left: 4px solid var(--c4p-orange); border-radius: 12px 12px 12px 4px; }
.c4p-msg--client { align-self: flex-start; }
.c4p-msg .c4p-msg__who { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--c4p-muted); }
.c4p-msg--team .c4p-msg__who { color: #8A5600; }
.c4p-msg .c4p-msg__text { margin: 0; overflow-wrap: anywhere; }

/* Pages légales */
.c4p-legal h2 { font-size: 19px; margin: 24px 0 8px; }
.c4p-legal p, .c4p-legal li { overflow-wrap: anywhere; }
.c4p-legal ul { padding-left: 20px; }
.c4p-foot__legal a { color: var(--c4p-muted); }

/* Mes coordonnées */
.c4p-profile .c4p-card { margin-bottom: 16px; }
.c4p-field { min-width: 0; }
.c4p-grid2 { display: grid; grid-template-columns: 1fr; column-gap: 12px; }
.c4p-check { display: flex !important; align-items: center; gap: 10px; font-weight: 600; margin: 4px 0 0 !important; cursor: pointer; }
.c4p-check input { width: 20px; height: 20px; accent-color: var(--c4p-orange); }
.c4p-billing[hidden] { display: none; }
.c4p-billing { margin-top: 4px; }
.c4p-form input[type=tel], .c4p-form input[type=url] { width: 100%; padding: 12px 14px; font: inherit; font-size: 16px; border: 1px solid #CCC; border-radius: 10px; background: #fff; }
.c4p-form input[type=tel]:focus, .c4p-form input[type=url]:focus, .c4p-form input[type=email]:focus { outline: 3px solid var(--c4p-orange); outline-offset: 0; border-color: var(--c4p-orange); }
.c4p-form textarea[rows="2"] { min-height: 70px; }
@media (min-width: 640px) {
	.c4p-grid2 { grid-template-columns: 1fr 1fr; }
	.c4p-grid2--zip { grid-template-columns: 160px 1fr; }
}
