/* reset ultra-light */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* reset.css minimal */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 block elements */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}

/* Body defaults */
body {
  line-height: 1;
}

/* Lists sans puces */
ol, ul {
  list-style: none;
}

/* Quotes sans styles */
blockquote, q {
  quotes: none;
}
blockquote::before, blockquote::after,
q::before, q::after {
  content: '';
  content: none;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}



/* styles */

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid #ccc;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s ease-in-out infinite;
  margin: 100px auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}



body {
	-webkit-text-size-adjust: none;
	scroll-margin-top: 135px;
	color:#333;
	font-family:Arial, Helvetica, sans-serif;
	}

.erreurIA {
    color: red;
}

.erreur {
    border-bottom: 2px solid red;
}

.okIA {
    /*color: green;*/
}

#zonePrincipale {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
	align-content: flex-start;
}

#zoneSelectionIA {
    font-family:Arial, Helvetica, sans-serif;

}

#zoneSelectionIA > div > div {
    font-size: 1.1em !important;
      margin: 5px 0px !important;
}

#zoneSelectionIA p {
    color: #ffffffb2;
    padding: 5px;
    font-size: 0.85em;
}

#IAredaction,
#IAtrad,
#IAgenImage,
#IAconversation {
    width:25%;
    margin: 10px 30px !important;
	width: auto;
}

#sourceTradIA {
    min-height: 100px !important;
    max-height: 350px !important;
    overflow-y: auto
}

#XresultatTradIA {
    white-space: pre-wrap;
    margin-top: 10px;
}

.titreZoneResultat {
    width: 100%;
    font-size: 1.2em;
    letter-spacing: -0.5px;
    color: #fff;
    background-color: #44444496;
    padding: 10px;
}

.masqueZonePrincipaleIA {
    display: none !important;
}

.afficheZonePrincipaleIA {
    display: flex !important;
}

#contenuIAtrad,
#contenuIAredaction,
#contenuIAimage,
#contenuIAchat {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: flex-start;
    width: 100%;
}

#contenuIAredaction {
    background-color:#ccc2
}

#btnTradActionsIA {
    display: none;
}

#barreAudioIA {
    width: 100%;
    display: none;
}

#barreAudioIA audio {
    width: 100%;
    display: block;
}

.toggleIA {
    border: 2px solid transparent;
}


/* IAredaction */
#IAgauche_index #IAdescription_index,
#IAgauche_index #IAaction_index,
#IAoptionsFields_index #IAajouts_index {
    min-height: 55px !important;
    overflow-y: auto;
}

#IAcorps_index,
#IAcorps_image,
#IAcorps_trad,
#IAcorps_chat {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    background-color: #ccc2;
    height: auto;
    padding: 10px;
}

#IAcorps_index > div,
#IAcorps_image > div {
    flex: 1; /* Chaque colonne prend 1 part égale */
}

#IAgauche_index,
#IAcentre_index,
#IAdroite_index {
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
}

#IAdroite_index {
    padding: 0px;
	margin-top: 10px;
}

#IAgenererColonne_index,
#IAcentre_image {
    background-color: #cccccc6b;
    flex-grow: 0 !important;
    padding: 10px;
	display: flex;
	align-items: center;
}

#IAcentre_index,
#IAdroite_image,
#IAtradZoneDroite {
    background-color:#fff;
    border: 4px solid #ccc;
}

#IAtradZoneDroite {
    height: 100%;
}

#IAtradZoneDroite.zoneTraduction {
    padding: 10px;
    height: auto;
}

#IAdroite_index {
    border: none;
}

#XresultatIA_index {
    padding: 10px;
    margin-top: 10px;
}

#XResImageIA {
    margin-top: 10px;
}

#XResImageIA img {
    max-width: 100%;
    height: auto;
    display: block;
}

#XresultatIA_index p {
    padding: 4px 0px;
    line-height: 140%;
}

#XaffinageIA_index {
    margin-top: 15px;
    line-height: 140%;
    color: #777;
    padding: 10px;
	background-color: #fff;
}

#XaffinageIA_index ul {
    padding-left: 20px;
    list-style-type: disc;
}

#XaffinageIA_index li {
    margin-bottom: 8px;
    line-height: 1.4em;
}

#zoneActionsPlus_index {
    width: 100%;
    display: flex;
    justify-content: space-around;
}

#zoneActionsPlus_index div {
    border: 1px solid #fff;
    padding: 10px;
}

#IAoptionsFields_index {
    flex-direction: column;
	display:flex;
	font-size:0.8em;
}

.imageAffichee {
    background-color: transparent !important;
    border: none !important;
}

#IAparam_chat {
    width: 33.3%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#IAzoneChat {
    width: 66.6%;
    display: flex;
    flex-direction: column;
}

#zoneDiscussionIA {
    background-color: #aaa5;
    padding: 10px 30px;
    min-height: 350px;
    overflow-y: auto;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#zoneDiscussionIA p {
    margin: 4px 0;
    line-height: 1.5em;
}

#IAmessageChat {
    min-height: 55px !important;
    max-height: 295px !important;
    overflow-y: auto
}

.messageIA {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
}

.messageIA.user {
    background-color: #d9f3f7;
    color: #003c48;
    align-self: flex-start;
    text-align: right;
    border-bottom-left-radius: 0px;
}

.messageIA.ia {
    background-color: #f7efe5;
    color: #73163f;
    align-self: flex-end;
    text-align: left;
    border-bottom-right-radius: 0px;
}

.messageIA.nouveau {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInMessage 0.3s ease-out forwards;
}

@keyframes fadeInMessage {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media only screen and (max-width: 1024px) {
    #IAcorps_index {
        flex-wrap: wrap;
    }

    #IAgauche_index,
    #IAcentre_index,
    #IAdroite_index {
        width: 100% !important;
    }
}



/* ANCIEN POPUP */

#overlay {
    background-color: #0008;
    height: 100%;
    width: 100%;
    position: absolute;
    z-index: 1500;
    top: 0;
    left: 0;
position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#bdlgIA {
  position: fixed; /* Clé pour ignorer le scroll */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Centrage parfait */
  
    border: 1px solid #999;
    box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.3);
    background-color: #fff;
    border-radius: 5px;
    z-index: 2000;
    width: 90vw;
    height: 87vh;
    overflow-y: auto;
    margin: auto;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}


.masquebdlg, .masqueoptions { display:none !important; }
.affichebdlg, .afficheoptions { display:flex !important; }


#IATitre { position:absolute; left:20px;}
#IAFerme {position: absolute;right: 10px;}

#IAentete {
    background-color: #077b88;
    position: fixed;
    height: 50px;
    padding: 7px;
    color: #fff;
    width: inherit;
    z-index: 10;
    box-shadow: 0px 4px 10px #00000096;
}

#IAcorps {
    display: flex;
    height: calc(90vh - 74px); /* 50px entête + 24px pied */
    margin-top: 50px; /* espace pour l'entête */
    overflow: hidden;
    background-color:#ccc2
}

#IApied {
    background-color:rgb(71, 71, 71);
    position: absolute;
    bottom: 0;
    height: 24px;
    padding: 7px;
    color: #fff;
    width: inherit;
    z-index: 10;
}

#IAgauche, 
#IAcentre,
#IAdroite { 
    position: relative;
    border:1px solid #ccc;
    margin: 2px;
    padding: 20px;
    box-sizing: border-box;
    height: 95%;
    overflow-x: hidden;
    overflow-y: auto;
}

#IAgauche {
    margin: 20px;
    width:45%;
}

#IAcentre {
    border:4px solid #ccc;
    width: 45%;
}

#IAdroite { 
  overflow-y: auto;
  width: 40%;
  border: none;
}

#XresultatIA { padding: 10px; margin-top: 10px; }

#XresultatIA p { padding: 4px 0px 4px 0; line-height: 140%; }

#XaffinageIA { margin-top: 15px; line-height: 140%; color: #777; }

#zoneActionsPlus { width:100%; display: flex;  justify-content: space-around; }

#zoneActionsPlus div { border:1px solid #ccc; padding: 10px; }

#IAoptionsFields {
    position: relative;
    background-color: transparent;
    border: none;
    box-shadow: none;
    flex-direction: column;
}

#XaffinageIA ul {
    padding-left: 20px;
    list-style-type: disc;
}

#XaffinageIA li {
    margin-bottom: 8px;
    line-height: 1.4em;
}



@media only screen and (max-width: 768px) 
{
    #IAcorps {
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        height: calc(90vh - 100px); /* 50px entête + 50px pied */
        margin-top: 50px; /* espace pour l'entête */
    }

    #IAgauche,#IAcentre,#IAdroite { width: 100% !important; }
}



/* Palette dorée + hover bleu */
:root{
  --or:        #a67c3d;  /* base doré */
  --fond-card:#2791bb;  /* fond carte = doré */
  --fond-card-hover: #055c6f; /* hover = bleu */
  --fond:#055c6f; --fond-fonce:#044f5f; --rose:#b3005d; --bord:#ff8f00; 
}

    /* Layout général */
    #wrap{
		display:flex; 
		flex-direction:column; 
		min-height:100vh;
	}

		#header, #footer { flex: 0 0 auto; }

	    #corp{ 
			min-height:0;   /* ⚠️ indispensable pour autoriser le scroll interne */
			overflow:hidden;
			width:100%; 
			display: flex; 
			flex: 1;
		}

			#gauche {   
				flex:0 0 20%;   /* largeur fixe, ne rétrécit pas */
				overflow:hidden;/* pas de scroll dans la colonne gauche */
				width: 20%;  background-color: #eee;
			}
			
			#droite { 
				width:80%;
				flex:1 1 auto;  /* prend le reste */
				min-width:0;    /* ⚠️ évite les débordements en flex */
				min-height:0;   /* ⚠️ nécessaire pour le scroll (Firefox/Chrome) */
				padding:24px 16px;
				overflow:auto;  /* 👈 seul ce panneau scrolle */
			}

p { margin: 10px 0px 10px 0px;}

    /* Classes d'affichage/masquage communes aux fichiers inclus */
    .afficheZonePrincipaleIA{ display:block !important; }
    .masqueZonePrincipaleIA{ display:none !important; }

    /* Footer */
    #footer{ margin-top:auto; background:#444; color:#aaa; padding:10px 16px; font-size:.8em;}

    /* Petites aides visuelles */
    .erreur{ outline:2px solid #d32f2f; background:#ffecec; }

    #header{background:var(--fond); color:#fff; padding:10px 24px; display:flex; align-items:center; justify-content:space-between;}
    #header .titre{font-weight:600; letter-spacing:.2px; text-align: center;}

	#header .lienHeader { color:#fffa; padding: 5px 10px;  border-radius: 5px;}
	#header .lienHeader:hover { color:#fff; cursor:pointer; background-color: #0005;  }

    /* Bloc intro centré */
    .introMerlin{ text-align:center; margin: 20px 0 20px 0px; }
    .introMerlin img{ width:140px; height:auto; opacity:.95 }
    .introMerlin .nom{ margin-top:8px; font-weight:600; color:#444 }

.lienRetourAccueil { display:block; text-decoration:none; color:#fffc; font-weight: 600;  letter-spacing: .2px;}
.lienRetourAccueil:hover {color:#fff}

.lienTester {display: flex;
  font-size: 0.8em !important;
  text-decoration: none;
  padding: 2px 10px;
  color: #fff;
  background-color: #cab780;
  border-radius: 5px;
  margin-top: auto;
  margin-left:auto;
  text-align: center;
  width: fit-content;
  
}

.lienTester:hover {
  color: #fff;
  background-color: #777;
  border-radius: 0px;
  }

.lienTester:hover:after {
	content:'  >';
  }

#texteAccueil {
	font-size: 1.2em;
	line-height: 140%;
	padding: 4vh 5vw;
}


#intro-ia-title { font-size:1.6em; margin-bottom:1vh;   line-height: 115%; color:#055c6f;}


.intro-ia__points {
    list-style: none;
    margin: 0 0 1rem 0;
    padding: 0;
	display: flex;
}

  .intro-ia__points li {
border: 1px solid #eee;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  width: 50%;
  background-color: #f4f4f4;
  margin: 5px;
  font-size:0.8em;
  }

  .intro-ia__points li > span { font-size: 1.2rem; line-height: 1.2; }

  .intro-ia__points strong { color: var(--muted); font-weight: bold; }

strong { font-weight:bold; color:#000;}

/* Cartes dorées */
.carteIA{
  background: var(--fond-card);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.10);
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
  text-align: center;
}

/* Texte des cartes en blanc */


/* Icône + libellé alignés / centrés sur la même ligne */
.carteIA .lib{
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  color:#fff;
}

/* Icône centrée */
.carteIA img.icoAPI{
  width: 24px;
  height: 24px;
}

/* Hover : bleu */
.carteIA:hover{
  background: var(--fond-card-hover);
  border-color: var(--fond-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

/* État actif = bleu */
.carteIA.actif{
  background: #fa0;
  border-color: var(--fond-card-hover);
  box-shadow: 0 0 0 4px rgba(5,92,111,.25), 0 8px 20px rgba(0,0,0,.18);
}

/* Barre “Retour” : occupe toute la ligne + bouton à droite */
.barRetourIA{
  flex: 0 0 100%;      /* ← force la barre à prendre toute la largeur de la ligne */
  width: 100%;
  display: flex;
  justify-content: flex-end; /* ← pousse le bouton à droite */
  align-items: center;
  background: #fff;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 6;
}

/* Bouton */
.btnRetourIA{
  padding: 6px 10px;
  border: 1px solid var(--or, #a67c3d);
  background: #fff;
  cursor: pointer;
  border-radius: 6px;
}
.btnRetourIA:hover{ background:#f5f5f5; }

/* Spécifique IAredaction : barre bien blanche au-dessus du fond gris */
#contenuIAredaction > .barRetourIA { background:#fff; }

#introMerlin.masqueIntro {
  display: none !important;
}


 /* bouton */
 
 .btn {
	cursor:pointer;
	border-radius:3px !important;
	
	background:linear-gradient(to bottom,  rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 100%);
	padding: 8px 10px !important;
	box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25) inset ;
	text-decoration:none !important;

}

.btn:hover {
	border-radius:5px !important;
	background:linear-gradient(to bottom,  rgba(255,255,255,0) 0%, rgba(255,255,255,0) 100%);
	box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.25) ;
	opacity: 1 !important;
}


.btnMerlin {
    background-color: #f4c554 !important;
    color: #000 !important;
    border-radius: 5px !important;
    padding: 8px 10px !important;
    margin: 2px !important;
    display: inline-block;
}

.rose {
    background-color: #de0576    !important;
    color: #FFF !important;
    border-radius: 5px !important;
    padding: 8px 10px !important;
    margin: 2px !important;
    display: inline-block;
	width: max-content;
}


.btnOrange:hover{ 
color: #f60;
text-decoration:none;
transition:all 0.25s ease 0s;}

.orange {
	background-color: #F60 !important;
	color:#FFF !important;
	border-radius:5px !important;
	padding: 8px 10px !important;
	margin:2px !important;
		display:inline-block;
}

.label {
	display: block;
	font-size: 0.8em;
	color: #777;
	margin: 7px 0;
}

.labelligne {
  display: inline-block;
  width: 160px;
  color: #777;
}

.textareaPrompt { padding: 16px;
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  line-height: 140%;
  height:150px !important;
font-size: 1.3em;
  color: #2b84e2;
  font-weight: bold;
}

select {
	background-color: #fff !important;
	border: 1px solid #b8bcad;
	border-radius: 3px;
	color: #222 !important;
	display: inline-block;
	font-size: 15px;
	font-weight: bold;
	padding: 5px 10px;
	width: 100%;
}
input {
	background-color: #fff !important;
	border: 1px solid #b8bcad;
	border-radius: 3px;
	color: #222 !important;
	display: inline-block;
	font-size: 15px;
	font-weight: bold;
	padding: 5px 10px;
}