« Modèle:Infobox/styles.css » : différence entre les versions
De Nefald
Autres actions
Page créée avec « .tg-infobox { position: relative; width: 320px; padding: 16px 0; border: var(--tg-border-base); border-radius: var(--tg-border-radius-large); border-spacing: 0; color: var(--tg-color-base); background-color: var(--tg-color-surface-2); line-height: var(--tg-line-height-xx-small); font-size: var(--tg-font-size-small); } .tg-infobox th, .tg-infobox td { padding: 0; →Remove default padding : vertical-align: top; }... » |
PortableInfobox |
||
Ligne 1 : | Ligne 1 : | ||
.tg-infobox { | /* ================================================================= | ||
PortableInfobox Styles - Adapted from TG Design System | |||
================================================================= | |||
Modern infobox styling using CSS custom properties for theming | |||
and consistent design across all infobox templates. | |||
Based on TG-style infobox design with PortableInfobox structure. | |||
================================================================= */ | |||
/* CSS Custom Properties (Variables) */ | |||
:root { | |||
--tg-border-base: 1px solid #e0e6ed; | |||
--tg-border-radius-large: 8px; | |||
--tg-border-radius-sharp: 0px; | |||
--tg-color-base: #222; | |||
--tg-color-emphasized: #000; | |||
--tg-color-subtle: #666; | |||
--tg-color-surface-2: #f8f9fa; | |||
--tg-border-color-base: #e0e6ed; | |||
--tg-line-height-xx-small: 1.25; | |||
--tg-line-height-xxx-small: 1.2; | |||
--tg-font-size-small: 14px; | |||
--tg-font-size-x-small: 12px; | |||
--tg-font-size-x-large: 18px; | |||
--tg-font-weight-regular: 400; | |||
} | |||
/* Dark mode variables */ | |||
@media (prefers-color-scheme: dark) { | |||
:root { | |||
--tg-border-base: 1px solid #404040; | |||
--tg-color-base: #e0e0e0; | |||
--tg-color-emphasized: #fff; | |||
--tg-color-subtle: #a0a0a0; | |||
--tg-color-surface-2: #1a1a1a; | |||
--tg-border-color-base: #404040; | |||
} | |||
} | |||
/* Base PortableInfobox Container */ | |||
.portable-infobox { | |||
position: relative; | position: relative; | ||
width: 320px; | width: 320px; | ||
Ligne 10 : | Ligne 52 : | ||
line-height: var(--tg-line-height-xx-small); | line-height: var(--tg-line-height-xx-small); | ||
font-size: var(--tg-font-size-small); | font-size: var(--tg-font-size-small); | ||
float: right; | |||
clear: right; | |||
margin: 0 0 1em 1em; | |||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); | |||
} | } | ||
. | /* Reset default padding for all infobox elements */ | ||
. | .portable-infobox .pi-item { | ||
padding: 0; | padding: 0; | ||
vertical-align: top; | vertical-align: top; | ||
} | } | ||
. | /* Add consistent horizontal padding */ | ||
.portable-infobox .pi-title, | |||
.portable-infobox .pi-header, | |||
.portable-infobox .pi-data-label, | |||
.portable-infobox .pi-data-value { | |||
padding-left: 16px; | padding-left: 16px; | ||
padding-right: 16px; | padding-right: 16px; | ||
} | } | ||
. | /* Title Styling */ | ||
.portable-infobox .pi-title { | |||
font-size: var(--tg-font-size-x-large); | font-size: var(--tg-font-size-x-large); | ||
line-height: var(--tg-line-height-xxx-small); | |||
color: var(--tg-color-emphasized); | |||
text-align: center; | |||
padding-top: 0; | |||
padding-bottom: 4px; | padding-bottom: 4px; | ||
font-weight: bold; | |||
background: transparent; | |||
border: none; | |||
} | } | ||
/* Image Container */ | |||
.portable-infobox .pi-image { | |||
. | |||
. | |||
border-top-left-radius: var(--tg-border-radius-large); | border-top-left-radius: var(--tg-border-radius-large); | ||
border-top-right-radius: var(--tg-border-radius-large); | border-top-right-radius: var(--tg-border-radius-large); | ||
Ligne 47 : | Ligne 93 : | ||
transform: translateY(-16px); | transform: translateY(-16px); | ||
overflow: hidden; | overflow: hidden; | ||
text-align: center; | |||
} | } | ||
. | /* Reset figure styles */ | ||
. | .portable-infobox .pi-image figure, | ||
.portable-infobox .pi-image figcaption { | |||
border: 0; | border: 0; | ||
padding: 0; | padding: 0; | ||
background: transparent; | background: transparent; | ||
box-shadow: none; | box-shadow: none; | ||
margin: 0; | |||
} | } | ||
. | .portable-infobox .pi-image figure { | ||
overflow: hidden; | overflow: hidden; | ||
} | } | ||
/* Image thumbnail */ | |||
.portable-infobox .pi-image-thumbnail { | |||
. | |||
margin: 0; | margin: 0; | ||
border: 0; | border: 0; | ||
width: 100%; | |||
height: auto; | |||
display: block; | |||
border-radius: var(--tg-border-radius-sharp); | |||
} | } | ||
/* Image caption */ | |||
. | .portable-infobox .pi-image-caption { | ||
. | padding: 4px 16px; | ||
text-align: center; | text-align: center; | ||
color: var(--tg-color-subtle); | color: var(--tg-color-subtle); | ||
font-size: var(--tg-font-size-x-small); | font-size: var(--tg-font-size-x-small); | ||
background: transparent; | |||
border: none; | |||
font-style: normal; | |||
} | } | ||
/* Group Headers */ | |||
.portable-infobox .pi-header { | |||
. | |||
padding-top: 12px; | padding-top: 12px; | ||
padding-bottom: 8px; | padding-bottom: 8px; | ||
color: var(--tg-color-emphasized); | |||
background: transparent !important; | |||
border: none; | |||
text-align: center; | |||
font-weight: bold; | |||
position: relative; | |||
} | } | ||
. | /* Header separator lines */ | ||
.portable-infobox .pi-header:not(.pi-title) { | |||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
Ligne 117 : | Ligne 154 : | ||
} | } | ||
. | .portable-infobox .pi-header:not(.pi-title):before, | ||
. | .portable-infobox .pi-header:not(.pi-title):after { | ||
content: " "; | content: ""; | ||
height: 1px; | height: 1px; | ||
width: 100%; | width: 100%; | ||
Ligne 125 : | Ligne 162 : | ||
} | } | ||
. | /* Data Rows */ | ||
.portable-infobox .pi-data { | |||
border: none; | |||
background: transparent; | |||
} | } | ||
. | /* Data Labels */ | ||
.portable-infobox .pi-data-label { | |||
padding: 8px 16px; | |||
text-align: start; | text-align: start; | ||
vertical-align: top; | vertical-align: top; | ||
color: var(--tg-color-base); | |||
background: transparent; | |||
border: none; | |||
font-weight: normal; | |||
width: auto; | |||
} | |||
/* Data Values */ | |||
.portable-infobox .pi-data-value { | |||
padding: 8px 16px; | |||
background: transparent; | |||
border: none; | |||
color: var(--tg-color-base); | |||
word-wrap: break-word; | |||
vertical-align: top; | |||
width: auto; | |||
} | } | ||
/* Special styling for subtitle-like data */ | |||
.portable-infobox .pi-data[data-source="subtitle"] .pi-data-value, | |||
.portable-infobox .pi-data[data-source="caption"] .pi-data-value { | |||
text-align: center; | |||
color: var(--tg-color-subtle); | |||
font-size: var(--tg-font-size-x-small); | |||
line-height: var(--tg-line-height-xxx-small); | |||
} | |||
/* Links */ | |||
.portable-infobox a { | |||
color: var(--tg-color-base); | |||
text-decoration: none; | |||
} | |||
.portable-infobox a:hover { | |||
text-decoration: underline; | |||
} | |||
/* Groups */ | |||
.portable-infobox .pi-group { | |||
border: none; | |||
margin: 0; | |||
padding: 0; | |||
background: transparent; | |||
} | |||
/* ================================================================= | |||
THEME SYSTEM - Color Schemes with CSS Variables | |||
================================================================= */ | |||
/* Monde Theme - Green */ | |||
.portable-infobox.pi-theme-monde { | |||
--theme-primary: #86C705; | |||
--theme-accent: #099DFF; | |||
} | |||
.portable-infobox.pi-theme-monde .pi-title { | |||
background-color: var(--theme-primary) !important; | |||
color: #fff !important; | |||
padding: 8px 16px; | |||
margin-bottom: 8px; | |||
border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0; | |||
} | |||
.portable-infobox.pi-theme-monde .pi-header:not(.pi-title) { | |||
color: var(--theme-accent) !important; | |||
} | |||
.portable-infobox.pi-theme-monde .pi-data[data-source="seed"] .pi-data-value, | |||
.portable-infobox.pi-theme-monde .pi-data[data-source="spawn"] .pi-data-value a { | |||
color: var(--theme-accent); | |||
font-style: italic; | |||
} | |||
/* Joueur Theme - Blue */ | |||
.portable-infobox.pi-theme-joueur { | |||
--theme-primary: #0066CC; | |||
--theme-accent: #4A90E2; | |||
} | |||
.portable-infobox.pi-theme-joueur .pi-title { | |||
background-color: var(--theme-primary) !important; | |||
color: #fff !important; | |||
padding: 8px 16px; | |||
margin-bottom: 8px; | |||
border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0; | |||
} | |||
.portable-infobox.pi-theme-joueur .pi-header:not(.pi-title) { | |||
color: var(--theme-primary) !important; | |||
} | |||
.portable-infobox.pi-theme-joueur .pi-data[data-source="username"] .pi-data-value { | |||
color: var(--theme-primary); | |||
font-weight: bold; | |||
} | |||
/* Serveur Theme - Red */ | |||
.portable-infobox.pi-theme-serveur { | |||
--theme-primary: #CC0000; | |||
--theme-accent: #FF4444; | |||
} | |||
.portable-infobox.pi-theme-serveur .pi-title { | |||
background-color: var(--theme-primary) !important; | |||
color: #fff !important; | |||
padding: 8px 16px; | |||
margin-bottom: 8px; | |||
border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0; | |||
} | |||
.portable-infobox.pi-theme-serveur .pi-header:not(.pi-title) { | |||
color: var(--theme-primary) !important; | |||
} | |||
.portable-infobox.pi-theme-serveur .pi-data[data-source="ip"] .pi-data-value { | |||
font-family: "Courier New", monospace; | |||
background-color: rgba(0, 0, 0, 0.05); | |||
padding: 4px 8px; | |||
border-radius: 4px; | |||
margin: 4px 0; | |||
} | |||
/* Événement Theme - Purple */ | |||
.portable-infobox.pi-theme-evenement { | |||
--theme-primary: #8A2BE2; | |||
--theme-accent: #B347D9; | |||
} | |||
.portable-infobox.pi-theme-evenement .pi-title { | |||
background-color: var(--theme-primary) !important; | |||
color: #fff !important; | |||
padding: 8px 16px; | |||
margin-bottom: 8px; | |||
border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0; | |||
} | |||
.portable-infobox.pi-theme-evenement .pi-header:not(.pi-title) { | |||
color: var(--theme-primary) !important; | |||
} | |||
.portable-infobox.pi-theme-evenement .pi-data[data-source="date"] .pi-data-value { | |||
color: var(--theme-primary); | |||
font-weight: bold; | |||
} | |||
/* Construction Theme - Orange */ | |||
.portable-infobox.pi-theme-construction { | |||
--theme-primary: #FF8C00; | |||
--theme-accent: #FFA500; | |||
} | |||
.portable-infobox.pi-theme-construction .pi-title { | |||
background-color: var(--theme-primary) !important; | |||
color: #fff !important; | |||
padding: 8px 16px; | |||
margin-bottom: 8px; | |||
border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0; | |||
} | |||
.portable-infobox.pi-theme-construction .pi-header:not(.pi-title) { | |||
color: var(--theme-primary) !important; | |||
} | |||
.portable-infobox.pi-theme-construction .pi-data[data-source="architecte"] .pi-data-value { | |||
color: var(--theme-primary); | |||
font-weight: bold; | |||
} | |||
/* ================================================================= | |||
RESPONSIVE DESIGN | |||
================================================================= */ | |||
@media (max-width: 640px) { | @media (max-width: 640px) { | ||
. | .portable-infobox { | ||
width: 100%; | width: 100%; | ||
float: none; | |||
margin: 1em 0; | |||
border-radius: var(--tg-border-radius-large); | |||
} | |||
.portable-infobox .pi-image { | |||
transform: none; | |||
border-radius: 0; | |||
margin-top: 0; | |||
} | } | ||
. | .portable-infobox .pi-image figure { | ||
margin-top: 16px; | margin-top: 16px; | ||
} | |||
/* Stack data labels and values on mobile */ | |||
.portable-infobox .pi-data { | |||
display: block; | |||
} | |||
.portable-infobox .pi-data-label, | |||
.portable-infobox .pi-data-value { | |||
display: block; | |||
width: 100%; | |||
padding: 6px 16px; | |||
} | |||
.portable-infobox .pi-data-label { | |||
font-weight: bold; | |||
padding-bottom: 2px; | |||
} | |||
.portable-infobox .pi-data-value { | |||
padding-top: 2px; | |||
padding-bottom: 12px; | |||
} | |||
} | |||
/* Tablet adjustments */ | |||
@media (max-width: 1024px) and (min-width: 641px) { | |||
.portable-infobox { | |||
width: 300px; | |||
} | |||
} | |||
/* ================================================================= | |||
ACCESSIBILITY & SPECIAL FEATURES | |||
================================================================= */ | |||
/* High contrast mode support */ | |||
@media (prefers-contrast: high) { | |||
.portable-infobox { | |||
border: 2px solid var(--tg-color-base); | |||
background-color: var(--tg-color-surface-2); | |||
} | |||
.portable-infobox .pi-title { | |||
border: 2px solid currentColor; | |||
} | |||
} | |||
/* Reduced motion support */ | |||
@media (prefers-reduced-motion: reduce) { | |||
.portable-infobox, | |||
.portable-infobox * { | |||
transition: none !important; | |||
animation: none !important; | |||
} | |||
} | |||
/* Focus indicators for accessibility */ | |||
.portable-infobox a:focus { | |||
outline: 2px solid var(--theme-primary, #0066CC); | |||
outline-offset: 2px; | |||
border-radius: 2px; | |||
} | |||
/* Print styles */ | |||
@media print { | |||
.portable-infobox { | |||
width: 100%; | |||
float: none; | |||
margin: 1em 0; | |||
border: 1px solid #000; | |||
box-shadow: none; | |||
background-color: #fff !important; | |||
color: #000 !important; | |||
font-size: 12px; | |||
page-break-inside: avoid; | |||
} | |||
.portable-infobox .pi-title { | |||
background-color: #f0f0f0 !important; | |||
color: #000 !important; | |||
border: 1px solid #000; | |||
} | |||
.portable-infobox .pi-header { | |||
color: #000 !important; | |||
} | |||
.portable-infobox a { | |||
color: #000 !important; | |||
text-decoration: underline; | |||
} | } | ||
} | } | ||
/* | /* EmbedVideo compatibility (if used) */ | ||
. | .portable-infobox .embedvideo { | ||
position: relative; | position: relative; | ||
width: 100% !important; | width: 100% !important; | ||
margin: 8px 0; | |||
} | } | ||
/* | /* Spotify embed hack adaptation */ | ||
. | .portable-infobox .embedvideo[data-service="spotifytrack"]::after { | ||
content: ""; | content: ""; | ||
position: absolute; | position: absolute; |
Version du 20 septembre 2025 à 08:37
/* =================================================================
PortableInfobox Styles - Adapted from TG Design System
=================================================================
Modern infobox styling using CSS custom properties for theming
and consistent design across all infobox templates.
Based on TG-style infobox design with PortableInfobox structure.
================================================================= */
/* CSS Custom Properties (Variables) */
:root {
--tg-border-base: 1px solid #e0e6ed;
--tg-border-radius-large: 8px;
--tg-border-radius-sharp: 0px;
--tg-color-base: #222;
--tg-color-emphasized: #000;
--tg-color-subtle: #666;
--tg-color-surface-2: #f8f9fa;
--tg-border-color-base: #e0e6ed;
--tg-line-height-xx-small: 1.25;
--tg-line-height-xxx-small: 1.2;
--tg-font-size-small: 14px;
--tg-font-size-x-small: 12px;
--tg-font-size-x-large: 18px;
--tg-font-weight-regular: 400;
}
/* Dark mode variables */
@media (prefers-color-scheme: dark) {
:root {
--tg-border-base: 1px solid #404040;
--tg-color-base: #e0e0e0;
--tg-color-emphasized: #fff;
--tg-color-subtle: #a0a0a0;
--tg-color-surface-2: #1a1a1a;
--tg-border-color-base: #404040;
}
}
/* Base PortableInfobox Container */
.portable-infobox {
position: relative;
width: 320px;
padding: 16px 0;
border: var(--tg-border-base);
border-radius: var(--tg-border-radius-large);
border-spacing: 0;
color: var(--tg-color-base);
background-color: var(--tg-color-surface-2);
line-height: var(--tg-line-height-xx-small);
font-size: var(--tg-font-size-small);
float: right;
clear: right;
margin: 0 0 1em 1em;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* Reset default padding for all infobox elements */
.portable-infobox .pi-item {
padding: 0;
vertical-align: top;
}
/* Add consistent horizontal padding */
.portable-infobox .pi-title,
.portable-infobox .pi-header,
.portable-infobox .pi-data-label,
.portable-infobox .pi-data-value {
padding-left: 16px;
padding-right: 16px;
}
/* Title Styling */
.portable-infobox .pi-title {
font-size: var(--tg-font-size-x-large);
line-height: var(--tg-line-height-xxx-small);
color: var(--tg-color-emphasized);
text-align: center;
padding-top: 0;
padding-bottom: 4px;
font-weight: bold;
background: transparent;
border: none;
}
/* Image Container */
.portable-infobox .pi-image {
border-top-left-radius: var(--tg-border-radius-large);
border-top-right-radius: var(--tg-border-radius-large);
padding: 0 !important;
transform: translateY(-16px);
overflow: hidden;
text-align: center;
}
/* Reset figure styles */
.portable-infobox .pi-image figure,
.portable-infobox .pi-image figcaption {
border: 0;
padding: 0;
background: transparent;
box-shadow: none;
margin: 0;
}
.portable-infobox .pi-image figure {
overflow: hidden;
}
/* Image thumbnail */
.portable-infobox .pi-image-thumbnail {
margin: 0;
border: 0;
width: 100%;
height: auto;
display: block;
border-radius: var(--tg-border-radius-sharp);
}
/* Image caption */
.portable-infobox .pi-image-caption {
padding: 4px 16px;
text-align: center;
color: var(--tg-color-subtle);
font-size: var(--tg-font-size-x-small);
background: transparent;
border: none;
font-style: normal;
}
/* Group Headers */
.portable-infobox .pi-header {
padding-top: 12px;
padding-bottom: 8px;
color: var(--tg-color-emphasized);
background: transparent !important;
border: none;
text-align: center;
font-weight: bold;
position: relative;
}
/* Header separator lines */
.portable-infobox .pi-header:not(.pi-title) {
display: flex;
align-items: center;
gap: 1rem;
white-space: nowrap;
color: var(--tg-color-subtle);
font-size: var(--tg-font-size-x-small);
font-weight: var(--tg-font-weight-regular);
}
.portable-infobox .pi-header:not(.pi-title):before,
.portable-infobox .pi-header:not(.pi-title):after {
content: "";
height: 1px;
width: 100%;
background-color: var(--tg-border-color-base);
}
/* Data Rows */
.portable-infobox .pi-data {
border: none;
background: transparent;
}
/* Data Labels */
.portable-infobox .pi-data-label {
padding: 8px 16px;
text-align: start;
vertical-align: top;
color: var(--tg-color-base);
background: transparent;
border: none;
font-weight: normal;
width: auto;
}
/* Data Values */
.portable-infobox .pi-data-value {
padding: 8px 16px;
background: transparent;
border: none;
color: var(--tg-color-base);
word-wrap: break-word;
vertical-align: top;
width: auto;
}
/* Special styling for subtitle-like data */
.portable-infobox .pi-data[data-source="subtitle"] .pi-data-value,
.portable-infobox .pi-data[data-source="caption"] .pi-data-value {
text-align: center;
color: var(--tg-color-subtle);
font-size: var(--tg-font-size-x-small);
line-height: var(--tg-line-height-xxx-small);
}
/* Links */
.portable-infobox a {
color: var(--tg-color-base);
text-decoration: none;
}
.portable-infobox a:hover {
text-decoration: underline;
}
/* Groups */
.portable-infobox .pi-group {
border: none;
margin: 0;
padding: 0;
background: transparent;
}
/* =================================================================
THEME SYSTEM - Color Schemes with CSS Variables
================================================================= */
/* Monde Theme - Green */
.portable-infobox.pi-theme-monde {
--theme-primary: #86C705;
--theme-accent: #099DFF;
}
.portable-infobox.pi-theme-monde .pi-title {
background-color: var(--theme-primary) !important;
color: #fff !important;
padding: 8px 16px;
margin-bottom: 8px;
border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0;
}
.portable-infobox.pi-theme-monde .pi-header:not(.pi-title) {
color: var(--theme-accent) !important;
}
.portable-infobox.pi-theme-monde .pi-data[data-source="seed"] .pi-data-value,
.portable-infobox.pi-theme-monde .pi-data[data-source="spawn"] .pi-data-value a {
color: var(--theme-accent);
font-style: italic;
}
/* Joueur Theme - Blue */
.portable-infobox.pi-theme-joueur {
--theme-primary: #0066CC;
--theme-accent: #4A90E2;
}
.portable-infobox.pi-theme-joueur .pi-title {
background-color: var(--theme-primary) !important;
color: #fff !important;
padding: 8px 16px;
margin-bottom: 8px;
border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0;
}
.portable-infobox.pi-theme-joueur .pi-header:not(.pi-title) {
color: var(--theme-primary) !important;
}
.portable-infobox.pi-theme-joueur .pi-data[data-source="username"] .pi-data-value {
color: var(--theme-primary);
font-weight: bold;
}
/* Serveur Theme - Red */
.portable-infobox.pi-theme-serveur {
--theme-primary: #CC0000;
--theme-accent: #FF4444;
}
.portable-infobox.pi-theme-serveur .pi-title {
background-color: var(--theme-primary) !important;
color: #fff !important;
padding: 8px 16px;
margin-bottom: 8px;
border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0;
}
.portable-infobox.pi-theme-serveur .pi-header:not(.pi-title) {
color: var(--theme-primary) !important;
}
.portable-infobox.pi-theme-serveur .pi-data[data-source="ip"] .pi-data-value {
font-family: "Courier New", monospace;
background-color: rgba(0, 0, 0, 0.05);
padding: 4px 8px;
border-radius: 4px;
margin: 4px 0;
}
/* Événement Theme - Purple */
.portable-infobox.pi-theme-evenement {
--theme-primary: #8A2BE2;
--theme-accent: #B347D9;
}
.portable-infobox.pi-theme-evenement .pi-title {
background-color: var(--theme-primary) !important;
color: #fff !important;
padding: 8px 16px;
margin-bottom: 8px;
border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0;
}
.portable-infobox.pi-theme-evenement .pi-header:not(.pi-title) {
color: var(--theme-primary) !important;
}
.portable-infobox.pi-theme-evenement .pi-data[data-source="date"] .pi-data-value {
color: var(--theme-primary);
font-weight: bold;
}
/* Construction Theme - Orange */
.portable-infobox.pi-theme-construction {
--theme-primary: #FF8C00;
--theme-accent: #FFA500;
}
.portable-infobox.pi-theme-construction .pi-title {
background-color: var(--theme-primary) !important;
color: #fff !important;
padding: 8px 16px;
margin-bottom: 8px;
border-radius: var(--tg-border-radius-large) var(--tg-border-radius-large) 0 0;
}
.portable-infobox.pi-theme-construction .pi-header:not(.pi-title) {
color: var(--theme-primary) !important;
}
.portable-infobox.pi-theme-construction .pi-data[data-source="architecte"] .pi-data-value {
color: var(--theme-primary);
font-weight: bold;
}
/* =================================================================
RESPONSIVE DESIGN
================================================================= */
@media (max-width: 640px) {
.portable-infobox {
width: 100%;
float: none;
margin: 1em 0;
border-radius: var(--tg-border-radius-large);
}
.portable-infobox .pi-image {
transform: none;
border-radius: 0;
margin-top: 0;
}
.portable-infobox .pi-image figure {
margin-top: 16px;
}
/* Stack data labels and values on mobile */
.portable-infobox .pi-data {
display: block;
}
.portable-infobox .pi-data-label,
.portable-infobox .pi-data-value {
display: block;
width: 100%;
padding: 6px 16px;
}
.portable-infobox .pi-data-label {
font-weight: bold;
padding-bottom: 2px;
}
.portable-infobox .pi-data-value {
padding-top: 2px;
padding-bottom: 12px;
}
}
/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 641px) {
.portable-infobox {
width: 300px;
}
}
/* =================================================================
ACCESSIBILITY & SPECIAL FEATURES
================================================================= */
/* High contrast mode support */
@media (prefers-contrast: high) {
.portable-infobox {
border: 2px solid var(--tg-color-base);
background-color: var(--tg-color-surface-2);
}
.portable-infobox .pi-title {
border: 2px solid currentColor;
}
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
.portable-infobox,
.portable-infobox * {
transition: none !important;
animation: none !important;
}
}
/* Focus indicators for accessibility */
.portable-infobox a:focus {
outline: 2px solid var(--theme-primary, #0066CC);
outline-offset: 2px;
border-radius: 2px;
}
/* Print styles */
@media print {
.portable-infobox {
width: 100%;
float: none;
margin: 1em 0;
border: 1px solid #000;
box-shadow: none;
background-color: #fff !important;
color: #000 !important;
font-size: 12px;
page-break-inside: avoid;
}
.portable-infobox .pi-title {
background-color: #f0f0f0 !important;
color: #000 !important;
border: 1px solid #000;
}
.portable-infobox .pi-header {
color: #000 !important;
}
.portable-infobox a {
color: #000 !important;
text-decoration: underline;
}
}
/* EmbedVideo compatibility (if used) */
.portable-infobox .embedvideo {
position: relative;
width: 100% !important;
margin: 8px 0;
}
/* Spotify embed hack adaptation */
.portable-infobox .embedvideo[data-service="spotifytrack"]::after {
content: "";
position: absolute;
inset: -4px;
border: 6px solid var(--tg-color-surface-2);
border-radius: 12px;
pointer-events: none;
}