/* Styles des pages, chargés via AssetMapper. Les couleurs viennent des variables de base.html.twig. */

/* Liste : titre et recherche */
.entete-liste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin: 0 0 .9rem; }
.entete-liste h1 { margin: 0; }
.recherche { flex: 1 1 14rem; max-width: 22rem; }
.recherche input, .ligne-recherche input { width: 100%; font-size: 1rem; padding: .6rem .85rem; border: 1px solid var(--ligne);
                                           border-radius: 999px; background: var(--surface); }
.recherche input:focus, .ligne-recherche input:focus { outline: 3px solid var(--accent-doux); border-color: var(--accent); }

/* Statuts, en pastilles défilables sur petit écran. */
.filtres { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin: 0 0 1rem; padding-bottom: .1rem; }
.filtres::-webkit-scrollbar { display: none; }
.filtre { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border: 1px solid var(--ligne);
          border-radius: 999px; font-size: .88rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.filtre .total { color: var(--doux); font-variant-numeric: tabular-nums; }
.filtre[aria-current="true"] { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.filtre[aria-current="true"] .total { color: var(--fond); opacity: .75; }

/* Couvertures : image si possible, sinon l'émoji du type sur un fond doux. */
.couverture { position: relative; display: grid; place-items: center; flex: none; width: 3.2rem; aspect-ratio: 2 / 3; overflow: hidden;
              border-radius: 8px; background: var(--accent-doux); }
.couverture[data-type="jeu"] { aspect-ratio: 1 / 1; }
.couverture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.couverture-emoji { font-size: 1.4rem; line-height: 1; }
.couverture-grande { width: 7.5rem; border-radius: 12px; box-shadow: 0 10px 30px -14px rgba(0,0,0,.6); }
.couverture-grande .couverture-emoji { font-size: 2.6rem; }

/* Liste des œuvres */
.oeuvres { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.carte-oeuvre { display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem .6rem .6rem; border: 1px solid var(--ligne);
                border-radius: 14px; background: var(--surface); text-decoration: none; transition: border-color .15s, transform .1s; }
a.carte-oeuvre:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--ligne)); }
a.carte-oeuvre:active { transform: scale(.99); }
.carte-oeuvre.statut-en_cours { border-left: 4px solid var(--accent); }
.carte-oeuvre.statut-pas_envie .titre { color: var(--doux); }
.carte-oeuvre .corps { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.carte-oeuvre .titre { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.carte-oeuvre .details, .carte-oeuvre .etat { color: var(--doux); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carte-oeuvre .etat { font-size: .8rem; }
.carte-resultat form { margin: 0; }
.bouton-rond { min-height: 2.6rem; min-width: 2.6rem; padding: .4rem; border-radius: 999px; font-size: 1.1rem; flex: none; }

.vide { border: 1px dashed var(--ligne); border-radius: 18px; padding: 2rem 1.25rem; text-align: center; color: var(--doux); }
.vide p { margin: .3rem 0; }
.vide .bouton { margin-top: .75rem; }
.vide-emoji { font-size: 2.2rem; }

/* Fiche */
.fiche-haut { display: flex; gap: 1.1rem; align-items: flex-end; margin: .25rem 0 1.4rem; }
.fiche-titre { min-width: 0; }
.fiche-type { margin: 0 0 .2rem; color: var(--doux); font-size: .85rem; font-weight: 600; }
.fiche-serie { margin: 0 0 .2rem; color: var(--accent); font-weight: 600; }
.meta { margin: 0; color: var(--doux); font-size: .92rem; }
@media (max-width: 420px) { .couverture-grande { width: 6rem; } }

.bloc { margin: 0 0 1.3rem; }
.bloc h2 { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--doux); margin: 0 0 .45rem; }
.choix-rapides { display: flex; flex-wrap: wrap; gap: .4rem; }
.choix-rapides form { margin: 0; }
.choix { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.6rem; padding: .4rem .85rem; border: 1px solid var(--ligne);
         border-radius: 999px; background: var(--surface); font-weight: 500; white-space: nowrap; }
.choix:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--ligne)); }
.choix.actif { border-color: var(--accent); background: var(--accent-doux); color: var(--accent); font-weight: 600; }
.avis .choix { padding-inline: .75rem; }
.emoji-avis { font-size: 1.15rem; }
.aide { color: var(--doux); font-size: .85rem; margin: .5rem 0 0; }
.texte { margin: 0; line-height: 1.65; overflow-wrap: anywhere; }
.commentaire { margin-top: .7rem; font-style: italic; }
.resume { color: color-mix(in srgb, var(--encre) 85%, var(--doux)); }
.etiquettes { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem; }
.etiquette { display: inline-block; padding: .2rem .7rem; border-radius: 999px; border: 1px solid var(--ligne); color: var(--doux); font-size: .8rem; font-weight: 600; }
.dates { color: var(--doux); font-size: .85rem; margin: 0 0 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions form { margin: 0; }

/* Boutons */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.75rem; border: 1px solid var(--accent);
          border-radius: 12px; padding: .6rem 1.15rem; background: var(--accent); color: var(--sur-accent); font-weight: 600; text-decoration: none; }
.bouton:hover { filter: brightness(1.06); }
.bouton-discret { background: transparent; color: var(--encre); border-color: var(--ligne); }
.bouton-supprimer { margin-left: auto; }

/* Ajouter : type, recherche, résultats */
.recherche-en-ligne { margin-bottom: 1.2rem; }
.segments-types { margin-bottom: .7rem; }
.ligne-recherche { display: flex; gap: .5rem; }
.ligne-recherche .bouton { border-radius: 999px; padding-inline: 1rem; }
.a-la-main { margin: 1.5rem 0 0; text-align: center; }
.a-la-main a { color: var(--doux); }

/* Formulaires */
.formulaire label, .formulaire legend { display: block; font-weight: 600; margin: 1.1rem 0 .4rem; padding: 0; }
.formulaire .facultatif { color: var(--doux); font-weight: 400; font-size: .85rem; margin-left: .3rem; }
.formulaire :is(input[type="text"], input[type="url"], textarea) { width: 100%; font-size: 1rem; padding: .7rem .8rem; border: 1px solid var(--ligne);
                                                                   border-radius: 12px; background: var(--surface); }
.formulaire textarea { resize: vertical; min-height: 4.5rem; line-height: 1.5; }
.formulaire :is(input, textarea):focus { outline: 3px solid var(--accent-doux); border-color: var(--accent); }
.formulaire .actions { margin-top: 1.5rem; }
.deux-colonnes { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 .75rem; }
.groupe-choix { border: 0; margin: 0; padding: 0; min-width: 0; }
.segments { display: flex; flex-wrap: wrap; gap: .35rem; }
.formulaire .segment, .recherche-en-ligne .segment { margin: 0; font-weight: 500; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment span { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .4rem .85rem; border: 1px solid var(--ligne);
                border-radius: 999px; background: var(--surface); cursor: pointer; white-space: nowrap; }
.segment input:checked + span { border-color: var(--accent); background: var(--accent-doux); color: var(--accent); font-weight: 600; }
.segment input:focus-visible + span { outline: 3px solid var(--accent); }
.formulaire .case { display: flex; align-items: center; gap: .6rem; font-weight: 600; margin: 1.1rem 0 0; }
.case input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); margin: 0; }

/* Panneaux (Préférences, connexion) */
.panneau { background: var(--surface); border: 1px solid var(--ligne); border-radius: 18px; padding: 1.25rem; margin-bottom: 1.25rem; }
.panneau h2 { font-size: 1.05rem; margin: 0 0 .9rem; }
.details { color: var(--doux); font-size: .9rem; margin: .7rem 0 0; }
.panneau ol { margin: 1rem 0 0; padding-left: 1.2rem; color: var(--doux); font-size: .95rem; }
.panneau li + li { margin-top: .3rem; }
.choix-theme { border: 0; margin: 0 0 1.1rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.option-theme { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border: 1px solid var(--ligne); border-radius: 12px;
                background: var(--fond); font-weight: 600; cursor: pointer; }
.option-theme:has(input:checked) { border-color: var(--accent); outline: 2px solid var(--accent-doux); }
.option-theme input { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; margin: 0; }
@media (max-width: 420px) { .choix-theme { grid-template-columns: 1fr; } .panneau .bouton { width: 100%; } }

.connexion { max-width: 360px; margin: 1.5rem auto; }
.connexion-emoji { font-size: 2.4rem; line-height: 1; margin: .25rem 0 .75rem; }
.connexion label { display: block; font-weight: 600; margin: 1rem 0 .35rem; }
.connexion input[type="password"] { width: 100%; font-size: 1.1rem; padding: .75rem .85rem; border: 1px solid var(--ligne);
                                    border-radius: 12px; background: var(--fond); }
.connexion input:focus { outline: 3px solid var(--accent-doux); border-color: var(--accent); }
.connexion .bouton { width: 100%; margin-top: 1.25rem; padding: .85rem; font-size: 1.05rem; }
.erreur { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); padding: .7rem .9rem; border-radius: 12px; margin: 0 0 .9rem; }
