@import url('https://fonts.cdnfonts.com/css/omnes-2');
html, body {
	padding: 0;
	margin: 0;
	overflow: hidden;
	height: 100%;
}

body {
	background: #000000;
	color: white;
}

html, body, canvas {
	touch-action-delay: none;
	touch-action: none;
}

canvas, .c3htmlwrap {
	position: absolute;
}

.c3htmlwrap {
	contain: strict;
}

.c3overlay {
	pointer-events: none;
}

.c3htmlwrap[interactive] > * {
	pointer-events: auto;
}

/* HACK - work around elements being selectable only in iOS WKWebView for some reason */
html[ioswebview] .c3htmlwrap,
html[ioswebview] canvas {
	-webkit-user-select: none;
	user-select: none;
}

html[ioswebview] .c3htmlwrap > * {
	-webkit-user-select: auto;
	user-select: auto;
}

#notSupportedWrap {
	margin: 2em auto 1em auto;
	width: 75%;
	max-width: 45em;
	border: 2px solid #aaa;
	border-radius: 1em;
	padding: 2em;
	background-color: #f0f0f0;
	font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
	color: black;
}

#notSupportedTitle {
	font-size: 1.8em;
}

.notSupportedMessage {
	font-size: 1.2em;
}

.notSupportedMessage em {
	color: #888;
}

/* bbcode styles */
.bbCodeH1 {
	font-size: 2em;
	font-weight: bold;
}

.bbCodeH2 {
	font-size: 1.5em;
	font-weight: bold;
}

.bbCodeH3 {
	font-size: 1.25em;
	font-weight: bold;
}

.bbCodeH4 {
	font-size: 1.1em;
	font-weight: bold;
}

.bbCodeItem::before {
	content: " • ";
}

/* For text icons converted to HTML: size the height to the line height
   preserving the aspect ratio. Also add position: relative as that allows
   just adding a 'top' style for the iconoffsety style. */
.c3-text-icon {
	height: 1em;
	width: auto;
	position: relative;
}

/* screen reader text */
.c3-screen-reader-text {
	position: absolute;
	width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}
.rotate-notification{
	display:none;
	z-index: 999999;
	background-color: black;
	width: 100%;
	height: 100vh;
	position: fixed;
	top: 0;
	left: 0;
	}
	
	.rotate-notification img{
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 150px;
	}
	
	@media (orientation: landscape) and (max-width: 1024px){
	body.is-touchdevice .rotate-notification{
	display: block;
	}
	}
	  
	  .notif {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		margin: 5rem auto;
    position: absolute;
    width: 100%;
	  }
	.phone {
		height: 50px;
		width: 100px;
		border: 3px solid white;
		border-radius: 10px;
		animation: rotate 1.5s ease-in-out infinite alternate;
		/* display: none; */
	  }
	  
	  .message {
		color: white;
		font-size: 1em;
		margin-top: 40px;
		/* display: none; */
	  }
	  
	  @keyframes rotate {
		0% {
			  transform: rotate(0deg)
		  }
		  50% {
			  transform: rotate(-90deg)
		  }
		  100% {
			  transform: rotate(-90deg)
		  }
	  }
	  
	  @media only screen and  (orientation: landscape) {
		.phone, .message {
		  display: none !important;
		  
		}
}

/* Style pour le certificat */
.certificate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    /*padding: 10px 20px;*/
    position: relative;
    z-index: 2;
}

.cert-title-logo {
    height: 60px;
    object-fit: contain;
}

.cert-main-logo {
    height: 80px;
    object-fit: contain;
}

.certificate {
    background: white;
    padding: 40px;
    border: 15px solid #5EB030;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
}

.decorative-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.decor-item {
    position: absolute;
    z-index: 1;
    overflow: hidden;
}

.decor-item img {
    max-width: 100%;
    height: auto;
}

.cloud {
    opacity: 0.8;
}
/* Ajustement pour l'impression */
@media print {
    .certificate-header {
        border-bottom-color: #5EB030 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Style pour les logos */
.logo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    /*padding: 10px;*/
}

.title-logo {
    height: 20vh;
    object-fit: contain;
}

.main-logo {
    height: 20vh;
    object-fit: contain;
}

/* Ajustements du formulaire existant */
.kids-form {
    background-image: radial-gradient(#FFFFFF,#A9C810,#5EB030);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.form-title h1 {
    margin-top: 0;
    color: #5EB030;
    text-align: center;
}

/* Style pour le formulaire enfants */
.certificate-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #ffd700, #ff69b4);
    padding: 20px;
}

.kids-form {
    background-image: radial-gradient(#FFFFFF,#A9C810,#5EB030);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.form-title {
    margin-bottom: 30px;
}

.form-logo {
    width: 150px;
    margin-bottom: 15px;
}

.kids-form h1 {
    color: #ff6b6b;
    font-size: 2em;
    margin-bottom: 20px;
    font-family: 'Comic Sans MS', cursive;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 1.2em;
    font-family: 'Comic Sans MS', cursive;
}

.input-group input {
    width: 95%;
    padding: 12px;
    border: 3px solid #ffd700;
    border-radius: 10px;
    font-size: 1.1em;
    font-family: 'Comic Sans MS', cursive;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: #ff69b4;
    outline: none;
}

.submit-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2em;
    font-family: 'Comic Sans MS', cursive;
    cursor: pointer;
    transition: transform 0.3s;
}

.submit-btn:hover {
    transform: scale(1.05);
}

/* Style pour le certificat */
.certificate-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    padding-top: 0px !important;
    background-image: radial-gradient(#FFFFFF,#A9C810,#5EB030);
    overflow: hidden;
    position: relative;
}

.certificate {
    background-image: radial-gradient(#FFFFFF,#A9C810,#5EB030);
    padding: 40px;
    padding-top: 0px !important;
    border: 15px solid #ffd700;
    border-radius: 20px;
    text-align: center;
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 2;
    overflow: hidden;
    margin-bottom: 50px;
}

.certificate-logo {
    width: 200px;
    margin-bottom: 20px;
}

.certificate h1 {
    color: #00572b;
    font-size: 1.5em;
    margin-bottom: 10px;
    font-family: 'Omnes', cursive;
    font-weight: bold;
    margin: 0px !important;
}

.congratulation-text {
    font-size: 4.5em;
    color: #00572b;
    margin-bottom: 10px;
    font-family: 'Omnes', cursive;
    font-weight: 900;
    margin: 0px !important;
}

.student-name {
    font-size: 2em;
    color: #4CAF50;
    font-weight: bold;
    margin: 20px 0;
    font-family: 'Omnes', cursive;
}

.achievement-text {
    font-size: 1.1em;
    color: #00572b;
    margin-bottom: 10px;
    font-family: 'Omnes', cursive;
    font-weight: 600;
    width: 60%;
    margin: 0 auto;
}

.date {
    font-style: italic;
    color: #00572b;
    margin-top: 10px;
    font-family: 'Omnes', cursive;
}

.certificate-actions {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.2);  /* Réduction de l'opacité */
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    backdrop-filter: blur(8px);  /* Augmentation de l'effet de flou */
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);  /* Ajout d'une bordure subtile */
    animation: slideUp 0.3s ease-out;
}

/* Ajout d'un effet hover */
.certificate-actions:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 1em;
    font-family: 'Omnes', cursive;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #00572b;
    color: white;
}

@media (orientation: landscape) and (max-height: 450px) {
    .certificate-actions {
        bottom: 10px;
        padding: 10px 15px;
    }

    .action-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

@supports (-webkit-touch-callout: none) {
    .certificate-actions {
        bottom: env(safe-area-inset-bottom, 20px);
    }
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@media print {
    .certificate-actions {
        display: none;
    }
    
    .certificate-container {
        background: none;
    }
}

/* Ajustements responsives pour le formulaire */
.certificate-form-container {
    padding: 10px;
    min-height: calc(100vh - 20px);
}

.kids-form {
    padding: 20px;
    width: 90%;
    max-width: 500px;
    margin: 10px auto;
}

.logo-header {
    flex-direction: column;
    gap: 15px;
}

.title-logo, .main-logo {
    height: 15vh;
    max-height: 100px;
}

.input-group input {
    font-size: 16px; /* Évite le zoom sur mobile */
}

/* Ajustements responsives pour le certificat */
.certificate {
    padding: 40px;
    width: 90%;
    border-width: 10px;
    margin: 10px auto;
}

/* Media Queries */
@media screen and (max-width: 480px) {
    .kids-form {
        padding: 15px;
    }
    
    .form-title h1 {
        font-size: 1.5em;
    }
    
    .input-group label {
        font-size: 1em;
    }
    
    .input-group input {
        padding: 8px;
    }
    
    .submit-btn {
        padding: 10px 20px;
        font-size: 1em;
    }
    
    .certificate h1 {
        font-size: 1.8em;
    }
    
    .student-name {
        font-size: 1.5em;
    }
    
    .achievement-text {
        font-size: 1.1em;
    }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    .logo-header {
        flex-direction: row;
    }
    
    .title-logo, .main-logo {
        height: 12vh;
    }
    
    .certificate h1 {
        font-size: 2em;
    }
}

@media screen and (min-width: 769px) {
    .certificate-form-container {
        padding: 30px;
    }
    
    .kids-form {
        padding: 40px;
    }
    
    .logo-header {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .title-logo, .main-logo {
        height: 18vh;
    }
}

/* Ajustements pour l'orientation */
@media (orientation: landscape) and (max-height: 600px) {
    .logo-header {
        flex-direction: row;
    }
    
    .title-logo, .main-logo {
        height: 10vh;
    }
    
    .form-title h1 {
        font-size: 1.5em;
        margin: 10px 0;
    }
    
    .input-group {
        margin-bottom: 10px;
    }
}

/* Ajustements pour l'impression */
@media print {
    .certificate {
        border-width: 15px !important;
        padding: 40px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }
    
    .certificate h1 {
        font-size: 28pt !important;
    }
    
    .student-name {
        font-size: 24pt !important;
    }
    
    .achievement-text {
        font-size: 16pt !important;
    }
    
    .date {
        font-size: 14pt !important;
    }
}

/* Ajustements pour le conteneur du formulaire */
.certificate-form-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Style pour le formulaire */
.kids-form {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    background-image: radial-gradient(#FFFFFF,#A9C810,#5EB030);
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

/* Media queries pour le mode paysage */
@media (orientation: landscape) {
    .certificate-form-container {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .kids-form {
        margin: 20px auto;
    }

    .logo-header {
        flex-direction: row;
        gap: 20px;
    }

    .title-logo, .main-logo {
        height: 8vh;
        min-height: 80px;
        max-height: 160px;
    }

    .form-title h1 {
        font-size: 1.5em;
        margin: 10px 0;
    }

    .input-group {
        margin-bottom: 10px;
    }

    .input-group label {
        font-size: 0.9em;
    }

    .input-group input {
        padding: 8px;
    }

    .submit-btn {
        padding: 8px 20px;
        font-size: 0.9em;
    }
}

/* Ajustements pour très petits écrans en paysage */
@media (orientation: landscape) and (max-height: 400px) {
    .certificate-form-container {
        align-items: flex-start;
    }

    .kids-form {
        padding: 15px;
    }

    .title-logo, .main-logo {
        height: 6vh;
        min-height: 80px;
    }
}

/* Media query pour l'impression */
@media print {
    @page {
        size: landscape;
    }
    .decorative-elements {
        display: block !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .decor-item {
        position: absolute !important;
    }
}

.certificate-bg {
    background-image: url('../../assets/certificate/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Ajustement pour l'impression */
@media print {
    .certificate-bg {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

.certificate-overlay {
    position: absolute;
    top: 10%;  /* Ajusté pour laisser de l'espace en haut */
    left: 10%;  /* Ajusté pour laisser de l'espace à gauche */
    right: 10%;  /* Ajusté pour laisser de l'espace à droite */
    bottom: 10%;  /* Ajusté pour laisser de l'espace en bas */
    background: rgba(255, 255, 255, 0.85);
    border-radius: 15px;
    z-index: 1;
}

/* Ajuster la position des images d'angle */
.corner-image {
    position: absolute;
    width: 150px;
    height: auto;
}

.bottom-left {
    bottom: -10px;
    left: -10px;
    transform: rotate(-5deg);
}

.bottom-right {
    bottom: -10px;
    right: -10px;
    transform: rotate(5deg);
}

.top-right {
    top: -10px;
    right: -10px;
    transform: rotate(10deg);
    width: 100px;
}

/* Ajustement pour l'impression */
@media print {
    .certificate-overlay {
        margin: 40px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Ajuster le z-index du contenu pour qu'il soit au-dessus de l'overlay */
.certificate-content {
    position: relative;
    z-index: 2;
}

/* Assurer que les images s'impriment correctement */
@media print {
    .certificate-overlay {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .corner-image {
        position: absolute !important;
    }
}

/* Ajouter ces styles */
.curved-text {
    width: 100%;
    height: 100px;
    margin: 10px 0;
}

.curved-text svg {
    width: 100%;
    height: 100%;
}

.congratulation-text {
    font-family: 'Omnes', cursive;
    font-size: 2.8em;;
    fill: #00572b;
    font-weight: bold;
}

/* Ajustement pour l'impression */
@media print {
    .curved-text {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}