/* Ajouts de la nouvelle plateforme (le reste du design vient tel quel de css.css). */

/* Drapeaux ronds, comme dans l'ancien template. */
.language-selector ul li img,
.flag-round {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e5e5e5;
}
.flag-round { height: 18px; width: 18px; vertical-align: -3px; }
.language-current,
.language-option {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.language-selector ul { padding: 0; }

/* Nom de l'artiste quand aucun logo n'est encore envoyé. */
.site-name-logo {
  font-family: 'Crimson Pro', 'Tinos', serif;
  font-weight: 700;
  font-size: 26px;
  color: #212529;
  white-space: nowrap;
}

/* Contact : version ordinateur / téléphone (repris de contact.blade.php). */
@media only screen and (max-width: 768px) {
  .mobile_container { display: block; }
  .web_container { display: none; }
}
@media only screen and (min-width: 768px) {
  .web_container { display: block; }
  .mobile_container { display: none; }
  .statement-left { width: 52%; }
}

/* Intro : version ordinateur / téléphone (repris de welcome.blade.php). */
@media (max-width: 767px) {
  .web-intro { display: none; }
  .mobile-intro { display: block; }
}
@media (min-width: 768px) {
  .web-intro { display: block; }
  .mobile-intro { display: none; }
}
.bold { font-weight: bold !important; }
.underline { text-decoration: underline !important; }
.intro-body { margin: 0; overflow: hidden; }

/* Écritures de droite à gauche : les blocs alignés à droite dans le design s'inversent. */
[dir="rtl"] .captions,
[dir="rtl"] .statement-left { text-align: left !important; }
[dir="rtl"] .back-btn { right: auto; left: 10px; }

/* ------------------------------------------------ admin : champ traduisible */
.tfield { flex: 1 1 auto; min-width: 0; }
.tfield-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 2px;
}
.tfield-tab {
  position: relative;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  padding: 3px 6px 2px;
  border: 1px solid #ced4da;
  border-bottom: 0;
  background: #f8f9fa;
  color: #6c757d;
  cursor: pointer;
}
.tfield-tab.active { background: #212529; color: #fff; border-color: #212529; }
.tfield-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.tfield-dot-stale { background: #e8590c; }
.tfield-dot-copy { background: #adb5bd; }
.tfield-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 3px;
}
.tfield-translate { font-size: 12px; padding: 1px 8px; white-space: nowrap; }
.tfield-badge { font-size: 11px; color: #6c757d; }
.tfield-badge-stale { color: #e8590c; font-weight: 700; }
.tfield-badge-auto { color: #0b7285; }
.input-group > .tfield .form-control { border-radius: 0; }
.input-group.flex-nowrap > .input-group-text { align-self: flex-end; height: 38px; }

/* Menu de l'admin : pages de l'étape 2 en gris. */
#mainMenu .nav-link.nav-step2,
.menu-step2,
.category-step2 { opacity: 0.45; }
#mainMenu .btn-link.nav-link { text-decoration: none; }

/* Glisser-déposer. */
[draggable="true"] { cursor: grab; }
.dragging { opacity: 0.4; }
.category-item { min-width: 220px; max-width: 320px; }
.category-add { min-width: 260px; align-self: flex-end; }

/* Éditeur de l'intro. */
.intro-stage {
  position: relative;
  width: 100%;
  height: 560px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #f1f1f1;
  overflow: hidden;
  touch-action: none;
}
.intro-stage-mobile { width: 281px; height: 500px; margin: auto; }
.intro-handle {
  position: absolute;
  cursor: move;
  white-space: nowrap;
  user-select: none;
  outline: 1px dashed rgba(255, 255, 255, 0.7);
  padding: 0 2px;
  line-height: 1.1;
}
.intro-text-row { border-left: 2px solid #212529; padding-left: 8px; }

/* Images des œuvres. */
.image-thumbnail { position: relative; cursor: pointer; margin-bottom: 6px; }
.image-thumbnail.selected img { outline: 2px solid #212529; }
.image-thumbnail .remove-image {
  position: absolute; top: 2px; right: 2px; border: 0; background: #fff; border-radius: 50%;
  width: 22px; height: 22px; line-height: 20px; padding: 0; z-index: 2;
}
.works_zoomable { position: relative; background-color: #f1f1f1; }
.works-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #9a9a9a; }
.logo-preview { max-width: 184px; display: block; margin-bottom: 10px; }
.zoom-frame { background-color: #f1f1f1; }

/* Pages de connexion. */
.auth-box { max-width: 420px; }

/* Espace de gestion. */
.language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 4px 12px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #ced4da;
  padding: 8px;
}
.language-choice { cursor: pointer; font-size: 14px; }
.language-choice[hidden] { display: none; }

/* Codes de langue en majuscules (les boutons sont en minuscules dans le design d'origine). */
.tfield-tab { text-transform: uppercase !important; }

/* Styles repris de l'en-tête de l'ancien template (header.blade.php). */
.language-selector ul li { left: 6px; }
.language-selector ul { margin-top: 8px; }
.carousel-item.active, .carousel-item-next, .carousel-item-prev {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
@media (max-width: 767px) {
  .carousel.slide { height: 205px !important; }
}

/* Styles propres aux pages Statement et fiche d'œuvre de l'ancien template (workDetail / statement.blade.php). */
#contentArea .captions { text-align: right; }
@media only screen and (min-width: 768px) {
  #contentArea .col-md-7 { width: 52%; }
}
.linked_items h5 { margin-top: 20px; }

/* Langues en texte simple « FR | EN | DE » (à la place des drapeaux). */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  font-family: 'Arimo', sans-serif;
  font-weight: 700;
  font-size: 15px;
}
.lang-code { color: #212529; text-decoration: none !important; padding: 2px 1px; border-bottom: 2px solid transparent; }
a.lang-code:hover, .lang-button:hover { border-bottom-color: #212529; }
.lang-current { border-bottom-color: #212529; }
.lang-sep { color: #8a8d91; font-weight: 400; }
.lang-button { background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; text-transform: none !important; font: inherit; }

/* Éditeur de l'intro : barre de style unique, ligne sélectionnée, icônes de lien. */
.intro-text-row { border-left: 0; padding-left: 0; }
.intro-text-row.selected .form-control { border-color: #212529; box-shadow: inset 3px 0 0 #212529 !important; }
.intro-link-slot { width: 34px; flex: 0 0 34px; display: flex; justify-content: center; }
.intro-link { background: none; border: 0; padding: 0; cursor: pointer; }
.intro-link img { height: 26px; width: auto; }
.intro-toggle.active { background: #212529; color: #fff; }
.intro-handle-selected { outline: 2px solid #ffffff; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5); }
.tgroup > .tfield-tabs { margin-bottom: 6px; }
.tgroup-tools { justify-content: flex-start; gap: 12px; margin-top: 6px; }
.intro-toolbar { flex-wrap: nowrap !important; }
.intro-toolbar .intro-font { max-width: 190px; }
.intro-toggle { text-transform: none !important; min-width: 31px; }

/* Icônes Material Design Icons (intégrées, couleur = couleur du texte). */
.mdi { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon-btn { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; line-height: 1; }
.pdf-icon { color: #c62828; vertical-align: middle; }
.social-mdi { color: #212529; border-radius: 0 !important; }
.back-btn { color: #212529; }
.intro-link { color: #212529; }
.intro-link.active { color: #1a73e8; }
.sort-handle .mdi, a .mdi, .delete-button .mdi { color: #212529; }
.image-thumbnail .remove-image { display: flex; align-items: center; justify-content: center; color: #212529; }
.slider-container .icon-btn { color: #212529; }

/* Espace de gestion : lien d'invitation dans la liste des sites. */
.invitation-box { background: #fff8e1; border: 1px solid #f0d58a; padding: 6px 8px; margin-top: 4px; max-width: 420px; }
.invitation-link { font-size: 12px; word-break: break-all; color: #8a1c4a; }
.site-highlight > td { background: #f6f6f2 !important; }
.artist-cell { min-width: 260px; }

/* Langues du site : 3 emplacements (principale verrouillée + 2 avec recherche). */
.lang-slot { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.lang-slot .form-check-input { margin: 0; }
.lang-slot-locked .lang-slot-name { font-weight: 700; }
.lang-slot-button { background: none; border: 1px solid #ced4da; padding: 3px 8px; display: inline-flex; align-items: center; gap: 4px; text-transform: none !important; cursor: pointer; }
.lang-slot-button:hover { border-color: #212529; }
.lang-search { position: absolute; top: 100%; left: 24px; z-index: 50; background: #fff; border: 1px solid #212529; width: 270px; padding: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.lang-search-field { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.lang-options { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; }
.lang-options li[hidden] { display: none; }
.lang-options button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 4px 6px; text-transform: none !important; }
.lang-options button:hover:not(:disabled) { background: #f1f1ee; }
.lang-options button:disabled { color: #b0b0b0; cursor: not-allowed; }

/* Images : dépôt (glisser-déposer) et recadrage. */
.crop-drop {
  position: relative;
  width: 100%;
  background-color: #f1f1f1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 1px dashed #b9b9b9;
  cursor: pointer;
  overflow: hidden;
}
.crop-drop img { width: 100%; height: 100%; object-fit: contain; display: block; }
.crop-drop.drag-over { outline: 3px solid #1a73e8; outline-offset: -3px; }
.crop-hint { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #7a7a7a; font-size: 14px; padding: 8px; }
.crop-hint[hidden] { display: none; }
.crop-actions { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.crop-stage { height: 65vh; background: #f6f6f6; }
.crop-stage img { display: block; max-width: 100%; }
.intro-stage { height: auto !important; aspect-ratio: 1920 / 1080; background-size: cover !important; cursor: default; }
.intro-stage-mobile { width: 281px; aspect-ratio: 720 / 1280; }
.image-slots .works_zoomable { width: 100%; height: auto; }
.crop-field .crop-drop { max-width: 100%; }

/* Actualités : version ordinateur / téléphone (reprise de news.blade.php). */
.news-mobile { display: none; }
@media (max-width: 767px) { .news-web { display: none; } .news-mobile { display: block; } }
.news-web .carousel-inner, .news-mobile .carousel-inner { height: auto !important; }
.news-web .carousel-item img, .news-mobile .carousel-item img { width: 100%; height: auto; display: block; }

/* Liens entre contenus (admin). */
.link-chips { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.link-chips li { display: flex; align-items: center; justify-content: space-between; gap: 6px; background: #f3f3f0; padding: 2px 6px; font-size: 14px; }
.subscribers-list li { padding: 2px 0; border-bottom: 1px solid #eee; }

/* « i » à la fin des titres de blocs de l'admin */
.help-i { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; margin-left: 6px; padding: 2px; border: 0; background: none; color: #6c757d; line-height: 1; border-radius: 50%; cursor: pointer; }
.help-i:hover, .help-i:focus-visible { color: #1d1f21; outline: none; background: #f0f0f0; }

/* « Enregistré » : mention centrée sous la barre noire du menu (remplace le grand bandeau vert) */
#header { position: relative; }
.flash-saved { text-align: center; font-weight: 700; margin: 10px 0; }
#header > .flash-saved {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  margin: 0; padding: 4px 16px; background: #fff; color: #1d1f21; white-space: nowrap; z-index: 1050;
  transition: opacity .4s ease;
}
.flash-saved.is-hidden { opacity: 0; }

/* Onglets de langue + bouton « Traduire » sur la même ligne, au-dessus du champ */
.tfield-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 2px; }
.tfield-head > .tfield-tabs { margin-bottom: 0; }
.tfield-head > .tfield-tools { margin-top: 0; justify-content: flex-start; gap: 8px; }
.tgroup > .tfield-head { margin-bottom: 6px; }

/* Menu de l'admin : « Déconnexion » un peu à l'écart, pour éviter un clic par mégarde */
@media (min-width: 1200px) { #mainMenu .nav-item-logout { margin-left: 32px; } }
@media (max-width: 1199.98px) { #mainMenu .nav-item-logout { margin-top: 14px; } }

/* Newsletter : options grisées tant que la fenêtre n'est pas activée */
.newsletter-options { transition: opacity .2s ease; }
.newsletter-options.is-off { opacity: .4; pointer-events: none; user-select: none; }
