@charset "UTF-8";

/* =====================================================================
   PANAFIVE — COOKIES : LE RÉGLAGE ET LE BANDEAU
   =====================================================================
   Chargée par /cookies.php (page_css) et par le bandeau lui-même quand
   il s'affiche (templates/partials/cookies-bandeau.php) : les autres
   pages n'en paient pas un octet.

   L'interrupteur n'est pas ici : c'est un composant du site (style.css,
   « INTERRUPTEUR »), partagé avec « Mon compte ».

   CE QUE LA FORME DOIT GARANTIR (CNIL, recommandation du 17/09/2020 ;
   EDPB, lignes directrices 03/2022 sur les interfaces trompeuses) :
     · « Tout refuser » et « Tout accepter » IDENTIQUES — même classe,
       même taille, côte à côte. Aucun des deux n'est mis en avant ;
     · le bandeau ne recouvre rien d'autre que le bas de l'écran, ne
       floute pas la page, ne bloque ni le défilement ni le clavier.
   ===================================================================== */

@layer components {

	/* =================================================================
	   1. LA CARTE DE RÉGLAGE (/cookies.php)
	   ================================================================= */

	.ck-page { display: grid; gap: var(--space-5); }

	.ck-carte {
		--ck-pad: var(--space-5);

		display: grid;
		gap: var(--space-4);
		padding: var(--ck-pad);
		background: var(--page-color-1);
		border: var(--contour-l) var(--contour-s) var(--pf-gold-line);
		border-radius: var(--card-radius);
		box-shadow: var(--shadow-xs);
		scroll-margin-top: calc(var(--topbar-h, 64px) + var(--space-5));
	}

	.ck-carte-tete { display: grid; gap: var(--space-2); }

	.ck-carte-titre {
		display: flex;
		align-items: center;
		gap: var(--space-2);
		margin: 0;
		font-family: var(--font-primary);
		font-size: var(--fs-sm);
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: var(--track-wide);
		color: var(--pf-gold);
	}

	.ck-carte-titre .ti { width: 17px; height: 17px; }

	.ck-carte-aide { margin: 0; font-size: var(--fs-sm); color: var(--secondary-color); }

	.ck-etat {
		display: flex;
		align-items: center;
		gap: 6px;
		margin: 0;
		font-size: var(--fs-xs);
		color: var(--secondary-color);
	}

	/* =================================================================
	   2. LES FINALITÉS — une ligne chacune, séparées par des filets
	   ================================================================= */

	.ck-reglages { display: grid; gap: var(--space-4); margin: 0; }

	.ck-categories {
		display: flex;
		flex-direction: column;
		border-top: 1px solid var(--border-color);
	}

	.ck-categorie {
		display: grid;
		gap: var(--space-2);
		padding-block: var(--space-4);
		border-bottom: 1px solid var(--border-color);
	}

	.ck-categorie-tete {
		display: grid;
		grid-template-columns: 38px minmax(0, 1fr) auto;
		align-items: center;
		gap: var(--space-3) var(--space-4);
	}

	.ck-categorie-icone {
		display: grid;
		place-items: center;
		width: 38px;
		height: 38px;
		color: var(--pf-gold-strong);
		background: var(--pf-gold-soft);
		border-radius: var(--radius-sm);
	}

	.ck-categorie-icone .ti { width: 19px; height: 19px; }

	/* Une finalité vide est grisée : elle existe (on dit qu'on n'en fait
	   rien), elle ne demande rien. */
	.ck-categorie.est-vide .ck-categorie-icone {
		color: var(--secondary-color);
		background: var(--pf-surface-2);
	}

	.ck-categorie-corps { display: grid; gap: 2px; min-width: 0; }
	.ck-categorie-corps strong { font-size: var(--fs-sm); color: var(--primary-color); }
	.ck-categorie-corps span { font-size: var(--fs-xs); line-height: var(--lh-normal); color: var(--secondary-color); }

	.ck-categorie-etat { display: flex; align-items: center; justify-content: flex-end; }

	.ck-details { margin-inline-start: calc(38px + var(--space-4)); }

	.ck-details > summary {
		display: inline-flex;
		align-items: center;
		min-height: 32px;
		font-size: var(--fs-xs);
		font-weight: 600;
		color: var(--link-color, var(--pf-gold));
		cursor: pointer;
	}

	.ck-traceurs {
		display: grid;
		gap: var(--space-2);
		margin: var(--space-2) 0 0;
		padding: 0;
		list-style: none;
	}

	/* Des FILETS, pas des boîtes : ce sont les lignes d'une même
	   finalité, pas des cartes posées dans la carte. */
	.ck-traceurs li {
		display: grid;
		gap: 2px;
		padding: var(--space-2) 0;
		font-size: var(--fs-xs);
		border-top: 1px dashed var(--border-color);
	}

	.ck-traceurs li:first-child { border-top: 0; }

	.ck-traceurs code { font-size: var(--fs-xs); color: var(--primary-color); }
	.ck-traceur-meta { color: var(--secondary-color); }
	.ck-traceur-role { color: var(--texte-color); }

	.ck-actions {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: var(--space-2);
	}

	.ck-actions .button { min-height: 44px; }

	/* L'inventaire : un nom de traceur ne se coupe pas — « PANAFIVESESSID »
	   coupé en quatre ne se reconnaît plus. Le tableau défile au besoin
	   dans son `.table-wrap`, la page non. */
	.ck-table code { white-space: nowrap; font-size: var(--fs-xs); }
	.ck-table td { vertical-align: top; }
	.ck-carte.est-inventaire { border-color: var(--border-color); }

	/* =================================================================
	   3. LE BANDEAU
	   =================================================================
	   Fixé en bas, centré, d'une largeur de lecture. Il ne recouvre que
	   ce bas d'écran : la page reste lisible, défilable et atteignable au
	   clavier sans y répondre — ne pas répondre vaut refus. */

	.ck-bandeau {
		position: fixed;
		inset-inline: var(--space-4);
		bottom: var(--space-4);
		z-index: var(--z-toast, 1100);

		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: var(--space-3) var(--space-5);
		align-items: center;
		max-width: 920px;
		max-height: calc(100svh - var(--space-7));
		margin-inline: auto;
		padding: var(--space-5);
		overflow-y: auto;

		background: var(--page-color-1);
		border: var(--contour-l) var(--contour-s) var(--pf-gold-line);
		border-radius: var(--card-radius);
		box-shadow: var(--shadow-lg);
	}

	/* « Continuer sans accepter » : en haut à droite, en toutes lettres —
	   la CNIL le veut visible, pas caché derrière une croix muette. */
	.ck-bandeau-rapide {
		grid-column: 1 / -1;
		justify-self: end;
		margin: calc(var(--space-2) * -1) 0 0;
	}

	.ck-continuer {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		min-height: 32px;
		padding: 0;
		font: inherit;
		font-size: var(--fs-xs);
		font-weight: 600;
		color: var(--secondary-color);
		background: none;
		border: 0;
		text-decoration: underline;
		text-underline-offset: 3px;
		cursor: pointer;
	}

	.ck-continuer:hover { color: var(--primary-color); }

	.ck-continuer:focus-visible {
		outline: 2px solid var(--pf-gold);
		outline-offset: 2px;
	}

	.ck-bandeau-texte { display: grid; gap: var(--space-2); min-width: 0; }

	.ck-bandeau-titre {
		display: flex;
		align-items: center;
		gap: var(--space-2);
		margin: 0;
		font-family: var(--font-primary);
		font-size: var(--fs-md);
		font-weight: 700;
		text-transform: none;
		letter-spacing: 0;
		color: var(--primary-color);
	}

	.ck-bandeau-titre .ti { width: 20px; height: 20px; color: var(--pf-gold); }

	.ck-bandeau-texte p { margin: 0; font-size: var(--fs-sm); color: var(--secondary-color); }

	.ck-bandeau-texte a {
		color: var(--link-color, var(--pf-gold));
		text-decoration: underline;
		text-underline-offset: 3px;
	}

	.ck-bandeau-actions {
		display: flex;
		flex-wrap: wrap;
		gap: var(--space-2);
		margin: 0;
	}

	.ck-bandeau-actions .button { min-height: 44px; min-width: 150px; justify-content: center; }

	.ck-bandeau-details { grid-column: 1 / -1; }

	.ck-bandeau-details > summary { list-style: none; cursor: pointer; }
	.ck-bandeau-details > summary::-webkit-details-marker { display: none; }
	.ck-bandeau-details[open] > summary { margin-bottom: var(--space-3); }

	@media (max-width: 720px) {
		.ck-bandeau {
			grid-template-columns: minmax(0, 1fr);
			inset-inline: var(--space-2);
			bottom: var(--space-2);
			padding: var(--space-4);
		}

		.ck-bandeau-actions > * { flex: 1 1 140px; }
	}

	@media (max-width: 560px) {
		.ck-categorie-tete { grid-template-columns: 38px minmax(0, 1fr); }
		.ck-categorie-etat { grid-column: 2 / -1; justify-content: flex-start; }
		.ck-details { margin-inline-start: 0; }
		.ck-actions > * { flex: 1 1 100%; justify-content: center; }
	}
}
