/*
 * Kaseko - Restitution des cadres et titres patrimoniaux (Option B).
 *
 * Re-declare les styles d'origine (perdus a l'import car definis dans les
 * <style> internes des pages Dreamweaver) et restaure des cadres fideles :
 * fonds d'origine, bordure "gaufre" (biseau 3D) + ombre, largeurs compactes.
 * Portee : strictement le contenu legacy (.k-entry--legacy, .k-entry__content).
 *
 * Couleurs respectees a l'identique. S'applique a toutes les pages importees
 * (Rythmes, Chants...) sans retouche page par page.
 */

/* ============================================================================
 * 1. TITRES  (couleurs d'origine)
 * ==========================================================================*/

/* Titre principal (.Intertitre) : Times, gras, bordeaux. PAS d'alignement force
 * -> reste a gauche dans un <td>, mais CENTRE dans un <h1> (filets fleuris). */
.k-entry--legacy .Intertitre,
.k-entry__content .Intertitre {
	font-family: "Times New Roman", Times, serif !important;
	font-size: 1.55rem !important;
	font-weight: 700 !important;
	color: #800000 !important;
	text-shadow: 1px 1px 2px rgba(204, 204, 204, 1) !important;
	line-height: 1.2 !important;
}
/* Filets fleuris (images decoratives) : centres comme a l'origine. */
.k-entry--legacy h1.Intertitre,
.k-entry__content h1.Intertitre {
	text-align: center !important;
}
/* Barres de titre dans un cadre : alignees a gauche comme a l'origine. */
.k-entry--legacy td.Intertitre,
.k-entry--legacy p.Intertitre,
.k-entry__content td.Intertitre,
.k-entry__content p.Intertitre {
	text-align: left !important;
}

/* Variante bleue, a gauche. */
.k-entry--legacy .Intertitre1,
.k-entry__content .Intertitre1 {
	font-family: "Times New Roman", Times, serif !important;
	font-size: 1.5rem !important;
	font-weight: 700 !important;
	color: #004488 !important;
	text-align: left !important;
	text-shadow: 1px 1px 2px rgba(204, 204, 204, 1) !important;
	line-height: 1.2 !important;
}

/* Titre des encadres-notes (fond bleu #DEEBEF) : bleu marine, a gauche. */
.k-entry--legacy .Intertitre11,
.k-entry__content .Intertitre11 {
	font-family: "Times New Roman", Times, serif !important;
	font-size: 1.5rem !important;
	font-weight: 700 !important;
	color: #000080 !important;
	text-align: left !important;
	line-height: 1.2 !important;
}

/* ============================================================================
 * 2. CORPS DES CADRES OCRE  (regle d'harmonisation)
 *    Titre + lettrine = meme rouge ; texte du corps = autre couleur, GRAS.
 *    Empeche le style du titre (conteneur td.Intertitre) de deteindre sur les
 *    paragraphes du corps (cause des paragraphes geants bordeaux).
 * ==========================================================================*/
.k-entry--legacy td.Intertitre p,
.k-entry__content td.Intertitre p {
	font-family: Arial, Helvetica, sans-serif !important;
	font-size: .98rem !important;
	font-weight: 700 !important;          /* corps en GRAS */
	color: #562D27 !important;            /* couleur distincte du titre rouge */
	text-align: justify;
	line-height: 1.55;
	text-shadow: none !important;
}
/* Lettrine dans un cadre ocre : meme rouge que le titre. */
.k-entry--legacy [bgcolor="#FBDE88" i] [class*="Letrine"],
.k-entry__content [bgcolor="#FBDE88" i] [class*="Letrine"] {
	color: #800000 !important;
}

/* ============================================================================
 * 3. LETTRINES  (capitales d'attaque, couleurs d'origine)
 * ==========================================================================*/
.k-entry--legacy .Letrine,
.k-entry__content .Letrine {
	font-size: 1.55rem !important;
	color: #800000 !important;
	line-height: 1 !important;
}
.k-entry--legacy .Letrine1,
.k-entry__content .Letrine1 {
	font-size: 2rem !important;
	color: #00336A !important;
	font-family: Georgia, "Times New Roman", Times, serif !important;
	line-height: 1 !important;
}
.k-entry--legacy .Letrine11,
.k-entry__content .Letrine11 {
	font-size: 2rem !important;
	color: #6A0000 !important;
	font-family: Georgia, "Times New Roman", Times, serif !important;
	margin: 0 !important;
	line-height: 1 !important;
}
.k-entry--legacy .Letrine12,
.k-entry__content .Letrine12 {
	font-size: 2rem !important;
	color: #00336A !important;
	font-family: Georgia, "Times New Roman", Times, serif !important;
	line-height: 1 !important;
}
.k-entry--legacy .Letrine-3,
.k-entry__content .Letrine-3 {
	font-family: Arial, Helvetica, sans-serif !important;
	font-size: 1rem !important;
	color: #000080 !important;
	font-weight: 700 !important;
}
/* Garde-fou anti-empilement (lettrines imbriquees de la rubrique Creole). */
.k-entry--legacy [class*="Letrine"] [class*="Letrine"],
.k-entry__content [class*="Letrine"] [class*="Letrine"] {
	font-size: 1em !important;
	line-height: inherit !important;
	vertical-align: baseline !important;
}

/* ============================================================================
 * 4. CADRES  (bordure "gaufre" 3D ; fonds d'origine ; largeurs compactes)
 * ==========================================================================*/

/* Base : tout tableau patrimonial. Largeur AUTO -> les grilles rythmiques
 * reprennent leur largeur compacte d'origine (et ne s'etirent plus a 100 %). */
.k-entry--legacy table[border],
.k-entry__content table[border] {
	border-radius: 0 !important;
	max-width: 100%;
	margin-top: 0 !important;
	margin-bottom: 1.2rem !important;
	background: transparent;
}
/* Respecte l'alignement d'origine : align="center" -> tableau centre
 * (marges auto), sinon il reste a gauche. (Corrige le centrage des chants.) */
.k-entry--legacy table[align="center"],
.k-entry__content table[align="center"] {
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Grilles rythmiques (border="1") : filet fin legerement biseaute. */
.k-entry--legacy table[border="1"],
.k-entry__content table[border="1"] {
	border-collapse: collapse !important;
	border: 1px solid #9a9a9a !important;
	width: auto !important;            /* grilles compactes (pas pleine largeur) */
}
.k-entry--legacy table[border="1"] td,
.k-entry--legacy table[border="1"] th,
.k-entry__content table[border="1"] td,
.k-entry__content table[border="1"] th {
	border: 1px solid #cccccc !important;
	padding: 5px 9px !important;
	vertical-align: top;
}

/* Encadres (border 2/3/5) : cadre GAUFRE (biseau 3D) + ombre portee, comme
 * le rendu d'origine de l'attribut border des navigateurs. */
.k-entry--legacy table[border="2"],
.k-entry--legacy table[border="3"],
.k-entry--legacy table[border="5"],
.k-entry__content table[border="2"],
.k-entry__content table[border="3"],
.k-entry__content table[border="5"] {
	border-collapse: separate !important;
	border-spacing: 0 !important;
	border: 4px ridge #b7b29f !important;
	box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2) !important;
}
/* Boites de chant (border 5) : largeur UNIFORME d'origine (90 %), centree,
 * pour que tous les chants aient le meme cadre quel que soit le texte. */
.k-entry--legacy table[border="5"],
.k-entry__content table[border="5"] {
	width: min(90%, 680px) !important;   /* fluide sur mobile, lisible (plafonne) sur grand ecran */
}
.k-entry--legacy table[border="2"] td,
.k-entry--legacy table[border="2"] th,
.k-entry--legacy table[border="3"] td,
.k-entry--legacy table[border="3"] th,
.k-entry--legacy table[border="5"] td,
.k-entry--legacy table[border="5"] th,
.k-entry__content table[border="2"] td,
.k-entry__content table[border="2"] th,
.k-entry__content table[border="3"] td,
.k-entry__content table[border="3"] th,
.k-entry__content table[border="5"] td,
.k-entry__content table[border="5"] th {
	border: 1px solid #d6d6d6 !important;   /* divisions internes (ex. chant) */
	padding: 10px 14px !important;
	vertical-align: top;
}

/* Cellules : police Arial / gris fonce (defaut d'origine), GRAS (td bold).
 * Sans !important sur le poids -> une cellule en font-weight:normal (libelles
 * Soliste/Choeur) reste fine. */
.k-entry--legacy table[border] td,
.k-entry__content table[border] td {
	font-family: Arial, Helvetica, sans-serif !important;
	color: #434343;
	font-weight: 700;
}

/* Cellules de chant (.Titre_Chant) : Georgia italique (prime sur Arial).
 * font-style sans !important -> les libelles (inline normal) restent droits. */
.k-entry--legacy table[border] td.Titre_Chant,
.k-entry--legacy table[border] th.Titre_Chant,
.k-entry--legacy .Titre_Chant,
.k-entry__content .Titre_Chant {
	font-family: Georgia, "Times New Roman", Times, serif !important;
	font-style: italic;
}

/* Fonds d'origine restitues a l'identique (selecteurs insensibles a la casse). */
.k-entry--legacy [bgcolor="#FBDE88" i],
.k-entry__content [bgcolor="#FBDE88" i] { background-color: #FBDE88 !important; } /* barre de titre */
.k-entry--legacy [bgcolor="#DEEBEF" i],
.k-entry__content [bgcolor="#DEEBEF" i] { background-color: #DEEBEF !important; } /* encadre-note */
.k-entry--legacy [bgcolor="#EBEBEB" i],
.k-entry__content [bgcolor="#EBEBEB" i] { background-color: #EBEBEB !important; } /* conteneur gris */
.k-entry--legacy [bgcolor="#FEFBFF" i],
.k-entry__content [bgcolor="#FEFBFF" i] { background-color: #FEFBFF !important; } /* conteneur clair */
.k-entry--legacy [bgcolor="#FFFFFF" i],
.k-entry__content [bgcolor="#FFFFFF" i] { background-color: #FFFFFF !important; } /* cellules */

/* ============================================================================
 * 5. LEGENDES PHOTO  (texte x-small) : passent sous l'image flottante au lieu
 *    de se decaler dans la colonne etroite a cote du flottant.
 * ==========================================================================*/
.k-entry--legacy span[style*="x-small" i],
.k-entry__content span[style*="x-small" i] {
	display: block;
	clear: both;
	margin-top: .3rem;
	text-align: left;
}

/* ============================================================================
 * 6. RESPONSIVE  : seules les GRILLES rythmiques deviennent defilables
 *    horizontalement sous 800 px (les encadres de prose continuent d'habiller).
 * ==========================================================================*/
@media (max-width: 800px) {
	.k-entry--legacy table[border="1"],
	.k-entry__content table[border="1"] {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		white-space: nowrap;
	}
}
