/* ============================================================
   Fiche libraire — relooking 2026
   Couleurs du site conservées :
     #0d5257 teal (marque) · #3277b3 bleu (contact)
     #BD4A4F rouge (CA)      · #1B7642 vert (groupements)
   Tout est scopé à .fiche-libraire pour ne pas impacter les autres pages.
   ============================================================ */

.fiche-libraire {
	--fl-brand: #13787f;      /* teal du menu (datalib) - bas du dégradé */
	--fl-brand-dark: #0d5257; /* teal foncé du menu - haut du dégradé / hover */
	--fl-info: #3277b3;
	--fl-money: #BD4A4F;
	--fl-group: #1B7642;
	--fl-line: #e9ecef;
}

/* --- Lien retour vers la liste --- */
.fiche-libraire .fiche-retour { margin-bottom: 12px; }

/* --- Panneaux transformés en "cartes" --- */
.fiche-libraire .panel {
	border: none;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
	overflow: hidden;
	margin-bottom: 18px;
	background: #fff;
}

/* En-têtes de panneaux : teal de marque + texte blanc */
.fiche-libraire > .panel > .panel-heading,
.fiche-libraire .panel-primary > .panel-heading {
	background: linear-gradient(to bottom, var(--fl-brand-dark) 0%, var(--fl-brand) 100%);
	color: #fff;
	border: none;
	padding: 12px 18px;
}
.fiche-libraire .panel-primary { border: none; }
.fiche-libraire .panel-heading b,
.fiche-libraire .panel-title,
.fiche-libraire .panel-title b {
	color: #fff;
	font-weight: 700;
	letter-spacing: .3px;
}

/* --- Étiquettes & valeurs --- */
.fiche-libraire .control-label {
	font-weight: 600;
	font-size: 13px;
	padding-top: 7px;
}
.fiche-libraire .form-group span b {
	color: #222;
	font-size: 15px;
}

/* --- Lignes & espacements --- */
.fiche-libraire .form-group {
	margin-bottom: 10px;
	padding: 4px 6px;
	border-radius: 6px;
	transition: background-color .15s ease;
}
.fiche-libraire .form-group:hover {
	background: rgba(13, 82, 87, .04);
}
.fiche-libraire hr {
	border-top: 1px solid var(--fl-line);
	margin: 14px 0;
}

/* Sous-titres de section ("Répartition du C.A.", "Groupements...") :
   barre verticale colorée (reprend la couleur inline du label) */
.fiche-libraire label u {
	display: inline-block;
	text-decoration: none;
	border: none;
	border-left: 4px solid currentColor;
	padding: 2px 0 2px 10px;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 12px;
	letter-spacing: .6px;
}

/* --- Carte Google Maps & image --- */
.fiche-libraire #map {
	height: 300px;
	border-radius: 12px;
	border: 1px solid #e3e6ea;
}
.fiche-libraire .single-item img {
	border-radius: 12px;
	max-width: 100%;
	height: auto;
}

/* --- Champs en mode édition --- */
.fiche-libraire .form-control {
	border-radius: 8px;
	border: 1px solid #d6dbe0;
	box-shadow: none;
	padding: 8px 12px;
	height: auto;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.fiche-libraire .form-control:hover { border-color: #b9c2cb; }
.fiche-libraire .form-control:focus {
	border-color: var(--fl-brand);
	box-shadow: 0 0 0 3px rgba(19, 120, 127, .20);
	outline: none;
}
/* input-group en bloc : les champs adresse s'empilent proprement */
.fiche-libraire .input-group { width: 100%; display: block; }
.fiche-libraire .input-group .form-control { margin-bottom: 6px; }
.fiche-libraire .input-group .form-control:last-child { margin-bottom: 0; }

/* Zone de dépôt d'image */
.fiche-libraire #dropfile {
	width: 100%;
	height: 50px;
	border: 3px dashed #BBBBBB;
	line-height: 50px;
	text-align: center;
	margin: 10px 0;
	border-radius: 8px;
	color: #888;
}

/* --- Boutons : teal de marque --- */
.fiche-libraire .btn-primary {
	background: var(--fl-brand);
	border-color: var(--fl-brand);
	border-radius: 8px;
	font-weight: 600;
}
.fiche-libraire .btn-primary:hover,
.fiche-libraire .btn-primary:focus {
	background: var(--fl-brand-dark);
	border-color: var(--fl-brand-dark);
}

/* --- Boutons d'action (géocodage, calcul manuel) : couleur du menu --- */
.fiche-libraire .btn-success {
	background: var(--fl-brand);
	border-color: var(--fl-brand);
	border-radius: 8px;
	font-weight: 600;
}
.fiche-libraire .btn-success:hover,
.fiche-libraire .btn-success:focus {
	background: var(--fl-brand-dark);
	border-color: var(--fl-brand-dark);
}
.fiche-libraire .fiche-geocode {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin: 6px 0 2px;
}
/* "Calcul manuel" est un lien stylé en bouton : on garde le texte blanc du bouton */
.fiche-libraire .fiche-geocode .btn,
.fiche-libraire .fiche-geocode .btn:hover,
.fiche-libraire .fiche-geocode .btn:focus { color: #fff; text-decoration: none; }

/* --- Finitions --- */
/* Corps de carte plus aéré */
.fiche-libraire .panel-body { padding: 18px 20px; }
.fiche-libraire .panel-primary > .panel-heading { padding: 14px 20px; }
.fiche-libraire .panel-title { font-size: 18px; }
.fiche-libraire .form-group { margin-bottom: 12px; }

/* Carte & photo : ombre douce */
.fiche-libraire #map { box-shadow: 0 2px 10px rgba(0, 0, 0, .10); }
.fiche-libraire .single-item img { box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }

/* Bouton "Valider les modifications" = action d'enregistrement, en vert */
.fiche-libraire button[name="rech_complet"] {
	background: var(--fl-brand);
	border-color: var(--fl-brand);
	padding: 12px;
	font-size: 15px;
	box-shadow: 0 2px 8px rgba(13, 82, 87, .30);
}
.fiche-libraire button[name="rech_complet"]:hover,
.fiche-libraire button[name="rech_complet"]:focus {
	background: var(--fl-brand-dark);
	border-color: var(--fl-brand-dark);
}

/* Bouton "Modifier la fiche" : un peu d'air autour de l'icône */
.fiche-libraire button[name="modif_fiche"] { padding: 8px 18px; }

/* Neutralise le rendu vert "has-success" hérité en mode consultation */
.fiche-libraire .has-success .form-control-feedback,
.fiche-libraire .has-feedback .form-control-feedback { display: none; }

/* --- Gestion des images (mode édition) --- */
.fiche-libraire .fiche-images-manage { margin-bottom: 14px; }
.fiche-libraire .fiche-upload {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}
/* Input fichier natif masqué : un <label> stylé en bouton sert de déclencheur */
.fiche-libraire .fiche-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
}
.fiche-libraire .fiche-upload label.btn { margin: 0; cursor: pointer; }
.fiche-libraire .fiche-file-name {
	font-size: 12px;
	color: #555;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.fiche-libraire .fiche-upload-hint { font-size: 11px; color: #6c757d; margin: -4px 0 10px; }
.fiche-libraire .fiche-img-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	gap: 8px;
}
.fiche-libraire .fiche-img-thumb {
	position: relative;
	border: 1px solid #e3e6ea;
	border-radius: 8px;
	overflow: hidden;
	background: #f8f9fa;
}
.fiche-libraire .fiche-img-thumb img {
	width: 100%;
	height: 80px;
	object-fit: cover;
	display: block;
}
.fiche-libraire .fiche-img-del {
	position: absolute;
	top: 4px;
	right: 4px;
	padding: 0 7px;
	line-height: 19px;
	font-weight: 700;
	border-radius: 50%;
	opacity: .9;
}
.fiche-libraire .fiche-img-del:hover { opacity: 1; }

/* --- Impression --- */
@media print {
	.fiche-libraire .panel { box-shadow: none; border: 1px solid #ccc; }
	.fiche-libraire .form-group:hover { background: none; }
	.fiche-libraire #map, .fiche-libraire .single-item img { box-shadow: none; }
}
