« Modèle:Accueil/search/styles.css » : différence entre les versions
De Nefald
Autres actions
< Modèle:Accueil | search
m citizen default css for command palette search |
Aucun résumé des modifications |
||
| Ligne 1 : | Ligne 1 : | ||
/* | /* Wrapper avec overflow pour le sticky */ | ||
.accueil-search- | .accueil-search-wrapper { | ||
max-width: | width: 100%; | ||
margin: | max-width: 100%; | ||
margin-bottom: 2rem; | |||
} | } | ||
/* Barre de recherche | /* Container sticky */ | ||
.accueil-search- | .accueil-search-sticky { | ||
position: sticky; | |||
top: 0; | |||
z-index: 10; | |||
background: var(--color-surface-0); | |||
padding: 1rem; | |||
} | |||
/* Barre de recherche - largeur limitée et centrée */ | |||
.accueil-search-sticky .citizen-command-palette__search { | |||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
gap: 12px; | gap: 12px; | ||
padding: | max-width: 600px; | ||
margin: 0 auto; | |||
padding: 12px 16px; | |||
font-size: 0.95rem; | font-size: 0.95rem; | ||
line-height: 1.5; | line-height: 1.5; | ||
cursor: pointer; | cursor: pointer; | ||
border-radius: 8px; | border-radius: 8px; | ||
background: var(--color-surface-1); | background-color: var(--color-surface-1); | ||
border: 1px solid var(--border-color-base); | border-width: 1px; | ||
transition: background | border-style: solid; | ||
border-color: var(--border-color-base); | |||
transition-property: background-color, border-color, transform; | |||
transition-duration: 0.2s; | |||
transition-timing-function: ease; | |||
} | } | ||
/* États interactifs */ | /* États interactifs */ | ||
.accueil-search- | .accueil-search-sticky .citizen-command-palette__search:hover { | ||
background: var(--color-surface-2); | background-color: var(--color-surface-2); | ||
border-color: var(--color-progressive); | border-color: var(--color-progressive); | ||
} | } | ||
.accueil-search- | .accueil-search-sticky .citizen-command-palette__search:active { | ||
transform: scale(0.995); | transform: scale(0.995); | ||
} | } | ||
/* Icône de recherche */ | /* Icône de recherche - taille fixe */ | ||
.accueil-search-icon { | .accueil-search-icon { | ||
display: | display: block; | ||
width: 18px; | |||
height: 18px; | |||
width: | |||
height: | |||
flex-shrink: 0; | flex-shrink: 0; | ||
position: relative; | position: relative; | ||
| Ligne 47 : | Ligne 60 : | ||
content: ''; | content: ''; | ||
position: absolute; | position: absolute; | ||
width: | width: 9px; | ||
height: | height: 9px; | ||
border: 2px solid var(--color-subtle); | border-width: 2px; | ||
border-style: solid; | |||
border-color: var(--color-subtle); | |||
border-radius: 50%; | border-radius: 50%; | ||
top: | top: 1px; | ||
left: | left: 1px; | ||
} | } | ||
| Ligne 59 : | Ligne 74 : | ||
position: absolute; | position: absolute; | ||
width: 2px; | width: 2px; | ||
height: | height: 5px; | ||
background: var(--color-subtle); | background-color: var(--color-subtle); | ||
transform: rotate(45deg); | transform: rotate(45deg); | ||
bottom: | bottom: 1px; | ||
right: | right: 1px; | ||
} | } | ||
| Ligne 71 : | Ligne 86 : | ||
user-select: none; | user-select: none; | ||
flex: 1; | flex: 1; | ||
white-space: nowrap; | |||
overflow: hidden; | |||
text-overflow: ellipsis; | |||
} | } | ||
/* Responsive | /* Responsive */ | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.accueil-search- | .accueil-search-sticky { | ||
padding: 0 0 | padding: 0.75rem 0.5rem; | ||
} | } | ||
.accueil-search- | .accueil-search-sticky .citizen-command-palette__search { | ||
padding: | max-width: 100%; | ||
padding: 10px 14px; | |||
font-size: 0.9rem; | font-size: 0.9rem; | ||
} | |||
} | |||
/* Très petits écrans */ | |||
@media (max-width: 480px) { | |||
.accueil-search-text { | |||
font-size: 0.85rem; | |||
} | } | ||
} | } | ||
Version du 3 novembre 2025 à 07:17
/* Wrapper avec overflow pour le sticky */
.accueil-search-wrapper {
width: 100%;
max-width: 100%;
margin-bottom: 2rem;
}
/* Container sticky */
.accueil-search-sticky {
position: sticky;
top: 0;
z-index: 10;
background: var(--color-surface-0);
padding: 1rem;
}
/* Barre de recherche - largeur limitée et centrée */
.accueil-search-sticky .citizen-command-palette__search {
display: flex;
align-items: center;
gap: 12px;
max-width: 600px;
margin: 0 auto;
padding: 12px 16px;
font-size: 0.95rem;
line-height: 1.5;
cursor: pointer;
border-radius: 8px;
background-color: var(--color-surface-1);
border-width: 1px;
border-style: solid;
border-color: var(--border-color-base);
transition-property: background-color, border-color, transform;
transition-duration: 0.2s;
transition-timing-function: ease;
}
/* États interactifs */
.accueil-search-sticky .citizen-command-palette__search:hover {
background-color: var(--color-surface-2);
border-color: var(--color-progressive);
}
.accueil-search-sticky .citizen-command-palette__search:active {
transform: scale(0.995);
}
/* Icône de recherche - taille fixe */
.accueil-search-icon {
display: block;
width: 18px;
height: 18px;
flex-shrink: 0;
position: relative;
opacity: 0.87;
}
/* Loupe en CSS */
.accueil-search-icon::before {
content: '';
position: absolute;
width: 9px;
height: 9px;
border-width: 2px;
border-style: solid;
border-color: var(--color-subtle);
border-radius: 50%;
top: 1px;
left: 1px;
}
.accueil-search-icon::after {
content: '';
position: absolute;
width: 2px;
height: 5px;
background-color: var(--color-subtle);
transform: rotate(45deg);
bottom: 1px;
right: 1px;
}
/* Texte placeholder */
.accueil-search-text {
color: var(--color-subtle);
user-select: none;
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* Responsive */
@media (max-width: 768px) {
.accueil-search-sticky {
padding: 0.75rem 0.5rem;
}
.accueil-search-sticky .citizen-command-palette__search {
max-width: 100%;
padding: 10px 14px;
font-size: 0.9rem;
}
}
/* Très petits écrans */
@media (max-width: 480px) {
.accueil-search-text {
font-size: 0.85rem;
}
}